public class TopicClass extends TopicConstraintCollection implements TypedConstraintIF, ConstraintIF
Modifier and Type | Field and Description |
---|---|
protected Collection |
otherClasses |
protected boolean |
strict |
protected Collection |
subclasses |
protected TopicClass |
superclass |
protected TypeSpecification |
typespec |
basenames, id, occurrences, roles, schema, subrules
Constructor and Description |
---|
TopicClass(OSLSchema schema,
String id)
INTERNAL: Creates a topic class belonging to the given schema.
|
Modifier and Type | Method and Description |
---|---|
void |
addOtherClass(TypeSpecification typespec)
INTERNAL: Add a specification of a class to which instances of
this class may belong.
|
protected void |
addSubclass(TopicClass subclass) |
Collection |
getAllOccurrenceConstraints()
INTERNAL: Returns the complete set of occurrence constraints in this
collection, including those of sub collections.
|
Collection |
getAllRoleConstraints()
INTERNAL: Returns the complete set of role constraints in this
collection, including those of sub collections.
|
Collection |
getAllTopicNameConstraints()
INTERNAL: Returns the complete set of base name constraints in this
collection, including those of sub collections.
|
Collection |
getOtherClasses()
INTERNAL: Returns the collection of other classes to which instances
of this class may belong.
|
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.
|
protected void |
removeSubclass(TopicClass subclass) |
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.
|
String |
toString() |
addOccurrenceConstraint, addRoleConstraint, addSubRule, addTopicNameConstraint, getId, getOccurrenceConstraints, getRoleConstraints, getSubRules, getTopicNameConstraints
protected boolean strict
protected Collection otherClasses
protected TypeSpecification typespec
protected TopicClass superclass
protected Collection subclasses
public boolean isStrict()
public void setIsStrict(boolean strict)
public TypeSpecification getTypeSpecification()
getTypeSpecification
in interface TypedConstraintIF
public void setTypeSpecification(TypeSpecification typespec)
setTypeSpecification
in interface TypedConstraintIF
public void addOtherClass(TypeSpecification typespec)
public void removeOtherClass(TypeSpecification typespec)
public Collection getOtherClasses()
public TopicClass getSuperclass()
public void setSuperclass(TopicClass superclass)
superclass
- The superclass of this class. May be null.public Collection getSubclasses()
public Collection getAllTopicNameConstraints()
TopicConstraintCollection
getAllTopicNameConstraints
in class TopicConstraintCollection
public Collection getAllOccurrenceConstraints()
TopicConstraintCollection
getAllOccurrenceConstraints
in class TopicConstraintCollection
public Collection getAllRoleConstraints()
TopicConstraintCollection
getAllRoleConstraints
in class TopicConstraintCollection
public boolean matches(TMObjectIF object)
ConstraintIF
matches
in interface ConstraintIF
protected void addSubclass(TopicClass subclass)
protected void removeSubclass(TopicClass subclass)