story.scheherazade.elements
Class Narrative

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

public class Narrative
extends java.lang.Object

A single Narrative.


Field Summary
static NodeRepositoryID FRAMES_REPOSITORYID
           
static NodeID PROTOTYPE_ACTION_NODEID
           
static NodeID PROTOTYPE_CONDITION_NODEID
           
static NodeID PROTOTYPE_MODIFIER_NODEID
           
static NodeID PROTOTYPE_SETTING_NODEID
           
static NodeID PROTOTYPE_STATE_NODEID
           
static NodeID PROTOTYPE_TIMELINE_NODEID
           
static NodeID PROTOTYPE_TRANSITION_NODEID
           
 
Constructor Summary
Narrative(NarrativeID title)
          Constructor that creates a new narrative from scratch.
 
Method Summary
 AssignedAction assignAction(TimelineID timelineID, TransitionTime time, ValidAction action, TextSpan span, InterpNodeID key)
          Associates an Action with a Transition.
 AssignedCondition assignCondition(TimelineID timelineID, StateTime time, ValidCondition condition, TextSpan sourceSpan, InterpNodeID key)
          Associates a Character with an instancing of a Condition.
 AssignedInterpNode assignInterpNode(TimelineID timelineID, InterpretativeNodeType interpNodeType, NounName character, AssignedInterpNode parent, InterpNodeID key, SCHPoint position)
          Assigns an Interp node.
 AssignedModifier assignModifier(AssignedPredicate modified, ValidModifier modifier, ModifierScope scope, TextSpan sourceSpan)
          Associates a Modifier with a predicate.
 void attachInterpPredicate(AssignedPredicate predicate, AssignedInterpNode interpNode)
           
 IntersectionPyramid compareNarratives(StorySet stories)
          Compare all the narratives currently loaded.
 void coreStoryFinished()
           
 void declareAction(TimelineID timelineID, ActionType actionType, StoryAssertion parameters, WordNetOffset offset, ActionType superAction)
          Declare a new Action in a timeline.
 void declareAntonymy(TimelineID timelineID, ActionType action1, ActionType action2)
          Declare antonymy between two actions.
 void declareCondition(TimelineID timelineID, ConditionType conditionType, StoryAssertion parameters, ConditionType superCondition)
          Declare that a certain Condition can exist in the world.
 void declareModifier(TimelineID timelineID, ModifierType modifierType, ModifiablePredicates modifiables, StoryAssertion parameters, ModifierType superModifier)
          Declare that a certain Modifier can exist in the world.
 void declareMorphologicalRelation(TimelineID timelineID, ConditionType condition, ModifierType modifier)
          Declare a morphological relationship between a condition type and an action type.
 void declareNounType(TimelineID timelineID, NounType nounType, StoryAssertion parameters, WordNetOffset offset, NounType superNoun, java.lang.String menuName, java.lang.String pluralForm, boolean proper, PropDiscreteness discreteness, CharacterGender gender)
           
 NounName defineNoun(TimelineID timelineID, ValidNoun noun, NounName nounName)
          Declare a particular Noun in the world, assigning it a name
 AssignedAction findAssignedAction(TimelineID timelineID, AssignedActionAddress aaa)
          Locates a previously assigned action.
 AssignedCondition findAssignedCondition(TimelineID timelineID, AssignedConditionAddress aca)
           
 InterpElement findAssignedInterpElement(TimelineID timelineID, InterpNodeID key)
          Locates a previously assigned action.
 AssignedModifier findAssignedModifier(TimelineID timelineID, AssignedModifierAddress ama)
          Locates a previously assigned modifier.
 ValidNoun findNounDefinition(TimelineID timelineID, NounName noun)
          Find the definition of a Noun by its name.
 void flipToBookmark(Bookmark bookmark)
          Reconstruct the Narrative of a previous defined point in time.
 StoryTelling generateRandomNarrative(TimelineID timelineID, int numPredicates, LanguageModel model)
           
 StoryAssertion getActionParameters(TimelineID timelineID, ActionType actionType)
          Get the parameters of an Action declared in a Timeline.
 AssignedActionSet getActionsBeginningAt(TimelineID timelineID, StateTime time)
          Get a list of all Actions beginning at a certain StateTime
 AssignedActionSet getActionsEndingAt(TimelineID timelineID, StateTime time)
          Get a list of all Actions ending at a certain StateTime
 AssignedActionSet getActionsInTransition(TimelineID timelineID, TransitionTime time)
          Get a list of all Actions assigned in a Transition.
 ActivationFrame getActivationFrame(TimelineID timelineID, AssignedAction action)
           
 AssignedActionSet getAllActions(TimelineID timelineID)
          Get a list of all Actions in a Timeline.
 AssignedConditionSet getAllConditions(TimelineID timelineID)
          Get a list of all Conditions in a Timeline.
 AssignedInterpNodeSet getAllInterpNodes(TimelineID timelineID, boolean topLevelOnly)
          Get a list of all Interp nodes in a Timeline.
 TimelineIDSet getAllTimelines()
          Get a list of all extant Timelines.
 AssignedAction getAssignedActionFromNode(NodeProxy node)
          Retrieve the metadata associated with a certain Action.
 AssignedCondition getAssignedConditionFromNode(NodeProxy node)
          Retrieve the metadata associated with a certain Condition.
 AssignedModifier getAssignedModifierFromNode(NodeProxy node)
          Retrieve the metadata associated with a certain Modifier.
 AssignedCondition getAssignedPersistentCondition(AssignedAction action)
          Given an assigned ConditionBegins action, get the AssignedCondition object for the condition that began.
 AssignedPredicate getAssignedPredicateFromAddress(TimelineID timelineID, AssignedPredicateAddress apa)
          Retrieve the metadata associated with a certain Predicate.
 AssignedPredicate getAssignedPredicateFromNode(NodeProxy node)
          Retrieve the metadata associated with a certain Predicate.
 TimelineTime getAttachmentPoint(TimelineID timelineID)
          Gets the attachment point of a timeline.
 Bookmark getBookmark()
          Get a Bookmark of the current state of the Narrative.
 InterpChainSet getChainsOfInterpNode(TimelineID timelineID, AssignedInterpNode node, boolean allowNestedHeads)
           
 AssignedAction getConditionBeginsAction(AssignedCondition condition)
          Given an assigned ConditionBegins action, get the AssignedCondition object for the condition that began.
 StoryAssertion getConditionParameters(TimelineID timelineID, ConditionType conditionType)
          Get the parameters of a Condition declared in a Timeline.
 AssignedConditionSet getConditionsInState(TimelineID timelineID, StateTime time, boolean localOnly)
          Get the Conditions associated with a particular State.
 ConditionSet getConditionsOfNounInState(TimelineID timelineID, StateTime time, boolean localOnly, NounName noun, SemanticRole role)
          Get the Conditions associated with a particular State and Noun under a certain semantic role.
 ActionTypeSet getDeclaredActions(TimelineID timelineID, boolean inherit)
          Get a list of all ActionTypes declared in a Timeline.
 ConditionTypeSet getDeclaredConditions(TimelineID timelineID, boolean inherit)
          Get a list of all ConditionTypes declared in a Timeline.
 ModifierTypeSet getDeclaredModifiers(TimelineID timelineID, boolean inherit)
          Get a list of all ModifierTypes declared in a Timeline.
 NounTypeSet getDeclaredNounTypes(TimelineID timelineID, boolean inherit, NounFlavor flavor)
          Get a list of all noun types declared in a Timeline.
 NounNameSet getDefinedNouns(TimelineID timelineID, boolean inherit, NounFlavor flavor)
          Get a list of all Nouns (NOT noun types) declared in a Timeline.
 InterpChainLink getInterpChain(TimelineID timelineID, InterpElement element)
           
 AssignedInterpNodeSet getInterpLineage(TimelineID timelineID, InterpElement element)
           
 StateTimeSet getInvokedStatesInTimeline(TimelineID timelineID)
          Get a list of all states declared in a Timeline.
 InterpArcSet getLinkedInterpElements(TimelineID timelineID, InterpElement element, InterpretativeArcType arcType, LinkDirection linkDirection)
           
 ModifiablePredicates getModifiablePredicates(TimelineID timelineID, ModifierType modifierType)
          Get the types of predicates which were defined as being modifiable by a Modifier.
 StoryAssertion getModifierParameters(TimelineID timelineID, ModifierType modifierType)
          Get the parameters of a Modifier declared in a Timeline.
 AssignedModifierSet getModifiersOfPredicate(AssignedPredicate modified)
          Get the Modifiers assigned to a predicate.
 StoryAssertion getNounParameters(TimelineID timelineID, NounType nounType)
          Get the parameters of a declared NounType.
 NarrativeID getTitle()
          Return the ID of this narrative.
 boolean inCoreStory()
           
 void initializeNarrative(NarrativeID title)
           
 SCHIntersection intersectPairwise(SCHIntersection pred1, SCHIntersection pred2)
          ANALYSIS
 void launchDebugger()
          Launch a browser to view the underlying DB-Core semantic network.
 void linkInterpElements(TimelineID timelineID, InterpElement from, InterpretativeArcType arcType, InterpElement to)
           
 ValidAction makeValidAction(TimelineID timelineID, ActionType actionType, SCHArguments arguments, int truthDegree, PredicateMode mode)
          Create an instance of a previously declared Action.
 ValidCondition makeValidCondition(TimelineID timelineID, ConditionType conditionType, SCHArguments arguments, int truthDegree, PredicateMode mode)
          Create an instance of a previously declared Condition.
 ValidModifier makeValidModifier(TimelineID timelineID, ModifierType modifierType, SCHArguments arguments)
          Create an instance of a previously declared Modifier.
 ValidNoun makeValidNoun(TimelineID timelineID, NounType nounType, SCHArguments arguments)
          Create an instance of a previously declared Noun.
 void newTimeline(TimelineID newTimelineID, TimelineType type, TimelineID referentTimelineID)
          Starts a new Timeline with a referent timeline.
 AssignedPredicate normalizeAssignedPredicate(AssignedPredicate predicate)
          Normalize a predicate.
 java.lang.StringBuffer printState()
          Render the state of the underlying db-core.
 SCHQueryResultSet query(StoryQuery query)
          Issue a Query of the Narrative.
 AssignedAction reassignAction(AssignedAction action, TransitionTime newTransition)
          Moves a previously assigned Action to another Transition.
 void reassignTransition(TimelineID timelineID, TransitionTime oldTime, TransitionTime newTime)
          Reassign a transition from one pair of time indexes to another.
 boolean reassignTransitionsAroundState(TimelineID timelineID, StateTime currentState, StateTime newState, 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(InterpElement interp, AssignedInterpNode newParent)
           
 AssignedAction redefineAction(AssignedAction oldAction, ValidAction newAction)
          Redefines (edits) a previously assigned Action.
 AssignedCondition redefineCondition(AssignedCondition oldCondition, ValidCondition newCondition)
          Redefines (edits) a previously assigned Condition.
 AssignedModifier redefineModifier(AssignedModifier oldModifier, ValidModifier newModifier)
          Redefines (edits) a previously assigned Modifier.
 NounName redefineNoun(TimelineID timelineID, NounName oldName, NounName newName, ValidNoun newDefinition)
          Redefine a Noun.
 void removeAssignedAction(TimelineID timeline, AssignedAction action)
          Removes a previously assigned Action.
 void removeAssignedCondition(TimelineID timeline, AssignedCondition condition)
          Removes a previously assigned Condition.
 void removeAssignedModifier(TimelineID timeline, AssignedModifier modifier)
          Removes a previously assigned Modifier.
 void removeInterpNode(TimelineID timelineID, InterpNodeID key)
          Removes an interp node.
 java.lang.StringBuffer render()
          Render the narrative
 void setAttachmentPoint(TimelineID timelineID, TimelineTime time)
          Sets the attachment point of a timeline.
 AssignedPredicate setConditionality(AssignedPredicate predicate, Conditionality conditionality)
          Set the conditionality of a predicate.
 void setInterpPosition(TimelineID timelineID, InterpElement element, SCHPoint position)
          Sets the position of an interpretative-element box on the canvas.
 void setNoInterpretation(AssignedPredicate predicate, java.lang.Boolean noInterpretation)
          Sets whether a predicate needs no interp-level nodes attached (no interpretation).
 void setSourceTextSpan(AssignedPredicate predicate, TextSpan span)
          Associate a text span with a predicate.
 void shell()
          For testing ONLY: start a db-core shell
 void swapCreationTimes(AssignedAction action1, AssignedAction action2)
          Swaps the "creation time" fields of two assigned actions, as if they were made in opposite order as they were actually assigned.
 void switchToNarrative(NarrativeID title)
           
 void undefineNoun(TimelineID timelineID, NounName noun)
          Undefine a Noun.
 void undoTest()
          For testing ONLY: does an undo and a redo over the DB-core, and verifies that the narrative is still valid.
 void unlinkInterpElements(TimelineID timelineID, InterpElement from, InterpretativeArcType arcType, InterpElement to)
           
 InterpValidationResult validateInterp(TimelineID timelineID)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRAMES_REPOSITORYID

public static final NodeRepositoryID FRAMES_REPOSITORYID

PROTOTYPE_SETTING_NODEID

public static final NodeID PROTOTYPE_SETTING_NODEID

PROTOTYPE_CONDITION_NODEID

public static final NodeID PROTOTYPE_CONDITION_NODEID

PROTOTYPE_ACTION_NODEID

public static final NodeID PROTOTYPE_ACTION_NODEID

PROTOTYPE_MODIFIER_NODEID

public static final NodeID PROTOTYPE_MODIFIER_NODEID

PROTOTYPE_TIMELINE_NODEID

public static final NodeID PROTOTYPE_TIMELINE_NODEID

PROTOTYPE_STATE_NODEID

public static final NodeID PROTOTYPE_STATE_NODEID

PROTOTYPE_TRANSITION_NODEID

public static final NodeID PROTOTYPE_TRANSITION_NODEID
Constructor Detail

Narrative

public Narrative(NarrativeID title)
          throws Scheherexception
Constructor that creates a new narrative from scratch.

Throws:
Scheherexception
Method Detail

switchToNarrative

public void switchToNarrative(NarrativeID title)
                       throws Scheherexception
Throws:
Scheherexception

inCoreStory

public boolean inCoreStory()

coreStoryFinished

public void coreStoryFinished()
                       throws Scheherexception
Throws:
Scheherexception

getBookmark

public Bookmark getBookmark()
                     throws Scheherexception
Get a Bookmark of the current state of the Narrative.

Throws:
Scheherexception

flipToBookmark

public void flipToBookmark(Bookmark bookmark)
                    throws Scheherexception
Reconstruct the Narrative of a previous defined point in time.

Throws:
Scheherexception

initializeNarrative

public void initializeNarrative(NarrativeID title)
                         throws Scheherexception
Throws:
Scheherexception

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Render the narrative

Throws:
Scheherexception

launchDebugger

public void launchDebugger()
                    throws Scheherexception
Launch a browser to view the underlying DB-Core semantic network.

Throws:
Scheherexception

getTitle

public NarrativeID getTitle()
Return the ID of this narrative.


printState

public java.lang.StringBuffer printState()
                                  throws Scheherexception
Render the state of the underlying db-core.

Throws:
Scheherexception

undoTest

public void undoTest()
              throws Scheherexception
For testing ONLY: does an undo and a redo over the DB-core, and verifies that the narrative is still valid.

Throws:
Scheherexception

shell

public void shell()
           throws Scheherexception
For testing ONLY: start a db-core shell

Throws:
Scheherexception

newTimeline

public void newTimeline(TimelineID newTimelineID,
                        TimelineType type,
                        TimelineID referentTimelineID)
                 throws Scheherexception
Starts a new Timeline with a referent timeline.

Throws:
Scheherexception

getAttachmentPoint

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

Throws:
Scheherexception

setAttachmentPoint

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

Throws:
Scheherexception

setNoInterpretation

public void setNoInterpretation(AssignedPredicate predicate,
                                java.lang.Boolean noInterpretation)
                         throws Scheherexception
Sets whether a predicate needs no interp-level nodes attached (no interpretation).

Throws:
Scheherexception

setSourceTextSpan

public void setSourceTextSpan(AssignedPredicate predicate,
                              TextSpan span)
                       throws Scheherexception
Associate a text span with a predicate.

Throws:
Scheherexception

getAllTimelines

public TimelineIDSet getAllTimelines()
                              throws Scheherexception
Get a list of all extant Timelines.

Throws:
Scheherexception

getInvokedStatesInTimeline

public StateTimeSet getInvokedStatesInTimeline(TimelineID timelineID)
                                        throws Scheherexception
Get a list of all states declared in a Timeline.

Throws:
Scheherexception

getActionsBeginningAt

public AssignedActionSet getActionsBeginningAt(TimelineID timelineID,
                                               StateTime time)
                                        throws Scheherexception
Get a list of all Actions beginning at a certain StateTime

Throws:
Scheherexception

getActionsEndingAt

public AssignedActionSet getActionsEndingAt(TimelineID timelineID,
                                            StateTime time)
                                     throws Scheherexception
Get a list of all Actions ending at a certain StateTime

Throws:
Scheherexception

getActionsInTransition

public AssignedActionSet getActionsInTransition(TimelineID timelineID,
                                                TransitionTime time)
                                         throws Scheherexception
Get a list of all Actions assigned in a Transition.

Throws:
Scheherexception

getAllActions

public AssignedActionSet getAllActions(TimelineID timelineID)
                                throws Scheherexception
Get a list of all Actions in a Timeline.

Throws:
Scheherexception

getAllConditions

public AssignedConditionSet getAllConditions(TimelineID timelineID)
                                      throws Scheherexception
Get a list of all Conditions in a Timeline.

Throws:
Scheherexception

getAllInterpNodes

public AssignedInterpNodeSet getAllInterpNodes(TimelineID timelineID,
                                               boolean topLevelOnly)
                                        throws Scheherexception
Get a list of all Interp nodes in a Timeline.

Throws:
Scheherexception

attachInterpPredicate

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

reattachInterpElement

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

setInterpPosition

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

Throws:
Scheherexception

getChainsOfInterpNode

public InterpChainSet getChainsOfInterpNode(TimelineID timelineID,
                                            AssignedInterpNode node,
                                            boolean allowNestedHeads)
                                     throws Scheherexception
Throws:
Scheherexception

getInterpChain

public InterpChainLink getInterpChain(TimelineID timelineID,
                                      InterpElement element)
                               throws Scheherexception
Throws:
Scheherexception

getActivationFrame

public ActivationFrame getActivationFrame(TimelineID timelineID,
                                          AssignedAction action)
                                   throws Scheherexception
Throws:
Scheherexception

getInterpLineage

public AssignedInterpNodeSet getInterpLineage(TimelineID timelineID,
                                              InterpElement element)
                                       throws Scheherexception
Throws:
Scheherexception

getDeclaredConditions

public ConditionTypeSet getDeclaredConditions(TimelineID timelineID,
                                              boolean inherit)
                                       throws Scheherexception
Get a list of all ConditionTypes declared in a Timeline.

Parameters:
inherit - Set false to only check the given timeline; set true to check timeline(s) that the given one is nested inside.
Throws:
Scheherexception

getDeclaredActions

public ActionTypeSet getDeclaredActions(TimelineID timelineID,
                                        boolean inherit)
                                 throws Scheherexception
Get a list of all ActionTypes declared in a Timeline.

Parameters:
inherit - Set false to only check the given timeline; set true to check timeline(s) that the given one is nested inside.
Throws:
Scheherexception

getDeclaredModifiers

public ModifierTypeSet getDeclaredModifiers(TimelineID timelineID,
                                            boolean inherit)
                                     throws Scheherexception
Get a list of all ModifierTypes declared in a Timeline.

Parameters:
inherit - Set false to only check the given timeline; set true to check timeline(s) that the given one is nested inside.
Throws:
Scheherexception

getLinkedInterpElements

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

linkInterpElements

public void linkInterpElements(TimelineID timelineID,
                               InterpElement from,
                               InterpretativeArcType arcType,
                               InterpElement to)
                        throws Scheherexception
Throws:
Scheherexception

unlinkInterpElements

public void unlinkInterpElements(TimelineID timelineID,
                                 InterpElement from,
                                 InterpretativeArcType arcType,
                                 InterpElement to)
                          throws Scheherexception
Throws:
Scheherexception

validateInterp

public InterpValidationResult validateInterp(TimelineID timelineID)
                                      throws Scheherexception
Throws:
Scheherexception

getConditionParameters

public StoryAssertion getConditionParameters(TimelineID timelineID,
                                             ConditionType conditionType)
                                      throws Scheherexception
Get the parameters of a Condition declared in a Timeline.

Throws:
Scheherexception

getActionParameters

public StoryAssertion getActionParameters(TimelineID timelineID,
                                          ActionType actionType)
                                   throws Scheherexception
Get the parameters of an Action declared in a Timeline.

Throws:
Scheherexception

getModifiablePredicates

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

Throws:
Scheherexception

getModifierParameters

public StoryAssertion getModifierParameters(TimelineID timelineID,
                                            ModifierType modifierType)
                                     throws Scheherexception
Get the parameters of a Modifier declared in a Timeline.

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 a predicate.

Throws:
Scheherexception

getConditionsInState

public AssignedConditionSet getConditionsInState(TimelineID timelineID,
                                                 StateTime time,
                                                 boolean localOnly)
                                          throws Scheherexception
Get the Conditions associated with a particular State.

Throws:
Scheherexception

getConditionsOfNounInState

public ConditionSet getConditionsOfNounInState(TimelineID timelineID,
                                               StateTime time,
                                               boolean localOnly,
                                               NounName noun,
                                               SemanticRole role)
                                        throws Scheherexception
Get the Conditions associated with a particular State and Noun under a certain semantic role.

Throws:
Scheherexception

declareCondition

public void declareCondition(TimelineID timelineID,
                             ConditionType conditionType,
                             StoryAssertion parameters,
                             ConditionType superCondition)
                      throws Scheherexception
Declare that a certain Condition can exist in the world.

Throws:
Scheherexception

makeValidCondition

public ValidCondition makeValidCondition(TimelineID timelineID,
                                         ConditionType conditionType,
                                         SCHArguments arguments,
                                         int truthDegree,
                                         PredicateMode mode)
                                  throws Scheherexception
Create an instance of a previously declared Condition.

Throws:
Scheherexception

makeValidAction

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

Throws:
Scheherexception

declareModifier

public void declareModifier(TimelineID timelineID,
                            ModifierType modifierType,
                            ModifiablePredicates modifiables,
                            StoryAssertion parameters,
                            ModifierType superModifier)
                     throws Scheherexception
Declare that a certain Modifier can exist in the world.

Throws:
Scheherexception

makeValidModifier

public ValidModifier makeValidModifier(TimelineID timelineID,
                                       ModifierType modifierType,
                                       SCHArguments arguments)
                                throws Scheherexception
Create an instance of a previously declared Modifier.

Throws:
Scheherexception

getAssignedActionFromNode

public AssignedAction getAssignedActionFromNode(NodeProxy node)
                                         throws Scheherexception
Retrieve the metadata associated with a certain Action.

Throws:
Scheherexception

getAssignedConditionFromNode

public AssignedCondition getAssignedConditionFromNode(NodeProxy node)
                                               throws Scheherexception
Retrieve the metadata associated with a certain Condition.

Throws:
Scheherexception

getAssignedModifierFromNode

public AssignedModifier getAssignedModifierFromNode(NodeProxy node)
                                             throws Scheherexception
Retrieve the metadata associated with a certain Modifier.

Throws:
Scheherexception

getAssignedPredicateFromNode

public AssignedPredicate getAssignedPredicateFromNode(NodeProxy node)
                                               throws Scheherexception
Retrieve the metadata associated with a certain Predicate.

Throws:
Scheherexception

getAssignedPredicateFromAddress

public AssignedPredicate getAssignedPredicateFromAddress(TimelineID timelineID,
                                                         AssignedPredicateAddress apa)
                                                  throws Scheherexception
Retrieve the metadata associated with a certain Predicate.

Throws:
Scheherexception

getAssignedPersistentCondition

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

Throws:
Scheherexception

getConditionBeginsAction

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

Throws:
Scheherexception

reassignTransition

public void reassignTransition(TimelineID timelineID,
                               TransitionTime oldTime,
                               TransitionTime newTime)
                        throws Scheherexception
Reassign a transition from one pair of time indexes to another.

Throws:
Scheherexception

reassignTransitionsAroundState

public boolean reassignTransitionsAroundState(TimelineID timelineID,
                                              StateTime currentState,
                                              StateTime newState,
                                              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

declareNounType

public void declareNounType(TimelineID timelineID,
                            NounType nounType,
                            StoryAssertion parameters,
                            WordNetOffset offset,
                            NounType superNoun,
                            java.lang.String menuName,
                            java.lang.String pluralForm,
                            boolean proper,
                            PropDiscreteness discreteness,
                            CharacterGender gender)
                     throws Scheherexception
Throws:
Scheherexception

getDeclaredNounTypes

public NounTypeSet getDeclaredNounTypes(TimelineID timelineID,
                                        boolean inherit,
                                        NounFlavor flavor)
                                 throws Scheherexception
Get a list of all noun types declared in a Timeline.

Parameters:
inherit - Set false to only check the given timeline; set true to check timeline(s) that the given one is nested inside.
Throws:
Scheherexception

getNounParameters

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

Throws:
Scheherexception

makeValidNoun

public ValidNoun makeValidNoun(TimelineID timelineID,
                               NounType nounType,
                               SCHArguments arguments)
                        throws Scheherexception
Create an instance of a previously declared Noun.

Throws:
Scheherexception

defineNoun

public NounName defineNoun(TimelineID timelineID,
                           ValidNoun noun,
                           NounName nounName)
                    throws Scheherexception
Declare a particular Noun in the world, assigning it a name

Throws:
Scheherexception

getDefinedNouns

public NounNameSet getDefinedNouns(TimelineID timelineID,
                                   boolean inherit,
                                   NounFlavor flavor)
                            throws Scheherexception
Get a list of all Nouns (NOT noun types) declared in a Timeline.

Parameters:
inherit - Set false to only check the given timeline; set true to check timeline(s) that the given one is nested inside.
Throws:
Scheherexception

findNounDefinition

public ValidNoun findNounDefinition(TimelineID timelineID,
                                    NounName noun)
                             throws Scheherexception
Find the definition of a Noun by its name.

Throws:
Scheherexception

redefineNoun

public NounName redefineNoun(TimelineID timelineID,
                             NounName oldName,
                             NounName newName,
                             ValidNoun newDefinition)
                      throws Scheherexception
Redefine a Noun.

Throws:
Scheherexception

undefineNoun

public void undefineNoun(TimelineID timelineID,
                         NounName noun)
                  throws Scheherexception
Undefine a Noun. Noun must never be used in the narrative.

Throws:
Scheherexception

assignAction

public AssignedAction assignAction(TimelineID timelineID,
                                   TransitionTime time,
                                   ValidAction action,
                                   TextSpan span,
                                   InterpNodeID key)
                            throws Scheherexception
Associates an Action with a Transition.

Throws:
Scheherexception

swapCreationTimes

public void swapCreationTimes(AssignedAction action1,
                              AssignedAction action2)
                       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 action,
                                     TransitionTime newTransition)
                              throws Scheherexception
Moves a previously assigned Action to another Transition.

Throws:
Scheherexception

findAssignedAction

public AssignedAction findAssignedAction(TimelineID timelineID,
                                         AssignedActionAddress aaa)
                                  throws Scheherexception
Locates a previously assigned action.

Throws:
Scheherexception

removeAssignedAction

public void removeAssignedAction(TimelineID timeline,
                                 AssignedAction action)
                          throws Scheherexception
Removes a previously assigned Action.

Throws:
Scheherexception

redefineAction

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

Throws:
Scheherexception

assignCondition

public AssignedCondition assignCondition(TimelineID timelineID,
                                         StateTime time,
                                         ValidCondition condition,
                                         TextSpan sourceSpan,
                                         InterpNodeID key)
                                  throws Scheherexception
Associates a Character with an instancing of a Condition.

Throws:
Scheherexception

redefineModifier

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

Throws:
Scheherexception

assignModifier

public AssignedModifier assignModifier(AssignedPredicate modified,
                                       ValidModifier modifier,
                                       ModifierScope scope,
                                       TextSpan sourceSpan)
                                throws Scheherexception
Associates a Modifier with a predicate.

Throws:
Scheherexception

findAssignedModifier

public AssignedModifier findAssignedModifier(TimelineID timelineID,
                                             AssignedModifierAddress ama)
                                      throws Scheherexception
Locates a previously assigned modifier.

Throws:
Scheherexception

removeAssignedModifier

public void removeAssignedModifier(TimelineID timeline,
                                   AssignedModifier modifier)
                            throws Scheherexception
Removes a previously assigned Modifier.

Throws:
Scheherexception

findAssignedCondition

public AssignedCondition findAssignedCondition(TimelineID timelineID,
                                               AssignedConditionAddress aca)
                                        throws Scheherexception
Throws:
Scheherexception

removeAssignedCondition

public void removeAssignedCondition(TimelineID timeline,
                                    AssignedCondition condition)
                             throws Scheherexception
Removes a previously assigned Condition.

Throws:
Scheherexception

redefineCondition

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

Throws:
Scheherexception

findAssignedInterpElement

public InterpElement findAssignedInterpElement(TimelineID timelineID,
                                               InterpNodeID key)
                                        throws Scheherexception
Locates a previously assigned action.

Throws:
Scheherexception

declareAction

public void declareAction(TimelineID timelineID,
                          ActionType actionType,
                          StoryAssertion parameters,
                          WordNetOffset offset,
                          ActionType superAction)
                   throws Scheherexception
Declare a new Action in a timeline.

Throws:
Scheherexception

declareAntonymy

public void declareAntonymy(TimelineID timelineID,
                            ActionType action1,
                            ActionType action2)
                     throws Scheherexception
Declare antonymy between two actions.

Throws:
Scheherexception

declareMorphologicalRelation

public void declareMorphologicalRelation(TimelineID timelineID,
                                         ConditionType condition,
                                         ModifierType modifier)
                                  throws Scheherexception
Declare a morphological relationship between a condition type and an action type.

Throws:
Scheherexception

normalizeAssignedPredicate

public AssignedPredicate normalizeAssignedPredicate(AssignedPredicate predicate)
                                             throws Scheherexception
Normalize a predicate.

Throws:
Scheherexception

assignInterpNode

public AssignedInterpNode assignInterpNode(TimelineID timelineID,
                                           InterpretativeNodeType interpNodeType,
                                           NounName character,
                                           AssignedInterpNode parent,
                                           InterpNodeID key,
                                           SCHPoint position)
                                    throws Scheherexception
Assigns an Interp node.

Throws:
Scheherexception

removeInterpNode

public void removeInterpNode(TimelineID timelineID,
                             InterpNodeID key)
                      throws Scheherexception
Removes an interp node.

Throws:
Scheherexception

query

public SCHQueryResultSet query(StoryQuery query)
                        throws Scheherexception
Issue a Query of the Narrative.

Throws:
Scheherexception

intersectPairwise

public SCHIntersection intersectPairwise(SCHIntersection pred1,
                                         SCHIntersection pred2)
                                  throws Scheherexception
ANALYSIS

Throws:
Scheherexception

generateRandomNarrative

public StoryTelling generateRandomNarrative(TimelineID timelineID,
                                            int numPredicates,
                                            LanguageModel model)
                                     throws Scheherexception
Throws:
Scheherexception

compareNarratives

public IntersectionPyramid compareNarratives(StorySet stories)
                                      throws Scheherexception
Compare all the narratives currently loaded. Returns a vector of vectors of SCHIntersections. Each inner vector is a group of intersections for some number of contributors, 1..n for n stories loaded. The outer vector contains such a vector for each n in 1..n.

Throws:
Scheherexception


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