net.ontopia.topicmaps.utils
Class TopicTreeBuilder

java.lang.Object
  extended by net.ontopia.topicmaps.utils.TopicTreeBuilder

public class TopicTreeBuilder
extends java.lang.Object

EXPERIMENTAL.

Since:
1.2

Field Summary
protected  TopicIF assocType
           
protected  TopicIF childRole
           
protected  TopicIF parentRole
           
protected  java.util.Collection types
           
 
Constructor Summary
TopicTreeBuilder(TopicIF assocType, TopicIF parentRole, TopicIF childRole)
           
 
Method Summary
 TopicTreeNode build()
          EXPERIMENTAL: Builds a tree consisting of all the topics participating in any associations of the given type.
 TopicTreeNode build(TopicIF topic)
          EXPERIMENTAL: Builds a tree consisting of all the topics directly related to the one given.
protected  TopicTreeNode build(TopicIF topic, java.util.Set visited)
           
protected  boolean filter(TopicIF topic)
           
protected  TopicIF getPlayer(AssociationIF assoc, TopicIF roleType)
           
protected  TopicIF getRoot(TopicIF topic, java.util.Set visited)
           
 void setFilterTypes(java.util.Collection types)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assocType

protected TopicIF assocType

parentRole

protected TopicIF parentRole

childRole

protected TopicIF childRole

types

protected java.util.Collection types
Constructor Detail

TopicTreeBuilder

public TopicTreeBuilder(TopicIF assocType,
                        TopicIF parentRole,
                        TopicIF childRole)
Method Detail

setFilterTypes

public void setFilterTypes(java.util.Collection types)

build

public TopicTreeNode build(TopicIF topic)
EXPERIMENTAL: Builds a tree consisting of all the topics directly related to the one given. The node given can be placed at any position in the tree.


build

public TopicTreeNode build()
EXPERIMENTAL: Builds a tree consisting of all the topics participating in any associations of the given type. A node with a null topic will be introduced as the common root of all the subtrees.


getRoot

protected TopicIF getRoot(TopicIF topic,
                          java.util.Set visited)

build

protected TopicTreeNode build(TopicIF topic,
                              java.util.Set visited)

getPlayer

protected TopicIF getPlayer(AssociationIF assoc,
                            TopicIF roleType)

filter

protected boolean filter(TopicIF topic)


Copyright © 2000-2012 Ontopia.