Package net.ontopia.topicmaps.viz
Class VizConfigurationManager
- java.lang.Object
-
- net.ontopia.topicmaps.viz.VizConfigurationManager
-
- Direct Known Subclasses:
VizGeneralConfigurationManager,VizTopicMapConfigurationManager
public abstract class VizConfigurationManager extends Object
INTERNAL: Abstract configuration manager class.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBASEprotected TopicMapBuilderIFbuilderprotected static StringDEFAULT_ASSOCIATION_TYPEprotected static StringDEFAULT_TYPEprotected TopicIFdefaultAssociationTypeprotected TopicIFdefaultTypeprotected static StringGENERAL_TOPICprotected TopicIFgeneralTopicprotected TopicMapIFtopicmapprotected static StringUNTYPEDprotected TopicIFuntypedTopic
-
Constructor Summary
Constructors Constructor Description VizConfigurationManager()Creates an empty configuration manager where everything is set to default.VizConfigurationManager(File tmfile)Constructor initializes the configuration by loading a topic map from the URL given in the parameter.VizConfigurationManager(URL tmurl)Constructor initializes the configuration by loading a topic map from the URL given in the parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TopicIFgetConfigTopic(TopicIF real)Looks up the corresponding topic (from the visualized topic map) in the configuration topic map, creating one if it doesn't exist.protected OccurrenceIFgetOccurrence(TopicIF topic, TopicIF type)Returns the occurrence of the given type, if there is one.StringgetOccurrenceValue(TopicIF type, TopicIF occtype)protected booleangetOccurrenceValue(TopicIF type, TopicIF occtype, boolean defaultBoolean)protected intgetOccurrenceValue(TopicIF type, TopicIF occtype, int defaultInt)protected TopicIFgetTopic(String indicator)Looks up a topic by subject indicator, creating it if it can't be found.protected TopicIFgetTopic(String indicator, String basename)Looks up a topic by subject indicator, creating it if it can't be found.TopicMapIFgetTopicMap()protected voidinit()protected voidremoveOccurence(TopicIF type, TopicIF occtype)protected booleanremoveOccurrence(TopicIF topic, TopicIF type)Removes the occurrence of a given type from a given configuration topic.voidsave(File f)protected voidsetOccurenceValue(TopicIF type, TopicIF occtype, boolean value)Sets the visibility setting for this association or topic type in the topic map.protected voidsetOccurenceValue(TopicIF type, TopicIF occtype, String value)protected voidsetOccurrenceValue(TopicIF type, TopicIF occtype, int integer)Sets the Shape setting for this association or topic type in the topic map.
-
-
-
Field Detail
-
builder
protected TopicMapBuilderIF builder
-
topicmap
protected TopicMapIF topicmap
-
BASE
protected static final String BASE
- See Also:
- Constant Field Values
-
generalTopic
protected TopicIF generalTopic
-
untypedTopic
protected TopicIF untypedTopic
-
defaultType
protected TopicIF defaultType
-
defaultAssociationType
protected TopicIF defaultAssociationType
-
GENERAL_TOPIC
protected static final String GENERAL_TOPIC
- See Also:
- Constant Field Values
-
DEFAULT_TYPE
protected static final String DEFAULT_TYPE
- See Also:
- Constant Field Values
-
UNTYPED
protected static final String UNTYPED
- See Also:
- Constant Field Values
-
DEFAULT_ASSOCIATION_TYPE
protected static final String DEFAULT_ASSOCIATION_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VizConfigurationManager
public VizConfigurationManager()
Creates an empty configuration manager where everything is set to default.
-
VizConfigurationManager
public VizConfigurationManager(File tmfile) throws IOException
Constructor initializes the configuration by loading a topic map from the URL given in the parameter.- Throws:
IOException
-
VizConfigurationManager
public VizConfigurationManager(URL tmurl) throws IOException
Constructor initializes the configuration by loading a topic map from the URL given in the parameter.- Throws:
IOException
-
-
Method Detail
-
getOccurrence
protected OccurrenceIF getOccurrence(TopicIF topic, TopicIF type)
Returns the occurrence of the given type, if there is one.
-
removeOccurrence
protected boolean removeOccurrence(TopicIF topic, TopicIF type)
Removes the occurrence of a given type from a given configuration topic. Returns true iff the occurrence was found and removed.
-
getTopic
protected TopicIF getTopic(String indicator, String basename)
Looks up a topic by subject indicator, creating it if it can't be found. If a new topic is created, assign "basename" as a basename.
-
getTopic
protected TopicIF getTopic(String indicator)
Looks up a topic by subject indicator, creating it if it can't be found.
-
getTopicMap
public TopicMapIF getTopicMap()
-
setOccurrenceValue
protected void setOccurrenceValue(TopicIF type, TopicIF occtype, int integer)
Sets the Shape setting for this association or topic type in the topic map.
-
setOccurenceValue
protected void setOccurenceValue(TopicIF type, TopicIF occtype, boolean value)
Sets the visibility setting for this association or topic type in the topic map.
-
getOccurrenceValue
protected boolean getOccurrenceValue(TopicIF type, TopicIF occtype, boolean defaultBoolean)
-
save
public void save(File f) throws IOException
- Throws:
IOException
-
init
protected void init()
-
-