|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tm4j.topicmap.unified.UnifiedTopicMapObject
org.tm4j.topicmap.unified.UnifiedTopic
| Field Summary |
| Fields inherited from class org.tm4j.topicmap.unified.UnifiedTopicMapObject |
m_tm |
| Constructor Summary | |
UnifiedTopic(UnifiedTopicMap tm,
Topic t)
|
|
| Method Summary | |
void |
addMergedTopic(Topic t)
Adds the specified topic to the set of merged topics. |
void |
addName(BaseName bn)
Adds another name to the set of names of this Topic. |
void |
addOccurrence(Occurrence bn)
Adds an occurrence to this Topic. |
void |
addSubjectIndicator(Locator sind)
Adds a subject indicator to this topic. |
void |
addType(Topic t)
Adds a new topic into the set of those defining the type of this topic. |
BaseName |
createName(java.lang.String id)
Creates a new BaseName as a child of this Topic. |
BaseName |
createName(java.lang.String id,
java.lang.String nameString)
Creates a new BaseName as a child of this Topic |
BaseName |
createName(java.lang.String id,
java.lang.String nameString,
Topic[] scope)
Creates a new BaseName as a child of this Topic |
Occurrence |
createOccurrence(java.lang.String id)
Creates a new Occurrence as a child of this Topic. |
Occurrence |
createOccurrence(java.lang.String id,
Locator resourceLocator,
Topic type,
Locator ref,
Topic[] themes)
|
Occurrence |
createOccurrence(java.lang.String id,
Locator resourceLocator,
Topic type,
java.lang.String data,
Topic[] themes)
|
boolean |
equals(java.lang.Object other)
|
Topic |
getBaseTopic()
Gets the topic with which this topic is merged if any. |
java.util.Collection |
getMergedTopics()
Returns a collection of all of the other topics which were merged with this topic due to identity matches or topic map naming constraints. |
java.util.Collection |
getNames()
Retrieves a collection of the base names of this topic and any merged topics. |
java.util.Collection |
getNames(boolean includeMerged)
Retrieves the collection of the base names of this topic and, if so specified, of any merged topics. |
java.util.Collection |
getOccurrences()
Returns the occurrences for this topic and any merged topics. |
java.util.Collection |
getOccurrences(boolean includeMerged)
Returns the occurrences for this topic and, if so specified, of any merged topics. |
TopicMap |
getParent()
Returns the TopicMap object which contains this Topic object. |
java.util.Set |
getResourceLocators()
|
java.util.Collection |
getRolesPlayed()
Gets the Member objects which define roles played by this topic in associations. |
java.util.Collection |
getRolesPlayed(boolean includeMerged)
Gets the Member objects which define roles played by this topic in associations. |
java.util.Collection |
getScopedNames()
Generates a list of all names of the topic and all merged topics, qualified by the scope of the names and of the topic itself. |
java.util.Collection |
getScopedNames(boolean includeMerged)
Generates a list of all names of the topic, qualified by the scope of the names and of the topic itself. |
Locator |
getSubject()
Retrieves the reference to the resource which is the subject of this topic. |
Locator |
getSubject(boolean includeMerged)
Retrieves the reference to the resource which is the subject of this topic. |
java.util.Collection |
getSubjectIndicators()
Returns the subject indicators for this topic and all merged topics. |
java.util.Collection |
getSubjectIndicators(boolean includeMerged)
Returns the subject indicators for this topic and, optionally, for all merged topics. |
java.util.Collection |
getTypes()
Returns the Topics defining the type of this topic and all merged topics. |
java.util.Collection |
getTypes(boolean includeMerged)
Returns the Topics defining the type of this topic and, optionally, of all merged topics. |
boolean |
isOfType(Locator l)
Determines whether this topic is typed by a topic whose subject is or whose subject is indicated by subjectOrIndicator. |
boolean |
isOfType(Topic t)
Determines whether the specified topic is one of the types of this topic. |
void |
setNames(BaseName[] names)
Sets the names of this Topic. |
void |
setOccurrences(Occurrence[] names)
Sets the list of occurrences for this Topic. |
void |
setSubject(Locator l)
Sets the reference to the subject of this topic. |
void |
setSubjectIndicators(Locator[] sinds)
Sets the collection of subject indicators for this topic. |
void |
setTypes(Topic[] types)
Defines the type of this topic. |
protected java.util.Collection |
toUnifiedTopics(java.util.Collection c)
Converts a collection of "raw" topics into a collection of UnifiedTopic objects. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UnifiedTopic(UnifiedTopicMap tm,
Topic t)
| Method Detail |
public java.util.Set getResourceLocators()
public Locator getSubject()
Topic
getSubject in interface TopicLocator, or null if no resource
represents the subject which this topic reifies.public void setSubject(Locator l)
Topic
setSubject in interface Topicl - The locator of the resource that is the subject which this topic reifies.public Locator getSubject(boolean includeMerged)
Topic
getSubject in interface TopicincludeMerged - if true, then the subject defined by any one of the topics merged with this topic will be returned,
otherwise a value will only be returned if it was specified on this Topic instance.
null if there is no subject
locator.public java.util.Collection getSubjectIndicators()
TopicgetSubjectIndicators(true).
getSubjectIndicators in interface TopicLocators representing
the subject indicators for this topic.
If no subject indicators are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public java.util.Collection getSubjectIndicators(boolean includeMerged)
Topic
getSubjectIndicators in interface TopicincludeMerged - if true, then the subject indicators of all
merged topics are included in the returned collection,
otherwise only the subject indicators of this topic are returned.
Locators representing
the subject indicators for this topic.
If no subject indicators are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public void addSubjectIndicator(Locator sind)
Topic
addSubjectIndicator in interface Topicsind - the subject indicator reference to be added.public void setSubjectIndicators(Locator[] sinds)
Topic
setSubjectIndicators in interface Topicsinds - the subject indicator references,
as an array of Locators.public java.util.Collection getTypes()
TopicgetTypes(true).
getTypes in interface TopicTopics defining the type
of this topic and all merged topics.
If no types are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public java.util.Collection getTypes(boolean includeMerged)
Topic
getTypes in interface TopicincludeMerged - If true then the types of all merged
topics are included in the returned collection,
otherwise, only the typing topics
defined on this topic are returned.
Topics defining the type
of this topic and, if includeMergedTopics is set
to true, of all merged topics.
If no subject indicators are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public void addType(Topic t)
Topic
addType in interface Topict - The typing topic to be added.public void setTypes(Topic[] types)
Topic
setTypes in interface Topictypes - the new set of topics to define the type of
this topic. If this is null,
all the existing typing topics of this topic
are removed.protected java.util.Collection toUnifiedTopics(java.util.Collection c)
public boolean isOfType(Topic t)
Topic
isOfType in interface Topict - the topic to be compared to this topic's typing topics.
true if type is among the topics
defining this topic's type, false otherwise.public boolean isOfType(Locator l)
TopicsubjectOrIndicator.
This method will return true if one of the following conditions hold:
isOfType in interface Topictrue if subjectOrIndicator
meets the above conditions, false otherwise.public java.util.Collection getNames()
TopicgetNames(true).
getNames in interface TopicBaseNames defined
on this topic and any merged topics.
If no base names are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public java.util.Collection getNames(boolean includeMerged)
Topic
getNames in interface TopicincludeMerged - If true, the names of
all merged topics are included in the returned collection.
Otherwise, the collection contains only the names defined
specifically on this topic.
BaseNames defined
on this topic and, optionally, any merged topics.
If no base names are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public void addName(BaseName bn)
Topic
addName in interface Topicbn - the name to be added.public void setNames(BaseName[] names)
Topic
setNames in interface Topicnames - the new set of names to be assigned to
this topic. If this is null,
all the existing names of this topic
are removed.public BaseName createName(java.lang.String id)
Topic
createName in interface Topicid - the unique object id to be assigned to the new BaseName object. If
this parameter is null, the back-end will assign an ID to the
newly created object.
public BaseName createName(java.lang.String id,
java.lang.String nameString)
Topic
createName in interface Topicid - the unique object id to be assigned to the new BaseName object. If
this parameter is null, the back-end will assign an ID to the newly created
object.nameString - the string to be assigned to the new BaseName as content.
public BaseName createName(java.lang.String id,
java.lang.String nameString,
Topic[] scope)
Topic
createName in interface Topicid - the unique object id to be assigned to the new BaseName object. If
this parameter is null, the back-end will assign an ID to the newly created
object.nameString - the string to be assigned to the new BaseName as content.scope - the topics to be assigned to the scope of the new BaseName.
public java.util.Collection getOccurrences()
TopicgetOccurrences(true).
getOccurrences in interface TopicOccurrences for this
topic and for any merged topics.
The returned collection is a copy of the internal set
of occurrences of the topic — modifying the
collection has no effect on the occurrence set of the Topic.
If no occurrences are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public java.util.Collection getOccurrences(boolean includeMerged)
Topic
getOccurrences in interface TopicincludeMerged - if true, then the occurrences of all
merged topics are included in the returned collection.
Otherwise, the collection contains only the occurrences defined
specifically for this topic.
Occurrences for this
topic and for any merged topics.
The returned collection is a copy of the internal set
of occurrences of the topic — modifying the
collection has no effect on the occurrence set of the Topic.
If no occurrences are currently defined on this
topic (or merged topics), the returned collection is empty;
it is never null.public void addOccurrence(Occurrence bn)
Topic
addOccurrence in interface Topicbn - The Occurrence to be added.public void setOccurrences(Occurrence[] names)
Topic
setOccurrences in interface Topicnames - the new set of occurrences to be associated with
this topic. If this is null,
all the existing occurrences of this topic
are removed.public Occurrence createOccurrence(java.lang.String id)
Topic
createOccurrence in interface Topicid - the unique object id to be assigned to the new Occurrence object. If
this parameter is null, the back-end will assign an ID to the
newly created object.
public Occurrence createOccurrence(java.lang.String id,
Locator resourceLocator,
Topic type,
Locator ref,
Topic[] themes)
throws DuplicateObjectIDException,
DuplicateResourceLocatorException,
java.beans.PropertyVetoException
createOccurrence in interface TopicDuplicateObjectIDException
DuplicateResourceLocatorException
java.beans.PropertyVetoException
public Occurrence createOccurrence(java.lang.String id,
Locator resourceLocator,
Topic type,
java.lang.String data,
Topic[] themes)
throws DuplicateObjectIDException,
DuplicateResourceLocatorException,
java.beans.PropertyVetoException
createOccurrence in interface TopicDuplicateObjectIDException
DuplicateResourceLocatorException
java.beans.PropertyVetoExceptionpublic java.util.Collection getRolesPlayed()
Topic
getRolesPlayed in interface TopicMember objects representing roles played by this Topic in Associations.public java.util.Collection getRolesPlayed(boolean includeMerged)
Topic
getRolesPlayed in interface TopicincludeMerged - If true then the roles played by all merged topics are included in the returned collection.public java.util.Collection getMergedTopics()
Topic
getMergedTopics in interface TopicTopics
that were topic merged with this topic.
If no topics were merged with this
topic, the returned collection is empty;
it is never null.public Topic getBaseTopic()
Topic
getBaseTopic in interface Topicnull
if the topic has not merged with any other.public java.util.Collection getScopedNames()
TopicgetScopedNames(true).
Each qualified name is generated as follows:<sorted-scope-list>.<name-string>Where <sorted-scope-list> is a list of all themes SGML identifiers sorted in ascending alphabetical order, with a period separator between each identifier.
getScopedNames in interface Topicnull.public java.util.Collection getScopedNames(boolean includeMerged)
Topic<sorted-scope-list>.<name-string>Where <sorted-scope-list> is a list of all themes SGML identifiers sorted in ascending alphabetical order, with a period separator between each identifier.
getScopedNames in interface TopicincludeMerged - If true, the scoped names of all
topics merged with this topic are returned. Otherwise,
only the scoped names of this topic are returned.
null.public TopicMap getParent()
Topic
getParent in interface Topicpublic boolean equals(java.lang.Object other)
equals in class UnifiedTopicMapObjectpublic void addMergedTopic(Topic t)
Topic
addMergedTopic in interface Topict - the topic to be added to the merge set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||