|
Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher 11g Release 1 (11.1.1) E22256-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xdo.template.pdf.xfdf.XFDFObject
public class XFDFObject
The class XFDFObject
represents XFDF object.
This class is mainly used to generate XFDF. When you create an instance of this class, an internal XFDF tree is initialized. You can use append() methods to append a FIELD element to the XFDF tree by passing a String name-value pair. You can append data as many times as you want. This class also allows you to append XML data by calling appendXML() methods. Note that you have to set the approriate XSL stylesheet by calling setStylesheet() method before calling appendXML() methods. You can append XML data as many times as you want. You can get the internal XFDF document at any time by calling toString(), toReader(), toInputStream(), or toXMLDocument() method. The sample code snippet is following.
// source XML data generated by OracleXMLQuery String xmlString = query.getXMLString(); // Create a converter instace XFDFObject x = new XFDFObject(); // Set stylesheet x.setStylesheet(new BufferedInputStream(new FileInputStream("test.xsl"))); // Add the XML data x.appendXML(xmlString); // Get the XFDF as a string, and output to stdout, // you can also get the XFDF as Reader or InputStream. System.out.print(x.toString());
Constructor Summary | |
---|---|
XFDFObject() Constructor |
|
XFDFObject(java.util.Hashtable fieldInfo) Constructor with the form information generated by FormProcessor. |
Method Summary | |
---|---|
void |
append(java.lang.String pName, java.lang.String pValue) Appends a field with the given name and value. |
void |
appendXML(java.io.File pXMLFile) Reads the XML data and converts it to XFDF. |
void |
appendXML(java.io.InputStream pXMLInputStream) Reads the XML data and converts it to XFDF. |
void |
appendXML(java.lang.String pXMLString) Reads the XML data and converts it to XFDF. |
void |
appendXML(oracle.xml.parser.v2.XMLDocument pDoc) Reads the XML data and converts it to XFDF. |
void |
setStylesheet(java.io.InputStream pIn) Sets the XSL stylesheet for XML data. |
void |
setStylesheet(java.lang.String pXSLString) Sets the XSL stylesheet for XML data. |
void |
setStylesheet(oracle.xml.parser.v2.XMLDocument pXSLDoc) Sets the XSL stylesheet for XML data. |
java.io.InputStream |
toInputStream() Returns XFDF document as a sequence of bytes. |
java.io.Reader |
toReader() Returns XFDF document as a sequence of characters. |
java.lang.String |
toString() Returns XFDF document as a Java String object. |
oracle.xml.parser.v2.XMLDocument |
toXMLDocument() Returns XFDF document as a XMLDocument object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XFDFObject()
public XFDFObject(java.util.Hashtable fieldInfo)
FormProcessor formProcessor = new FormProcessor(); XFDFObject xfdfObject = new XFDFObject(formProcessor.getFieldInfo());
fieldInfo
- Field information generated by FormProcessorMethod Detail |
---|
public void append(java.lang.String pName, java.lang.String pValue)
pName
- XFDF field namepValue
- XFDF field valuepublic void setStylesheet(java.lang.String pXSLString)
pXSLString
- XSL stylesheet StringappendXML(XMLDocument)
, appendXML(InputStream)
, appendXML(File)
, appendXML(String)
public void setStylesheet(java.io.InputStream pIn) throws oracle.xml.parser.v2.XSLException
pIn
- XSL stylesheet InputStreamoracle.xml.parser.v2.XSLException
- XSLExceptionappendXML(XMLDocument)
, appendXML(InputStream)
, appendXML(File)
, appendXML(String)
public void setStylesheet(oracle.xml.parser.v2.XMLDocument pXSLDoc)
pXSLDoc
- XSL stylesheet documentappendXML(XMLDocument)
, appendXML(InputStream)
, appendXML(File)
, appendXML(String)
public void appendXML(java.io.InputStream pXMLInputStream)
pXMLInputStream
- XML datasetStylesheet(XMLDocument)
, setStylesheet(InputStream)
, setStylesheet(String)
public void appendXML(java.io.File pXMLFile)
pXMLFile
- XML filesetStylesheet(XMLDocument)
, setStylesheet(InputStream)
, setStylesheet(String)
public void appendXML(java.lang.String pXMLString)
pXMLString
- XML data stringsetStylesheet(XMLDocument)
, setStylesheet(InputStream)
, setStylesheet(String)
public void appendXML(oracle.xml.parser.v2.XMLDocument pDoc)
pDoc
- XML datasetStylesheet(XMLDocument)
, setStylesheet(InputStream)
, setStylesheet(String)
public java.io.Reader toReader()
public java.io.InputStream toInputStream()
public java.lang.String toString()
toString
in class java.lang.Object
public oracle.xml.parser.v2.XMLDocument toXMLDocument()
|
Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher 11g Release 1 (11.1.1) E22256-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |