|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.scheherazade.misc.STools
public class STools
Bag of miscellaenous tricks specific to Scheherazade.
Nested Class Summary | |
---|---|
static class |
STools.EmptyHorizontal
An object that is an invisible placeholder of horizontal space. |
static class |
STools.EmptyVertical
An object that is an invisible placeholder of vertical space. |
Constructor Summary | |
---|---|
STools()
|
Method Summary | |
---|---|
static java.lang.String |
capitalize(java.lang.String in)
|
static java.lang.String |
compress(java.lang.String in)
|
static java.lang.String |
decompress(java.lang.String in)
|
static java.util.TreeSet |
getGroupMembers(SCHArguments args,
NounFlavor flavor)
Get the members of a group. |
static java.lang.String |
getNodeComment(DBCAccessor dbca,
NodeAddress node)
Get a comment of a node. |
static org.w3c.dom.Node |
getOnlyXMLChild(org.w3c.dom.Node node,
java.lang.String tag)
|
static StateTime |
getOnsetTime(AssignedPredicate predicate)
|
static Perspective |
getPerspective(TransitionTime actionTime,
TimelineTime perceptionTimelineTime)
Get the perspective of an action from some time. |
static Perspective |
getPerspective(TransitionTime actionTime,
TransitionTime actionTimeSlice,
TimelineTime perceptionTimelineTime,
boolean debug)
Get the perspective of a SLICE of an action from some time. |
static PredicateFlavor |
getPredicateFlavor(ScheherIDWithType type)
|
static AssignedConditionSet |
getProperties(StoryInterpreter story,
TimelineID timeline,
GenericScheherID ID)
Get the Properties of a certain GenericScheherID in the story. |
static int |
getTrailingInt(java.lang.String string)
Returns the integer at the end of a string. |
static ScheherIDWithType |
getType(java.lang.Object object)
|
static GenericScheherID |
getValidPredicateType(ValidPredicate predicate)
Java is a bit strange for not letting me put "public GenericScheherID getType()" in the ValidPredicate interface, because each ValidPredicate returns a different type for getType() -- ValidProp returns PropType, for example. |
static java.lang.String |
getVersion(java.lang.Object object)
Read in the version number from src/version.txt |
static java.lang.String |
getXMLAttribute(org.w3c.dom.Element element,
java.lang.String attname)
|
static java.lang.String |
getXMLAttribute(org.w3c.dom.Node node,
java.lang.String attname)
|
static boolean |
isPredicateFlavor(ScheherIDWithType type)
|
static boolean |
isValidInterpLeftType(InterpretativeNodeType nodeType,
InterpretativeArcType arcType)
|
static boolean |
isValidInterpRightType(InterpretativeNodeType nodeType,
InterpretativeArcType arcType)
|
static NounName |
makeNounName(NounFlavor nounFlavor,
java.lang.String name)
Switchboard for making a NounName |
static java.lang.String |
makeStandardPluralForm(java.lang.String singular)
|
static java.lang.String |
removeTail(java.lang.String string,
int numLettersToRemove)
|
static java.lang.String |
separateCamelCase(java.lang.String in)
|
static java.util.Hashtable<NounName,AssignedActionSet> |
sortActionsByAgent(StoryInterpreter story,
AssignedActionSet actions)
Returns a hashtable that has an AssignedActionSet for each agent/mover key. |
static java.util.Hashtable<NounName,AssignedConditionSet> |
sortConditionsByAgent(StoryInterpreter story,
AssignedConditionSet conditions)
Returns a hashtable that has an AssignedConditionSet for each agent/mover |
static boolean |
startsWithVowel(java.lang.String in)
Returns whether a string starts with a vowel. |
static void |
startupChecks(java.lang.Object object)
Stuff to do whenever Scheherazade starts. |
static boolean |
validVersion()
Checks to see if we are running java version >= 1.5. |
static java.lang.String |
verbalizeUnknownObject(java.lang.Object ID,
StoryInterpreter story,
Verbalizer verbalizer,
PlannerRepository planners)
Verbalize a GenericScheherID of unknown type. |
static java.lang.String |
verbalizeVirgilCommand(Virgil virgil,
StoryInterpreter story,
Verbalizer verbalizer,
PlannerRepository planners,
StoryPoint point)
|
static java.lang.String |
verbalizeVirgilCommand(Virgil virgil,
StoryInterpreter story,
Verbalizer verbalizer,
PlannerRepository planners,
VirgilCommand command)
Create an NL description of a StoryPoint for populating Undo and Redo buttons. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public STools()
Method Detail |
---|
public static java.lang.String getNodeComment(DBCAccessor dbca, NodeAddress node) throws Scheherexception
Scheherexception
public static boolean startsWithVowel(java.lang.String in)
public static int getTrailingInt(java.lang.String string) throws Scheherexception
Scheherexception
public static java.lang.String capitalize(java.lang.String in)
public static java.lang.String separateCamelCase(java.lang.String in)
public static java.lang.String verbalizeUnknownObject(java.lang.Object ID, StoryInterpreter story, Verbalizer verbalizer, PlannerRepository planners)
public static java.lang.String verbalizeVirgilCommand(Virgil virgil, StoryInterpreter story, Verbalizer verbalizer, PlannerRepository planners, VirgilCommand command) throws Scheherexception
Scheherexception
public static java.lang.String verbalizeVirgilCommand(Virgil virgil, StoryInterpreter story, Verbalizer verbalizer, PlannerRepository planners, StoryPoint point) throws Scheherexception
Scheherexception
public static GenericScheherID getValidPredicateType(ValidPredicate predicate) throws Scheherexception
Scheherexception
public static AssignedConditionSet getProperties(StoryInterpreter story, TimelineID timeline, GenericScheherID ID) throws Scheherexception
Scheherexception
public static java.util.Hashtable<NounName,AssignedActionSet> sortActionsByAgent(StoryInterpreter story, AssignedActionSet actions) throws Scheherexception
Scheherexception
public static java.util.Hashtable<NounName,AssignedConditionSet> sortConditionsByAgent(StoryInterpreter story, AssignedConditionSet conditions) throws Scheherexception
Scheherexception
public static boolean validVersion()
public static final java.lang.String getVersion(java.lang.Object object)
public static void startupChecks(java.lang.Object object) throws Scheherexception
Scheherexception
public static java.util.TreeSet getGroupMembers(SCHArguments args, NounFlavor flavor) throws Scheherexception
Scheherexception
public static NounName makeNounName(NounFlavor nounFlavor, java.lang.String name) throws Scheherexception
Scheherexception
public static StateTime getOnsetTime(AssignedPredicate predicate) throws Scheherexception
Scheherexception
public static Perspective getPerspective(TransitionTime actionTime, TransitionTime actionTimeSlice, TimelineTime perceptionTimelineTime, boolean debug) throws Scheherexception
Scheherexception
public static Perspective getPerspective(TransitionTime actionTime, TimelineTime perceptionTimelineTime) throws Scheherexception
Scheherexception
public static PredicateFlavor getPredicateFlavor(ScheherIDWithType type) throws Scheherexception
Scheherexception
public static boolean isPredicateFlavor(ScheherIDWithType type) throws Scheherexception
Scheherexception
public static ScheherIDWithType getType(java.lang.Object object) throws Scheherexception
Scheherexception
public static java.lang.String makeStandardPluralForm(java.lang.String singular)
public static java.lang.String removeTail(java.lang.String string, int numLettersToRemove) throws java.lang.Exception
java.lang.Exception
public static boolean isValidInterpLeftType(InterpretativeNodeType nodeType, InterpretativeArcType arcType)
public static boolean isValidInterpRightType(InterpretativeNodeType nodeType, InterpretativeArcType arcType)
public static java.lang.String compress(java.lang.String in) throws Scheherexception
Scheherexception
public static java.lang.String decompress(java.lang.String in) throws Scheherexception
Scheherexception
public static java.lang.String getXMLAttribute(org.w3c.dom.Element element, java.lang.String attname) throws Scheherexception
Scheherexception
public static java.lang.String getXMLAttribute(org.w3c.dom.Node node, java.lang.String attname) throws Scheherexception
Scheherexception
public static org.w3c.dom.Node getOnlyXMLChild(org.w3c.dom.Node node, java.lang.String tag) throws Scheherexception
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |