|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.wlxt.WLXT
BEA WebLogic XML/non-XML Translator (WLXT) is a data translation engine. WLXT is capable of translating binary data to XML or translating XML data to a binary format.
Binary data is translated to XML according to an Message Format Language (MFL) document. MFL is an XML language that describes the organization and layout of binary data in terms of structures and fields. WLXT can convert binary data to XML using an MFL document. WLXT can also serialize XML data to a binary format that is described by a MFL document. The FormatBuilder GUI tool is used to create MFL documents.
To translate binary data to XML:
WLXT can also be used to perform XSLT transformations. WLXT includes several transform() methods that will apply an XSL stylesheet to a given XML document.
Any product that redistributes this component should reproduce the Apache Software License copyright in the documentation and/or other materials provided with the distribution.
Constructor Summary | |
WLXT()
Construct an WLXT object |
Method Summary | |
void |
addMFLDocument(java.net.URL mflDocumentURI)
Add a MFL document to the cache. |
void |
addMFLDocument(java.net.URL mflDocumentURI,
org.xml.sax.InputSource mflInput)
Add a MFL document to the cache. |
void |
addMFLDocument(java.net.URL mflDocumentURI,
java.io.InputStream mflInput)
|
void |
addMFLDocument(java.net.URL mflDocumentURI,
com.bea.wlxt.mfl.MFLRoot mfl)
Add a MFL document to the cache. |
void |
addMFLDocument(java.net.URL mflDocumentURI,
java.io.Reader mflInput)
|
static void |
addNewDataType(java.lang.String name,
Bintype binType)
Add a new User Defined Type to the WLXT runtime engine. |
void |
addStylesheet(java.net.URL stylesheetURI)
Add a single stylesheet to the cache. |
void |
addStylesheet(java.net.URL stylesheetURI,
org.xml.sax.InputSource stylesheetInput)
Add a single stylesheet to the cache. |
static void |
checkDeveloperLicense()
|
void |
clearMFLCache()
Clear the MFL cache to that new documents will be fully parsed. |
com.bea.wlxt.mfl.MFLRoot |
getMFLDocument(java.net.URL mflDocumentURI)
|
static java.lang.String |
getXMLText(org.w3c.dom.Document document,
int initialIndent,
int indent)
Convert a DOM Document object to XML text. |
void |
init(java.util.Properties properties)
Initialize the WLXT with a Properties object. |
void |
init(java.lang.String filename)
Initialize WLXT with a Properties file. |
org.w3c.dom.Document |
parse(java.net.URL mflURI,
java.io.InputStream binaryInput,
java.io.PrintWriter debug)
Parse binary data given in binaryInput argument using the MFL document specified by mflURI. |
org.w3c.dom.Document |
parse(java.net.URL mflURI,
java.io.InputStream binaryInput,
java.lang.String dtdSystemId,
java.io.PrintWriter debug)
Parse binary data given in binaryInput argument using the MFL document specified by mflURI. |
org.w3c.dom.Document |
parse(java.net.URL mflURI,
java.io.InputStream binaryInput,
java.lang.String defaultNamespace,
java.lang.String schemaLocation,
java.io.PrintWriter debug)
Parse binary data given in binaryInput argument using the MFL document specified by mflURI. |
static void |
printDOM(org.w3c.dom.Document document,
java.io.PrintWriter out)
Convert a DOM Document object to XML text. |
static void |
printDOM(org.w3c.dom.Document document,
java.io.PrintWriter out,
int initialIndent,
int indent)
Convert a DOM Document object to XML text. |
void |
reinit(java.util.Properties properties)
Reinitialize the entire cache. |
void |
reinitStylesheet(java.net.URL stylesheetURI)
Reinitialize a single stylesheet. |
static void |
removeDataType(java.lang.String name)
Remove a User Defined Type from the WLXT engine. |
void |
serialize(java.net.URL mflURI,
org.w3c.dom.Document document,
java.io.OutputStream binaryOutput,
java.io.PrintWriter debug)
Serialize the XML data (given in document argument) to the binary format specified by the MFL document (mflURI). |
void |
serialize(java.net.URL mflURI,
org.xml.sax.InputSource xmlInput,
java.io.OutputStream binaryOutput)
Serialize the XML data (given in xmlInput argument) to the binary format specified by the MFL document (mflURI). |
void |
serialize(java.net.URL mflURI,
org.xml.sax.InputSource xmlInput,
java.io.OutputStream binaryOutput,
java.io.PrintWriter debug)
Serialize the XML data (given in xmlInput argument) to the binary format specified by the MFL document (mflURI). |
void |
serialize(java.net.URL mflURI,
java.io.InputStream xmlInput,
java.io.OutputStream binaryOutput)
Serialize the XML data (given in xmlInput argument) to the binary format specified by the MFL document (mflURI). |
void |
serialize(java.net.URL mflURI,
java.io.InputStream xmlInput,
java.io.OutputStream binaryOutput,
java.io.PrintWriter debug)
Serialize the XML data (given in xmlInput argument) to the binary format specified by the MFL document (mflURI). |
static java.lang.String |
stringDOM(org.w3c.dom.Document doc,
int initIndent,
int indent)
Convert a DOM Document object to an XML String. |
static java.lang.String |
stringDOM(org.w3c.dom.Document doc,
int initIndent,
int indent,
java.lang.String encoding)
Convert a DOM Document object to an XML String. |
void |
transform(org.w3c.dom.Document document,
java.io.OutputStream out,
java.net.URL stylesheetURI)
Perform an XSLT transformation on the document argument using the specified stylesheet. |
org.w3c.dom.Document |
transform(org.w3c.dom.Document document,
java.net.URL stylesheetURI)
Perform an XSLT transformation on the document argument using the specified stylesheet. |
void |
transform(org.xml.sax.InputSource xmlInput,
java.io.OutputStream out,
java.net.URL stylesheetURI)
Perform an XSLT transformation on the XML input argument using the specified stylesheet. |
org.w3c.dom.Document |
transform(org.xml.sax.InputSource xmlInput,
java.net.URL stylesheetURI)
Perform an XSLT transformation on the document argument using the specified stylesheet. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public WLXT() throws java.lang.RuntimeException
Note: License checking is performed at construction. RuntimeException is thrown if license is invalid.
Method Detail |
public void init(java.util.Properties properties) throws com.bea.wlxt.WLXTException
properties
- Properties object containing the property
'WLXT.stylesheets' and/or 'WLXT.MFLDocuments'.Properties
public void init(java.lang.String filename) throws com.bea.wlxt.WLXTException
filename
- The name of the properties filepublic void reinitStylesheet(java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
stylesheetURI
- The unique resource identifier
for the stylesheetURL
public void reinit(java.util.Properties properties) throws com.bea.wlxt.WLXTException
properties
- Properties object containing the property
WLXT.stylesheets and/or WLXT.MFLDocumentspublic void addStylesheet(java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
stylesheetURI
- The unique resource identifier
for the stylesheetURL
public void addStylesheet(java.net.URL stylesheetURI, org.xml.sax.InputSource stylesheetInput) throws com.bea.wlxt.WLXTException
stylesheetURI
- The unique resource identifier
for the stylesheetstylesheetInput
- The InputSource for the stylesheetURL
public void addMFLDocument(java.net.URL mflDocumentURI) throws com.bea.wlxt.WLXTException
mflURI
- The unique resource identifier
for the MFL documentURL
public void addMFLDocument(java.net.URL mflDocumentURI, org.xml.sax.InputSource mflInput) throws com.bea.wlxt.WLXTException
mflURI
- The unique resource identifier
for the MFL documentmflInput
- The InputSource for the content of
the MFL documentURL
public void addMFLDocument(java.net.URL mflDocumentURI, com.bea.wlxt.mfl.MFLRoot mfl) throws com.bea.wlxt.WLXTException
mflURI
- The unique resource identifier
for the MFL documentmflInput
- The InputSource for the content of
the MFL documentURL
public void addMFLDocument(java.net.URL mflDocumentURI, java.io.InputStream mflInput) throws com.bea.wlxt.WLXTException
public void addMFLDocument(java.net.URL mflDocumentURI, java.io.Reader mflInput) throws com.bea.wlxt.WLXTException
public void clearMFLCache()
public com.bea.wlxt.mfl.MFLRoot getMFLDocument(java.net.URL mflDocumentURI) throws com.bea.wlxt.WLXTException
public org.w3c.dom.Document parse(java.net.URL mflURI, java.io.InputStream binaryInput, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
No DTD or schema reference is output in the resulting XML.
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to parse binary
databinaryInput
- InputStream of binary data that should be converted
to XMLdebug
- PrintWriter to be used to display parse debug information.
May be null to disable debug information.public org.w3c.dom.Document parse(java.net.URL mflURI, java.io.InputStream binaryInput, java.lang.String dtdSystemId, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
This method has a system id parameter that allows the user to specify the document type definition for the doctype element of the resulting XML.
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to parse binary
databinaryInput
- InputStream of binary data that should be converted
to XMLdtdSystemId
- The system id of the Document Type Definition. This
id will be output in the DOCTYPE element of the
resulting XML.debug
- PrintWriter to be used to display parse debug information.
May be null to disable debug information.public org.w3c.dom.Document parse(java.net.URL mflURI, java.io.InputStream binaryInput, java.lang.String defaultNamespace, java.lang.String schemaLocation, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
This method has default namespace parameter that causes the resulting XML to output a default namespace in the root node of the document. This method also has a schema location parameter cause the resulting XML to reference a schema as its content model.
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to parse binary
databinaryInput
- InputStream of binary data that should be converted
to XMLdefaultNamespace
- can be null, if not null causes a default namespace to be
declared in the root node of the resulting XMLschemaLocation
- causes a reference to the specified schema to be output in
the root node of the resulting XMLdebug
- PrintWriter to be used to display parse debug information.
May be null to disable debug information.public void serialize(java.net.URL mflURI, org.w3c.dom.Document document, java.io.OutputStream binaryOutput, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to convert the XML
data to the binary formatdocument
- XML data that is to be converted to a binary formatbinaryOutput
- OutputStream that is to contain the binary datadebug
- PrintWriter to be used to display (or log) debug information.
May be null to disable debug information.public void serialize(java.net.URL mflURI, java.io.InputStream xmlInput, java.io.OutputStream binaryOutput) throws com.bea.wlxt.WLXTException
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to convert the XML
data to the binary formatxmlInput
- XML data that is to be converted to a binary formatbinaryOutput
- OutputStream that is to contain the binary datapublic void serialize(java.net.URL mflURI, org.xml.sax.InputSource xmlInput, java.io.OutputStream binaryOutput) throws com.bea.wlxt.WLXTException
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to convert the XML
data to the binary formatxmlInput
- XML data that is to be converted to a binary formatbinaryOutput
- OutputStream that is to contain the binary datapublic void serialize(java.net.URL mflURI, java.io.InputStream xmlInput, java.io.OutputStream binaryOutput, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to convert the XML
data to the binary formatxmlInput
- XML data that is to be converted to a binary formatbinaryOutput
- OutputStream that is to contain the binary datadebug
- PrintWriter to be used to display (or log) debug information.
May be null to disable debug information.public void serialize(java.net.URL mflURI, org.xml.sax.InputSource xmlInput, java.io.OutputStream binaryOutput, java.io.PrintWriter debug) throws com.bea.wlxt.WLXTException
If the MFL document is not found in the cache, then it will be automatically processed and added to the cache.
mflURI
- URL to MFL document that should be used to convert the XML
data to the binary formatxmlInput
- XML data that is to be converted to a binary formatbinaryOutput
- OutputStream that is to contain the binary datadebug
- PrintWriter to be used to display (or log) debug information.
May be null to disable debug information.public void transform(org.xml.sax.InputSource xmlInput, java.io.OutputStream out, java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
xmlInput
- XML input to XSLT transformationout
- Output stream where the result of transformation is written.stylesheetURI
- The unique resource identifier
for the stylesheet to use for the
transformationInputSource
,
URL
public void transform(org.w3c.dom.Document document, java.io.OutputStream out, java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
document
- DOM Document object to be transformedout
- Output stream where the result of transformation is written.stylesheetURI
- The unique resource identifier
for the stylesheet to use for the
transformationDocument
,
URL
public org.w3c.dom.Document transform(org.xml.sax.InputSource xmlInput, java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
xmlInput
- XML input to XSLT transformationstylesheetURI
- The unique resource identifier
for the stylesheet to use for the
transformationDocument
,
URL
public org.w3c.dom.Document transform(org.w3c.dom.Document document, java.net.URL stylesheetURI) throws com.bea.wlxt.WLXTException
document
- DOM Document object to be transformedstylesheetURI
- The unique resource identifier
for the stylesheet to use for the
transformationDocument
,
URL
public static java.lang.String stringDOM(org.w3c.dom.Document doc, int initIndent, int indent)
document
- DOM Document object to beinitialIndent
- The number of columns the top level element
should be indented.indent
- The number of columns each child element
should be indented.Document
public static java.lang.String stringDOM(org.w3c.dom.Document doc, int initIndent, int indent, java.lang.String encoding)
document
- DOM Document object to beinitialIndent
- The number of columns the top level element
should be indented.indent
- The number of columns each child element
should be indented.Document
public static void printDOM(org.w3c.dom.Document document, java.io.PrintWriter out)
document
- DOM Document object to beout
- PrintWriter that text is to be written toDocument
public static void printDOM(org.w3c.dom.Document document, java.io.PrintWriter out, int initialIndent, int indent)
document
- DOM Document object to beout
- PrintWriter that text is to be written toinitialIndent
- The number of columns the top level element
should be indented.indent
- The number of columns each child element
should be indented.Document
public static java.lang.String getXMLText(org.w3c.dom.Document document, int initialIndent, int indent)
document
- DOM Document object to beout
- PrintWriter that text is to be written toinitialIndent
- The number of columns the top level element
should be indented.indent
- The number of columns each child element
should be indented.Document
public static void addNewDataType(java.lang.String name, Bintype binType)
name
- The name of the User Defined Type.binType
- A reference to an object derived from class
com.bea.wlxt.bintype.Bintype which implements the
UDT.public static void removeDataType(java.lang.String name)
name
- The name of the User Defined Type as passed to
addNewDataType.public static void checkDeveloperLicense() throws com.bea.wlxt.LicenseException
|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |