org.tm4j.topicmap
Interface Occurrence

All Superinterfaces:
DataObject, ScopedObject, TopicMapObject
All Known Implementing Classes:
UnifiedOccurrence

public interface Occurrence
extends ScopedObject, DataObject

This interface defines a single occurrence construct in a Topic Map. Occurrences may be untyped, or they may be defined by a an optional typing Topic, and the might also be restricted in validity to a certain scope, which is defined by a set of Topics. An occurrence contains a reference to a resource or in-line resource data.

Author:
Kal Ahmed
See Also:
Topic

Method Summary
 Topic getParent()
          Gets the topic which contains this occurrence.
 Topic getType()
          Gets the Topic definition the type of this occurrence.
 boolean isOfType(Topic type)
          Determines whether the type of the occurrence is described by type.
 void setType(Topic type)
          Sets the Topic defining the type of this Occurrence.
 
Methods inherited from interface org.tm4j.topicmap.ScopedObject
addTheme, dispose, getScope, inScope, inScope, removeTheme, setScope
 
Methods inherited from interface org.tm4j.topicmap.TopicMapObject
addMultiValuePropertyChangeListener, addMultiValuePropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addSourceLocator, addVetoableChangeListener, destroy, fireMultiValuePropertyChange, fireMultiValuePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getID, getResourceLocator, getSourceLocators, getTopicMap, removeMultiValuePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeSourceLocator, removeVetoableChangeListener, setID, setResourceLocator
 
Methods inherited from interface org.tm4j.topicmap.DataObject
getData, getDataLocator, isDataInline, setData, setDataLocator
 

Method Detail

getType

public Topic getType()
Gets the Topic definition the type of this occurrence.

Returns:
The Topic defining the type of this Occurrence, or null if no such Topic has been specified.

setType

public void setType(Topic type)
             throws java.beans.PropertyVetoException
Sets the Topic defining the type of this Occurrence.

Parameters:
type - The Topic defining the type of this occurrence.
Throws:
java.beans.PropertyVetoException

isOfType

public boolean isOfType(Topic type)
Determines whether the type of the occurrence is described by type.

Returns:
true if the type of this Occurrence is defined by the topic type, false otherwise.

getParent

public Topic getParent()
Gets the topic which contains this occurrence.

Returns:
The Topic object which contains this occurrence, or null if the occurrence is not currently part of any topic.