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

java.lang.Object
  extended by net.ontopia.topicmaps.schema.impl.osl.TopicConstraintCollection
      extended by net.ontopia.topicmaps.schema.impl.osl.TopicClass
All Implemented Interfaces:
ConstraintIF, TypedConstraintIF

public class TopicClass
extends TopicConstraintCollection
implements TypedConstraintIF, ConstraintIF

INTERNAL: Represents a topic class definition.


Field Summary
protected  java.util.Collection otherClasses
           
protected  boolean strict
           
protected  java.util.Collection subclasses
           
protected  TopicClass superclass
           
protected  TypeSpecification typespec
           
 
Fields inherited from class net.ontopia.topicmaps.schema.impl.osl.TopicConstraintCollection
basenames, id, occurrences, roles, schema, subrules
 
Constructor Summary
TopicClass(OSLSchema schema, java.lang.String id)
          INTERNAL: Creates a topic class belonging to the given schema.
 
Method Summary
 void addOtherClass(TypeSpecification typespec)
          INTERNAL: Add a specification of a class to which instances of this class may belong.
 java.util.Collection getAllOccurrenceConstraints()
          INTERNAL: Returns the complete set of occurrence constraints in this collection, including those of sub collections.
 java.util.Collection getAllRoleConstraints()
          INTERNAL: Returns the complete set of role constraints in this collection, including those of sub collections.
 java.util.Collection getAllTopicNameConstraints()
          INTERNAL: Returns the complete set of base name constraints in this collection, including those of sub collections.
 java.util.Collection getOtherClasses()
          INTERNAL: Returns the collection of other classes to which instances of this class may belong.
 java.util.Collection getSubclasses()
          INTERNAL: Returns the (possibly empty) collection of subclasses of this class.
 TopicClass getSuperclass()
          INTERNAL: Returns the superclass of this class.
 TypeSpecification getTypeSpecification()
          INTERNAL: Returns the specification of the topic typing the class defined by this object.
 boolean isStrict()
          INTERNAL: True if strict matching is used; false otherwise.
 boolean matches(TMObjectIF object)
          PUBLIC: Returns true if the object given is constrained by this constraint.
 void removeOtherClass(TypeSpecification typespec)
          INTERNAL: Remove the specification of a class to which instances of this class may no longer belong.
 void setIsStrict(boolean strict)
          INTERNAL: Sets whether the class uses strict matching or not.
 void setSuperclass(TopicClass superclass)
          INTERNAL: Sets the superclass of this class.
 void setTypeSpecification(TypeSpecification typespec)
          INTERNAL: Sets the specification of the topic typing the class defined by this object.
 java.lang.String toString()
           
 
Methods inherited from class net.ontopia.topicmaps.schema.impl.osl.TopicConstraintCollection
addOccurrenceConstraint, addRoleConstraint, addSubRule, addTopicNameConstraint, getId, getOccurrenceConstraints, getRoleConstraints, getSubRules, getTopicNameConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

strict

protected boolean strict

otherClasses

protected java.util.Collection otherClasses

typespec

protected TypeSpecification typespec

superclass

protected TopicClass superclass

subclasses

protected java.util.Collection subclasses
Constructor Detail

TopicClass

public TopicClass(OSLSchema schema,
                  java.lang.String id)
INTERNAL: Creates a topic class belonging to the given schema.

Parameters:
id - The id of the topic class. May be null.
Method Detail

isStrict

public boolean isStrict()
INTERNAL: True if strict matching is used; false otherwise.


setIsStrict

public void setIsStrict(boolean strict)
INTERNAL: Sets whether the class uses strict matching or not.


getTypeSpecification

public TypeSpecification getTypeSpecification()
INTERNAL: Returns the specification of the topic typing the class defined by this object.

Specified by:
getTypeSpecification in interface TypedConstraintIF

setTypeSpecification

public void setTypeSpecification(TypeSpecification typespec)
INTERNAL: Sets the specification of the topic typing the class defined by this object.

Specified by:
setTypeSpecification in interface TypedConstraintIF

addOtherClass

public void addOtherClass(TypeSpecification typespec)
INTERNAL: Add a specification of a class to which instances of this class may belong.


removeOtherClass

public void removeOtherClass(TypeSpecification typespec)
INTERNAL: Remove the specification of a class to which instances of this class may no longer belong.


getOtherClasses

public java.util.Collection getOtherClasses()
INTERNAL: Returns the collection of other classes to which instances of this class may belong.

Returns:
A collection of TypeSpecification objects.

getSuperclass

public TopicClass getSuperclass()
INTERNAL: Returns the superclass of this class.

Returns:
The superclass. May be null.

setSuperclass

public void setSuperclass(TopicClass superclass)
INTERNAL: Sets the superclass of this class.

Parameters:
superclass - The superclass of this class. May be null.

getSubclasses

public java.util.Collection getSubclasses()
INTERNAL: Returns the (possibly empty) collection of subclasses of this class.

Returns:
A collection of TopicClass objects.

getAllTopicNameConstraints

public java.util.Collection getAllTopicNameConstraints()
Description copied from class: TopicConstraintCollection
INTERNAL: Returns the complete set of base name constraints in this collection, including those of sub collections.

Overrides:
getAllTopicNameConstraints in class TopicConstraintCollection
Returns:
A collection of TopicNameConstraint objects.

getAllOccurrenceConstraints

public java.util.Collection getAllOccurrenceConstraints()
Description copied from class: TopicConstraintCollection
INTERNAL: Returns the complete set of occurrence constraints in this collection, including those of sub collections.

Overrides:
getAllOccurrenceConstraints in class TopicConstraintCollection
Returns:
A collection of OccurrenceConstraint objects.

getAllRoleConstraints

public java.util.Collection getAllRoleConstraints()
Description copied from class: TopicConstraintCollection
INTERNAL: Returns the complete set of role constraints in this collection, including those of sub collections.

Overrides:
getAllRoleConstraints in class TopicConstraintCollection
Returns:
A collection of TopicRoleConstraint objects.

matches

public boolean matches(TMObjectIF object)
Description copied from interface: ConstraintIF
PUBLIC: Returns true if the object given is constrained by this constraint.

Specified by:
matches in interface ConstraintIF

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2012 Ontopia.