org.tm4j.topicmap.utils .XTMUtils
Description
Utility class containing methods to reduce the number of objects in a TM4J topic map.
The static methods contained in this class implement one or more of the XTM duplicate suppression rules. This class also contains an implementation of the XTM topic merging rules.
The implementations in this class are safe to use with any TM4J backend.
Warning Many of the duplicate suppression algorithms are brute-force algorithms and may take some time to execute against large topic maps.
Inheritance Hierarchy
- java.lang.Object
- XTMUtils
Field Summary | |
---|---|
m_log |
Method Summary | |
---|---|
void |
flattenTopicRefs(org.tm4j.topicmap.TopicMap tm)
Performs a single pass through the topic map, replacing
all topic references with a reference to the base topic
of the merged topic set.
|
org.tm4j.topicmap.TopicMap |
makeConsistent(org.tm4j.topicmap.TopicMap tm)
Creates a "consistent" topic map representation by applying the
duplicate suppression rules of XTM 1.0 Annex F (section 6)
This means that
1) All topics which are merged together are replaced by a single topic
having the characteristics of all the merged ones (XTM 1.0 F.5.1)
2) Duplicate subject indicators on the same topic are collapsed into
a single subject indicator (XTM 1.0 F.6.1)
3) Duplicate names in the same scope on the same topic
are collapsed into a single name (XTM 1.0 F.6.2)
4) Duplicate role players in associations are removed (XTM 1.0 F.6.4)
5) Duplicate associations are collapsed into a single association
(XTM 1.0 F.6.3)
Note that F.6.4 is applied before F.6.3 as the XTM definition of a
duplicate association uses a definition of equivalence which is
affected by the aplication as F.6.4.
|
void | removeDuplicateAssociations(java.util.Collection assocs,org.tm4j.topicmap.TopicMapUtils utils) |
void | removeDuplicateAssociations(org.tm4j.topicmap.TopicMap tm) |
void | removeDuplicateNames(org.tm4j.topicmap.Topic t) |
void | removeDuplicateOccurrences(org.tm4j.topicmap.Topic t) |
void | removeDuplicateSubjectIndicators(org.tm4j.topicmap.Topic t) |
org.tm4j.topicmap.Topic |
staticMerge(org.tm4j.topicmap.Topic t)
Takes all topics merged with t and adds their
characteristics to t .
|
org.tm4j.topicmap.Topic |
staticMerge(org.tm4j.topicmap.Topic t,boolean swapTopics)
Internal implementation of the static merge algorithm.
|
void |
swapTopic(org.tm4j.topicmap.Topic from,org.tm4j.topicmap.Topic to)
Exchanges all uses of the topic from |
Meta Data (1)
Related Topics
Imports
Is Contained By
Is Imported By