org.neuzd.Regnus
Class Regnus

java.lang.Object
  extended by org.neuzd.Regnus.Regnus

public class Regnus
extends java.lang.Object

A class that provides methods to parse a Regnus Script File.
Regnus is Copyright 2010-2011 Ryan J. Bury. All rights reserved.

Version:
1.0
Author:
neuzd

Constructor Summary
Regnus()
          Creates a Regnus class.
 
Method Summary
 boolean checkIfScriptIsValid(java.lang.String RSFFile)
          Checks if the file at the given path is a valid Regnus Script File.
 java.lang.String getRegnusSpec()
          Generates a String containing the Regnus spec version.
 java.lang.String getScriptDetails(java.lang.String RSFFile)
          Generates a String with various details about the Regnus Script File like: filename, title, content of the blurb, number of entries and number of labels.
 java.lang.String getScriptTitle()
          Generates a String containing the current script title.
 java.lang.String[] listLabels(java.lang.String RSFFile)
          Creates a String array where each member represents a label.
 java.lang.String RegnusGenerate(java.lang.String RSFFile, java.lang.String TargetLabel)
          Generates the text by evaluating a label in a Regnus Script File.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Regnus

public Regnus()
Creates a Regnus class.

Method Detail

checkIfScriptIsValid

public boolean checkIfScriptIsValid(java.lang.String RSFFile)
                             throws java.lang.Exception
Checks if the file at the given path is a valid Regnus Script File.

Parameters:
RSFFile - the absolute path of the file to be checked
Returns:
true if the file is a valid Regnus Script File, false otherwise
Throws:
java.lang.Exception

getRegnusSpec

public java.lang.String getRegnusSpec()
Generates a String containing the Regnus spec version.

Returns:
a String representing the Regnus spec version

getScriptDetails

public java.lang.String getScriptDetails(java.lang.String RSFFile)
                                  throws java.lang.Exception
Generates a String with various details about the Regnus Script File like: filename, title, content of the blurb, number of entries and number of labels.

Parameters:
RSFFile - the absolute path of a Regnus Script File
Returns:
a String containing various details about the Regnus Script File
Throws:
java.lang.Exception

getScriptTitle

public java.lang.String getScriptTitle()
Generates a String containing the current script title.

Returns:
a String containing the Regnus script title

listLabels

public java.lang.String[] listLabels(java.lang.String RSFFile)
                              throws java.lang.Exception
Creates a String array where each member represents a label.

Parameters:
RSFFile - the absolute path of the Regnus Script File
Returns:
a String array containing the various labels found in the script
Throws:
java.lang.Exception

RegnusGenerate

public java.lang.String RegnusGenerate(java.lang.String RSFFile,
                                       java.lang.String TargetLabel)
                                throws java.lang.Exception
Generates the text by evaluating a label in a Regnus Script File.

Parameters:
RSFFile - the absolute path of the Regnus Script File to be parsed
TargetLabel - the label to be evaluated
Returns:
a String representing the parsed Regnus text
Throws:
java.lang.Exception
See Also:
listLabels(String RSFFile)