public class Referent
extends Object
Modifier and Type | Field and Description |
---|---|
private String |
asEntered
The referent string as entered (un-edited, un-parsed) by a user or external system.
|
private String |
cardinality
If a set, this is where its cardinality is kept.
|
private String |
cgifVariableReference
The variable reference for CGIF.
|
static String |
coll |
static String |
dist |
static String |
forall
The forall symbol that can serve as a referent
|
private InputStream |
is |
private boolean |
isASet
Whether this referent denotes a set or not
|
private String |
marker
If the referent is an actual individual marker
|
private Double |
number
If referent denotes an actual number, here's where it's kept.
|
private CGIFParser |
parser |
private ArrayList<Referent> |
setMembers
If a set, these are the members of the referent set
|
private String |
variable
anything preceded by a star or question mark
|
Modifier and Type | Method and Description |
---|---|
void |
addSetMember(Referent ref) |
protected void |
copyFromReferent(Referent ref) |
String |
explain()
For debugging purposes to describe what the referent is.
|
String |
getAsVariable(boolean bound)
See the referent as if it were a bound or unbound variable, with prefix ? or *
|
String |
getCardinality() |
int |
getCardinalityAsNumber()
Parses the cardinality as a string and returns an integer if one is found.
|
String |
getCgifVariableReference() |
String |
getMarker() |
Double |
getNumber() |
String |
getReferentString()
Return the original string referent as entered by a user or external
system.
|
String |
getVariable()
Get the variable portion of a referent, if present.
|
private void |
makeCGIFVariableReference() |
private void |
parseReferentString() |
void |
setCardinality(String cardinality) |
void |
setCgifVariableReference(String cgifVariableReference) |
void |
setMarker(String marker) |
void |
setMemberList(ArrayList<Referent> members)
Consider a list of referents to be set members.
|
void |
setNumber(Double number) |
void |
setReferentString(String ref)
Set the referent original string but do not parse
|
void |
setReferentString(String ref,
boolean parse)
Set the referent original string and optionally parse for all possible elements
|
void |
setVariable(String variable) |
public static final String forall
public static final String dist
public static final String coll
private InputStream is
private CGIFParser parser
private String asEntered
private String variable
private String marker
private String cgifVariableReference
private boolean isASet
private ArrayList<Referent> setMembers
private String cardinality
private Double number
public String explain()
public String getReferentString()
public void setReferentString(String ref)
public void setReferentString(String ref, boolean parse)
ref
- The referent to be setparse
- Whether to parse it or not (used primarily by the parser itself and this class)public String getVariable()
public String getAsVariable(boolean bound)
public void setVariable(String variable)
public String getCardinality()
public int getCardinalityAsNumber()
public void setCardinality(String cardinality)
public String getMarker()
public void setMarker(String marker)
public void addSetMember(Referent ref)
public String getCgifVariableReference()
public void setCgifVariableReference(String cgifVariableReference)
public Double getNumber()
public void setNumber(Double number)
private void makeCGIFVariableReference()
public void setMemberList(ArrayList<Referent> members)
protected void copyFromReferent(Referent ref)
private void parseReferentString()