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, java.io.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 inherited from class jade.content.lang.Codec
Codec.CodecException
 
Field Summary
static java.lang.String NAME
           
 
Fields inherited from class jade.content.lang.Codec
UNNAMEDPREFIX
 
Constructor Summary
LEAPCodec()
          Construct a LEAPCodec object i.e. a Codec for the LEAP language
 
Method Summary
 AbsContentElement decode(byte[] content)
          Decodes the content to an abstract descriptor.
 AbsContentElement decode(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

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

LEAPCodec

public LEAPCodec()
Construct a LEAPCodec object i.e. a Codec for the LEAP language

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:
encode in class ByteArrayCodec
Parameters:
content - the content as an abstract descriptor.
Returns:
the content as a byte array.
Throws:
CodecException
Codec.CodecException

encode

public byte[] encode(Ontology ontology,
                     AbsContentElement content)
              throws Codec.CodecException
Encodes a content into a byte array.

Specified by:
encode in class ByteArrayCodec
Parameters:
ontology - the ontology
content - the content as an abstract descriptor.
Returns:
the content as a byte array.
Throws:
CodecException
Codec.CodecException

decode

public AbsContentElement decode(byte[] content)
                         throws Codec.CodecException
Decodes the content to an abstract descriptor.

Specified by:
decode in class ByteArrayCodec
Parameters:
content - the content as a byte array.
Returns:
the content as an abstract description.
Throws:
CodecException
Codec.CodecException

decode

public AbsContentElement decode(Ontology ontology,
                                byte[] content)
                         throws Codec.CodecException
Decodes the content to an abstract description.

Specified by:
decode in class ByteArrayCodec
Parameters:
ontology - the ontology.
content - the content as a byte array.
Returns:
the content as an abstract description.
Throws:
CodecException
Codec.CodecException


JADE