story.scheherazade.misc
Class TimelineID

java.lang.Object
  extended by story.scheherazade.misc.GenericScheherID
      extended by story.scheherazade.misc.TimelineID
All Implemented Interfaces:
java.lang.Comparable, RenderableObject, ScheherIDWithType

public class TimelineID
extends GenericScheherID
implements java.lang.Comparable, ScheherIDWithType

Extension of GenericScheherID that semantically represents the ID of a Timeline.


Field Summary
static TimelineID INTERP
           
static TimelineID REALITY
           
static TimelineID UNIVERSAL
           
 
Constructor Summary
TimelineID(java.lang.String name)
           
TimelineID(TimelineID ID, TimelineID superTimelineID, long creationTime)
          Constructor for including supertimeline metadata.
 
Method Summary
 int compareTo(java.lang.Object other)
           
 long getCreationTime()
           
 GenericScheherID getType()
          Get the GenericScheherID's type (or supertype, if it's already a type).
 WordNetOffset getWordNetOffset()
          Get the GenericScheherID's WordNet synset offset
 boolean knownInScopeOf(TimelineID possibleAncestor)
          Return true if super-timeline metadata is set and this timelien is in the scope of (a descendant of) some other timeline.
static TimelineID makeTimelineID(java.lang.String name)
          Convenient function that returns a TimelineID for a certain string, either by constructing a new one or returning the static field(s) for reserved IDs.
 java.lang.StringBuffer render()
          Render the ID in a StringBuffer.
 
Methods inherited from class story.scheherazade.misc.GenericScheherID
equals, getIDType, isEveryType, isGenericType, isGroupType, isUniversalType, toRawString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface story.scheherazade.misc.ScheherIDWithType
isUniversalType
 

Field Detail

UNIVERSAL

public static final TimelineID UNIVERSAL

REALITY

public static final TimelineID REALITY

INTERP

public static final TimelineID INTERP
Constructor Detail

TimelineID

public TimelineID(java.lang.String name)
           throws Scheherexception
Throws:
Scheherexception

TimelineID

public TimelineID(TimelineID ID,
                  TimelineID superTimelineID,
                  long creationTime)
           throws Scheherexception
Constructor for including supertimeline metadata.

Throws:
Scheherexception
Method Detail

makeTimelineID

public static TimelineID makeTimelineID(java.lang.String name)
                                 throws Scheherexception
Convenient function that returns a TimelineID for a certain string, either by constructing a new one or returning the static field(s) for reserved IDs.

Throws:
Scheherexception

getCreationTime

public long getCreationTime()

compareTo

public int compareTo(java.lang.Object other)
              throws java.lang.ClassCastException
Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class GenericScheherID
Throws:
java.lang.ClassCastException

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Description copied from class: GenericScheherID
Render the ID in a StringBuffer. Automatically punctuates according to ID type.

Specified by:
render in interface RenderableObject
Specified by:
render in class GenericScheherID
Throws:
Scheherexception

getType

public GenericScheherID getType()
                         throws Scheherexception
Description copied from interface: ScheherIDWithType
Get the GenericScheherID's type (or supertype, if it's already a type).

Specified by:
getType in interface ScheherIDWithType
Throws:
Scheherexception

knownInScopeOf

public boolean knownInScopeOf(TimelineID possibleAncestor)
                       throws Scheherexception
Return true if super-timeline metadata is set and this timelien is in the scope of (a descendant of) some other timeline.

Throws:
Scheherexception

getWordNetOffset

public WordNetOffset getWordNetOffset()
Description copied from interface: ScheherIDWithType
Get the GenericScheherID's WordNet synset offset

Specified by:
getWordNetOffset in interface ScheherIDWithType


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