|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jbo.mom.xml.XMLOutputStream
public class XMLOutputStream
NAME This class holds the content of an object you intenet to persist as XML. DESCRIPTION NOTES VERSION MODIFIED (MM/DD/YY)
Field Summary | |
---|---|
static int |
AMP |
static java.lang.String |
AMP_STR |
static int |
APOS |
static java.lang.String |
APOS_STR |
static int |
GT |
static java.lang.String |
GT_STR |
static int |
LT |
static java.lang.String |
LT_STR |
static int |
MAX_CONT_STRING_SIZE |
static int |
MAX_STRING_LINE |
protected java.lang.StringBuffer |
mBuffer |
protected DTAttrsHolder |
mDTAttrs |
protected java.lang.String |
mIndentStr |
static java.lang.String |
NEW_LINE |
static int |
NEW_LINE_CHAR |
static int |
QUOT |
static java.lang.String |
QUOT_STR |
static int |
SPACE_CHAR |
static java.lang.String |
SPACE_STR |
Constructor Summary | |
---|---|
XMLOutputStream(DefinitionManager mgr) |
|
XMLOutputStream(DefinitionManager mgr, PersistableDefObject obj) |
Method Summary | |
---|---|
java.lang.String |
breakStr(java.lang.String inStr) Breaks the String in to multiple lines by appending new line Characters. |
protected java.lang.String |
checkSpecialChar(java.lang.String value, char specialChar, java.lang.String replacement) |
protected java.lang.String |
checkSpecialChars(java.lang.String value) |
void |
closeConnection() Writes the internal buffers and closes the XML file. |
void |
commit() This method Commits the transaction. |
protected static java.lang.String |
createEscapes(java.lang.String inStr, boolean userString) |
static java.net.URL |
createURL(java.lang.String fileName) Creates the URL class for the given filename |
protected void |
doWriteString(java.lang.String attrName, java.lang.String value) |
void |
epilogue(DefPersistable jtpObject) This method write the ending block for each Object. |
void |
epilogue(PersistentDefinition jtpObject) This method write the ending block for each Object. |
Element |
findChildElemWithAttribute(Element parent, java.lang.String sName, java.lang.String sValue) |
java.lang.Object |
getConnection() Returns the the XML FileOutStream. |
java.lang.String |
getIanaEncoding() |
java.lang.String |
getJdkEncoding() |
boolean |
isConnectionOpen() Returns if a Connection is already open |
protected boolean |
isDefaultValue(java.lang.String attrName, java.lang.String value) |
void |
openConnection(java.lang.String tagName) |
void |
openConnection(java.lang.String xmlFileName, java.lang.String tagName) Opens the XML file in output mode. |
void |
prologue(DefPersistable jtpObject) This method writes the starting block for each Object. |
void |
prologue(PersistentDefinition jtpObject) This method writes the starting block for each Object. |
void |
removeAttribute(java.lang.String attrName) |
static java.lang.StringBuffer |
removeDesignTime(java.lang.StringBuffer buffer) |
boolean |
removeElementByAttribute(java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue) |
boolean |
removeElements(java.lang.String elemName) |
boolean |
removeObject(DefPersistable jtpObject) |
void |
resetIndentation() Decreases the indentation by three spaces |
void |
rollback() This method rolls back the transaction. |
void |
saveAs(java.lang.String xmlFileName) Opens the XML file in output mode. |
void |
saveAsRunTimeXML(java.lang.String xmlFileName) Saves the Runtime Version of XML File Same as the Regular XML file without DesignTime section |
protected void |
saveDesignTimeAttrs() |
void |
saveToOutputStream(java.io.OutputStream os) Saves the Buffer to given OutputStream |
void |
saveToOutputStream(java.io.Writer os) Saves the Buffer to given Writer |
void |
saveXMLData(PersistableDefObject obj) |
void |
saveXMLData(PersistableDefObject obj, java.lang.String objFullName, char[] data) |
void |
setIanaEncoding(java.lang.String iana) |
void |
setIndentation() Increases the indentation by three spaces |
void |
setJdkEncoding(java.lang.String jdkEnc) |
char[] |
toCharArray() expose own content as a char array: this involves a complete buffer copy |
boolean |
writeBoolean(java.lang.String attrName, boolean value) This method writes an attribute of type boolean |
boolean |
writeByte(java.lang.String attrName, byte value) This method writes an attribute of type byte |
boolean |
writeChar(java.lang.String attrName, char value) This method writes an attribute of type char |
void |
writeComment(java.lang.String comment) |
boolean |
writeDouble(java.lang.String attrName, double value) This method writes an attribute of type double |
void |
writeFileHeader(java.lang.String tagName) Creates Properties XML section. |
boolean |
writeFloat(java.lang.String attrName, float value) This method writes an attribute of type float |
boolean |
writeInt(java.lang.String attrName, int value) This method writes an attribute of type int |
boolean |
writeLong(java.lang.String attrName, long value) This method writes an attribute of type long |
void |
writeObject(DefPersistable jtpObject) Writes a DefPersistible object |
void |
writeObject(PersistentDefinition jtpObject) Writes a PersistentDefinition object |
boolean |
writeObject(java.lang.String attrName, java.lang.Object value) This method writes an attribute of type object |
boolean |
writeShort(java.lang.String attrName, short value) This method writes an attribute of type short |
boolean |
writeString(java.lang.String attrName, java.lang.String value) This method writes an attribute of type String |
boolean |
writeStringArray(java.lang.String attrName, java.util.Enumeration value) This method writes an attribute of type String |
boolean |
writeStringArray(java.lang.String attrName, java.util.Iterator value) This method writes an attribute of type String |
boolean |
writeStringArray(java.lang.String attrName, java.lang.Object[] value) This method writes an attribute of type String |
boolean |
writeStringArrayElement(java.lang.String attrName, java.util.Iterator value) This method writes an attribute of type String |
boolean |
writeTable(DefPersistable jtpObject, java.lang.String attrName, java.util.HashMap value) This method writes an attribute of type Hashtable |
boolean |
writeTable(DefPersistable jtpObject, java.lang.String attrName, java.util.Hashtable value) This method writes an attribute of type Hashtable |
boolean |
writeTable(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.lang.String name, java.lang.String value, java.util.HashMap ht) This method writes an attribute of type Hashtable |
boolean |
writeTable(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.lang.String name, java.lang.String value, java.util.Hashtable ht) This method writes an attribute of type Hashtable |
void |
writeUserObject(java.lang.String elementName, java.lang.String value) |
void |
writeUserObject(java.lang.String ns, java.lang.String elementName, java.lang.String value) |
void |
writeUserObjectWithName(java.lang.String elementName, java.lang.String name, java.lang.String value) |
boolean |
writeUserString(java.lang.String attrName, java.lang.String value) This method writes an attribute of type String This method replaces the system characters such as '"&<> to escape sequances that XML parser understands. |
boolean |
writeUserStringArrayElement(java.lang.String attrName, java.lang.String elemName, java.util.Iterator value) This method writes CData elements of type String |
boolean |
writeUserStringElementsMap(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.util.HashMap values) |
java.lang.Object |
writeVariableValues(java.lang.String elemName, java.lang.Object[] objs) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String NEW_LINE
public static final java.lang.String LT_STR
public static final java.lang.String GT_STR
public static final java.lang.String AMP_STR
public static final java.lang.String APOS_STR
public static final java.lang.String QUOT_STR
public static final java.lang.String SPACE_STR
public static final int MAX_CONT_STRING_SIZE
public static final int MAX_STRING_LINE
public static final int LT
public static final int GT
public static final int AMP
public static final int APOS
public static final int QUOT
public static final int SPACE_CHAR
public static final int NEW_LINE_CHAR
protected java.lang.String mIndentStr
protected java.lang.StringBuffer mBuffer
protected DTAttrsHolder mDTAttrs
Constructor Detail |
---|
public XMLOutputStream(DefinitionManager mgr)
public XMLOutputStream(DefinitionManager mgr, PersistableDefObject obj)
Method Detail |
---|
public void prologue(DefPersistable jtpObject)
jtpObject
- the JT Persistable Objectpublic Element findChildElemWithAttribute(Element parent, java.lang.String sName, java.lang.String sValue)
public void prologue(PersistentDefinition jtpObject)
jtpObject
- the JT Persistable Objectpublic void epilogue(DefPersistable jtpObject)
jtpObject
- the JT Persistable Objectpublic void epilogue(PersistentDefinition jtpObject)
jtpObject
- the JT Persistable Objectprotected void saveDesignTimeAttrs()
public boolean writeObject(java.lang.String attrName, java.lang.Object value)
writeObject
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeTable(DefPersistable jtpObject, java.lang.String attrName, java.util.HashMap value)
writeTable
in interface DefWriter
jtpObject
- the object holding this AttributeattrName
- the name of the Attribute to writtenvalue
- the value of the Attributepublic boolean writeTable(DefPersistable jtpObject, java.lang.String attrName, java.util.Hashtable value)
writeTable
in interface DefWriter
jtpObject
- the object holding this AttributeattrName
- the name of the Attribute to writtenvalue
- the value of the Attributepublic boolean writeTable(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.lang.String name, java.lang.String value, java.util.Hashtable ht)
DefWriter
writeTable
in interface DefWriter
jtpObject
- the object holding this AttributeattrName
- the name of the Attribute to writtenelemName
- the value of the name of the attribute.name
- the value of the label of the attribute namevalue
- the value of the label for the attribute valueht
- the value of the Attributepublic boolean writeTable(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.lang.String name, java.lang.String value, java.util.HashMap ht)
DefWriter
writeTable
in interface DefWriter
jtpObject
- the object holding this AttributeattrName
- the name of the Attribute to writtenelemName
- the value of the name of the attribute.name
- the value of the label of the attribute namevalue
- the value of the label for the attribute valueht
- the value of the Attributeprotected java.lang.String checkSpecialChars(java.lang.String value)
protected java.lang.String checkSpecialChar(java.lang.String value, char specialChar, java.lang.String replacement)
public boolean writeString(java.lang.String attrName, java.lang.String value)
writeString
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributeprotected void doWriteString(java.lang.String attrName, java.lang.String value)
protected boolean isDefaultValue(java.lang.String attrName, java.lang.String value)
public boolean writeUserString(java.lang.String attrName, java.lang.String value)
writeUserString
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeStringArray(java.lang.String attrName, java.util.Iterator value)
writeStringArray
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Enumeration of valuespublic boolean writeStringArray(java.lang.String attrName, java.util.Enumeration value)
writeStringArray
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Enumeration of valuespublic boolean writeStringArray(java.lang.String attrName, java.lang.Object[] value)
writeStringArray
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Enumeration of valuespublic boolean writeInt(java.lang.String attrName, int value)
writeInt
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeShort(java.lang.String attrName, short value)
writeShort
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeLong(java.lang.String attrName, long value)
writeLong
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeFloat(java.lang.String attrName, float value)
writeFloat
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeDouble(java.lang.String attrName, double value)
writeDouble
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeBoolean(java.lang.String attrName, boolean value)
writeBoolean
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeByte(java.lang.String attrName, byte value)
writeByte
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic boolean writeChar(java.lang.String attrName, char value)
writeChar
in interface DefWriter
attrName
- the name of the Attribute to readvalue
- Value of the Attributepublic void openConnection(java.lang.String tagName)
public void openConnection(java.lang.String xmlFileName, java.lang.String tagName)
xmlFileName
- Name of the XML File.java.lang.Error
- opening the XML filepublic void closeConnection()
java.lang.Error
- closing the connectionpublic boolean isConnectionOpen()
public java.lang.Object getConnection()
public void commit()
commit
in interface DefWriter
java.lang.Error
- commiting the transactionpublic void rollback()
rollback
in interface DefWriter
java.lang.Error
- Rolling back the transactionpublic void setIndentation()
public void resetIndentation()
public void writeFileHeader(java.lang.String tagName)
tagName
- Hashtable consists of Properties.public void writeObject(DefPersistable jtpObject)
writeObject
in interface DefWriter
jtpObject
- the DefPersistable object to writepublic void writeObject(PersistentDefinition jtpObject)
writeObject
in interface DefWriter
jtpObject
- the PersistentDefinition object to writepublic void writeUserObject(java.lang.String ns, java.lang.String elementName, java.lang.String value)
writeUserObject
in interface DefWriter
public void writeUserObject(java.lang.String elementName, java.lang.String value)
writeUserObject
in interface DefWriter
public void writeUserObjectWithName(java.lang.String elementName, java.lang.String name, java.lang.String value)
public void writeComment(java.lang.String comment)
public void saveAs(java.lang.String xmlFileName)
xmlFileName
- Name of the XML File.java.lang.Error
- opening the XML filepublic void saveAsRunTimeXML(java.lang.String xmlFileName)
xmlFileName
- Name of the XML File.java.lang.Error
- opening the XML filepublic static java.lang.StringBuffer removeDesignTime(java.lang.StringBuffer buffer)
public void saveToOutputStream(java.io.OutputStream os)
os
- OutputStreamjava.lang.Error
- opening the XML filepublic java.lang.String breakStr(java.lang.String inStr)
inStr
- Input Stringprotected static java.lang.String createEscapes(java.lang.String inStr, boolean userString)
public static java.net.URL createURL(java.lang.String fileName) throws java.io.IOException
fileName
- The Xml file namejava.io.IOException
- Can not java.io.File classpublic void saveToOutputStream(java.io.Writer os)
os
- Writerjava.lang.Error
public java.lang.String getIanaEncoding()
public void setIanaEncoding(java.lang.String iana)
public java.lang.String getJdkEncoding()
public void setJdkEncoding(java.lang.String jdkEnc)
public char[] toCharArray()
public boolean writeStringArrayElement(java.lang.String attrName, java.util.Iterator value)
writeStringArrayElement
in interface DefWriter
attrName
- the name of the element to writevalue
- Enumeration of valuespublic boolean writeUserStringArrayElement(java.lang.String attrName, java.lang.String elemName, java.util.Iterator value)
writeUserStringArrayElement
in interface DefWriter
public boolean writeUserStringElementsMap(DefPersistable jtpObject, java.lang.String attrName, java.lang.String elemName, java.util.HashMap values)
writeUserStringElementsMap
in interface DefWriter
public boolean removeElements(java.lang.String elemName)
removeElements
in interface DefWriter
public boolean removeElementByAttribute(java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
removeElementByAttribute
in interface DefWriter
public boolean removeObject(DefPersistable jtpObject)
removeObject
in interface DefWriter
public void removeAttribute(java.lang.String attrName)
removeAttribute
in interface DefWriter
public void saveXMLData(PersistableDefObject obj)
public void saveXMLData(PersistableDefObject obj, java.lang.String objFullName, char[] data)
public java.lang.Object writeVariableValues(java.lang.String elemName, java.lang.Object[] objs)
writeVariableValues
in interface DefWriter
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |