story.scheherazade.elements
Class Timeline

java.lang.Object
  extended by story.scheherazade.elements.Timeline

public class Timeline
extends java.lang.Object

A Timeline is Scheherazade's way of referring to a semantic timeline.

Because Timeline nodes can be removed from the underlying db-core, these Timeline objects should never be passed outside the Narrative, only accessed within the Narrative. TimelineIDs are used to reference Timelines.


Field Summary
static java.lang.String ANONYMOUS
           
static int DEFAULT_ACTION_TRUTH
           
static boolean LOAD_WORDNET_ABSOLUTE_PATH
           
static NodeID SETTING_NODEID
           
 
Constructor Summary
Timeline(Narrative narrative, DBCAccessor dbca)
           
 
Method Summary
 AssignedAction assignAction(NodeAddress timeline, TransitionTime time, ValidAction action, TextSpan sourceSpan, InterpNodeID key)
          Assigns an instance of an Action to a Transition.
 AssignedCondition assignCondition(NodeAddress timeline, StateTime time, ValidCondition condition, TextSpan sourceSpan, InterpNodeID key)
          Assigns an instance of a Condition to a State.
 AssignedInterpNode assignInterpNode(NodeAddress timeline, InterpretativeNodeType interpNodeType, NounName character, AssignedInterpNode parent, InterpNodeID key, SCHPoint position)
           
 AssignedModifier assignModifier(AssignedPredicate predicate, ValidModifier modifier, ModifierScope scope, TextSpan sourceSpan)
          Assigns an instance of a Modifier to a predicate.
 void attachInterpPredicate(AssignedPredicate predicate, AssignedInterpNode interp)
           
 void declareAction(NodeAddress timeline, ActionType actionType, StoryAssertion expansionParams, WordNetOffset offset, ActionType superAction)
          Declare a new type of Action and define its parameters.
 void declareAntonymy(NodeAddress timeline, ActionType action1, ActionType action2)
          Declare an antonymous relationship between two actions.
 void declareCondition(NodeAddress timeline, ConditionType conditionType, StoryAssertion expansionParams, ConditionType superCondition)
          Declare a new Condition in the Setting of this Timeline.
 void declareModifier(NodeAddress timeline, ModifierType modifierType, ModifiablePredicates modifiables, StoryAssertion expansionParams, ModifierType superModifier)
          Declare a new Modifier in the Setting of this Timeline.
 void declareMorphologicalRelation(NodeAddress timeline, ConditionType condition, ModifierType modifier)
          Declare a morphological relationship between a condition type and a modifier type.
 void declareNounType(NodeAddress timeline, NounType nounType, StoryAssertion expansionParams, WordNetOffset offset, NounType superNoun, java.lang.String menuName, java.lang.String pluralForm, boolean proper, PropDiscreteness discreteness, CharacterGender gender)
          Declare that a type of Noun can exist in the world.
 NounName defineNoun(NodeAddress timeline, ValidNoun noun, NounName nounName)
          Define a particular Noun in the world, assigning it a name
 boolean expansionParametersSet(NodeAddress node)
          Have the DBCA check whether expansion parameters are set for a node
 AssignedAction findAssignedAction(NodeAddress timeline, AssignedActionAddress aaa)
          Find an AssignedAction from an AssignedActionaddress
 AssignedCondition findAssignedCondition(NodeAddress timeline, AssignedConditionAddress aca)
          Find an AssignedCondition from an AssignedConditionAddress.
 InterpElement findAssignedInterpElement(NodeAddress timeline, InterpNodeID key)
           
 AssignedModifier findAssignedModifier(NodeAddress timeline, AssignedModifierAddress ama)
          Find an AssignedModifier from an AssignedModifieraddress
 NounType findCompleteNounType(NodeAddress timeline, NounType nounType)
           
 NodeAddress findDeclaration(TimelineID timelineID)
          Find the NodeAddress behind a TimelineID.
 NodeAddress findDeclaration(TimelineID timelineID, NarrativeID storyID)
          Find the NodeAddress behind a TimelineID of a story other than the current one.
 int findHopsBetweenTypes(ScheherIDWithType from, ScheherIDWithType to)
           
 NodeAddress findNodeIntersection(NodeAddress frame1, NodeAddress frame2)
           
 ValidNoun findNounDefinition(NodeAddress timeline, NounName noun)
           
 NodeAddress findSettingNode(TimelineID timelineID)
           
 StoryTelling generateRandomNarrative(NodeAddress timeline, int numPredicates, LanguageModel model)
          Populate a timeline with a bunch of randomly generated actions.
 java.lang.Object generateRandomPredicate(StoryTelling telling, NodeAddress timeline, PredicateFlavor flavor, story.scheherazade.elements.Timeline.GenerationState genstate, int indent, PredicateMode predicateMode)
          Generate a completely random predicate.
 StoryAssertion getActionParameters(NodeAddress timeline, ActionType actionType)
          Get the parameters of a declared Action
 AssignedActionSet getActionsBeginningAt(NodeAddress timeline, StateTime time)
          Get all the Actions beginning at a certain StateTime.
 AssignedActionSet getActionsEndingAt(NodeAddress timeline, StateTime time)
          Get all Actions ending at a certain StateTime.
 AssignedActionSet getActionsInTransition(NodeAddress timeline, TransitionTime time)
          Get all the Actions instantiated in a Transition.
 ActivationFrame getActivationFrame(NodeAddress timeline, AssignedAction action)
           
 AssignedActionSet getAllActions(NodeAddress timeline)
          Get all actions in a Timeline.
 AssignedConditionSet getAllConditions(NodeAddress timeline)
          Get all conditions in a Timeline.
 AssignedInterpNodeSet getAllInterpNodes(NodeAddress timeline, boolean topLevelOnly)
          Get all interp nodes in a Timeline.
 InterpArcSet getAllLinkedInterpElements(NodeAddress timeline, InterpElement element, LinkDirection linkDirection)
           
 StateTimeSet getAllStates(NodeAddress timeline)
          Get a list of all States that have been activated for this Timeline.
 AssignedAction getAssignedActionFromNode(NodeProxy assignedActionNode)
           
 AssignedCondition getAssignedConditionFromNode(NodeProxy assignedConditionNode)
           
 AssignedModifier getAssignedModifierFromNode(NodeProxy assignedModifierNode)
           
 AssignedCondition getAssignedPersistentCondition(AssignedAction assignedAction)
          Given an assigned ConditionBegins action, get the AssignedCondition object for the condition that began.
 AssignedPredicate getAssignedPredicateFromAddress(NodeAddress timeline, AssignedPredicateAddress apa)
           
 AssignedPredicate getAssignedPredicateFromNode(NodeAddress node)
           
 AssignedPredicate getAssignedPredicateFromNode(NodeProxy assignedPredicateNode)
           
 TimelineTime getAttachmentPoint(NodeAddress timeline)
          Gets the attachment point of a timeline.
 InterpChainSet getChainsOfInterpNode(NodeAddress timeline, AssignedInterpNode node, boolean allowNestedHeads)
           
 AssignedAction getConditionBeginsAction(AssignedCondition assignedCondition)
          Given an assigned persistent condition action, get the assigned ConditionBegins action
 StoryAssertion getConditionParameters(NodeAddress timeline, ConditionType conditionType)
          Get the parameters of a declared Condition.
 AssignedConditionSet getConditionsInState(NodeAddress timeline, StateTime time, boolean localOnly)
           
 ConditionSet getConditionsOfNounInState(NodeAddress timeline, StateTime time, boolean localOnly, NounName noun, SemanticRole role)
           
 ActionTypeSet getDeclaredActions(NodeAddress timeline, boolean inherit)
           
 NounNameSet getDeclaredCharacters(NodeAddress timeline, boolean inherit)
           
 ConditionTypeSet getDeclaredConditions(NodeAddress timeline, boolean inherit)
           
 ModifierTypeSet getDeclaredModifiers(NodeAddress timeline, boolean inherit)
           
 NounTypeSet getDeclaredNounTypes(NodeAddress timeline, boolean inherit, NounFlavor flavor)
          Get a list of all declared noun types.
 NounNameSet getDefinedNouns(NodeAddress timeline, boolean inherit, NounFlavor flavor)
           
 NodeAddress getFirstNodeLinkedFromNode(NodeAddress node, LinkType linkType)
          Have the DBCA retrieve a linked node on someone's behalf
 InterpChainLink getInterpChain(NodeAddress timeline, InterpretativeArcType incomingArcType, InterpElement element)
          Compiles an interp chain (possibly forking into many chains) starting at the designated element.
 InterpNodeID getInterpKeyFromNode(NodeAddress node)
           
 NodeAddressSet getInterpLineage(InterpElement element)
          Get an ordered list of ancestor InterpNode (agency boxes) for an interp element, starting with itself.
 AssignedInterpNodeSet getInterpLineage(NodeAddress timeline, InterpElement element)
           
 SCHPoint getInterpPositionFromNode(NodeAddress node, boolean getSourceSpanPosition)
          Helper function that retrieves a common attribute from a node.
 InterpArcSet getLinkedInterpElements(NodeAddress timeline, InterpElement element, InterpretativeArcType arcType, LinkDirection linkDirection)
           
 LinkSet getLinksFromNode(NodeAddress node, LinkType linkType, boolean directOnly)
          Have the DBCA retrieve linked nodes on someone's behalf
 ModifiablePredicates getModifiablePredicates(NodeAddress timeline, ModifierType modifierType)
          Get the types of predicates which were defined as being modifiable by a Modifier.
 StoryAssertion getModifierParameters(NodeAddress timeline, ModifierType modifierType)
          Get the parameters of a declared Modifier.
 AssignedModifierSet getModifiersOfPredicate(AssignedPredicate modified)
          Get the Modifiers assigned to a predicate.
 AttributeValue getNodeAttribute(NodeAddress node, java.lang.Object attribute)
          Have the DBCA retrieve a node attribute on someone's behalf with no inheritance.
 AttributeValue getNodeAttribute(NodeAddress node, java.lang.Object attribute, boolean overrideInheritance)
          Have the DBCA retrieve a node attribute on someone's behalf.
 NodeProxy getNodeProxy(NodeAddress node)
           
 java.lang.Boolean getNoInterpretationFromNode(NodeAddress node)
           
 StoryAssertion getNounParameters(NodeAddress timeline, NounType nounType)
          Get the parameters of a declared NounType.
 CommandSequence getRedefineConditionSequence(NodeAddress timeline, NodeAddress conditionNode, NodeAddress stateNode, ValidCondition newCondition)
           
 shef.nlp.wordnet.similarity.SimilarityMeasure getSimilarityMeasure()
           
 TimelineID getTimelineID(NodeAddress timeline)
           
 TimelineType getTimelineType(NodeAddress timeline)
           
 NarrativeID getTitle()
           
 TransitionTimePair getVirtualStateRange(NodeAddress virtualStateNode)
          Given a virtual state node, over which transitions does the state begin and end?
 net.didion.jwnl.dictionary.Dictionary getWordNetInstance()
           
 boolean inScopeOfTimeline(NodeAddress thisTimeline, TimelineID otherTimeline)
          Determines whether some timeline is in the scope of some other timeline -- that is, either the same one or one it are nested inside
 SCHArguments internSCHArguments(SCHArguments in)
          Before SCH-level objects can be stuck in the undo/redo memento, we need to remove all "live" references such as NodeProxies for nodes in the current instantiation of the graph.
 SCHIntersection intersect(SCHIntersection int1, SCHIntersection int2, boolean checkStoryOverlap)
           
 SCHIntersection intersectPairwise(SCHIntersection pred1, SCHIntersection pred2)
           
 void linkInterpElements(NodeAddress timeline, InterpElement from, InterpretativeArcType arcType, InterpElement to)
           
 SCHIntersection makeSeedIntersection(AssignedPredicate predicate, SemanticRole role, NarrativeID storyID, NounName associatedName)
          Make a seed intersection out of an AssignedPredicate.
 SCHIntersection makeSeedIntersection(java.lang.Object object, SemanticRole role, NodeAddress timeline, NarrativeID storyID)
          Main switchboard for making a seed intersection out of a story element.
 SCHIntersection makeSeedIntersection(ValidPredicate predicate, SemanticRole role, NarrativeID storyID, NounName associatedName)
           
 SCHIntersection makeSeedIntersection(ValidPredicate predicate, SemanticRole role, NarrativeID storyID, NounName associatedName, boolean addContributor)
           
 ValidAction makeValidAction(NodeAddress timeline, ActionType actionType, SCHArguments arguments, int truthDegree, PredicateMode mode)
          Define an instance of a previously declared Action.
 ValidCondition makeValidCondition(NodeAddress timeline, Condition condition)
          Define an instance of a previously declared Condition.
 ValidCondition makeValidCondition(NodeAddress timeline, ConditionType condition, SCHArguments arguments, int truthDegree, PredicateMode mode)
          Define an instance of a previously declared Condition.
 ValidModifier makeValidModifier(NodeAddress timeline, ModifierType modifier, SCHArguments arguments)
          Define an instance of a previously declared Modifier.
 ValidNoun makeValidNoun(NodeAddress timeline, Noun noun)
          Define an instance of a previously declared Noun.
 ValidNoun makeValidNoun(NodeAddress timeline, NounType noun, SCHArguments arguments)
          Define an instance of a previously declared Noun.
 NodeAddress newTimeline(TimelineID ID, TimelineType newType)
          Create a new Timeline in the db-core with no referent timeline.
 NodeAddress newTimeline(TimelineID ID, TimelineType newType, NodeAddress referentTimeline)
          Create a new Timeline in the db-core with a referent timeline.
 ActionType normalizeActionType(NodeAddress timeline, ActionType actionType)
           
 AssignedPredicate normalizeAssignedPredicate(AssignedPredicate predicate)
           
 ConditionType normalizeConditionType(NodeAddress timeline, ConditionType conditionType)
           
 ModifierType normalizeModifierType(NodeAddress timeline, ModifierType modifierType)
           
 void propogateActivation(InterpElement interp, ActivationFrame frame, Activation change)
           
 AssignedAction reassignAction(AssignedAction assignedAction, TransitionTime newTime)
          Ressigns an instance of an Action to a new Transition.
 void reassignTransition(NodeAddress timeline, TransitionTime oldTime, TransitionTime newTime)
          Reassign a Transition node from one state to another.
 boolean reassignTransitionsAroundState(NodeAddress timeline, StateTime currentState, StateTime newStateTime, boolean starting)
          Move a state from one time point to another from the point of view of any transitions that go to or from the state.
 void reattachInterpElement(NodeAddress timeline, InterpElement interp, AssignedInterpNode newParent)
           
 AssignedAction redefineAction(NodeAddress timeline, AssignedAction oldAction, ValidAction newAction)
          Redefines (edits) a previously assigned Action.
 AssignedCondition redefineCondition(NodeAddress timeline, AssignedCondition oldCondition, ValidCondition newCondition)
          Redefines (edits) a previously assigned Condition.
 AssignedModifier redefineModifier(NodeAddress timeline, AssignedModifier oldModifier, ValidModifier newModifier)
          Redefines (edits) a previously assigned Modifier.
 NounName redefineNoun(NodeAddress timeline, NounName oldName, NounName newName, ValidNoun newDefinition)
           
 void removeAssignedAction(NodeAddress timeline, AssignedAction assignedAction)
          Remove a previously assigned Action.
 void removeAssignedCondition(NodeAddress timeline, AssignedCondition assignedCondition)
          Eliminate a Condition from its concrete State.
 void removeAssignedModifier(NodeAddress timeline, AssignedModifier assignedModifier)
          Eliminate a Modifier from its concrete State.
 void removeInterpNode(NodeAddress timeline, InterpNodeID key)
          Removes an interp node.
 void reReferenceSCHArguments(SCHArguments in)
          Interpret SCHArguments by applying SCH-level semantics to NodeAddresses that were dereferenced by validateSCHArguments above.
 void setAttachmentPoint(NodeAddress timeline, TimelineTime time)
          Sets the attachment point of a timeline.
 AssignedPredicate setConditionality(AssignedPredicate predicate, Conditionality conditionality)
          Set the Conditionality of an assigned predicate.
 void setExpansionParameters(NodeAddress node, ParameterSet parameters)
          Have the DBCA set an expansion parameter on someone's behalf.
 void setInterpPosition(InterpElement element, SCHPoint position)
          Sets the position of an interpretative-element box on the canvas.
 void setNoInterpretation(AssignedPredicate ap, java.lang.Boolean noInterpretation)
           
 void setSourceTextSpan(AssignedPredicate predicate, TextSpan span)
          Set the associated text span for a predicate.
 void swapCreationTimes(AssignedAction aa1, AssignedAction aa2)
          Swaps the "creation time" fields of two assigned actions, as if they were made in opposite order as they were actually assigned.
 void undefineNoun(NodeAddress timeline, NounName noun)
           
 SCHArguments uninternSCHArguments(SCHArguments in)
           
 void unlinkInterpElements(NodeAddress timeline, InterpElement from, InterpretativeArcType arcType, InterpElement to)
           
 InterpValidationResult validateInterp(NodeAddress timeline)
           
 ValidPredicate validatePredicateFromNode(NodeAddress timeline, NodeAddress predicateNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOAD_WORDNET_ABSOLUTE_PATH

public static final boolean LOAD_WORDNET_ABSOLUTE_PATH
See Also:
Constant Field Values

SETTING_NODEID

public static final NodeID SETTING_NODEID

ANONYMOUS

public static final java.lang.String ANONYMOUS
See Also:
Constant Field Values

DEFAULT_ACTION_TRUTH

public static final int DEFAULT_ACTION_TRUTH
See Also:
Constant Field Values
Constructor Detail

Timeline

public Timeline(Narrative narrative,
                DBCAccessor dbca)
         throws Scheherexception
Throws:
Scheherexception
Method Detail

getTimelineID

public TimelineID getTimelineID(NodeAddress timeline)
                         throws Scheherexception
Throws:
Scheherexception

getTimelineType

public TimelineType getTimelineType(NodeAddress timeline)
                             throws Scheherexception
Throws:
Scheherexception

getNodeProxy

public NodeProxy getNodeProxy(NodeAddress node)
                       throws Scheherexception
Throws:
Scheherexception

getTitle

public NarrativeID getTitle()

getSimilarityMeasure

public shef.nlp.wordnet.similarity.SimilarityMeasure getSimilarityMeasure()

getWordNetInstance

public net.didion.jwnl.dictionary.Dictionary getWordNetInstance()

getNodeAttribute

public AttributeValue getNodeAttribute(NodeAddress node,
                                       java.lang.Object attribute)
                                throws Scheherexception
Have the DBCA retrieve a node attribute on someone's behalf with no inheritance.

Throws:
Scheherexception

getNodeAttribute

public AttributeValue getNodeAttribute(NodeAddress node,
                                       java.lang.Object attribute,
                                       boolean overrideInheritance)
                                throws Scheherexception
Have the DBCA retrieve a node attribute on someone's behalf.

Throws:
Scheherexception

getFirstNodeLinkedFromNode

public NodeAddress getFirstNodeLinkedFromNode(NodeAddress node,
                                              LinkType linkType)
                                       throws Scheherexception
Have the DBCA retrieve a linked node on someone's behalf

Throws:
Scheherexception

setExpansionParameters

public void setExpansionParameters(NodeAddress node,
                                   ParameterSet parameters)
                            throws Scheherexception
Have the DBCA set an expansion parameter on someone's behalf.

Throws:
Scheherexception

expansionParametersSet

public boolean expansionParametersSet(NodeAddress node)
                               throws Scheherexception
Have the DBCA check whether expansion parameters are set for a node

Throws:
Scheherexception

getLinksFromNode

public LinkSet getLinksFromNode(NodeAddress node,
                                LinkType linkType,
                                boolean directOnly)
                         throws Scheherexception
Have the DBCA retrieve linked nodes on someone's behalf

Throws:
Scheherexception

newTimeline

public NodeAddress newTimeline(TimelineID ID,
                               TimelineType newType)
                        throws Scheherexception
Create a new Timeline in the db-core with no referent timeline.

Throws:
Scheherexception

newTimeline

public NodeAddress newTimeline(TimelineID ID,
                               TimelineType newType,
                               NodeAddress referentTimeline)
                        throws Scheherexception
Create a new Timeline in the db-core with a referent timeline.

Throws:
Scheherexception

getAttachmentPoint

public TimelineTime getAttachmentPoint(NodeAddress timeline)
                                throws Scheherexception
Gets the attachment point of a timeline.

Throws:
Scheherexception

setAttachmentPoint

public void setAttachmentPoint(NodeAddress timeline,
                               TimelineTime time)
                        throws Scheherexception
Sets the attachment point of a timeline.

Throws:
Scheherexception

setSourceTextSpan

public void setSourceTextSpan(AssignedPredicate predicate,
                              TextSpan span)
                       throws Scheherexception
Set the associated text span for a predicate.

Throws:
Scheherexception

setInterpPosition

public void setInterpPosition(InterpElement element,
                              SCHPoint position)
                       throws Scheherexception
Sets the position of an interpretative-element box on the canvas.

Throws:
Scheherexception

makeValidCondition

public ValidCondition makeValidCondition(NodeAddress timeline,
                                         ConditionType condition,
                                         SCHArguments arguments,
                                         int truthDegree,
                                         PredicateMode mode)
                                  throws Scheherexception
Define an instance of a previously declared Condition.

Throws:
Scheherexception

makeValidCondition

public ValidCondition makeValidCondition(NodeAddress timeline,
                                         Condition condition)
                                  throws Scheherexception
Define an instance of a previously declared Condition.

Throws:
Scheherexception

makeValidModifier

public ValidModifier makeValidModifier(NodeAddress timeline,
                                       ModifierType modifier,
                                       SCHArguments arguments)
                                throws Scheherexception
Define an instance of a previously declared Modifier.

Throws:
Scheherexception

getConditionParameters

public StoryAssertion getConditionParameters(NodeAddress timeline,
                                             ConditionType conditionType)
                                      throws Scheherexception
Get the parameters of a declared Condition.

Throws:
Scheherexception

getActionParameters

public StoryAssertion getActionParameters(NodeAddress timeline,
                                          ActionType actionType)
                                   throws Scheherexception
Get the parameters of a declared Action

Throws:
Scheherexception

getModifiablePredicates

public ModifiablePredicates getModifiablePredicates(NodeAddress timeline,
                                                    ModifierType modifierType)
                                             throws Scheherexception
Get the types of predicates which were defined as being modifiable by a Modifier.

Throws:
Scheherexception

getModifierParameters

public StoryAssertion getModifierParameters(NodeAddress timeline,
                                            ModifierType modifierType)
                                     throws Scheherexception
Get the parameters of a declared Modifier.

Throws:
Scheherexception

getModifiersOfPredicate

public AssignedModifierSet getModifiersOfPredicate(AssignedPredicate modified)
                                            throws Scheherexception
Get the Modifiers assigned to a predicate.

Throws:
Scheherexception

setConditionality

public AssignedPredicate setConditionality(AssignedPredicate predicate,
                                           Conditionality conditionality)
                                    throws Scheherexception
Set the Conditionality of an assigned predicate.

Throws:
Scheherexception

makeValidAction

public ValidAction makeValidAction(NodeAddress timeline,
                                   ActionType actionType,
                                   SCHArguments arguments,
                                   int truthDegree,
                                   PredicateMode mode)
                            throws Scheherexception
Define an instance of a previously declared Action.

Throws:
Scheherexception

generateRandomNarrative

public StoryTelling generateRandomNarrative(NodeAddress timeline,
                                            int numPredicates,
                                            LanguageModel model)
                                     throws Scheherexception
Populate a timeline with a bunch of randomly generated actions.

Throws:
Scheherexception

generateRandomPredicate

public java.lang.Object generateRandomPredicate(StoryTelling telling,
                                                NodeAddress timeline,
                                                PredicateFlavor flavor,
                                                story.scheherazade.elements.Timeline.GenerationState genstate,
                                                int indent,
                                                PredicateMode predicateMode)
                                         throws Scheherexception
Generate a completely random predicate.

Throws:
Scheherexception

declareCondition

public void declareCondition(NodeAddress timeline,
                             ConditionType conditionType,
                             StoryAssertion expansionParams,
                             ConditionType superCondition)
                      throws Scheherexception
Declare a new Condition in the Setting of this Timeline.

Throws:
Scheherexception

declareModifier

public void declareModifier(NodeAddress timeline,
                            ModifierType modifierType,
                            ModifiablePredicates modifiables,
                            StoryAssertion expansionParams,
                            ModifierType superModifier)
                     throws Scheherexception
Declare a new Modifier in the Setting of this Timeline.

Throws:
Scheherexception

declareAction

public void declareAction(NodeAddress timeline,
                          ActionType actionType,
                          StoryAssertion expansionParams,
                          WordNetOffset offset,
                          ActionType superAction)
                   throws Scheherexception
Declare a new type of Action and define its parameters.

Throws:
Scheherexception

normalizeActionType

public ActionType normalizeActionType(NodeAddress timeline,
                                      ActionType actionType)
                               throws Scheherexception
Throws:
Scheherexception

normalizeConditionType

public ConditionType normalizeConditionType(NodeAddress timeline,
                                            ConditionType conditionType)
                                     throws Scheherexception
Throws:
Scheherexception

normalizeModifierType

public ModifierType normalizeModifierType(NodeAddress timeline,
                                          ModifierType modifierType)
                                   throws Scheherexception
Throws:
Scheherexception

declareAntonymy

public void declareAntonymy(NodeAddress timeline,
                            ActionType action1,
                            ActionType action2)
                     throws Scheherexception
Declare an antonymous relationship between two actions.

Throws:
Scheherexception

declareMorphologicalRelation

public void declareMorphologicalRelation(NodeAddress timeline,
                                         ConditionType condition,
                                         ModifierType modifier)
                                  throws Scheherexception
Declare a morphological relationship between a condition type and a modifier type.

Throws:
Scheherexception

assignInterpNode

public AssignedInterpNode assignInterpNode(NodeAddress timeline,
                                           InterpretativeNodeType interpNodeType,
                                           NounName character,
                                           AssignedInterpNode parent,
                                           InterpNodeID key,
                                           SCHPoint position)
                                    throws Scheherexception
Throws:
Scheherexception

removeInterpNode

public void removeInterpNode(NodeAddress timeline,
                             InterpNodeID key)
                      throws Scheherexception
Removes an interp node.

Throws:
Scheherexception

validatePredicateFromNode

public ValidPredicate validatePredicateFromNode(NodeAddress timeline,
                                                NodeAddress predicateNode)
                                         throws Scheherexception
Throws:
Scheherexception

validateInterp

public InterpValidationResult validateInterp(NodeAddress timeline)
                                      throws Scheherexception
Throws:
Scheherexception

assignAction

public AssignedAction assignAction(NodeAddress timeline,
                                   TransitionTime time,
                                   ValidAction action,
                                   TextSpan sourceSpan,
                                   InterpNodeID key)
                            throws Scheherexception
Assigns an instance of an Action to a Transition.

Checks to make sure the Action is in scope (has been declared in a Setting node in scope) and that the arguments satisfy it.

Throws:
Scheherexception

swapCreationTimes

public void swapCreationTimes(AssignedAction aa1,
                              AssignedAction aa2)
                       throws Scheherexception
Swaps the "creation time" fields of two assigned actions, as if they were made in opposite order as they were actually assigned.

Throws:
Scheherexception

reassignAction

public AssignedAction reassignAction(AssignedAction assignedAction,
                                     TransitionTime newTime)
                              throws Scheherexception
Ressigns an instance of an Action to a new Transition.

Throws:
Scheherexception

removeAssignedAction

public void removeAssignedAction(NodeAddress timeline,
                                 AssignedAction assignedAction)
                          throws Scheherexception
Remove a previously assigned Action.

Throws:
Scheherexception

redefineAction

public AssignedAction redefineAction(NodeAddress timeline,
                                     AssignedAction oldAction,
                                     ValidAction newAction)
                              throws Scheherexception
Redefines (edits) a previously assigned Action.

Throws:
Scheherexception

assignModifier

public AssignedModifier assignModifier(AssignedPredicate predicate,
                                       ValidModifier modifier,
                                       ModifierScope scope,
                                       TextSpan sourceSpan)
                                throws Scheherexception
Assigns an instance of a Modifier to a predicate.

Throws:
Scheherexception

redefineModifier

public AssignedModifier redefineModifier(NodeAddress timeline,
                                         AssignedModifier oldModifier,
                                         ValidModifier newModifier)
                                  throws Scheherexception
Redefines (edits) a previously assigned Modifier.

Throws:
Scheherexception

removeAssignedModifier

public void removeAssignedModifier(NodeAddress timeline,
                                   AssignedModifier assignedModifier)
                            throws Scheherexception
Eliminate a Modifier from its concrete State.

Throws:
Scheherexception

getVirtualStateRange

public TransitionTimePair getVirtualStateRange(NodeAddress virtualStateNode)
                                        throws Scheherexception
Given a virtual state node, over which transitions does the state begin and end? Either might be null.

Throws:
Scheherexception

getAssignedPersistentCondition

public AssignedCondition getAssignedPersistentCondition(AssignedAction assignedAction)
                                                 throws Scheherexception
Given an assigned ConditionBegins action, get the AssignedCondition object for the condition that began.

Throws:
Scheherexception

getConditionBeginsAction

public AssignedAction getConditionBeginsAction(AssignedCondition assignedCondition)
                                        throws Scheherexception
Given an assigned persistent condition action, get the assigned ConditionBegins action

Throws:
Scheherexception

findAssignedCondition

public AssignedCondition findAssignedCondition(NodeAddress timeline,
                                               AssignedConditionAddress aca)
                                        throws Scheherexception
Find an AssignedCondition from an AssignedConditionAddress.

Throws:
Scheherexception

findAssignedAction

public AssignedAction findAssignedAction(NodeAddress timeline,
                                         AssignedActionAddress aaa)
                                  throws Scheherexception
Find an AssignedAction from an AssignedActionaddress

Throws:
Scheherexception

findAssignedModifier

public AssignedModifier findAssignedModifier(NodeAddress timeline,
                                             AssignedModifierAddress ama)
                                      throws Scheherexception
Find an AssignedModifier from an AssignedModifieraddress

Throws:
Scheherexception

findAssignedInterpElement

public InterpElement findAssignedInterpElement(NodeAddress timeline,
                                               InterpNodeID key)
                                        throws Scheherexception
Throws:
Scheherexception

getActionsBeginningAt

public AssignedActionSet getActionsBeginningAt(NodeAddress timeline,
                                               StateTime time)
                                        throws Scheherexception
Get all the Actions beginning at a certain StateTime.

Throws:
Scheherexception

getActionsEndingAt

public AssignedActionSet getActionsEndingAt(NodeAddress timeline,
                                            StateTime time)
                                     throws Scheherexception
Get all Actions ending at a certain StateTime.

Throws:
Scheherexception

getActionsInTransition

public AssignedActionSet getActionsInTransition(NodeAddress timeline,
                                                TransitionTime time)
                                         throws Scheherexception
Get all the Actions instantiated in a Transition.

Throws:
Scheherexception

getAllActions

public AssignedActionSet getAllActions(NodeAddress timeline)
                                throws Scheherexception
Get all actions in a Timeline.

Throws:
Scheherexception

getAllConditions

public AssignedConditionSet getAllConditions(NodeAddress timeline)
                                      throws Scheherexception
Get all conditions in a Timeline.

Throws:
Scheherexception

getAllInterpNodes

public AssignedInterpNodeSet getAllInterpNodes(NodeAddress timeline,
                                               boolean topLevelOnly)
                                        throws Scheherexception
Get all interp nodes in a Timeline.

Throws:
Scheherexception

assignCondition

public AssignedCondition assignCondition(NodeAddress timeline,
                                         StateTime time,
                                         ValidCondition condition,
                                         TextSpan sourceSpan,
                                         InterpNodeID key)
                                  throws Scheherexception
Assigns an instance of a Condition to a State.

Checks to make sure the Condition is in scope (has been declared in a Setting node in scope) and that the arguments satisfy it.

Throws:
Scheherexception

removeAssignedCondition

public void removeAssignedCondition(NodeAddress timeline,
                                    AssignedCondition assignedCondition)
                             throws Scheherexception
Eliminate a Condition from its concrete State.

Throws:
Scheherexception

redefineCondition

public AssignedCondition redefineCondition(NodeAddress timeline,
                                           AssignedCondition oldCondition,
                                           ValidCondition newCondition)
                                    throws Scheherexception
Redefines (edits) a previously assigned Condition.

Throws:
Scheherexception

getRedefineConditionSequence

public CommandSequence getRedefineConditionSequence(NodeAddress timeline,
                                                    NodeAddress conditionNode,
                                                    NodeAddress stateNode,
                                                    ValidCondition newCondition)
                                             throws Scheherexception
Throws:
Scheherexception

getConditionsInState

public AssignedConditionSet getConditionsInState(NodeAddress timeline,
                                                 StateTime time,
                                                 boolean localOnly)
                                          throws Scheherexception
Throws:
Scheherexception

getConditionsOfNounInState

public ConditionSet getConditionsOfNounInState(NodeAddress timeline,
                                               StateTime time,
                                               boolean localOnly,
                                               NounName noun,
                                               SemanticRole role)
                                        throws Scheherexception
Throws:
Scheherexception

getDeclaredCharacters

public NounNameSet getDeclaredCharacters(NodeAddress timeline,
                                         boolean inherit)
                                  throws Scheherexception
Throws:
Scheherexception

getDeclaredActions

public ActionTypeSet getDeclaredActions(NodeAddress timeline,
                                        boolean inherit)
                                 throws Scheherexception
Throws:
Scheherexception

getDeclaredConditions

public ConditionTypeSet getDeclaredConditions(NodeAddress timeline,
                                              boolean inherit)
                                       throws Scheherexception
Throws:
Scheherexception

getDeclaredModifiers

public ModifierTypeSet getDeclaredModifiers(NodeAddress timeline,
                                            boolean inherit)
                                     throws Scheherexception
Throws:
Scheherexception

findSettingNode

public NodeAddress findSettingNode(TimelineID timelineID)
                            throws Scheherexception
Throws:
Scheherexception

findDeclaration

public NodeAddress findDeclaration(TimelineID timelineID)
                            throws Scheherexception
Find the NodeAddress behind a TimelineID.

Throws:
Scheherexception

findDeclaration

public NodeAddress findDeclaration(TimelineID timelineID,
                                   NarrativeID storyID)
                            throws Scheherexception
Find the NodeAddress behind a TimelineID of a story other than the current one.

Throws:
Scheherexception

getAllStates

public StateTimeSet getAllStates(NodeAddress timeline)
                          throws Scheherexception
Get a list of all States that have been activated for this Timeline.

Throws:
Scheherexception

reassignTransition

public void reassignTransition(NodeAddress timeline,
                               TransitionTime oldTime,
                               TransitionTime newTime)
                        throws Scheherexception
Reassign a Transition node from one state to another.

Throws:
Scheherexception

reassignTransitionsAroundState

public boolean reassignTransitionsAroundState(NodeAddress timeline,
                                              StateTime currentState,
                                              StateTime newStateTime,
                                              boolean starting)
                                       throws Scheherexception
Move a state from one time point to another from the point of view of any transitions that go to or from the state. Does not move any conditions from the current state to the new state. Returns whether anything changed.

Throws:
Scheherexception

internSCHArguments

public SCHArguments internSCHArguments(SCHArguments in)
                                throws Scheherexception
Before SCH-level objects can be stuck in the undo/redo memento, we need to remove all "live" references such as NodeProxies for nodes in the current instantiation of the graph.

Throws:
Scheherexception

uninternSCHArguments

public SCHArguments uninternSCHArguments(SCHArguments in)
                                  throws Scheherexception
Throws:
Scheherexception

reReferenceSCHArguments

public void reReferenceSCHArguments(SCHArguments in)
                             throws Scheherexception
Interpret SCHArguments by applying SCH-level semantics to NodeAddresses that were dereferenced by validateSCHArguments above. A sort of validateSCHArguments in reverse for when one of the "Valid" classes (e.g., ValidCharacter) needs to return its definition to other classes that don't know what NodeAddresses are. Works by REFERENCE! Does NOT make copy.

Throws:
Scheherexception

inScopeOfTimeline

public boolean inScopeOfTimeline(NodeAddress thisTimeline,
                                 TimelineID otherTimeline)
                          throws Scheherexception
Determines whether some timeline is in the scope of some other timeline -- that is, either the same one or one it are nested inside

Throws:
Scheherexception

getInterpPositionFromNode

public SCHPoint getInterpPositionFromNode(NodeAddress node,
                                          boolean getSourceSpanPosition)
                                   throws Scheherexception
Helper function that retrieves a common attribute from a node.

Throws:
Scheherexception

getInterpKeyFromNode

public InterpNodeID getInterpKeyFromNode(NodeAddress node)
                                  throws Scheherexception
Throws:
Scheherexception

getNoInterpretationFromNode

public java.lang.Boolean getNoInterpretationFromNode(NodeAddress node)
                                              throws Scheherexception
Throws:
Scheherexception

getAssignedPredicateFromNode

public AssignedPredicate getAssignedPredicateFromNode(NodeAddress node)
                                               throws Scheherexception
Throws:
Scheherexception

getAssignedPredicateFromNode

public AssignedPredicate getAssignedPredicateFromNode(NodeProxy assignedPredicateNode)
                                               throws Scheherexception
Throws:
Scheherexception

getAssignedPredicateFromAddress

public AssignedPredicate getAssignedPredicateFromAddress(NodeAddress timeline,
                                                         AssignedPredicateAddress apa)
                                                  throws Scheherexception
Throws:
Scheherexception

getAssignedConditionFromNode

public AssignedCondition getAssignedConditionFromNode(NodeProxy assignedConditionNode)
                                               throws Scheherexception
Throws:
Scheherexception

getAssignedActionFromNode

public AssignedAction getAssignedActionFromNode(NodeProxy assignedActionNode)
                                         throws Scheherexception
Throws:
Scheherexception

attachInterpPredicate

public void attachInterpPredicate(AssignedPredicate predicate,
                                  AssignedInterpNode interp)
                           throws Scheherexception
Throws:
Scheherexception

reattachInterpElement

public void reattachInterpElement(NodeAddress timeline,
                                  InterpElement interp,
                                  AssignedInterpNode newParent)
                           throws Scheherexception
Throws:
Scheherexception

getAllLinkedInterpElements

public InterpArcSet getAllLinkedInterpElements(NodeAddress timeline,
                                               InterpElement element,
                                               LinkDirection linkDirection)
                                        throws Scheherexception
Throws:
Scheherexception

getLinkedInterpElements

public InterpArcSet getLinkedInterpElements(NodeAddress timeline,
                                            InterpElement element,
                                            InterpretativeArcType arcType,
                                            LinkDirection linkDirection)
                                     throws Scheherexception
Throws:
Scheherexception

linkInterpElements

public void linkInterpElements(NodeAddress timeline,
                               InterpElement from,
                               InterpretativeArcType arcType,
                               InterpElement to)
                        throws Scheherexception
Throws:
Scheherexception

getInterpLineage

public AssignedInterpNodeSet getInterpLineage(NodeAddress timeline,
                                              InterpElement element)
                                       throws Scheherexception
Throws:
Scheherexception

getInterpLineage

public NodeAddressSet getInterpLineage(InterpElement element)
                                throws Scheherexception
Get an ordered list of ancestor InterpNode (agency boxes) for an interp element, starting with itself.

Throws:
Scheherexception

getChainsOfInterpNode

public InterpChainSet getChainsOfInterpNode(NodeAddress timeline,
                                            AssignedInterpNode node,
                                            boolean allowNestedHeads)
                                     throws Scheherexception
Throws:
Scheherexception

getInterpChain

public InterpChainLink getInterpChain(NodeAddress timeline,
                                      InterpretativeArcType incomingArcType,
                                      InterpElement element)
                               throws Scheherexception
Compiles an interp chain (possibly forking into many chains) starting at the designated element.

Throws:
Scheherexception

getActivationFrame

public ActivationFrame getActivationFrame(NodeAddress timeline,
                                          AssignedAction action)
                                   throws Scheherexception
Throws:
Scheherexception

propogateActivation

public void propogateActivation(InterpElement interp,
                                ActivationFrame frame,
                                Activation change)
                         throws Scheherexception
Throws:
Scheherexception

unlinkInterpElements

public void unlinkInterpElements(NodeAddress timeline,
                                 InterpElement from,
                                 InterpretativeArcType arcType,
                                 InterpElement to)
                          throws Scheherexception
Throws:
Scheherexception

setNoInterpretation

public void setNoInterpretation(AssignedPredicate ap,
                                java.lang.Boolean noInterpretation)
                         throws Scheherexception
Throws:
Scheherexception

getAssignedModifierFromNode

public AssignedModifier getAssignedModifierFromNode(NodeProxy assignedModifierNode)
                                             throws Scheherexception
Throws:
Scheherexception

normalizeAssignedPredicate

public AssignedPredicate normalizeAssignedPredicate(AssignedPredicate predicate)
                                             throws Scheherexception
Throws:
Scheherexception

makeSeedIntersection

public SCHIntersection makeSeedIntersection(java.lang.Object object,
                                            SemanticRole role,
                                            NodeAddress timeline,
                                            NarrativeID storyID)
                                     throws Scheherexception
Main switchboard for making a seed intersection out of a story element.

Throws:
Scheherexception

makeSeedIntersection

public SCHIntersection makeSeedIntersection(AssignedPredicate predicate,
                                            SemanticRole role,
                                            NarrativeID storyID,
                                            NounName associatedName)
                                     throws Scheherexception
Make a seed intersection out of an AssignedPredicate.

Throws:
Scheherexception

makeSeedIntersection

public SCHIntersection makeSeedIntersection(ValidPredicate predicate,
                                            SemanticRole role,
                                            NarrativeID storyID,
                                            NounName associatedName)
                                     throws Scheherexception
Throws:
Scheherexception

makeSeedIntersection

public SCHIntersection makeSeedIntersection(ValidPredicate predicate,
                                            SemanticRole role,
                                            NarrativeID storyID,
                                            NounName associatedName,
                                            boolean addContributor)
                                     throws Scheherexception
Throws:
Scheherexception

intersect

public SCHIntersection intersect(SCHIntersection int1,
                                 SCHIntersection int2,
                                 boolean checkStoryOverlap)
                          throws Scheherexception
Throws:
Scheherexception

intersectPairwise

public SCHIntersection intersectPairwise(SCHIntersection pred1,
                                         SCHIntersection pred2)
                                  throws Scheherexception
Throws:
Scheherexception

findNodeIntersection

public NodeAddress findNodeIntersection(NodeAddress frame1,
                                        NodeAddress frame2)
                                 throws Scheherexception
Throws:
Scheherexception

findHopsBetweenTypes

public int findHopsBetweenTypes(ScheherIDWithType from,
                                ScheherIDWithType to)
                         throws Scheherexception
Throws:
Scheherexception

declareNounType

public void declareNounType(NodeAddress timeline,
                            NounType nounType,
                            StoryAssertion expansionParams,
                            WordNetOffset offset,
                            NounType superNoun,
                            java.lang.String menuName,
                            java.lang.String pluralForm,
                            boolean proper,
                            PropDiscreteness discreteness,
                            CharacterGender gender)
                     throws Scheherexception
Declare that a type of Noun can exist in the world.

Parameters:
nounType - The name of the type of Noun.
superType - The name of the more general type of Noun of which this Noun should be a type. For example, a "baseball" might be a subtype of a "ball." For "root" nouns, those with no supertypes, use the NounType.Universal. A NounType that has a supertype can only be declared in the same timeline as its supertype.
maxInstances - The maximum number of instances of the noun that can exist. For nouns of unlimited supply, use the reserved value of -1.
Throws:
Scheherexception

getDeclaredNounTypes

public NounTypeSet getDeclaredNounTypes(NodeAddress timeline,
                                        boolean inherit,
                                        NounFlavor flavor)
                                 throws Scheherexception
Get a list of all declared noun types.

Throws:
Scheherexception

getNounParameters

public StoryAssertion getNounParameters(NodeAddress timeline,
                                        NounType nounType)
                                 throws Scheherexception
Get the parameters of a declared NounType.

Throws:
Scheherexception

makeValidNoun

public ValidNoun makeValidNoun(NodeAddress timeline,
                               NounType noun,
                               SCHArguments arguments)
                        throws Scheherexception
Define an instance of a previously declared Noun.

Throws:
Scheherexception

makeValidNoun

public ValidNoun makeValidNoun(NodeAddress timeline,
                               Noun noun)
                        throws Scheherexception
Define an instance of a previously declared Noun.

Throws:
Scheherexception

defineNoun

public NounName defineNoun(NodeAddress timeline,
                           ValidNoun noun,
                           NounName nounName)
                    throws Scheherexception
Define a particular Noun in the world, assigning it a name

Throws:
Scheherexception

getDefinedNouns

public NounNameSet getDefinedNouns(NodeAddress timeline,
                                   boolean inherit,
                                   NounFlavor flavor)
                            throws Scheherexception
Throws:
Scheherexception

findCompleteNounType

public NounType findCompleteNounType(NodeAddress timeline,
                                     NounType nounType)
                              throws Scheherexception
Throws:
Scheherexception

findNounDefinition

public ValidNoun findNounDefinition(NodeAddress timeline,
                                    NounName noun)
                             throws Scheherexception
Throws:
Scheherexception

redefineNoun

public NounName redefineNoun(NodeAddress timeline,
                             NounName oldName,
                             NounName newName,
                             ValidNoun newDefinition)
                      throws Scheherexception
Throws:
Scheherexception

undefineNoun

public void undefineNoun(NodeAddress timeline,
                         NounName noun)
                  throws Scheherexception
Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.