Package jade.content.lang.leap
Class LEAPCodec
- java.lang.Object
-
- jade.content.lang.Codec
-
- jade.content.lang.ByteArrayCodec
-
- jade.content.lang.leap.LEAPCodec
-
- All Implemented Interfaces:
Serializable,Serializable
public class LEAPCodec extends ByteArrayCodec
Content language codec for the LEAP language- Author:
- Federico Bergenti - Universita` di Parma
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.content.lang.Codec
Codec.CodecException
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from class jade.content.lang.Codec
UNNAMEDPREFIX
-
-
Constructor Summary
Constructors Constructor Description LEAPCodec()Construct a LEAPCodec object i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbsContentElementdecode(byte[] content)Decodes the content to an abstract descriptor.AbsContentElementdecode(Ontology ontology, byte[] content)Decodes the content to an abstract description.byte[]encode(AbsContentElement content)Encodes an abstract descriptor holding a content element into a byte array.byte[]encode(Ontology ontology, AbsContentElement content)Encodes a content into a byte array.-
Methods inherited from class jade.content.lang.Codec
getInnerOntology, getName
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
encode
public byte[] encode(AbsContentElement content) throws Codec.CodecException
Encodes an abstract descriptor holding a content element into a byte array.- Specified by:
encodein classByteArrayCodec- Parameters:
content- the content as an abstract descriptor.- Returns:
- the content as a byte array.
- Throws:
Codec.CodecException
-
encode
public byte[] encode(Ontology ontology, AbsContentElement content) throws Codec.CodecException
Encodes a content into a byte array.- Specified by:
encodein classByteArrayCodec- Parameters:
ontology- the ontologycontent- the content as an abstract descriptor.- Returns:
- the content as a byte array.
- Throws:
Codec.CodecException
-
decode
public AbsContentElement decode(byte[] content) throws Codec.CodecException
Decodes the content to an abstract descriptor.- Specified by:
decodein classByteArrayCodec- Parameters:
content- the content as a byte array.- Returns:
- the content as an abstract description.
- Throws:
Codec.CodecException
-
decode
public AbsContentElement decode(Ontology ontology, byte[] content) throws Codec.CodecException
Decodes the content to an abstract description.- Specified by:
decodein classByteArrayCodec- Parameters:
ontology- the ontology.content- the content as a byte array.- Returns:
- the content as an abstract description.
- Throws:
Codec.CodecException
-
-