public class Item
extends java.lang.Object
Constructor and Description |
---|
Item(Relation relation,
ItemContents sharedContents)
Creates an item.
|
Modifier and Type | Method and Description |
---|---|
Item |
addDaughter(Item item)
Adds the given item as a daughter to this item.
|
Item |
appendItem(Item originalItem)
Appends an item in this list after this item.
|
Item |
createDaughter()
Creates a new Item, adds it as a daughter to this item and returns the
new item.
|
boolean |
equalsShared(Item otherItem)
Determines if the shared contents of the two items are the same.
|
java.lang.Object |
findFeature(java.lang.String pathAndFeature)
Finds the feature by following the given path.
|
Item |
findItem(java.lang.String path)
Finds the item specified by the given path.
|
Item |
getDaughter()
Retrieves the first daughter of this item.
|
FeatureSet |
getFeatures()
Returns the feature set of this item.
|
Item |
getItemAs(java.lang.String relationName)
Finds the item in the given relation that has the same shared contents.
|
Item |
getLastDaughter()
Retrieves the last daughter of this item.
|
Item |
getNext()
Gets the next item in this list.
|
Item |
getNthDaughter(int which)
Retrieves the Nth daughter of this item.
|
Relation |
getOwnerRelation()
Retrieves the owning Relation.
|
Item |
getParent()
Returns the parent of this item.
|
Item |
getPrevious()
Gets the previous item in this list.
|
ItemContents |
getSharedContents()
Retrieves the shared contents for this item.
|
Utterance |
getUtterance()
Returns the utterance associated with this item.
|
boolean |
hasDaughters()
Determines if this item has daughters.
|
Item |
prependItem(Item originalItem)
Prepends an item in this list before this item.
|
java.lang.String |
toString() |
public Item(Relation relation, ItemContents sharedContents)
relation
- the relation that owns this itemsharedContents
- the contents that is shared with others. If null,
a new sharedContents is created.public Item getItemAs(java.lang.String relationName)
relationName
- the relation of interestpublic Relation getOwnerRelation()
public ItemContents getSharedContents()
public boolean hasDaughters()
public Item getDaughter()
public Item getNthDaughter(int which)
which
- the index of the daughter to returnpublic Item getLastDaughter()
public Item addDaughter(Item item)
item
- for the new daughterpublic Item createDaughter()
public Item getParent()
public Utterance getUtterance()
public FeatureSet getFeatures()
public java.lang.Object findFeature(java.lang.String pathAndFeature)
pathAndFeature
- the path to followpublic Item findItem(java.lang.String path)
path
- the path to followpublic Item getNext()
public Item getPrevious()
public Item appendItem(Item originalItem)
originalItem
- new item has shared contents with this item (or *
null)public Item prependItem(Item originalItem)
originalItem
- new item has shared contents with this item (or *
null)public java.lang.String toString()
toString
in class java.lang.Object
public boolean equalsShared(Item otherItem)
otherItem
- the item to compare