public class CGIFParserHelper
extends Object
| Modifier and Type | Field and Description |
|---|---|
ReferentMap |
referents |
| Constructor and Description |
|---|
CGIFParserHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
extractChargerComment(Token token)
Looks for a charger comment in either the first or second token.
|
static String |
extractChargerComment(Token t1,
Token t2) |
Actor |
makeActor(Graph g,
String name,
ArrayList<String> inputvariables,
ArrayList<String> outputvariables,
String layout)
Processes the actor from cgif07.jj (as converted into CGIFParser.java)
|
Concept |
makeConcept(Graph g,
String type,
Referent referent,
String layout)
Processes the concept from cgif07.jj (as converted into CGIFParser.java)
|
void |
makeGenSpecLink(Graph g,
String subtype,
String supertype,
String layout)
Processes the gen spec link from cgif07.jj (as converted into CGIFParser.java)
|
Relation |
makeRelation(Graph g,
String name,
ArrayList<String> variables,
String layout)
Processes the relation from cgif07.jj (as converted into CGIFParser.java)
|
void |
makeTypeLabel(Graph g,
String type,
String layout)
Use the CGIF information to instantiate a new type label.
|
void |
parseChargerLayout(String chargerComment,
GraphObject go) |
(package private) String |
unquotify(String possiblyQuotedString) |
public ReferentMap referents
public static String extractChargerComment(Token token)
token1 - token2 - public void parseChargerLayout(String chargerComment,
GraphObject go)
public Concept makeConcept(Graph g, String type, Referent referent, String layout)
graph - The graph into which the concept will be insertedtype - The type name to be made into a type labelreferent - the referent as established by the parserlayout - CGX layout string, if present in a CGIF commentpublic void makeTypeLabel(Graph g, String type, String layout) throws CGIFSubtypeException
graph - The graph into which the concept will be insertedtype - The type name to be made into a type labellayout - CGX layout string, if present in a CGIF commentCGIFSubtypeExceptionpublic void makeGenSpecLink(Graph g, String subtype, String supertype, String layout) throws CGIFSubtypeException
g - subtype - supertype - layout - CGX layout string, if present in a CGIF commentCGIFSubtypeExceptionpublic Relation makeRelation(Graph g, String name, ArrayList<String> variables, String layout) throws CGIFVariableException
g - the graph in which this actor is to be insertedname - name of the actorvariables - zero or more variables, to be associated with concepts. Last one is considered output arc's target.layout - CGX layout string, if present in a CGIF commentCGIFVariableExceptionpublic Actor makeActor(Graph g, String name, ArrayList<String> inputvariables, ArrayList<String> outputvariables, String layout) throws CGIFVariableException
g - the graph in which this actor is to be insertedname - name of the actorinputvariables - zero or more input variables, to be associated with input conceptsoutputvariables - zero or more output variables, to be associated with output conceptslayout - CGX layout string, if present in a CGIF commentCGIFVariableExceptionString unquotify(String possiblyQuotedString)