public class Occurrence extends TMObject implements OccurrenceIF
Modifier and Type | Field and Description |
---|---|
protected LocatorIF |
datatype |
protected TopicIF |
reifier |
protected UniqueSet<TopicIF> |
scope |
protected TopicIF |
type |
protected String |
value |
oid, parent, sources, topicmap
EVENT_ADD_THEME, EVENT_ADDED, EVENT_REMOVE_THEME, EVENT_REMOVED, EVENT_SET_DATATYPE, EVENT_SET_TYPE, EVENT_SET_VALUE
EVENT_SET_REIFIER
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENT
Modifier and Type | Method and Description |
---|---|
void |
addTheme(TopicIF theme)
PUBLIC: Add a topic to this scope.
|
protected void |
fireEvent(String event,
Object new_value,
Object old_value)
INTERNAL: Fires an event, so that listeners can be informed about
the event.
|
LocatorIF |
getDataType()
PUBLIC: Gets the data type of this occurrence.
|
long |
getLength()
PUBLIC: Returns the length of the occurrence value.
|
LocatorIF |
getLocator()
PUBLIC: Returns a LocatorIF representation of the occurrence
value.
|
Reader |
getReader()
PUBLIC: Returns a Reader that allows you to stream the string
representation of this occurrence.
|
TopicIF |
getReifier()
PUBLIC: Returns the topic that reifies this object.
|
Collection<TopicIF> |
getScope()
PUBLIC: Returns the set of topics that are the stated scope of
this object.
|
TopicIF |
getTopic()
PUBLIC: Gets the topic for this occurrence.
|
TopicIF |
getType()
PUBLIC: Gets the type that this object is an instance of.
|
String |
getValue()
PUBLIC: Gets the string representation of this occurrence.
|
protected boolean |
isConnected() |
void |
remove()
PUBLIC: Removes the object from its parent.
|
void |
removeTheme(TopicIF theme)
PUBLIC: Remove a topic from this scope.
|
protected void |
setDataType(LocatorIF datatype) |
void |
setLocator(LocatorIF locator)
PUBLIC: Same as
setValue(locator.getAddress(),
DataTypes.TYPE_URI) . |
void |
setReader(Reader value,
long length,
LocatorIF datatype)
PUBLIC: Sets the value and the data type of this occurrence using
a reader.
|
void |
setReifier(TopicIF _reifier)
PUBLIC: Sets the reifier of this object.
|
protected void |
setTopic(Topic parent)
INTERNAL: Set the topic that the occurrence belongs to.
|
void |
setType(TopicIF type)
PUBLIC: Sets the type that this object is an instance of.
|
void |
setValue(String value)
PUBLIC: Same as
setValue(value,
DataTypes.TYPE_STRING) . |
void |
setValue(String value,
LocatorIF datatype)
PUBLIC: Sets the value and the data type of this occurrence using
a string.
|
String |
toString() |
addItemIdentifier, getItemIdentifiers, getObjectId, getTopicMap, isReadOnly, removeItemIdentifier
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addItemIdentifier, getItemIdentifiers, getObjectId, getTopicMap, isReadOnly, removeItemIdentifier
protected TopicIF reifier
protected TopicIF type
protected String value
protected LocatorIF datatype
public void remove()
TMObjectIF
remove
in interface TMObjectIF
public TopicIF getTopic()
OccurrenceIF
getTopic
in interface OccurrenceIF
protected void setTopic(Topic parent)
public LocatorIF getDataType()
OccurrenceIF
getDataType
in interface OccurrenceIF
protected void setDataType(LocatorIF datatype)
public String getValue()
OccurrenceIF
getValue
in interface OccurrenceIF
public void setValue(String value)
OccurrenceIF
setValue(value,
DataTypes.TYPE_STRING)
. This method is here primarily for
backwards compatibility.setValue
in interface OccurrenceIF
public void setValue(String value, LocatorIF datatype)
OccurrenceIF
setValue
in interface OccurrenceIF
public Reader getReader()
OccurrenceIF
getReader
in interface OccurrenceIF
public void setReader(Reader value, long length, LocatorIF datatype)
OccurrenceIF
setReader
in interface OccurrenceIF
public LocatorIF getLocator()
OccurrenceIF
DataType.TYPE_URI
). This method
is here primarily for backwards compatibility.getLocator
in interface OccurrenceIF
public void setLocator(LocatorIF locator)
OccurrenceIF
setValue(locator.getAddress(),
DataTypes.TYPE_URI)
. This method is here primarily for
backwards compatibility.setLocator
in interface OccurrenceIF
public long getLength()
OccurrenceIF
getLength
in interface OccurrenceIF
public Collection<TopicIF> getScope()
ScopedIF
public void addTheme(TopicIF theme)
ScopedIF
public void removeTheme(TopicIF theme)
ScopedIF
removeTheme
in interface ScopedIF
theme
- A topic to be removed from this scope; an object implementing TopicIF.public TopicIF getType()
TypedIF
public void setType(TopicIF type)
TypedIF
public TopicIF getReifier()
ReifiableIF
getReifier
in interface ReifiableIF
public void setReifier(TopicIF _reifier)
ReifiableIF
setReifier
in interface ReifiableIF
protected void fireEvent(String event, Object new_value, Object old_value)
TMObject
protected boolean isConnected()
isConnected
in class TMObject