|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jade.content.schema.ObjectSchema
|
+--jade.content.schema.ObjectSchemaImpl
|
+--jade.content.schema.TermSchema
|
+--jade.content.schema.ConceptSchema
The class to be used to define schemas of concepts in an ontology.
| Field Summary | |
static java.lang.String |
BASE_NAME
|
| Fields inherited from class jade.content.schema.ObjectSchema |
baseSchema, MANDATORY, OPTIONAL, UNLIMITED |
| Constructor Summary | |
ConceptSchema(java.lang.String typeName)
Creates a ConceptSchema with a given type-name,
e.g. |
|
| Method Summary | |
void |
add(java.lang.String name,
TermSchema slotSchema)
Add a mandatory slot to the schema. |
void |
add(java.lang.String name,
TermSchema slotSchema,
int optionality)
Add a slot to the schema. |
void |
add(java.lang.String name,
TermSchema elementsSchema,
int cardMin,
int cardMax)
Add a slot with cardinality between cardMin
and cardMax to this schema. |
void |
add(java.lang.String name,
TermSchema elementsSchema,
int cardMin,
int cardMax,
java.lang.String aggType)
Add a slot with cardinality between cardMin
and cardMax to this schema and allow specifying the type
of Aggregate to be used for this slot. |
void |
addFacet(java.lang.String slotName,
Facet f)
Add a Facet on a slot of this schema |
void |
addSuperSchema(ConceptSchema superClassSchema)
Adds a super-schema to this schema. |
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. |
static ObjectSchema |
getBaseSchema()
Retrieve the generic base schema for all concepts. |
AbsObject |
newInstance()
Creates an Abstract descriptor to hold a concept 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, addSuperSchema, containsSlot, equals, getFacets, getNames, getSchema, getTypeName, isCompatibleWith, isMandatory, toString, validateSlots |
| Methods inherited from class jade.content.schema.ObjectSchema |
getEncodingByOrder, setEncodingByOrder |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String BASE_NAME
| Constructor Detail |
public ConceptSchema(java.lang.String typeName)
ConceptSchema with a given type-name,
e.g. PERSON, ADDRESS...
typeName - The name of this ConceptSchema.| Method Detail |
public static ObjectSchema getBaseSchema()
public void add(java.lang.String name,
TermSchema slotSchema)
TermSchema.
name - The name of the slot.slotSchema - The schema of the slot.
public void add(java.lang.String name,
TermSchema slotSchema,
int optionality)
TermSchema.
name - The name of the slot.slotSchema - The schema of the slot.optionality - The optionality, i.e., OPTIONAL
or MANDATORY
public void add(java.lang.String name,
TermSchema elementsSchema,
int cardMin,
int cardMax)
cardMin
and cardMax to this schema.
Adding such a slot corresponds to add a slot
of type Aggregate and then to add proper facets (constraints)
to check that the type of the elements in the aggregate are
compatible with elementsSchema and that the
aggregate contains at least cardMin elements and
at most cardMax elements. By default the Aggregate
is of type BasicOntology.SEQUENCE.
name - The name of the slot.elementsSchema - The schema for the elements of this slot.cardMin - This slot must get at least cardMin
valuescardMax - This slot can get at most cardMax
values
public void add(java.lang.String name,
TermSchema elementsSchema,
int cardMin,
int cardMax,
java.lang.String aggType)
cardMin
and cardMax to this schema and allow specifying the type
of Aggregate to be used for this slot.
name - The name of the slot.elementsSchema - The schema for the elements of this slot.cardMin - This slot must get at least cardMin
valuescardMax - This slot can get at most cardMax
valuesaggType - The type of Aggregate to be usedadd(String, TermSchema, int, int)public void addSuperSchema(ConceptSchema superClassSchema)
ConceptSchema
must be a ConceptSchema too.
superClassSchema - The super-schema to be added.
public void addFacet(java.lang.String slotName,
Facet f)
throws OntologyException
Facet on a slot of this schema
addFacet in class jade.content.schema.ObjectSchemaImplslotName - the name of the slot the Facet
must be added to.f - the Facet to be added.
OntologyException - if slotName does not identify
a valid slot in this schema
public AbsObject newInstance()
throws OntologyException
newInstance in class TermSchemaOntologyException
public void validate(AbsObject abs,
Ontology onto)
throws OntologyException
validate in class jade.content.schema.ObjectSchemaImplabs - The abstract descriptor to be checked
OntologyException - If the abstract descriptor does not
complies with this schemaprotected boolean descendsFrom(ObjectSchema s)
descendsFrom in class TermSchema
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||