Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher
11g Release 1 (11.1.1)

E22256-01


oracle.xdo.template.pdf.xfdf
Class XFDFObject

java.lang.Object
  extended by oracle.xdo.template.pdf.xfdf.XFDFObject


public class XFDFObject
extends java.lang.Object

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());

 
Version:
3.0
Author:
Kei Saito

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

XFDFObject

public XFDFObject()
Constructor
Since:
1.0

XFDFObject

public XFDFObject(java.util.Hashtable fieldInfo)
Constructor with the form information generated by FormProcessor. Sample code snippet is following.
     FormProcessor formProcessor = new FormProcessor();
     XFDFObject xfdfObject = new XFDFObject(formProcessor.getFieldInfo());
 
Parameters:
fieldInfo - Field information generated by FormProcessor
Since:
1.0

Method Detail

append

public void append(java.lang.String pName,
                   java.lang.String pValue)
Appends a field with the given name and value.
Parameters:
pName - XFDF field name
pValue - XFDF field value
Since:
1.0

setStylesheet

public void setStylesheet(java.lang.String pXSLString)
Sets the XSL stylesheet for XML data.
Parameters:
pXSLString - XSL stylesheet String
Since:
1.0
See Also:
appendXML(XMLDocument), appendXML(InputStream), appendXML(File), appendXML(String)

setStylesheet

public void setStylesheet(java.io.InputStream pIn)
                   throws oracle.xml.parser.v2.XSLException
Sets the XSL stylesheet for XML data.
Parameters:
pIn - XSL stylesheet InputStream
Throws:
oracle.xml.parser.v2.XSLException - XSLException
Since:
1.0
See Also:
appendXML(XMLDocument), appendXML(InputStream), appendXML(File), appendXML(String)

setStylesheet

public void setStylesheet(oracle.xml.parser.v2.XMLDocument pXSLDoc)
Sets the XSL stylesheet for XML data.
Parameters:
pXSLDoc - XSL stylesheet document
Since:
1.0
See Also:
appendXML(XMLDocument), appendXML(InputStream), appendXML(File), appendXML(String)

appendXML

public void appendXML(java.io.InputStream pXMLInputStream)
Reads the XML data and converts it to XFDF. You should set the Stylesheet for the XML data beforehand by calling either of setStylesheet() methods.
Parameters:
pXMLInputStream - XML data
Since:
1.0
See Also:
setStylesheet(XMLDocument), setStylesheet(InputStream), setStylesheet(String)

appendXML

public void appendXML(java.io.File pXMLFile)
Reads the XML data and converts it to XFDF. You should set the Stylesheet for the XML data beforehand by calling either of setStylesheet() methods.
Parameters:
pXMLFile - XML file
Since:
1.0
See Also:
setStylesheet(XMLDocument), setStylesheet(InputStream), setStylesheet(String)

appendXML

public void appendXML(java.lang.String pXMLString)
Reads the XML data and converts it to XFDF. You should set the Stylesheet for the XML data beforehand by calling either of setStylesheet() methods.
Parameters:
pXMLString - XML data string
Since:
1.0
See Also:
setStylesheet(XMLDocument), setStylesheet(InputStream), setStylesheet(String)

appendXML

public void appendXML(oracle.xml.parser.v2.XMLDocument pDoc)
Reads the XML data and converts it to XFDF. You should set the Stylesheet for the XML data beforehand by calling either of setStylesheet() methods.
Parameters:
pDoc - XML data
Since:
1.0
See Also:
setStylesheet(XMLDocument), setStylesheet(InputStream), setStylesheet(String)

toReader

public java.io.Reader toReader()
Returns XFDF document as a sequence of characters.
Returns:
XFDF data as a Reader object
Since:
1.0

toInputStream

public java.io.InputStream toInputStream()
Returns XFDF document as a sequence of bytes.
Returns:
XFDF data as a InputStream object
Since:
3.0

toString

public java.lang.String toString()
Returns XFDF document as a Java String object.
Overrides:
toString in class java.lang.Object
Returns:
XFDF data as a string
Since:
1.0

toXMLDocument

public oracle.xml.parser.v2.XMLDocument toXMLDocument()
Returns XFDF document as a XMLDocument object.
Returns:
XFDF data as a XMLDocument
Since:
1.0

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher
11g Release 1 (11.1.1)

E22256-01


Copyright © 2010, 2011, Oracle. All rights reserved.