public final class UpConversionUtilities
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
UPCONVERSION_OPTIONS_XML_LOCAL_NAME
Local name of XML container element when writing out options using
appendUpConversionOptionsElement(Document, Element, UpConversionOptions, boolean) |
| 构造器和说明 |
|---|
UpConversionUtilities() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
appendUpConversionOptionsElement(org.w3c.dom.Document document,
org.w3c.dom.Element containerElement,
UpConversionOptions options,
boolean applyDefaults)
Writes out the given
UpConversionOptions Object as a child Element of the
given element, using a simple ad-hoc XML format. |
static UpConversionFailure |
extractUpConversionFailure(org.w3c.dom.Element sFailElement)
Populates and returns an
UpConversionFailure for the given Element,
which is assumed to be a s:fail element having the appropriate structure. |
static java.util.List<UpConversionFailure> |
extractUpConversionFailures(org.w3c.dom.Document upConvertedDocument)
Searches the given DOM
Document for all s:fail elements contained therein. |
static java.util.List<UpConversionFailure> |
extractUpConversionFailures(org.w3c.dom.Element startSearchElement)
Searches the given DOM
Element and all its descendents for all s:fail elements
contained therein. |
static java.util.List<UpConversionFailure> |
extractUpConversionFailures(uk.ac.ed.ph.snuggletex.utilities.UnwrappedParallelMathMLDOM unwrappedDocument)
Extracts all of the
s:fail elements within the given UnwrappedParallelMathMLDOM |
static java.lang.String |
getErrorMessage(java.lang.String upConversionErrorCodeAsString,
java.lang.Object... arguments)
Returns a full error message for the given
UpConversionErrorCode String and arguments,
using the SnuggleTeX MessageFormatter class to do the hard work. |
static java.lang.String |
getErrorMessage(UpConversionFailure failure)
Returns a full error message for the given
UpConversionFailure, using
the SnuggleTeX MessageFormatter class to do the hard work. |
static boolean |
isUpConversionFailureElement(org.w3c.dom.Node node)
Checks to see whether the given DOM Node is an
s:fail element. |
public static final java.lang.String UPCONVERSION_OPTIONS_XML_LOCAL_NAME
appendUpConversionOptionsElement(Document, Element, UpConversionOptions, boolean)public static java.lang.String getErrorMessage(UpConversionFailure failure)
UpConversionFailure, using
the SnuggleTeX MessageFormatter class to do the hard work.failure - public static java.lang.String getErrorMessage(java.lang.String upConversionErrorCodeAsString,
java.lang.Object... arguments)
UpConversionErrorCode String and arguments,
using the SnuggleTeX MessageFormatter class to do the hard work.public static UpConversionFailure extractUpConversionFailure(org.w3c.dom.Element sFailElement)
UpConversionFailure for the given Element,
which is assumed to be a s:fail element having the appropriate structure.sFailElement - public static java.util.List<UpConversionFailure> extractUpConversionFailures(uk.ac.ed.ph.snuggletex.utilities.UnwrappedParallelMathMLDOM unwrappedDocument)
s:fail elements within the given UnwrappedParallelMathMLDOMpublic static java.util.List<UpConversionFailure> extractUpConversionFailures(org.w3c.dom.Document upConvertedDocument)
Document for all s:fail elements contained therein.public static java.util.List<UpConversionFailure> extractUpConversionFailures(org.w3c.dom.Element startSearchElement)
Element and all its descendents for all s:fail elements
contained therein.public static boolean isUpConversionFailureElement(org.w3c.dom.Node node)
s:fail element.public static void appendUpConversionOptionsElement(org.w3c.dom.Document document,
org.w3c.dom.Element containerElement,
UpConversionOptions options,
boolean applyDefaults)
UpConversionOptions Object as a child Element of the
given element, using a simple ad-hoc XML format.
This is used internally to pass Java-specified options to the stylesheets that perform the up-conversion process and may be useful in other situations as well.
document - Document to append tocontainerElement - Element that will be the parent of the resulting DOM fragmentoptions - UpConversionOptions to write, may be null.applyDefaults - if true, then default values for each option are written out
when not explicitly specified or if UpConversionOptions is null.