@Deprecated public class ContentManager extends Object implements Serializable
ContentManager
object accessible through
the getContentManager()
method of the Agent
class.Modifier and Type | Field and Description |
---|---|
private Map |
languages
Deprecated.
|
private Map |
ontologies
Deprecated.
|
private boolean |
validationMode
Deprecated.
|
Constructor and Description |
---|
ContentManager()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private AbsContentElement |
decode(ACLMessage msg,
Codec codec,
Ontology onto)
Deprecated.
|
private AbsContentElement |
decode(Object buf,
Codec codec,
Ontology onto)
Deprecated.
|
private Object |
encode(AbsContentElement content,
Codec codec,
Ontology onto)
Deprecated.
|
private void |
encode(ACLMessage msg,
AbsContentElement content,
Codec codec,
Ontology onto)
Deprecated.
|
AbsContentElement |
extractAbsContent(ACLMessage msg)
Deprecated.
Translates the
:content slot of an
ACLMessage msg into an AbsContentElement
using the content language and ontology indicated in the
:language and :ontology fields of msg . |
AbsContentElement |
extractAbsContent(MLMessage msg)
Deprecated.
Translates the
:content slot of an
ACLMessage msg into an AbsContentElement
using the content language and ontology indicated in the
:language and :ontology fields of msg . |
ContentElement |
extractContent(ACLMessage msg)
Deprecated.
Translates the
:content slot of an
ACLMessage msg into a ContentElement
using the content language and ontology indicated in the
:language and :ontology fields of msg . |
void |
fillContent(ACLMessage msg,
AbsContentElement content)
Deprecated.
Fills the
:content slot of an
ACLMessage msg using the content language
and ontology indicated in the :language and
:ontology fields of msg . |
void |
fillContent(ACLMessage msg,
ContentElement content)
Deprecated.
Fills the
:content slot of an
ACLMessage msg using the content language
and ontology indicated in the :language and
:ontology fields of msg . |
AbsContentElement |
getAbs(String codecName,
String ontoName,
String exp)
Deprecated.
Translates the
:content slot of an
ACLMessage msg into an AbsContentElement
using the content language and ontology indicated in the
:language and :ontology fields of msg . |
String[] |
getLanguageNames()
Deprecated.
|
private Ontology |
getMergedOntology(Codec c,
Ontology o)
Deprecated.
Merge the reference ontology with the inner ontology of the
content language
|
Ontology |
getOntology(ACLMessage msg)
Deprecated.
|
String[] |
getOntologyNames()
Deprecated.
|
boolean |
getValidationMode()
Deprecated.
Return the currently set validation mode i.e.
|
Codec |
lookupLanguage(String name)
Deprecated.
Retrieves a previously registered
Codec
giving its name . |
Ontology |
lookupOntology(String name)
Deprecated.
Retrieves a previously registered
Ontology
giving its name . |
Object |
makeExpressionString(String codecName,
String ontoName,
ContentElement content)
Deprecated.
|
private void |
readObject(ObjectInputStream oin)
Deprecated.
|
void |
registerLanguage(Codec c)
Deprecated.
Registers a
Codec for a given content language
with its default name (i.e. |
void |
registerLanguage(Codec c,
String name)
Deprecated.
Registers a
Codec for a given content language
with a given name. |
void |
registerOntology(Ontology o)
Deprecated.
Registers an
Ontology with its default name (i.e. |
void |
registerOntology(Ontology o,
String name)
Deprecated.
Registers an
Ontology with a given name. |
void |
setValidationMode(boolean mode)
Deprecated.
Set the validation mode i.e.
|
String |
toString()
Deprecated.
|
private void |
validate(AbsContentElement content,
Ontology onto)
Deprecated.
|
private transient Map languages
private transient Map ontologies
private boolean validationMode
private void readObject(ObjectInputStream oin) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void registerLanguage(Codec c)
Codec
for a given content language
with its default name (i.e.
the name returned by its getName()
method.
Since this operation is performed the agent that owns this
ContentManager
is able to "speak" the language
corresponding to the registered Codec
.c
- the Codec
to be registered.public void registerLanguage(Codec c, String name)
Codec
for a given content language
with a given name.c
- the Codec
to be registered.name
- the name associated to the registered codec.public void registerOntology(Ontology o)
Ontology
with its default name (i.e.
the name returned by its getName()
method.
Since this operation is performed the agent that owns this
ContentManager
"knows" the registered
Ontology
.o
- the Ontology
to be registered.public void registerOntology(Ontology o, String name)
Ontology
with a given name.o
- the Ontology
to be registered.name
- the name associated to the registered Ontology.public Codec lookupLanguage(String name)
Codec
giving its name
.name
- the name associated to the Codec
to be retrieved.Codec
associated to
name
or null
if no Codec was registered
with the given name.public Ontology lookupOntology(String name)
Ontology
giving its name
.name
- the name associated to the Ontology
to be retrieved.Ontology
associated to
name
or null
if no Ontology was registered
with the given name.public void fillContent(ACLMessage msg, AbsContentElement content) throws Codec.CodecException, OntologyException
:content
slot of an
ACLMessage msg
using the content language
and ontology indicated in the :language
and
:ontology
fields of msg
.msg
- the message whose content has to be filled.content
- the content of the message represented as an
AbsContentElement
.Codec.CodecException
- if content
is not compliant
to the content language used for this operation.OntologyException
- if content
is not compliant
to the ontology used for this operation.public void fillContent(ACLMessage msg, ContentElement content) throws Codec.CodecException, OntologyException
:content
slot of an
ACLMessage msg
using the content language
and ontology indicated in the :language
and
:ontology
fields of msg
.msg
- the message whose content has to be filled.content
- the content of the message represented as a
ContentElement
.Codec.CodecException
- if content
is not compliant
to the content language used for this operation.OntologyException
- if content
is not compliant
to the ontology used for this operation.public Object makeExpressionString(String codecName, String ontoName, ContentElement content) throws Codec.CodecException, OntologyException
codecName
- ontoName
- content
- Codec.CodecException
OntologyException
public AbsContentElement extractAbsContent(ACLMessage msg) throws Codec.CodecException, OntologyException
:content
slot of an
ACLMessage msg
into an AbsContentElement
using the content language and ontology indicated in the
:language
and :ontology
fields of msg
.msg
- the message whose content has to be extracted.AbsContentElement
.Codec.CodecException
- if the content of the message is not compliant
to the content language used for this operation.OntologyException
- if the content of the message is not compliant
to the ontology used for this operation.public AbsContentElement extractAbsContent(MLMessage msg) throws Codec.CodecException, OntologyException
:content
slot of an
ACLMessage msg
into an AbsContentElement
using the content language and ontology indicated in the
:language
and :ontology
fields of msg
.msg
- the message whose content has to be extracted.AbsContentElement
.Codec.CodecException
- if the content of the message is not compliant
to the content language used for this operation.OntologyException
- if the content of the message is not compliant
to the ontology used for this operation.public AbsContentElement getAbs(String codecName, String ontoName, String exp) throws Codec.CodecException, OntologyException
:content
slot of an
ACLMessage msg
into an AbsContentElement
using the content language and ontology indicated in the
:language
and :ontology
fields of msg
.msg
- the message whose content has to be extracted.AbsContentElement
.Codec.CodecException
- if the content of the message is not compliant
to the content language used for this operation.OntologyException
- if the content of the message is not compliant
to the ontology used for this operation.public ContentElement extractContent(ACLMessage msg) throws Codec.CodecException, UngroundedException, OntologyException
:content
slot of an
ACLMessage msg
into a ContentElement
using the content language and ontology indicated in the
:language
and :ontology
fields of msg
.msg
- the message whose content has to be extracted.ContentElement
.Codec.CodecException
- if the content of the message is not compliant
to the content language used for this operation.OntologyException
- if the content of the message is not compliant
to the ontology used for this operation.UngroundedException
public void setValidationMode(boolean mode)
true
mode
- the new validation modepublic boolean getValidationMode()
true
public Ontology getOntology(ACLMessage msg)
private Ontology getMergedOntology(Codec c, Ontology o)
private void validate(AbsContentElement content, Ontology onto) throws OntologyException
OntologyException
private void encode(ACLMessage msg, AbsContentElement content, Codec codec, Ontology onto) throws Codec.CodecException, OntologyException
private Object encode(AbsContentElement content, Codec codec, Ontology onto) throws Codec.CodecException, OntologyException
private AbsContentElement decode(ACLMessage msg, Codec codec, Ontology onto) throws Codec.CodecException, OntologyException
private AbsContentElement decode(Object buf, Codec codec, Ontology onto) throws Codec.CodecException, OntologyException
public String[] getLanguageNames()
public String[] getOntologyNames()