jade.content.lang.sl
Class SLCodec
java.lang.Object
|
+--jade.content.lang.Codec
|
+--jade.content.lang.StringCodec
|
+--jade.content.lang.sl.SLCodec
- public class SLCodec
- extends StringCodec
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.
- Version:
- $Date: 2003/03/04 14:47:42 $ $Revision: 1.13 $
- Author:
- Fabio Bellifemine - TILAB
- See Also:
- Serialized Form
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. |
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 |
SLCodec
public SLCodec()
- Construct a Codec object for the full SL-language (FIPA-SL).
SLCodec
public SLCodec(int slType)
- Construct a Codec object for the given profile of SL-language.
- Parameters:
slType
- specify 0 for FIPA-SL0, 1 for FIPA-SL1, 2 for FIPA-SL2, any other value can be used for full FIPA-SL
encode
public java.lang.String encode(AbsContentElement content)
throws Codec.CodecException
- Encodes a content into a String.
- Overrides:
- encode in class StringCodec
- Parameters:
content
- the content as an abstract descriptor.- Returns:
- the content as a String.
- Throws:
- CodecException -
encode
public java.lang.String encode(Ontology ontology,
AbsContentElement content)
throws Codec.CodecException
- Encodes a content into a String.
- Overrides:
- encode in class StringCodec
- Parameters:
ontology
- the ontologycontent
- the content as an abstract descriptor.- Returns:
- the content as a String.
- Throws:
- CodecException -
decode
public AbsContentElement decode(java.lang.String content)
throws Codec.CodecException
- Decodes the content to an abstract description.
- Overrides:
- decode in class StringCodec
- Parameters:
content
- the content as a String.- Returns:
- the content as an abstract description.
- Throws:
- CodecException -
decode
public AbsContentElement decode(Ontology ontology,
java.lang.String content)
throws Codec.CodecException
- Decodes the content to an abstract description.
- Overrides:
- decode in class StringCodec
- Parameters:
ontology
- the ontology.content
- the content as a String.- Returns:
- the content as an abstract description.
- Throws:
- CodecException -
main
public static void main(java.lang.String[] args)
getInnerOntology
public Ontology getInnerOntology()
- Overrides:
- getInnerOntology in class Codec
- Returns:
- the ontology containing the schemas of the operator
defined in this language