net.ontopia.topicmaps.webed.impl.utils
Class SchemaUtils

java.lang.Object
  extended by net.ontopia.topicmaps.webed.impl.utils.SchemaUtils

public class SchemaUtils
extends java.lang.Object

INTERNAL: Utitlity class for providing help around making topic map schema support available to the web editor.


Constructor Summary
SchemaUtils()
           
 
Method Summary
protected  ConstraintIF findClass(TMObjectIF object, java.util.Collection classes)
           
protected  ConstraintIF findClass(TopicIF topic, java.util.Collection classes)
           
 java.util.Collection getAllowedAssocTypes(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns a collection of association types that can be played by the given topic.
 java.util.Collection getAllTopicNameConstraints(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns the complete set of topic name constraints in this collection, including those of sub collections.
protected  java.util.Collection getCharacteristicsInScope(java.util.Collection objects, java.util.Collection scope)
          INTERNAL: Return all objects that are in the given scope.
 java.util.Collection getExtOccConstraints(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns the complete set of constraints for external occurrences for the given topic in the specified schema.
 java.util.Collection getIntOccConstraints(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns the complete set of constraints for internal occurrences for the given topic in the specified schema.
 java.util.Collection getMatchingTopics(TopicMapIF tm, ScopeSpecification scopeSpec)
          INTERNAL: Gets the topic objects which define a context theme by the given scope specification typically attached to a constraint object.
 java.util.Collection getMatchingTopics(TopicMapIF tm, TypeSpecification typeSpec)
          INTERNAL: Gets the topic objects which define a class type by the given type specification typically attached to a constraint object.
protected  java.util.Collection getObjectsOfType(java.util.Collection allTypes, java.util.Collection curTypes)
          INTERNAL: Return all typing objects that are equal to one of the given types.
protected  java.util.Collection getOccurrenceConstraints(OSLSchema schema, TopicIF topic, boolean internal)
           
 TypeStorage getRemainingExtOccTypes(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns a set of topic objects which belong to external occurrence types that are allowed to add to the given topic.
 TypeStorage getRemainingIntOccTypes(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns a set of topic objects which belong to internal occurrence types that are allowed to add to the given topic.
protected  TypeStorage getRemainingOccTypes(OSLSchema schema, TopicIF topic, java.util.Collection occCons)
           
 TypeStorage getRemainingRoleTypes(OSLSchema schema, AssociationIF assoc)
          INTERNAL: Returns a set of topic objects which belong to role types that are allowed to add to the given association.
 ScopeStorage getRemainingTopicNameThemes(OSLSchema schema, TopicIF topic)
          INTERNAL: Returns a set of topic objects which belong to themes that are allowed to add to the topic name by the given topic.
 java.util.Collection getRoleConstraints(OSLSchema schema, AssociationIF assoc)
          INTERNAL: Returns the collection of role constraints in this class definition.
 TopicIF getRoleType4AssocType(OSLSchema schema, TopicIF assocType, TopicIF player)
          INTERNAL: Get the allowed association role type for the given association type with the help of the schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaUtils

public SchemaUtils()
Method Detail

getMatchingTopics

public java.util.Collection getMatchingTopics(TopicMapIF tm,
                                              ScopeSpecification scopeSpec)
INTERNAL: Gets the topic objects which define a context theme by the given scope specification typically attached to a constraint object.

Returns:
A collection of TopicIF objects.

getMatchingTopics

public java.util.Collection getMatchingTopics(TopicMapIF tm,
                                              TypeSpecification typeSpec)
INTERNAL: Gets the topic objects which define a class type by the given type specification typically attached to a constraint object.

Returns:
A collection of TopicIF objects.

getAllTopicNameConstraints

public java.util.Collection getAllTopicNameConstraints(OSLSchema schema,
                                                       TopicIF topic)
INTERNAL: Returns the complete set of topic name constraints in this collection, including those of sub collections.

Returns:
A collection of TopicNameConstraint objects.

getRemainingTopicNameThemes

public ScopeStorage getRemainingTopicNameThemes(OSLSchema schema,
                                                TopicIF topic)
INTERNAL: Returns a set of topic objects which belong to themes that are allowed to add to the topic name by the given topic.

Returns:
A ScopeStorage object containing a collection of TopicIF objects.

getIntOccConstraints

public java.util.Collection getIntOccConstraints(OSLSchema schema,
                                                 TopicIF topic)
INTERNAL: Returns the complete set of constraints for internal occurrences for the given topic in the specified schema.

Returns:
A collection of OccurrenceConstraint objects.

getExtOccConstraints

public java.util.Collection getExtOccConstraints(OSLSchema schema,
                                                 TopicIF topic)
INTERNAL: Returns the complete set of constraints for external occurrences for the given topic in the specified schema.

Returns:
A collection of OccurrenceConstraint objects.

getOccurrenceConstraints

protected java.util.Collection getOccurrenceConstraints(OSLSchema schema,
                                                        TopicIF topic,
                                                        boolean internal)

getRemainingIntOccTypes

public TypeStorage getRemainingIntOccTypes(OSLSchema schema,
                                           TopicIF topic)
INTERNAL: Returns a set of topic objects which belong to internal occurrence types that are allowed to add to the given topic.

Returns:
A TypeStorage object containing a collection of TopicIF objects.

getRemainingExtOccTypes

public TypeStorage getRemainingExtOccTypes(OSLSchema schema,
                                           TopicIF topic)
INTERNAL: Returns a set of topic objects which belong to external occurrence types that are allowed to add to the given topic.

Returns:
A TypeStorage object containing a collection of TopicIF objects.

getRemainingOccTypes

protected TypeStorage getRemainingOccTypes(OSLSchema schema,
                                           TopicIF topic,
                                           java.util.Collection occCons)

getRoleConstraints

public java.util.Collection getRoleConstraints(OSLSchema schema,
                                               AssociationIF assoc)
INTERNAL: Returns the collection of role constraints in this class definition.

Returns:
A collection of AssociationRoleConstraint objects.

getAllowedAssocTypes

public java.util.Collection getAllowedAssocTypes(OSLSchema schema,
                                                 TopicIF topic)
INTERNAL: Returns a collection of association types that can be played by the given topic.

Returns:
A collection of TopicIF objects.

getRoleType4AssocType

public TopicIF getRoleType4AssocType(OSLSchema schema,
                                     TopicIF assocType,
                                     TopicIF player)
INTERNAL: Get the allowed association role type for the given association type with the help of the schema.


getRemainingRoleTypes

public TypeStorage getRemainingRoleTypes(OSLSchema schema,
                                         AssociationIF assoc)
INTERNAL: Returns a set of topic objects which belong to role types that are allowed to add to the given association.

Returns:
A TypeStorage object containing a collection of TopicIF objects.

findClass

protected ConstraintIF findClass(TopicIF topic,
                                 java.util.Collection classes)

findClass

protected ConstraintIF findClass(TMObjectIF object,
                                 java.util.Collection classes)

getCharacteristicsInScope

protected java.util.Collection getCharacteristicsInScope(java.util.Collection objects,
                                                         java.util.Collection scope)
INTERNAL: Return all objects that are in the given scope.


getObjectsOfType

protected java.util.Collection getObjectsOfType(java.util.Collection allTypes,
                                                java.util.Collection curTypes)
INTERNAL: Return all typing objects that are equal to one of the given types.



Copyright © 2000-2012 Ontopia.