|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the whole Topic Map construct.
Method Summary | |
void |
addAddedTheme(Topic theme)
Adds an added theme to the topic map. |
void |
addExternalRef(Locator topicRef)
Adds an external reference from this topic map to another topic map. |
void |
addMergeMap(Locator mapLocator,
Topic[] addedThemes)
Adds a new mergeMap directive to this topic map. |
Association |
createAssociation(java.lang.String id)
Creates a new Association in this TopicMap. |
Association |
createAssociation(java.lang.String id,
Locator resourceLocator,
Topic type,
Topic[] themes)
Creates a new Association in this topic map |
Topic |
createTopic(java.lang.String id)
Creates a new Topic in this TopicMap. |
java.util.Collection |
getAddedThemes()
Get a list of the Topic objects defining the added themes of the topic map. |
java.util.Collection |
getAssociations()
Get a list of the Associations contained in the topic map. |
java.util.Iterator |
getAssociationsIterator()
Get an iterator over all of the Associations in the topic map. |
Locator |
getBaseLocator()
Returns the Locator for the address of the source which generated the topic map. |
java.util.Set |
getExternalRefs()
Returns all of the unresolved external references from this topic map. |
TopicMapFactory |
getFactory()
Get the concrete implementation of the TopicMapFactory interface which partners with the concrete implementation of this interface. |
IndexManager |
getIndexManager()
Returns the IndexManager object which handles access to all of the indexes for this topic map. |
LocatorFactory |
getLocatorFactory()
Get the concrete implementation of the LocatorFactory interface which partners with the concrete implementation of this interface. |
java.util.Set |
getMergeMapAddedThemes(Locator mapLocator)
Returns the collection of themes to be added to the external topic map resource when it is merged with this map. |
java.util.Collection |
getMergeMapLocators()
Returns an unmodifiable Map of the unresolved mergeMap directives contained within this topic map. |
java.lang.String |
getName()
getName Get the name of the topic map. |
TopicMapObject |
getObjectByID(java.lang.String id)
Gets the object with the specified unique identifier. |
TopicMapObject |
getObjectByResourceLocator(Locator resourceLocator)
Deprecated. from 0.9.0 this method is renamed getObjectBySourceLocator(Locator) |
TopicMapObject |
getObjectBySourceLocator(Locator resourceLocator)
Gets the TopicMapObject which was generated from the specified resource. |
java.util.Collection |
getObjects()
Gets all the objects in the topic map. |
java.lang.Boolean |
getProperty(java.lang.String propertyName)
Returns the value of a configuration property set for this topic map |
TopicMapProvider |
getProvider()
Returns the TopicMapProvider implementation which provides this TopicMap |
Topic |
getTopicByID(java.lang.String id)
Gets the topic with the specified unique identifier |
Topic |
getTopicBySubject(Locator subjectLocator)
Get the topic which is bound to the specified subject |
Topic |
getTopicBySubjectIndicator(Locator subjectIndicatorLocator)
Get the topic which is bound to the subject indicated by the specified resource. |
int |
getTopicCount()
Get a count of the number of topics in the topic map |
java.util.Set |
getTopics()
Get the Topics in this topic map |
java.util.Iterator |
getTopicsIterator()
Get an Iterator over the Topics in this map. |
TopicMapUtils |
getUtils()
Get the concrete implementation of the TopicMapUtils interface which partners with the concrete implementation of this interface. |
boolean |
hasMergeMap(Locator mapLocator)
Determine whether or not the specified resource is listed in an unresolved mergeMap directive for this topic map. |
void |
removeExternalRef(Locator externalReference)
Removes a resource from the list of external references of this topic map. |
void |
removeMergeMap(Locator mapLocator)
Removes an unresolved mergeMap directive from this topic map. |
void |
setBaseLocator(Locator base)
Sets the Locator of the source which generated this topic map. |
void |
setName(java.lang.String name)
setName Set the name of the topic map. |
Method Detail |
public void addAddedTheme(Topic theme)
public Association createAssociation(java.lang.String id) throws DuplicateObjectIDException, java.beans.PropertyVetoException
id
- the unique identifier to be assigned to the new Association. If this
parameter is null, then the Association will be assigned a unique
identifier by the back-end implementation.
DuplicateObjectIDException
- if id
specifies an identifier which
is already assigned to some other object in this TopicMap.
java.beans.PropertyVetoException
- if some listener to the TopicMap vetoes the creation of this object.public Association createAssociation(java.lang.String id, Locator resourceLocator, Topic type, Topic[] themes) throws DuplicateObjectIDException, DuplicateResourceLocatorException, java.beans.PropertyVetoException
id
- the unique identifier to be assigned to the new Association. If this
parameter is null, then the Association will be assigned a unique
identifier by the back-end implementation.resourceLocator
- the address of the syntactic item which describes this
Association (e.g. the address of the XTM association
element). This parameter may be NULL for Associations
not created from a syntactic item with an address.type
- the topic which defines the class of associations to which the new
Association instance belongs. This parameter may be NULL for
untyped associations.themes
- the topics which define the scope of the new Association. This
parameter may be NULL for Associations created in the unconstrained
scope.
DuplicateObjectIDException
- if id
is already assigned to some
other object in this TopicMap.
DuplicateResourceLocatorException
- if resourceLocator
is the
address of some other object in this TopicMap.
java.beans.PropertyVetoException
- if a listener to the TopicMap vetoes the creation
of this Association.public Topic createTopic(java.lang.String id) throws DuplicateObjectIDException, java.beans.PropertyVetoException
id
- the unique identifier to be assigned to the new Topic. If this
parameter is null, then the Topic will be assigned a unique
identifier by the back-end implementation.
DuplicateObjectIDException
- if id
specifies an identifier which
is already assigned to some other object in this TopicMap.
java.beans.PropertyVetoException
- if some listener to the TopicMap vetoes the creation of this object.public java.util.Set getTopics()
public java.util.Iterator getTopicsIterator()
public int getTopicCount()
public Topic getTopicByID(java.lang.String id)
id
- The identifier of the topic to be retrieved.
public java.util.Collection getObjects()
public TopicMapObject getObjectByID(java.lang.String id)
id
- The unique identifier of the object to be retrieved.
public TopicMapObject getObjectByResourceLocator(Locator resourceLocator)
getObjectBySourceLocator(Locator)
resourceLocator
- The Locator of the resource to look for.
locator
public TopicMapObject getObjectBySourceLocator(Locator resourceLocator)
resourceLocator
- The Locator of the resource to look for.
locator
public Topic getTopicBySubject(Locator subjectLocator)
subjectLocator
- The locator of the subject to which the topic is bound
public Topic getTopicBySubjectIndicator(Locator subjectIndicatorLocator)
subjectIndicatorLocator
- The locator of a resource which indicates the subject of the topic.
public java.util.Collection getAddedThemes()
Topic
public java.util.Collection getAssociations()
Association
public java.util.Iterator getAssociationsIterator()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to be assigned to the topic map.public TopicMapUtils getUtils()
public TopicMapFactory getFactory()
public LocatorFactory getLocatorFactory()
public Locator getBaseLocator()
public void setBaseLocator(Locator base)
base
- The base resource locator of the topic map.getBaseLocator()
public java.util.Collection getMergeMapLocators()
public TopicMapProvider getProvider()
public void addMergeMap(Locator mapLocator, Topic[] addedThemes)
mapLocator
- The Locator of the external topic map to be mergedaddedThemes
- An array of Topic objects containing the themes to be added to
the topic map when it is merged. Null if there are no themes to be added.public boolean hasMergeMap(Locator mapLocator)
mapLocator
- The Locator of the external topic map to test for
public java.util.Set getMergeMapAddedThemes(Locator mapLocator)
mapLocator
- The Locator of the external topic map to
be merged.
mapLocator
specifies the locator of
an external topic map to be merged into this topic map,
a Set of Topic objects defining the themes to be added to the
external topic map will be returned. Otherwise, null is returned.public void removeMergeMap(Locator mapLocator)
mapLocator
- The Locator of the external topic map reference to
be removed.public void addExternalRef(Locator topicRef)
topicRef
- The external locator to be added. If the referenced resource is already contained as an external reference or as a merge map, it will not be added. For the purposes of this check, the fragment and query parts of a URILocator are ignored, and only the reference to the complete document will be stored
For example if the reference is to http://www.tm4j.org/example.xtm#topic1, the locator which is tested for and stored will be http://www.tm4j.org/example.xtm This means that multiple references to different topics in the same external topic map will only ever create one external reference.
For other locator notations the complete address is used for this test.
public java.util.Set getExternalRefs()
public void removeExternalRef(Locator externalReference)
TopicMapProvider.mergeTopicMap(TopicMap baseTopicMap, Locator externalTopicMap, Topic[] addedThemes)
public IndexManager getIndexManager()
public java.lang.Boolean getProperty(java.lang.String propertyName)
propertyName
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |