story.scheherazade.elements
Class NarrativeSymbolTable
java.lang.Object
story.scheherazade.elements.NarrativeSymbolTable
public class NarrativeSymbolTable
- extends java.lang.Object
This is a master symbol table for Narratives that hashes from
SCH-level names (e.g., CharacterName) to their NodeAddress
declaration nodes.
IMPORTANT: It is tempting to want to link from names to the more
durable NodeProxies. However, this symbol table is copied and
included as part of the undo/redo memento. Only NodeAddresses
persist across undo/redo; NodeProxies, being surrogates for
specific object instantiations, end up pointing to null after an
undo. That is why we link to NodeAddress here.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NarrativeSymbolTable
public NarrativeSymbolTable(DBCAccessor dbca)
makeCopy
public NarrativeSymbolTable makeCopy()
makeSymbolTableKey
public java.lang.String makeSymbolTableKey(NodeAddress timeline,
GenericScheherID ID)
throws Scheherexception
- Throws:
Scheherexception
makeSymbolTableKey
public java.lang.String makeSymbolTableKey(TimelineID ID,
int storyID)
throws Scheherexception
- Throws:
Scheherexception
declareElementNode
public void declareElementNode(java.lang.String key,
NodeAddress declarationNode)
throws Scheherexception
- Throws:
Scheherexception
declareElementNode
public void declareElementNode(java.lang.String key,
NodeProxy declarationNode)
throws Scheherexception
- Throws:
Scheherexception
undeclareElementNode
public void undeclareElementNode(java.lang.String key)
throws Scheherexception
- Throws:
Scheherexception
isDeclared
public boolean isDeclared(java.lang.String key)
throws Scheherexception
- Throws:
Scheherexception
getDeclaredElementNode
public NodeAddress getDeclaredElementNode(java.lang.String key)
throws Scheherexception
- Throws:
Scheherexception
render
public java.lang.StringBuffer render()
throws Scheherexception
- Throws:
Scheherexception
Copyright © 2011 David K. Elson. All Rights Reserved.