public class Relation extends Function
Entity.LabelValuePair| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MODAL |
static java.lang.String |
NOT |
protected Entity |
object
End of key methods, specified in interface.
|
static java.lang.String |
PARTICLE |
static java.lang.String |
SHOULD |
bundle, changeList, defaultToStringIsCompact, elementOf, exampleOf, FIRE_NOTIFICATION, LOGGER, LOGGER_GROUP, LOGGER_INSTANCE, MARKER_ACTION, MARKER_COMPLETE, MARKER_DESCRIPTION, MARKER_DETERMINER, MARKER_ENTITY, MARKER_FEATURE, MARKER_OWNERS, MARKER_WORD, modifiers, name, nameSuffix, objectOf, observers, OWNER, pathElement, pathList, placeList, previousState, PROPERTY, roleList, SAVE_STATE, subjectOf, TYPECHAR_ENTITY, TYPECHAR_FUNCTION, TYPECHAR_RELATION, TYPECHAR_SEQUENCE| Constructor and Description |
|---|
Relation(boolean readOnly,
java.lang.String suffix,
Entity subject,
Entity object)
Constructs object with a name determined by suffix string provided; used
only in reading.
|
Relation(Bundle b,
Entity subject,
Entity object) |
Relation(Entity subject,
Entity object)
Constructs a new relation, given a subject and an object.
|
Relation(java.lang.String type,
Entity subject,
Entity object)
Constructs a new relation, given a type, a subject and an object.
|
Relation(Thread thread,
Entity subject,
Entity object) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToModalThread(java.lang.String s) |
java.lang.Object |
clone(EntityFactory factory)
Clones (shallow).
|
Entity |
cloneForResolver()
Clones, recursively.
|
Entity |
cloneForResolver(EntityFactory factory) |
protected Entity |
deepClone(EntityFactory factory,
java.util.IdentityHashMap<Entity,Entity> cloneMap,
boolean newId)
Clones, recursively.
|
boolean |
entityP()
Key methods, specified in interface.
|
boolean |
entityP(java.lang.String type)
Determine if the object is an Entity, AND has the given type in
its primal thread.
|
protected java.lang.String |
filler(boolean compact)
Helps produce print string.
|
protected java.lang.String |
fillerSansName(boolean compact)
Assures no calls to getName().
|
boolean |
functionP()
Key methods, specified in interface.
|
boolean |
functionP(java.lang.String type)
Determine if the object is a Function, AND has the given type in
its primal thread.
|
java.util.List<Entity> |
getAllComponents()
Returns an ordered list of all Entities that are subcomponents:
- for a Entity: empty list
- for a Function: subject
- for a Relation: subject, object
- for a Sequence: getElements()
|
java.util.Set<Entity> |
getChildren()
Returns all the children of the node, which for an Entity is an empty set.
|
Thread |
getModalThread()
The Modal Thread will store all modals and particles
such as "not" or "should", with respect to this Relation
The following methods allow you to manipulate the thread
|
int |
getNumberOfChildren() |
Entity |
getObject()
Gets object.
|
char |
getPrettyPrintType() |
boolean |
isEqual(java.lang.Object o)
Used to test equality without regard to ID numbers.
|
boolean |
isInModalThread(java.lang.String s) |
boolean |
isNegated() |
static void |
main(java.lang.String[] argv)
Tests behavior.
|
void |
negate() |
boolean |
relationP()
Determines if the object is a Relation.
|
boolean |
relationP(java.lang.String type)
Determine if the object is a Relation, AND has the given type in
its primal thread.
|
void |
removeFromModalThread(java.lang.String s) |
boolean |
sequenceP()
Determines if the object is a Sequence.
|
boolean |
sequenceP(java.lang.String type)
Determine if the object is a Sequence, AND has the given type in
its primal thread.
|
void |
setModalThread(Thread t) |
void |
setObject(Entity t)
Sets object.
|
getSubject, setSubjectaddDeterminer, addElement, addElementOf, addExampleOf, addFeature, addModifier, addModifier, addObjectOf, addObserver, addProperty, addSubjectOf, addThread, addType, addType, addType, addTypes, addTypes, asString, asStringWithIndexes, asStringWithoutIndexes, breakLinksFromChildren, bundleModified, changed, changed, clearModifiers, clone, clonePropertyList, config, deepClone, deepClone, deepClone, deepClone, delete, deleteObserver, deleteObservers, featureP, fine, finer, finest, fireNotification, getAllFramesDeep, getAllFramesDeepHelper, getAllFramesShallow, getAllTypes, getAllTypesExcept, getAllTypesForFindMatchingThing, getAncestors, getAncestralTrajectorySpaces, getBundle, getClassesFromString, getConnected, getCopy, getCopy, getDescendants, getDeterminer, getElement, getElementOf, getElements, getExampleOf, getExplicitName, getFeatures, getID, getIdentifier, getKeys, getLogger, getMatcherTypes, getModifiers, getName, getNameSuffix, getObjectOf, getObjectOf, getParents, getPrimedThread, getPrintStringFromCollection, getProperty, getPropertyList, getRoots, getSaveStringForm, getSubjectOf, getSubjectOf, getSupertype, getThread, getThreadWith, getThreadWith, getType, getTypes, hasFeature, hash, hashCode, hashCodeSansID, hashIncludingThings, hasProperty, hasProperty, identity, identitySansName, imagineType, info, isA, isA, isA, isA, isAllOf, isAncestorOf, isAnyOf, isAnyOf, isAnyOf, isAPrimed, isAPrimed, isAPrimedAction, isDeepEqual, isFirstOrderThing, isNoneOf, isNotA, isNotAPrimed, isPathElement, isRoot, isZeroOrderThing, limitTo, limitToRoot, makeLinksFromChildren, makeThread, marker, order, printNamesFromCollection, pushPrimedThread, reader, removeElementOf, removeFeature, removeObjectOf, removeParent, removeProperty, removeSubjectOf, removeType, replacePrimedThread, resolvePath, resolvePath, saveState, sendPrimedThreadToEnd, setBundle, setModifiers, setName, setNameSuffix, setNotification, setNotificationOnDependents, setPrimedThread, setPropertyList, setSaveStringForm, setSaveStringFormOnDependents, severe, showDifferences, swapPrimedThread, toString, toString, toStringNamesOnly, toStringSansName, warningpublic static final java.lang.String PARTICLE
public static final java.lang.String MODAL
public static final java.lang.String NOT
public static final java.lang.String SHOULD
protected Entity object
public Relation(Entity subject, Entity object)
public Relation(java.lang.String type,
Entity subject,
Entity object)
public boolean entityP()
public boolean entityP(java.lang.String type)
Framepublic boolean functionP()
Functionpublic boolean functionP(java.lang.String type)
Framepublic boolean relationP()
Framepublic boolean relationP(java.lang.String type)
Framepublic boolean sequenceP()
Framepublic boolean sequenceP(java.lang.String type)
Framepublic void setObject(Entity t)
Framepublic Entity getObject()
Framepublic java.util.Set<Entity> getChildren()
EntitygetChildren in class Functionpublic int getNumberOfChildren()
getNumberOfChildren in class Functionpublic boolean isEqual(java.lang.Object o)
public java.util.List<Entity> getAllComponents()
FramegetAllComponents in interface FramegetAllComponents in class FunctionFrame.getAllComponents()public char getPrettyPrintType()
getPrettyPrintType in interface FramegetPrettyPrintType in class Functionprotected java.lang.String filler(boolean compact)
protected java.lang.String fillerSansName(boolean compact)
FunctionfillerSansName in class Functionpublic java.lang.Object clone(EntityFactory factory)
protected Entity deepClone(EntityFactory factory, java.util.IdentityHashMap<Entity,Entity> cloneMap, boolean newId)
public Entity cloneForResolver()
cloneForResolver in class Functionpublic Entity cloneForResolver(EntityFactory factory)
cloneForResolver in class Functionpublic Thread getModalThread()
public void setModalThread(Thread t)
public boolean isInModalThread(java.lang.String s)
public void addToModalThread(java.lang.String s)
public void removeFromModalThread(java.lang.String s)
public void negate()
public boolean isNegated()
public static void main(java.lang.String[] argv)