|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.openmath.codec.Codec
public abstract class Codec
A String based codec that translates (XML-encoded) OpenMath objects to their backengine equivalent.
| Field Summary | |
|---|---|
protected java.util.Hashtable |
mCDs
Stores the CD's supported by the codec. |
| Constructor Summary | |
|---|---|
Codec()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addCD(java.lang.String name,
java.lang.String location,
java.lang.String className)
Adds a CD to the Codec. |
abstract java.lang.String |
decode(java.lang.String syntax)
Decodes the backengine syntax to an OpenMath object in XML encoding. |
abstract OMObject |
decodeOMObject(java.lang.String syntax)
Decodes the backengine-syntax to an OM-object. |
abstract java.lang.String |
encode(java.lang.String object)
Encodes the XML-encoded OM-object. |
abstract java.lang.String |
encodeOMObject(OMObject object)
Encodes the OM-object to backengine-syntax. |
void |
removeCD(java.lang.String name)
Removes a CD from the Codec. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Hashtable mCDs
This hashtable is used to support CD's that are not defined in the core set of CD's. Note that if you put a CD which belongs to the core in this hashtable it IS used.
| Constructor Detail |
|---|
public Codec()
| Method Detail |
|---|
public void addCD(java.lang.String name,
java.lang.String location,
java.lang.String className)
throws CodecException
name - the name of the CD.location - the URL of the CD, if none is given it is assume to be
on the classpathclassName - the Codec of the CD.
CodecException - when adding the CD (Codec) failed.
public void removeCD(java.lang.String name)
throws CodecException
name - the name of the CD.
CodecException - when removing the CD (Codec) failed.
public abstract java.lang.String encode(java.lang.String object)
throws CodecEncodeException
object - the OpenMath object in XML encoding to encode.
CodecEncodeException - when a problem arises during encoding.
public abstract java.lang.String encodeOMObject(OMObject object)
throws CodecEncodeException
object - the OpenMath object to encode.
CodecEncodeException - when a problem arises during encoding.
public abstract java.lang.String decode(java.lang.String syntax)
throws CodecDecodeException
syntax - the syntax to decode to an OpenMath object in XML encoding.
CodecDecodeException - when a problem arises during decoding.
public abstract OMObject decodeOMObject(java.lang.String syntax)
throws CodecDecodeException
syntax - the syntax to decode to an OpenMath object.
CodecDecodeException - when a problem arises during decoding.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||