|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.jape.RightHandSide
public class RightHandSide
The RHS of a CPSL rule. The action part. Contains an inner class created from the code in the grammar RHS.
| Field Summary | |
|---|---|
private byte[] |
actionClassBytes
The bytes of the compiled action class. |
private String |
actionClassClassFileName
Name of the .class file for the action class. |
private String |
actionClassJavaFileName
Name of the .java file for the action class. |
private String |
actionClassName
The name of the action class. |
private static AtomicInteger |
actionClassNumber
Cardinality of the action class set. |
private String |
actionClassQualifiedName
The qualified name of the action class. |
private StringBuffer |
actionClassString
The string we use to create the action class. |
private static String |
actionsDirName
Package name for action classes. |
private Set<String> |
blockNames
The set of block names. |
(package private) static boolean |
debug
Debug flag. |
private static boolean |
DEBUG
Debug flag |
private LeftHandSide |
lhs
The LHS of our rule, where we get bindings from. |
private String |
nl
Local fashion for newlines. |
private String |
phaseName
|
private String |
ruleName
|
private static long |
serialVersionUID
|
private SourceInfo |
sourceInfo
A list of source info object for mapping between Java and Jape. |
private static ArrayList |
tempFiles
A list of the files and directories we create. |
private Object |
theActionObject
An instance of theActionClass. |
private static Set<StackTraceElement> |
warnings
|
| Fields inherited from interface gate.jape.JapeConstants |
|---|
ALL_STYLE, APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, ONCE_STYLE, SINGLE_SPAN_BINDING |
| Constructor Summary | |
|---|---|
RightHandSide(String transducerName,
String ruleName,
LeftHandSide lhs,
String importblock)
Construction from the transducer name, rule name and the LHS. |
|
| Method Summary | |
|---|---|
void |
addBlock(String anonymousBlock)
Add an anonymous block to the action class |
void |
addBlock(String name,
String namedBlock)
Add a named block to the action class |
static void |
cleanUp()
Remove class files created for actions. |
void |
createActionClass()
Create the action class and an instance of it. |
String |
getActionClassName()
|
String |
getActionClassString()
Returns the string for the java code |
String |
getPhaseName()
|
String |
getRuleName()
|
void |
instantiateActionClass()
Create an instance of the action class. |
private void |
readObject(ObjectInputStream in)
|
void |
setPhaseName(String phaseName)
|
void |
setRuleName(String ruleName)
|
String |
shortDesc()
Create a string representation of the object. |
String |
toString()
Create a string representation of the object. |
String |
toString(String pad)
Create a string representation of the object. |
void |
transduce(Document doc,
Map<String,AnnotationSet> bindings,
AnnotationSet inputAS,
AnnotationSet outputAS,
Ontology ontology,
ActionContext actionContext)
Makes changes to the document, using LHS bindings. |
private void |
writeObject(ObjectOutputStream out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private static final boolean DEBUG
private transient Object theActionObject
private StringBuffer actionClassString
private byte[] actionClassBytes
private String actionClassName
private static String actionsDirName
private String actionClassQualifiedName
private String actionClassJavaFileName
private String actionClassClassFileName
private transient SourceInfo sourceInfo
private static AtomicInteger actionClassNumber
private Set<String> blockNames
private LeftHandSide lhs
private static ArrayList tempFiles
private final String nl
static final boolean debug
private String phaseName
private String ruleName
private static Set<StackTraceElement> warnings
| Constructor Detail |
|---|
public RightHandSide(String transducerName,
String ruleName,
LeftHandSide lhs,
String importblock)
| Method Detail |
|---|
public String getActionClassString()
public String getActionClassName()
public void addBlock(String anonymousBlock)
public void addBlock(String name,
String namedBlock)
public void createActionClass()
throws JapeException
JapeException
public void instantiateActionClass()
throws JapeException
JapeExceptionpublic static void cleanUp()
private void writeObject(ObjectOutputStream out)
throws IOException
IOException
private void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void transduce(Document doc,
Map<String,AnnotationSet> bindings,
AnnotationSet inputAS,
AnnotationSet outputAS,
Ontology ontology,
ActionContext actionContext)
throws JapeException
JapeExceptionpublic String toString()
toString in class Objectpublic String toString(String pad)
public String shortDesc()
public void setPhaseName(String phaseName)
public String getPhaseName()
public void setRuleName(String ruleName)
public String getRuleName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||