story.scheherazade.misc
Class NounName

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

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

Extension of GenericScheherID that semantically represents the name of a Noun.


Constructor Summary
NounName(NounName name, NounType nounType)
          Constructor used internally that provides some metadata about the named noun.
NounName(java.lang.String name, NounFlavor flavor)
           
 
Method Summary
 int compareTo(java.lang.Object other)
           
 NounFlavor getNounFlavor()
           
 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 isAnonymous()
           
 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
 

Constructor Detail

NounName

public NounName(java.lang.String name,
                NounFlavor flavor)
         throws Scheherexception
Throws:
Scheherexception

NounName

public NounName(NounName name,
                NounType nounType)
         throws Scheherexception
Constructor used internally that provides some metadata about the named noun.

Throws:
Scheherexception
Method Detail

getType

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

Specified by:
getType in interface ScheherIDWithType

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

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

isAnonymous

public boolean isAnonymous()

getNounFlavor

public NounFlavor getNounFlavor()

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.