story.scheherazade.misc
Class ConditionType

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

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

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


Field Summary
static ConditionType Universal
           
 
Constructor Summary
ConditionType(ConditionType type, ConditionType supertype)
          Constructor that supplements an ConditionType with supertype metadata.
ConditionType(CoreCondition condition)
           
ConditionType(java.lang.String name)
           
 
Method Summary
 int compareTo(java.lang.Object other)
           
 NodeID declarationNodeID()
          Construct the DBCORE NodeID of the node that declares this condition.
 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 isCoreCondition(CoreCondition condition)
          Returns whether this ConditionType represents some CoreCondition.
 ConditionType makeClone()
           
 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 ConditionType Universal
Constructor Detail

ConditionType

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

ConditionType

public ConditionType(ConditionType type,
                     ConditionType supertype)
              throws Scheherexception
Constructor that supplements an ConditionType with supertype metadata.

Throws:
Scheherexception

ConditionType

public ConditionType(CoreCondition condition)
              throws Scheherexception
Throws:
Scheherexception
Method Detail

declarationNodeID

public NodeID declarationNodeID()
                         throws Scheherexception
Construct the DBCORE NodeID of the node that declares this condition.

Throws:
Scheherexception

makeClone

public ConditionType makeClone()
                        throws Scheherexception
Throws:
Scheherexception

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

isCoreCondition

public boolean isCoreCondition(CoreCondition condition)
Returns whether this ConditionType represents some CoreCondition.


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

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

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.