Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.xml
Class XMLFileAccessor

java.lang.Object
  extended by oracle.toplink.internal.databaseaccess.DatasourceAccessor
      extended by oracle.toplink.sdk.SDKAccessor
          extended by oracle.toplink.xml.XMLFileAccessor
All Implemented Interfaces:
java.lang.Cloneable, oracle.toplink.internal.databaseaccess.Accessor, XMLAccessor
Direct Known Subclasses:
XMLZipFileAccessor

Deprecated. since OracleAS TopLink 10g (10.1.3). This class is replaced by oracle.toplink.ox

public class XMLFileAccessor
extends SDKAccessor
implements XMLAccessor

XMLFileAccessor is an implementation of the XMLAccessor interface that uses the native O/S file system to store XML documents:

The above-described default behavior for organizing the accessor's files can be overridden at the root element name level by using XMLFileAccessorFilePolicys. A file policy can be used to define what files are used for a specific root element name.

If necessary, this Accessor will dynamically load a DefaultXMLTranslator, either by using a JARClassLoader, to load the translator from specific set of JAR files, or by using the current class loader, if no JAR files have been specified. The static method DatabaseLogin.setXMLParserJARFileNames() is used to set the paths to the JAR files to be used for custom class loading.

Since:
TOPLink/Java 3.0
See Also:
XMLCall, XMLFileLogin, JARClassLoader, DatabaseLogin

Constructor Summary
XMLFileAccessor()
          Deprecated. Default constructor.
 
Method Summary
 void addFilePolicy(java.lang.String rootElementName, XMLFileAccessorFilePolicy filePolicy)
          Deprecated. Set the file policy for the specified root element name.
 void connect(Login login, oracle.toplink.internal.sessions.AbstractSession session)
          Deprecated. Establish a connection to the "data store".
 Record convert(Record row, oracle.toplink.internal.sessions.AbstractSession session)
          Deprecated. Everything in XML must be strings.
 void createStreamSource(java.lang.String rootElementName)
          Deprecated. Create a source for data streams for the XML documents with the specified root element name.
 java.lang.Integer deleteStream(java.lang.String rootElementName, Record row, java.util.Vector orderedPrimaryKeyElements)
          Deprecated. Delete the data for the specified root element and primary key.
 void disconnect(oracle.toplink.internal.sessions.AbstractSession session)
          Deprecated. Drop the connection to the "data store".
 void dropStreamSource(java.lang.String rootElementName)
          Deprecated. Drop the source for data streams for the XML documents with the specified root element name.
 XMLFileAccessorFilePolicy getDefaultFilePolicy()
          Deprecated. Return the default file policy.
 java.io.Reader getExistenceCheckStream(java.lang.String rootElementName, Record row, java.util.Vector orderedPrimaryKeyElements)
          Deprecated. If it exists, return a read stream on the data for the specified root element and primary key.
 java.io.Writer getExistingWriteStream(java.lang.String rootElementName, Record row, java.util.Vector orderedPrimaryKeyElements)
          Deprecated. Return a write stream that will overwrite the data for the specified root element and primary key.
 XMLFileAccessorFilePolicy getFilePolicy(java.lang.String rootElementName)
          Deprecated. Return the file policy for the specified root element name.
 java.io.Writer getNewWriteStream(java.lang.String rootElementName, Record row, java.util.Vector orderedPrimaryKeyElements)
          Deprecated. Return a new write stream for the specified root element and primary key.
 java.io.Reader getReadStream(java.lang.String rootElementName, Record row, java.util.Vector orderedPrimaryKeyElements)
          Deprecated. Return a read stream on the data for the specified root element and primary key.
 java.util.Enumeration getReadStreams(java.lang.String rootElementName)
          Deprecated. Return an enumeration on a collection of read streams, one for *every* document with the specified root element.
 java.util.Enumeration getReadStreams(java.lang.String rootElementName, java.util.Vector foreignKeyRows, java.util.Vector orderedForeignKeyElements)
          Deprecated. Return an enumeration on a collection of streams, one for every specified foreign key.
 XMLTranslator getXMLTranslator()
          Deprecated. Return the default XML translator for all data store calls.
 void setDefaultFilePolicy(XMLFileAccessorFilePolicy defaultFilePolicy)
          Deprecated. Set the default file policy.
 void setXMLTranslator(XMLTranslator translator)
          Deprecated. Set the default XML translator for all data store calls.
 
Methods inherited from class oracle.toplink.sdk.SDKAccessor
basicBeginTransaction, basicCommitTransaction, basicExecuteCall, basicRollbackTransaction, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLFileAccessor

public XMLFileAccessor()
Deprecated. 
Default constructor.

Method Detail

addFilePolicy

public void addFilePolicy(java.lang.String rootElementName,
                          XMLFileAccessorFilePolicy filePolicy)
Deprecated. 
Set the file policy for the specified root element name.


connect

public void connect(Login login,
                    oracle.toplink.internal.sessions.AbstractSession session)
             throws XMLDataStoreException
Deprecated. 
Establish a connection to the "data store".

Specified by:
connect in interface oracle.toplink.internal.databaseaccess.Accessor
Overrides:
DatasourceAccessor in class oracle.toplink.internal.databaseaccess.DatasourceAccessor
Throws:
XMLDataStoreException

convert

public Record convert(Record row,
                      oracle.toplink.internal.sessions.AbstractSession session)
Deprecated. 
Everything in XML must be strings.

Specified by:
convert in interface XMLAccessor

createStreamSource

public void createStreamSource(java.lang.String rootElementName)
                        throws XMLDataStoreException
Deprecated. 
Create a source for data streams for the XML documents with the specified root element name.

Specified by:
createStreamSource in interface XMLAccessor
Throws:
XMLDataStoreException

deleteStream

public java.lang.Integer deleteStream(java.lang.String rootElementName,
                                      Record row,
                                      java.util.Vector orderedPrimaryKeyElements)
                               throws XMLDataStoreException
Deprecated. 
Delete the data for the specified root element and primary key. Return the stream count (1 or 0).

Specified by:
deleteStream in interface XMLAccessor
Throws:
XMLDataStoreException

disconnect

public void disconnect(oracle.toplink.internal.sessions.AbstractSession session)
                throws XMLDataStoreException
Deprecated. 
Drop the connection to the "data store".

Specified by:
disconnect in interface oracle.toplink.internal.databaseaccess.Accessor
Overrides:
DatasourceAccessor in class oracle.toplink.internal.databaseaccess.DatasourceAccessor
Throws:
XMLDataStoreException

dropStreamSource

public void dropStreamSource(java.lang.String rootElementName)
                      throws XMLDataStoreException
Deprecated. 
Drop the source for data streams for the XML documents with the specified root element name.

Specified by:
dropStreamSource in interface XMLAccessor
Throws:
XMLDataStoreException

getDefaultFilePolicy

public XMLFileAccessorFilePolicy getDefaultFilePolicy()
Deprecated. 
Return the default file policy.


getExistenceCheckStream

public java.io.Reader getExistenceCheckStream(java.lang.String rootElementName,
                                              Record row,
                                              java.util.Vector orderedPrimaryKeyElements)
                                       throws XMLDataStoreException
Deprecated. 
If it exists, return a read stream on the data for the specified root element and primary key. If it does not exist, return null.

Specified by:
getExistenceCheckStream in interface XMLAccessor
Throws:
XMLDataStoreException

getExistingWriteStream

public java.io.Writer getExistingWriteStream(java.lang.String rootElementName,
                                             Record row,
                                             java.util.Vector orderedPrimaryKeyElements)
                                      throws XMLDataStoreException
Deprecated. 
Return a write stream that will overwrite the data for the specified root element and primary key.

Specified by:
getExistingWriteStream in interface XMLAccessor
Throws:
XMLDataStoreException

getFilePolicy

public XMLFileAccessorFilePolicy getFilePolicy(java.lang.String rootElementName)
Deprecated. 
Return the file policy for the specified root element name.


getNewWriteStream

public java.io.Writer getNewWriteStream(java.lang.String rootElementName,
                                        Record row,
                                        java.util.Vector orderedPrimaryKeyElements)
                                 throws XMLDataStoreException
Deprecated. 
Return a new write stream for the specified root element and primary key.

Specified by:
getNewWriteStream in interface XMLAccessor
Throws:
XMLDataStoreException

getReadStream

public java.io.Reader getReadStream(java.lang.String rootElementName,
                                    Record row,
                                    java.util.Vector orderedPrimaryKeyElements)
                             throws XMLDataStoreException
Deprecated. 
Return a read stream on the data for the specified root element and primary key. If the stream is not found return null.

Specified by:
getReadStream in interface XMLAccessor
Throws:
XMLDataStoreException

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName)
                                     throws XMLDataStoreException
Deprecated. 
Return an enumeration on a collection of read streams, one for *every* document with the specified root element.

Specified by:
getReadStreams in interface XMLAccessor
Throws:
XMLDataStoreException

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName,
                       java.util.Vector foreignKeyRows,
                       java.util.Vector orderedForeignKeyElements)
                                     throws XMLDataStoreException
Deprecated. 
Return an enumeration on a collection of streams, one for every specified foreign key. If a particular stream is not found the enumeration will return null in its place.

Specified by:
getReadStreams in interface XMLAccessor
Throws:
XMLDataStoreException

getXMLTranslator

public XMLTranslator getXMLTranslator()
Deprecated. 
Return the default XML translator for all data store calls.

Specified by:
getXMLTranslator in interface XMLAccessor

setDefaultFilePolicy

public void setDefaultFilePolicy(XMLFileAccessorFilePolicy defaultFilePolicy)
Deprecated. 
Set the default file policy.


setXMLTranslator

public void setXMLTranslator(XMLTranslator translator)
Deprecated. 
Set the default XML translator for all data store calls.

Specified by:
setXMLTranslator in interface XMLAccessor

Copyright © 1998, 2010, Oracle. All Rights Reserved.