|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.content.lang.Codec | +--jade.content.lang.StringCodec | +--jade.content.lang.sl.SLCodec
The codec class for the FIPA-SLn languages. This class
implements the Codec
interface and allows converting
back and forth between strings and frames, according to the SL
grammar.
By default the class implements full SL grammar, otherwise the proper
value must be used in the constructor.
Nested Class Summary |
Nested classes inherited from class jade.content.lang.Codec |
Codec.CodecException |
Field Summary |
Fields inherited from class jade.content.lang.Codec |
UNNAMEDPREFIX |
Constructor Summary | |
SLCodec()
Construct a Codec object for the full SL-language (FIPA-SL). |
|
SLCodec(int slType)
Construct a Codec object for the given profile of SL-language. |
Method Summary | |
AbsContentElement |
decode(Ontology ontology,
java.lang.String content)
Decodes the content to an abstract description. |
AbsContentElement |
decode(java.lang.String content)
Decodes the content to an abstract description. |
AbsPredicate |
decodeFormula(Ontology ontology,
java.lang.String formula)
Decodes the content to an abstract description, where the content is known to be a Well-formed Formula |
AbsTerm |
decodeTerm(Ontology ontology,
java.lang.String term)
Decodes the content to an abstract description, where the content is known to be a Term. |
java.lang.String |
encode(AbsContentElement content)
Encodes a content into a String. |
java.lang.String |
encode(Ontology ontology,
AbsContentElement content)
Encodes a content into a String. |
java.lang.String |
encodeFormula(Ontology ontology,
AbsPredicate formula)
Encodes the content into a String, where the content is known to be a Well-formed Formula |
java.lang.String |
encodeTerm(Ontology ontology,
AbsTerm term)
Encodes the content into a String, where the content is known to be a Term. |
Ontology |
getInnerOntology()
|
static void |
main(java.lang.String[] args)
|
protected java.lang.Object |
readResolve()
Restore parser after deserialization. |
Methods inherited from class jade.content.lang.Codec |
getName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SLCodec()
public SLCodec(int slType)
slType
- specify 0 for FIPA-SL0, 1 for FIPA-SL1, 2 for FIPA-SL2, any other value can be used for full FIPA-SLMethod Detail |
public java.lang.String encode(AbsContentElement content) throws Codec.CodecException
encode
in class StringCodec
content
- the content as an abstract descriptor.
CodecException
Codec.CodecException
public java.lang.String encode(Ontology ontology, AbsContentElement content) throws Codec.CodecException
encode
in class StringCodec
ontology
- the ontologycontent
- the content as an abstract descriptor.
CodecException
Codec.CodecException
public AbsContentElement decode(java.lang.String content) throws Codec.CodecException
decode
in class StringCodec
content
- the content as a String.
CodecException
Codec.CodecException
public AbsContentElement decode(Ontology ontology, java.lang.String content) throws Codec.CodecException
decode
in class StringCodec
ontology
- the ontology.content
- the content as a String.
CodecException
Codec.CodecException
public AbsTerm decodeTerm(Ontology ontology, java.lang.String term) throws Codec.CodecException
ontology
- the ontology.
CodecException
Codec.CodecException
public java.lang.String encodeTerm(Ontology ontology, AbsTerm term) throws Codec.CodecException
ontology
- the ontology.term
- the termt as an abstract descriptor
CodecException
Codec.CodecException
public AbsPredicate decodeFormula(Ontology ontology, java.lang.String formula) throws Codec.CodecException
ontology
- the ontology.formula
- the content as a String.
CodecException
Codec.CodecException
public java.lang.String encodeFormula(Ontology ontology, AbsPredicate formula) throws Codec.CodecException
ontology
- the ontology.formula
- the formula as an abstract descriptor
CodecException
Codec.CodecException
public static void main(java.lang.String[] args)
public Ontology getInnerOntology()
getInnerOntology
in class Codec
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |