org.ceryle.graph.tm
Interface TopicMapVisualizer

All Known Implementing Classes:
TM4JVisualizerImpl

public interface TopicMapVisualizer

An interface for processors to visualize a TopicMap document object.

Version:
$Id: TopicMapVisualizer.java,v 3.8 2007-06-15 12:09:27 altheim Exp $
Author:
Murray Altheim

Method Summary
 boolean inProgress()
          When true, indicates that the visualizer is currently loading/visualizing a Topic Map.
 Object instanceOf(Association assoc, Topic classTopic, Topic instanceTopic)
          Indicates an explicit class-instance Association.
 Object onAssociation(Association assoc)
          Indicates the start of an Association.
 boolean onBaseName(Topic topic, BaseName basename)
          Indicates the start of a BaseName.
 boolean onMember(Association assoc, Member member)
          Indicates the start of a Member.
 boolean onOccurrence(Topic topic, Occurrence occur)
          Indicates the start of an Occurrence.
 void onParameter(Topic param)
          Indicates the start of a Variant Parameter.
 Object onRole(Association assoc, Topic player, Topic role)
          Indicates the start of an Association role.
 Set onScope(Topic[] scope)
          Indicates the start of a Scope.
 Object onTheme(Topic theme)
          Indicates the start of a Theme (Topic used in a Scope).
 Object onTopic(Topic topic)
          Indicates the start of a Topic.
 boolean onTopicMap(TopicMap topicmap)
          Indicates the start of a TopicMap.
 boolean onVariant(BaseName basename, Variant variant)
          Indicates the start of a Variant.
 void onVariantName(Variant variant, VariantName varName)
          Indicates the start of a Variant Name.
 void postProcess(TopicMap topicmap)
          Following a visualization pass, begin any post-processing.
 void reset()
          Resets the visualizer, clearing it of any stored variables or caches.
 Object subclassOf(Association assoc, Topic superclassTopic, Topic subclassTopic)
          Indicates a superclass-subclass Association.
 void updateAssociation(Association assoc)
          Update the display of an already-visualized Association.
 void visualize(TopicMap topicmap, boolean merge)
          Displays the TopicMap topicmap as a graph.
 

Method Detail

visualize

void visualize(TopicMap topicmap,
               boolean merge)
               throws VisualizationException
Displays the TopicMap topicmap as a graph. If the boolean reset is true, the incoming graph is merged with any existing graph contents. This method is used to initiate the processing.

Throws:
VisualizationException

inProgress

boolean inProgress()
When true, indicates that the visualizer is currently loading/visualizing a Topic Map. This is not an indicator of incremental editing operations.


postProcess

void postProcess(TopicMap topicmap)
Following a visualization pass, begin any post-processing.


reset

void reset()
Resets the visualizer, clearing it of any stored variables or caches.


onTopicMap

boolean onTopicMap(TopicMap topicmap)
                   throws VisualizationException
Indicates the start of a TopicMap.

Throws:
VisualizationException

onTopic

Object onTopic(Topic topic)
               throws VisualizationException
Indicates the start of a Topic.

Returns:
a graph Object visualizing the Topic.
Throws:
VisualizationException

onScope

Set onScope(Topic[] scope)
            throws VisualizationException
Indicates the start of a Scope. If there are no objects, an empty Set is returned (not null).

Returns:
a Set containing all the graph Objects acting as scopes.
Throws:
VisualizationException

onTheme

Object onTheme(Topic theme)
               throws VisualizationException
Indicates the start of a Theme (Topic used in a Scope).

Returns:
a graph Object visualizing the theme's Topic.
Throws:
VisualizationException

onBaseName

boolean onBaseName(Topic topic,
                   BaseName basename)
                   throws VisualizationException
Indicates the start of a BaseName.

Throws:
VisualizationException

onVariant

boolean onVariant(BaseName basename,
                  Variant variant)
                  throws VisualizationException
Indicates the start of a Variant.

Throws:
VisualizationException

onParameter

void onParameter(Topic param)
                 throws VisualizationException
Indicates the start of a Variant Parameter.

Throws:
VisualizationException

onVariantName

void onVariantName(Variant variant,
                   VariantName varName)
                   throws VisualizationException
Indicates the start of a Variant Name.

Throws:
VisualizationException

onOccurrence

boolean onOccurrence(Topic topic,
                     Occurrence occur)
                     throws VisualizationException
Indicates the start of an Occurrence.

Returns:
true if the Occurrence is visualized (this may be optional).
Throws:
VisualizationException

onAssociation

Object onAssociation(Association assoc)
                     throws VisualizationException
Indicates the start of an Association.

Returns:
a graph Object visualizing the Association.
Throws:
VisualizationException

updateAssociation

void updateAssociation(Association assoc)
                       throws VisualizationException
Update the display of an already-visualized Association.

Throws:
VisualizationException

onMember

boolean onMember(Association assoc,
                 Member member)
                 throws VisualizationException
Indicates the start of a Member. The Association is included in order to provide for template role determination.

Returns:
true if the Member is visualized.
Throws:
VisualizationException

onRole

Object onRole(Association assoc,
              Topic player,
              Topic role)
              throws VisualizationException
Indicates the start of an Association role. This is an optional method, as roles are not always visualized.

Returns:
a graph Object visualizing the Topic.
Throws:
VisualizationException

instanceOf

Object instanceOf(Association assoc,
                  Topic classTopic,
                  Topic instanceTopic)
                  throws VisualizationException
Indicates an explicit class-instance Association.

Returns:
a graph Object visualizing the Association.
Throws:
VisualizationException

subclassOf

Object subclassOf(Association assoc,
                  Topic superclassTopic,
                  Topic subclassTopic)
                  throws VisualizationException
Indicates a superclass-subclass Association.

Returns:
a graph Object visualizing the Association.
Throws:
VisualizationException


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.