|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.omdocjdom.rephrase.RephraseHeuristics
public class RephraseHeuristics
The centerpoint for all "prior-knowledge" for rephrases.
| Constructor Summary | |
|---|---|
RephraseHeuristics()
|
|
| Method Summary | |
|---|---|
static void |
adjustAcceptedTypesList(List givenTypes,
String userAgentString)
Pack of heuristics to protect against senseless mime-types as well as re-order preference depening on the client-identification if available. |
static String |
computePresentableFormat(String mimeType,
String mimeSubType)
|
static List |
computePresentationFormatsContentTypes()
|
static void |
ensureStaticRephraseInitted()
|
static RephraseGraph |
getStaticRephraseGraph()
|
static void |
initStaticRephrase(Subconfiguration config)
Builds a static rephrase-graph stored here and that can be used with staticRephrase(org.activemath.omdocjdom.OJElement, java.lang.String, java.lang.String). |
static CDGroup |
makeMathMLCdGroup()
|
static OJElement |
staticRephrase(OJElement sourceOmobj,
String contentType,
String clientString)
Uses the rephrase-information created by initStaticRephrase(org.activemath.abstractcontent.Subconfiguration)
to rephrase the indicated OMOBJ to the wished
ContentType or CDGroup. encoded
as a MIME-type. |
static OJElement |
staticRephraseToMathMLCDG(OJElement sourceOmobj)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RephraseHeuristics()
| Method Detail |
|---|
public static CDGroup makeMathMLCdGroup()
public static List computePresentationFormatsContentTypes()
public static String computePresentableFormat(String mimeType,
String mimeSubType)
public static void initStaticRephrase(Subconfiguration config)
throws org.jdom.JDOMException,
MBaseException
staticRephrase(org.activemath.omdocjdom.OJElement, java.lang.String, java.lang.String).
config - the configuration of which one expects
to find the MBaseRef service as well as
cdgroups.xx properties.
The values of the properties are MBaseIDs
of theories which, along with all imported theories,
represent the set of CDs.
org.jdom.JDOMException
MBaseException
public static void ensureStaticRephraseInitted()
throws org.jdom.JDOMException,
MBaseException
org.jdom.JDOMException
MBaseExceptionpublic static RephraseGraph getStaticRephraseGraph()
public static OJElement staticRephraseToMathMLCDG(OJElement sourceOmobj)
public static OJElement staticRephrase(OJElement sourceOmobj,
String contentType,
String clientString)
initStaticRephrase(org.activemath.abstractcontent.Subconfiguration)
to rephrase the indicated OMOBJ to the wished
ContentType or CDGroup. encoded
as a MIME-type.
sourceOmobj - the OpenMath object to be rephrasedcontentType - the string-descriptor of the mime-type
(maybe several, comma or space separated)clientString - a descriptor of the consumer user-agent string
allowing to embed heuristics to embed special treatments
in the rephrase.
RephraseException - is it cannot do itContentType#asMimeType()}
public static void adjustAcceptedTypesList(List givenTypes,
String userAgentString)
text/xml
which do not allow a server to propose anything.
text/xml is converted to application/openmath+xml
which is then expanded to the global CD-group.
givenTypes - a list ContentTypes to be re-arrangeduserAgentString - a string describing the transfer-client.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||