net.ontopia.topicmaps.schema.impl.osl
Class OSLSchema

java.lang.Object
  extended by net.ontopia.topicmaps.schema.impl.osl.OSLSchema
All Implemented Interfaces:
SchemaIF

public class OSLSchema
extends java.lang.Object
implements SchemaIF

PUBLIC: Represents an entire OSL schema.


Field Summary
protected  LocatorIF address
           
protected  java.util.Collection assocClasses
           
protected  java.util.Map rulesets
           
protected  boolean strict
           
protected  java.util.Collection topicClasses
           
protected  java.util.Map topicsById
           
protected  SchemaValidatorIF validator
           
 
Constructor Summary
OSLSchema(LocatorIF address)
          PUBLIC: Creates a new OSL schema object.
 
Method Summary
 void addAssociationClass(AssociationClass assocClass)
          INTERNAL: Adds an AssociationClass object to the schema.
 void addRuleSet(RuleSet rule)
          INTERNAL: Adds a RuleSet object to the schema.
 void addTopicClass(TopicClass topicClass)
          INTERNAL: Adds a TopicClass object to the schema.
 LocatorIF getAddress()
          PUBLIC: Returns the address of the schema.
 java.util.Collection getAssociationClasses()
          INTERNAL: Returns all the association classes in this schema.
 RuleSet getRuleSet(java.lang.String id)
          INTERNAL: Returns the rule set that has the given ID.
 java.util.Collection getRuleSets()
          INTERNAL: Returns all the rule sets in this schema.
 TopicClass getTopicClass(java.lang.String id)
          INTERNAL: Returns the topic class that has the given ID.
 java.util.Collection getTopicClasses()
          INTERNAL: Returns all the topic classes in this schema.
 SchemaValidatorIF getValidator()
          PUBLIC: Returns a validator object that can be used to validate topic map objects against the schema.
 boolean isStrict()
          INTERNAL: True if the schema uses strict matching, false otherwise.
 void removeAssociationClass(AssociationClass assocClass)
          INTERNAL: Removes the association class from this schema.
 void removeRuleSet(RuleSet rule)
          INTERNAL: Removes the rule set from this schema.
 void removeTopicClass(TopicClass topicClass)
          INTERNAL: Removes the topic class from this schema.
 void setIsStrict(boolean strict)
          INTERNAL: Sets the matching policy of the schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validator

protected SchemaValidatorIF validator

topicClasses

protected java.util.Collection topicClasses

assocClasses

protected java.util.Collection assocClasses

strict

protected boolean strict

rulesets

protected java.util.Map rulesets

topicsById

protected java.util.Map topicsById

address

protected LocatorIF address
Constructor Detail

OSLSchema

public OSLSchema(LocatorIF address)
PUBLIC: Creates a new OSL schema object.

Parameters:
address - The base address of the schema.
Method Detail

getValidator

public SchemaValidatorIF getValidator()
Description copied from interface: SchemaIF
PUBLIC: Returns a validator object that can be used to validate topic map objects against the schema.

Specified by:
getValidator in interface SchemaIF

getAddress

public LocatorIF getAddress()
Description copied from interface: SchemaIF
PUBLIC: Returns the address of the schema. The address may be null.

Specified by:
getAddress in interface SchemaIF

addRuleSet

public void addRuleSet(RuleSet rule)
INTERNAL: Adds a RuleSet object to the schema.


addTopicClass

public void addTopicClass(TopicClass topicClass)
INTERNAL: Adds a TopicClass object to the schema.


addAssociationClass

public void addAssociationClass(AssociationClass assocClass)
INTERNAL: Adds an AssociationClass object to the schema.


getRuleSets

public java.util.Collection getRuleSets()
INTERNAL: Returns all the rule sets in this schema.


getTopicClasses

public java.util.Collection getTopicClasses()
INTERNAL: Returns all the topic classes in this schema.


getAssociationClasses

public java.util.Collection getAssociationClasses()
INTERNAL: Returns all the association classes in this schema.


removeRuleSet

public void removeRuleSet(RuleSet rule)
INTERNAL: Removes the rule set from this schema. If the schema does not have the rule set the call is ignored.


removeTopicClass

public void removeTopicClass(TopicClass topicClass)
INTERNAL: Removes the topic class from this schema. If the schema does not have the topic class the call is ignored.


removeAssociationClass

public void removeAssociationClass(AssociationClass assocClass)
INTERNAL: Removes the association class from this schema. If the schema does not have the association class the call is ignored.


getTopicClass

public TopicClass getTopicClass(java.lang.String id)
INTERNAL: Returns the topic class that has the given ID. If no topic class has this ID, null is returned.


getRuleSet

public RuleSet getRuleSet(java.lang.String id)
INTERNAL: Returns the rule set that has the given ID. If no rule set has this ID, null is returned.


isStrict

public boolean isStrict()
INTERNAL: True if the schema uses strict matching, false otherwise.


setIsStrict

public void setIsStrict(boolean strict)
INTERNAL: Sets the matching policy of the schema.



Copyright © 2000-2012 Ontopia.