public class AgentActionSchema extends ConceptSchema
Modifier and Type | Field and Description |
---|---|
static String |
BASE_NAME |
private static AgentActionSchema |
baseSchema |
RESULT_SLOT_NAME
encodingByOrder, MANDATORY, OPTIONAL, UNLIMITED
Modifier | Constructor and Description |
---|---|
private |
AgentActionSchema()
Construct a schema that vinculates an entity to be a generic
agent action
|
|
AgentActionSchema(String typeName)
Creates an
AgentActionSchema with a given type-name. |
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
PredicateSchema slotSchema)
Add a mandatory slot of type PredicateSchema to this schema.
|
void |
add(String name,
PredicateSchema slotSchema,
int optionality)
Add a slot of type PredicateSchema 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 agent actions.
|
Facet[] |
getResultFacets() |
TermSchema |
getResultSchema() |
AbsObject |
newInstance()
Creates an Abstract descriptor to hold an agent action of
the proper type.
|
void |
setResult(TermSchema resultSchema)
Define that the result produced by the execution of an action described by this
schema has a structure conforming to a given term schema.
|
void |
setResult(TermSchema elementsSchema,
int cardMin,
int cardMax)
Define that the result produced by the execution of an action described by this
schema is an aggregate of n (with n between cardMin and cardMax) elements each one having
a structure conforming to a given term schema.
|
void |
validate(AbsObject abs,
Ontology onto)
Check whether a given abstract descriptor complies with this
schema.
|
add, add, add, add, addFacet, addSuperSchema
add, add, add, add, addSuperSchema, containsSlot, equals, getAllFacets, getFacets, getNames, getOwnNames, getSchema, getSuperSchemas, getTypeName, isAssignableFrom, isCompatibleWith, isMandatory, isOwnSlot, toString, validateSlots
getEncodingByOrder, setEncodingByOrder
public static final String BASE_NAME
private static AgentActionSchema baseSchema
private AgentActionSchema()
public AgentActionSchema(String typeName)
AgentActionSchema
with a given type-name.typeName
- The name of this AgentActionSchema
.public static ObjectSchema getBaseSchema()
public void add(String name, PredicateSchema slotSchema)
name
- The name of the slot.slotSchema
- The schema of the slot.public void add(String name, PredicateSchema slotSchema, int optionality)
name
- The name of the slot.slotSchema
- The schema of the slot.optionality
- The optionality, i.e. OPTIONAL
or MANDATORY
public AbsObject newInstance() throws OntologyException
newInstance
in class ConceptSchema
OntologyException
public void validate(AbsObject abs, Ontology onto) throws OntologyException
validate
in class ConceptSchema
abs
- The abstract descriptor to be checkedOntologyException
- If the abstract descriptor does not
complies with this schemaprotected boolean descendsFrom(ObjectSchema s)
descendsFrom
in class ConceptSchema
public void setResult(TermSchema resultSchema)
resultSchema
- the schema of the resultpublic void setResult(TermSchema elementsSchema, int cardMin, int cardMax)
elementsSchema
- the schema of the elements in the result aggregatecardMin
- the result must include at least cardMin
elementscardMax
- the result must include at most cardMax
elementspublic TermSchema getResultSchema()
public Facet[] getResultFacets()