jade.content.schema
Class PrimitiveSchema
java.lang.Object
|
+--jade.content.schema.ObjectSchema
|
+--jade.content.schema.ObjectSchemaImpl
|
+--jade.content.schema.TermSchema
|
+--jade.content.schema.PrimitiveSchema
- All Implemented Interfaces:
- Serializable, java.io.Serializable
- public class PrimitiveSchema
- extends TermSchema
This class represent the schema of primitive entities in
an ontology.
- Author:
- Federico Bergenti - Universita` di Parma
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
BASE_NAME
|
Constructor Summary |
PrimitiveSchema(java.lang.String typeName)
Creates a PrimitiveSchema with a given type-name. |
Method Summary |
protected boolean |
descendsFrom(ObjectSchema s)
Return true if
- s is the base schema for the XXXSchema class this schema is
an instance of (e.g. s is ConceptSchema.getBaseSchema() and this
schema is an instance of ConceptSchema)
- s is the base schema for a super-class of the XXXSchema class
this schema is an instance of (e.g. s is TermSchema.getBaseSchema()
and this schema is an instance of ConceptSchema) |
static ObjectSchema |
getBaseSchema()
Retrieve the generic base schema for all primitives. |
AbsObject |
newInstance()
Creates an Abstract descriptor to hold a primitive of
the proper type. |
void |
validate(AbsObject abs,
Ontology onto)
Check whether a given abstract descriptor complies with this
schema. |
Methods inherited from class jade.content.schema.TermSchema |
add, add, add, add, addFacet, addSuperSchema, containsSlot, equals, getFacets, getNames, getSchema, getTypeName, isCompatibleWith, isMandatory, toString, validateSlots |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BASE_NAME
public static final java.lang.String BASE_NAME
- See Also:
- Constant Field Values
PrimitiveSchema
public PrimitiveSchema(java.lang.String typeName)
- Creates a
PrimitiveSchema
with a given type-name.
- Parameters:
typeName
- The name of this PrimitiveSchema
.
getBaseSchema
public static ObjectSchema getBaseSchema()
- Retrieve the generic base schema for all primitives.
- Returns:
- the generic base schema for all primitives.
newInstance
public AbsObject newInstance()
throws OntologyException
- Creates an Abstract descriptor to hold a primitive of
the proper type.
- Overrides:
newInstance
in class TermSchema
OntologyException
validate
public void validate(AbsObject abs,
Ontology onto)
throws OntologyException
- Check whether a given abstract descriptor complies with this
schema.
- Overrides:
validate
in class jade.content.schema.ObjectSchemaImpl
- Parameters:
abs
- The abstract descriptor to be checked
- Throws:
OntologyException
- If the abstract descriptor does not
complies with this schema
descendsFrom
protected boolean descendsFrom(ObjectSchema s)
- Return true if
- s is the base schema for the XXXSchema class this schema is
an instance of (e.g. s is ConceptSchema.getBaseSchema() and this
schema is an instance of ConceptSchema)
- s is the base schema for a super-class of the XXXSchema class
this schema is an instance of (e.g. s is TermSchema.getBaseSchema()
and this schema is an instance of ConceptSchema)
- Overrides:
descendsFrom
in class TermSchema
JADE