Class CDCodec
java.lang.Object
org.episteme.core.mathematics.loaders.openmath.codec.CDCodec
A codec that translates (XML-encoded) OpenMath objects as defined in the
Content Dictionary it implements to their backengine equivalent and
vice-versa.
Note that this kind of Codec always needs a master codec as parent to terminate properly.
- Version:
- $Revision: 1.2 $
- Author:
- Manfred N. Riem (mriem@manorrock.org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecodes the backengine syntax to a XML-encoded OM-object.decodeOMObject(String syntax) Decodes the backengine-syntax to an OM-object.Encodes the XML-encoded OM-object.encodeOMObject(OMObject object) Encodes the OM-object to backengine-syntax.Gets the parent-object.voidSets the parent-object.
-
Field Details
-
mParent
Stores the parent Codec.
-
-
Constructor Details
-
CDCodec
public CDCodec()Constructor. -
CDCodec
-
-
Method Details
-
setParent
Sets the parent-object.- Parameters:
parent- set the parent codec.
-
getParent
-
encode
Encodes the XML-encoded OM-object.- Parameters:
string- encodes the XML-encoded OpenMath object.- Returns:
- the string with the encoding.
- Throws:
CodecEncodeException- when a problem arises during encoding.
-
encodeOMObject
Encodes the OM-object to backengine-syntax.- Parameters:
object- encodes the OpenMath object.- Returns:
- the string with the encoding.
- Throws:
CodecEncodeException- when a problem arises during encoding.
-
decode
Decodes the backengine syntax to a XML-encoded OM-object.- Parameters:
syntax- decodes the syntax to an OpenMath object.- Returns:
- the OpenMath object in XML encoding.
- Throws:
CodecDecodeException- when a problem arises during decoding.
-
decodeOMObject
Decodes the backengine-syntax to an OM-object.- Parameters:
syntax- decodes the syntax to an OpenMath object.- Returns:
- the OpenMath object.
- Throws:
CodecDecodeException- when a problem arises during decoding.
-