|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the topic map occurrence construct.
An occurrence may either reference an external
resource (via the resource property) or
contain inline string data (in the value
property). An occurrence with value will return
null
for resource and vice-versa.
Method Summary | |
Topic |
getReifier()
Returns the Topic that reifies this occurrence. |
Locator |
getResource()
Returns the resource reference locator associated with this occurrence. |
Topic |
getTopic()
Returns the topic to which this occurrence belongs. |
Topic |
getType()
Returns the topic which defines the type of this occurrence. |
java.lang.String |
getValue()
Returns the data string associated with this occurrence. |
void |
remove()
Removes this Occurrence from the collection of Occurrences managed by the parent Topic. |
void |
setResource(Locator loc)
Sets the resource reference for this occurrence. |
void |
setType(Topic type)
Sets the topic which defines the type of this occurrence. |
void |
setValue(java.lang.String value)
Sets the value data string for this occurrence. |
Methods inherited from interface org.tmapi.core.ScopedObject |
addScopingTopic, getScope, removeScopingTopic |
Methods inherited from interface org.tmapi.core.TopicMapObject |
addSourceLocator, equals, getObjectId, getSourceLocators, getTopicMap, hashCode, removeSourceLocator |
Method Detail |
public Topic getTopic()
public void setType(Topic type)
type
- The Topic which defines the type of this Occurrence,
or null
to remove any existing type.public Topic getType()
null
if there is no occurrence type.public java.lang.String getValue()
null
if the occurrence does not have a value data string.public void setValue(java.lang.String value)
null
.
public Locator getResource()
null
if this occurrence does not have a resource reference.public void setResource(Locator loc)
null
.
loc
- The Locator object which reference the resourcepublic Topic getReifier()
null
if the occurrence is not reified.public void remove() throws TMAPIException
remove
in interface TopicMapObject
TMAPIException
- if the object cannot be removed from the container. Derived
interfaces may define specific circumstances under which a subclass of TMAPIException
must be raised.
Implementations MUST NOT use a TMAPIException to
wrap a failure raised in the underlying engine - such errors must always be wrapped in a
TMAPIRuntimeException.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |