|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.content.schema.ObjectSchema
Field Summary | |
static java.lang.String |
BASE_NAME
|
protected static ObjectSchema |
baseSchema
|
static int |
MANDATORY
Canstant value indicating that a slot in a schema is mandatory, i.e. its value must not be null |
static int |
OPTIONAL
Canstant value indicating that a slot in a schema is optional, i.e. its value can be null |
static int |
UNLIMITED
Canstant value indicating that a slot in a schema has an infinite maximum cardinality |
Constructor Summary | |
ObjectSchema()
|
Method Summary | |
protected abstract void |
add(java.lang.String name,
ObjectSchema slotSchema)
Add a mandatory slot to the schema. |
protected abstract void |
add(java.lang.String name,
ObjectSchema slotSchema,
int optionality)
Add a slot to the schema. |
protected abstract void |
add(java.lang.String name,
ObjectSchema elementsSchema,
int cardMin,
int cardMax)
Add a slot with cardinality between cardMin
and cardMax to this schema.
|
protected abstract void |
add(java.lang.String name,
ObjectSchema 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. |
protected abstract void |
addFacet(java.lang.String slotName,
Facet f)
Add a Facet on a slot of this schema |
protected abstract void |
addSuperSchema(ObjectSchema superSchema)
Add a super schema tho this schema, i.e. this schema will inherit all characteristics from the super schema |
abstract boolean |
containsSlot(java.lang.String name)
Indicate whether a given String is the name of a
slot defined in this Schema |
protected abstract 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 objects. |
boolean |
getEncodingByOrder()
Get the indication whether the preferred encoding for the slots of concepts compliant to this schema is by order or by name. |
abstract Facet[] |
getFacets(java.lang.String slotName)
Get the facets defined upon a slot of the objectschema. |
abstract java.lang.String[] |
getNames()
Returns the names of all the slots in this Schema
(including slots defined in super schemas). |
abstract ObjectSchema |
getSchema(java.lang.String name)
Retrieves the schema of a slot of this Schema . |
abstract java.lang.String |
getTypeName()
Retrieves the name of the type of this schema. |
abstract boolean |
isCompatibleWith(ObjectSchema s)
Check if this schema is compatible with a given schema s. |
abstract AbsObject |
newInstance()
Creates an Abstract descriptor to hold an object compliant to this Schema . |
void |
setEncodingByOrder(boolean b)
Sets an indication about whether the preferred encoding for the slots of concepts compliants to this schema is by oredr or by name. |
abstract void |
validate(AbsObject abs,
Ontology onto)
Check whether a given abstract descriptor complies with this schema. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int MANDATORY
public static final int OPTIONAL
public static final int UNLIMITED
public static final java.lang.String BASE_NAME
protected static ObjectSchema baseSchema
Constructor Detail |
public ObjectSchema()
Method Detail |
public static ObjectSchema getBaseSchema()
protected abstract void add(java.lang.String name, ObjectSchema slotSchema, int optionality)
name
- The name of the slot.slotSchema
- The schema defining the type of the slot.optionality
- The optionality, i.e., OPTIONAL
or MANDATORY
protected abstract void add(java.lang.String name, ObjectSchema slotSchema)
name
- name of the slot.slotSchema
- schema of the slot.protected abstract void add(java.lang.String name, ObjectSchema 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
valuesprotected abstract void add(java.lang.String name, ObjectSchema 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, ObjectSchema, int, int)
protected abstract void addSuperSchema(ObjectSchema superSchema)
superSchema
- the super schema.protected abstract void addFacet(java.lang.String slotName, Facet f) throws OntologyException
Facet
on a slot of this schemaslotName
- the name of the slot the Facet
must be added to.f
- the Facet
to be added.public void setEncodingByOrder(boolean b)
public boolean getEncodingByOrder()
public abstract java.lang.String getTypeName()
public abstract java.lang.String[] getNames()
Schema
(including slots defined in super schemas).public abstract ObjectSchema getSchema(java.lang.String name) throws OntologyException
Schema
.name
- The name of the slot.Schema
of slot name
public abstract boolean containsSlot(java.lang.String name)
String
is the name of a
slot defined in this Schema
name
- The String
to test.true
if name
is the name of a
slot defined in this Schema
.public abstract AbsObject newInstance() throws OntologyException
Schema
.public abstract void validate(AbsObject abs, Ontology onto) throws OntologyException
abs
- The abstract descriptor to be checkedpublic abstract boolean isCompatibleWith(ObjectSchema s)
protected abstract boolean descendsFrom(ObjectSchema s)
public abstract Facet[] getFacets(java.lang.String slotName)
slotName
- The name of the slot which the facets are related to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |