Package net.ontopia.topicmaps.core
Interface OccurrenceIF
- All Superinterfaces:
ReifiableIF,ScopedIF,TMObjectIF,TypedIF
- All Known Subinterfaces:
MOccurrence,MOccurrenceWithoutTopic
- All Known Implementing Classes:
Occurrence,Occurrence,ReadOnlyOccurrence,SnapshotOccurrence
PUBLIC: Implemented by objects representing occurrences in the
topic map model. An occurrence is a relationship between a topic,
and an information resource which is relevant to that topic.
NOTE Comments partly revised only.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface net.ontopia.topicmaps.core.ReifiableIF
EVENT_SET_REIFIERFields inherited from interface net.ontopia.topicmaps.core.TMObjectIF
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENT -
Method Summary
Modifier and TypeMethodDescriptionPUBLIC: Gets the data type of this occurrence.longPUBLIC: Returns the length of the occurrence value.default LocatorIFPUBLIC: Returns a LocatorIF representation of the occurrence value.PUBLIC: Returns a Reader that allows you to stream the string representation of this occurrence.getTopic()PUBLIC: Gets the topic for this occurrence.getValue()PUBLIC: Gets the string representation of this occurrence.default voidsetLocator(LocatorIF locator) PUBLIC: Same assetValue(locator.getAddress(), DataTypes.TYPE_URI).voidPUBLIC: Sets the value and the data type of this occurrence using a reader.default voidPUBLIC: Same assetValue(value, DataTypes.TYPE_STRING).voidPUBLIC: Sets the value and the data type of this occurrence using a string.Methods inherited from interface net.ontopia.topicmaps.core.ReifiableIF
getReifier, setReifierMethods inherited from interface net.ontopia.topicmaps.core.ScopedIF
addTheme, getScope, removeThemeMethods inherited from interface net.ontopia.topicmaps.core.TMObjectIF
addItemIdentifier, getItemIdentifiers, getObjectId, getTopicMap, isReadOnly, remove, removeItemIdentifier
-
Field Details
-
EVENT_ADDED
- See Also:
-
EVENT_REMOVED
- See Also:
-
EVENT_SET_TYPE
- See Also:
-
EVENT_SET_VALUE
- See Also:
-
EVENT_SET_DATATYPE
- See Also:
-
EVENT_ADD_THEME
- See Also:
-
EVENT_REMOVE_THEME
- See Also:
-
-
Method Details
-
getTopic
TopicIF getTopic()PUBLIC: Gets the topic for this occurrence.- Returns:
- The topic to which this occurrence belongs; an object implementing TopicIF.
-
getDataType
LocatorIF getDataType()PUBLIC: Gets the data type of this occurrence.- Since:
- 4.0
-
getValue
String getValue()PUBLIC: Gets the string representation of this occurrence. This method will return null if the length of the value exceeds the supported maximum size. -
getReader
Reader getReader()PUBLIC: Returns a Reader that allows you to stream the string representation of this occurrence. Values of all sizes are supported by this method.- Since:
- 4.0
-
setValue
PUBLIC: Same assetValue(value, DataTypes.TYPE_STRING). This method is here primarily for backwards compatibility. -
getLocator
PUBLIC: Returns a LocatorIF representation of the occurrence value. This method will return null if the value is not of type xsd:anyURI (same asDataType.TYPE_URI). This method is here primarily for backwards compatibility. -
setLocator
PUBLIC: Same assetValue(locator.getAddress(), DataTypes.TYPE_URI). This method is here primarily for backwards compatibility. -
setValue
PUBLIC: Sets the value and the data type of this occurrence using a string. The value must conform to the correct string representation according to the datatype.- Since:
- 4.0
-
setReader
PUBLIC: Sets the value and the data type of this occurrence using a reader. The reader value must conform to the correct string representation according to the datatype.- Since:
- 4.0
-
getLength
long getLength()PUBLIC: Returns the length of the occurrence value. The number of characters in the string representation is returned.- Since:
- 4.0
-