jade.content.lang
Class StringCodec
java.lang.Object
|
+--jade.content.lang.Codec
|
+--jade.content.lang.StringCodec
- All Implemented Interfaces:
- java.io.Serializable, Serializable
- Direct Known Subclasses:
- SLCodec
- public abstract class StringCodec
- extends Codec
Base class for content language codecs that transform
AbsContentElements to/from sequences of strings
- Author:
- Giovanni Caire - TILAB
- See Also:
- Serialized Form
Constructor Summary |
StringCodec(java.lang.String name)
Construct a StringCodec object with the given name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringCodec
public StringCodec(java.lang.String name)
- Construct a StringCodec object with the given name
encode
public abstract java.lang.String encode(AbsContentElement content)
throws Codec.CodecException
- Encodes a content into a string.
- Parameters:
content
- the content as an abstract descriptor.
- Returns:
- the content as a string.
- Throws:
CodecException
Codec.CodecException
encode
public abstract java.lang.String encode(Ontology ontology,
AbsContentElement content)
throws Codec.CodecException
- Encodes a content into a string using a given ontology.
- Parameters:
ontology
- the ontologycontent
- the content as an abstract descriptor.
- Returns:
- the content as a string.
- Throws:
CodecException
Codec.CodecException
decode
public abstract AbsContentElement decode(java.lang.String content)
throws Codec.CodecException
- Decodes the content to an abstract description.
- Parameters:
content
- the content as a string.
- Returns:
- the content as an abstract description.
- Throws:
CodecException
Codec.CodecException
decode
public abstract AbsContentElement decode(Ontology ontology,
java.lang.String content)
throws Codec.CodecException
- Decodes the content to an abstract description using a
given ontology.
- Parameters:
ontology
- the ontology.content
- the content as a string.
- Returns:
- the content as an abstract description.
- Throws:
CodecException
Codec.CodecException
JADE