org.activemath.omdocjdom.rephrase
Class ContentType

java.lang.Object
  extended by org.activemath.omdocjdom.rephrase.ContentType
Direct Known Subclasses:
CDGroup

public class ContentType
extends Object

Denotes a possible translation "flavour" of an OpenMath object. Such objects are either denoted by MIME-types added with some parameters


Field Summary
static String OPENMATH_MIMETYPE
           
protected  String stringDesc
           
 
Constructor Summary
protected ContentType()
           
  ContentType(String stringDesc)
          Tries to follow the MIME-type with attribute encoding.
 
Method Summary
 String asMimeType()
           
 String asPresentableFormat()
          Verifies whether the format is human presentable in which case the presentation architecture should be used.
 boolean equals(Object obj)
           
 String getAttribute(String attName)
           
 String getCDGroupId()
          Returns the supported CD-groups indicated in this type.
 boolean getIsOpenMath()
           
 String getTypicalFileName()
           
 int hashCode()
           
 boolean isPresentableFormat()
           
protected  void parseEncoding(String stringDesc)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OPENMATH_MIMETYPE

public static final String OPENMATH_MIMETYPE
See Also:
Constant Field Values

stringDesc

protected String stringDesc
Constructor Detail

ContentType

public ContentType(String stringDesc)
Tries to follow the MIME-type with attribute encoding. RFC 2045. See also XHTML media types, and XML Media types.

Parameters:
stringDesc - the

ContentType

protected ContentType()
Method Detail

parseEncoding

protected void parseEncoding(String stringDesc)

getIsOpenMath

public boolean getIsOpenMath()

getCDGroupId

public String getCDGroupId()
Returns the supported CD-groups indicated in this type.


getAttribute

public String getAttribute(String attName)

asPresentableFormat

public String asPresentableFormat()
Verifies whether the format is human presentable in which case the presentation architecture should be used.

Returns:
the presentation format name to be used if any found.

isPresentableFormat

public boolean isPresentableFormat()

asMimeType

public String asMimeType()

getTypicalFileName

public String getTypicalFileName()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object