jade.content.schema
Class AgentActionSchema

java.lang.Object
  |
  +--jade.content.schema.ObjectSchema
        |
        +--jade.content.schema.ObjectSchemaImpl
              |
              +--jade.content.schema.TermSchema
                    |
                    +--jade.content.schema.ConceptSchema
                          |
                          +--jade.content.schema.AgentActionSchema
All Implemented Interfaces:
java.io.Serializable, Serializable

public class AgentActionSchema
extends ConceptSchema

The class to be used to define schemas of agent actions in an ontology. Note that an AgentActionSchema should also be a ConceptSchema, but this inheritance relation is cut as Java does not support multiple inheritance. As a consequence in practice it will not be possible to define e.g. a ConceptSchema with a slot whose value must be instances of a certain type of agent-action even if in theory this should be possible as a ConceptSchema can have slots of type term and an agent-action is a concept and therefore a term.

Author:
Federico Bergenti - Universita` di Parma
See Also:
Serialized Form

Field Summary
static java.lang.String BASE_NAME
           
 
Fields inherited from class jade.content.schema.ObjectSchema
baseSchema, MANDATORY, OPTIONAL, UNLIMITED
 
Constructor Summary
AgentActionSchema(java.lang.String typeName)
          Creates an AgentActionSchema with a given type-name.
 
Method Summary
 void add(java.lang.String name, PredicateSchema slotSchema)
          Add a mandatory slot of type PredicateSchema to this schema.
 void add(java.lang.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.
 AbsObject newInstance()
          Creates an Abstract descriptor to hold an agent action 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.ConceptSchema
add, add, add, add, addFacet, addSuperSchema
 
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

BASE_NAME

public static final java.lang.String BASE_NAME
See Also:
Constant Field Values
Constructor Detail

AgentActionSchema

public AgentActionSchema(java.lang.String typeName)
Creates an AgentActionSchema with a given type-name.

Parameters:
typeName - The name of this AgentActionSchema.
Method Detail

getBaseSchema

public static ObjectSchema getBaseSchema()
Retrieve the generic base schema for all agent actions.

Returns:
the generic base schema for all agent actions.

add

public void add(java.lang.String name,
                PredicateSchema slotSchema)
Add a mandatory slot of type PredicateSchema to this schema.

Parameters:
name - The name of the slot.
slotSchema - The schema of the slot.

add

public void add(java.lang.String name,
                PredicateSchema slotSchema,
                int optionality)
Add a slot of type PredicateSchema to this schema.

Parameters:
name - The name of the slot.
slotSchema - The schema of the slot.
optionality - The optionality, i.e. OPTIONAL or MANDATORY

newInstance

public AbsObject newInstance()
                      throws OntologyException
Creates an Abstract descriptor to hold an agent action of the proper type.

Overrides:
newInstance in class ConceptSchema
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 ConceptSchema
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. Moreover, as AgentActionSchema extends GenericActionSchema, but should also extend ConceptSchema (this is not possible in practice as Java does not support multiple inheritance), this method returns true also in the case that s is equals to, or is an ancestor of, ConceptSchema.getBaseSchema() (i.e. TermSchema.getBaseSchema() descends from s)

Overrides:
descendsFrom in class ConceptSchema


JADE