Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.xml.zip
Class XMLZipFileStreamPolicy

java.lang.Object
  extended byoracle.toplink.xml.zip.XMLZipFileStreamPolicy

All Implemented Interfaces:
java.io.Serializable, XMLStreamPolicy

public class XMLZipFileStreamPolicy
extends java.lang.Object
implements XMLStreamPolicy

This implementation of the XMLStreamPolicy interface provides streams to XML documents stored in ZIP file archives. It also controls the access to these ZIP files: adding, deleting, and updating the entries in the ZIP files.

Since:
TOPLink/Java 3.5
See Also:
XMLZipFileAccessor, Serialized Form

Constructor Summary
XMLZipFileStreamPolicy(java.io.File file, java.util.Enumeration zipEntryNames)
Construct a policy for the specified ZIP file and entry.
XMLZipFileStreamPolicy(java.io.File file, java.lang.String zipEntryName)
Construct a policy for the specified ZIP file and entry.
XMLZipFileStreamPolicy(java.lang.String fileName, java.util.Enumeration zipEntryNames)
Construct a policy for the specified ZIP file and entries.
XMLZipFileStreamPolicy(java.lang.String fileName, java.lang.String zipEntryName)
Construct a policy for the specified ZIP file and entry.

Method Summary
java.lang.Integer deleteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
This implementation loops through the ZIP file, copying its entries into a new ZIP file, skipping the entry to be deleted.
java.io.Reader getExistenceCheckStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
Return the ZIP file entry wrapped in a stream.
java.io.Writer getExistingWriteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
This implementation removes and adds an entry to the ZIP file and positions the stream at the end of the ZIP file.
java.io.Writer getNewWriteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
This implementation adds an entry to the ZIP file and positions the stream at the end of the ZIP file.
java.io.Reader getReadStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
Return the ZIP file entry wrapped in a stream.
java.util.Enumeration getReadStreams(java.lang.String rootElementName, oracle.toplink.internal.databaseaccess.Accessor accessor)
Return the ZIP file entries wrapped in streams.
java.util.Enumeration getReadStreams(java.lang.String rootElementName, java.util.Vector foreignKeys, java.util.Vector orderedForeignKeyElements, oracle.toplink.internal.databaseaccess.Accessor accessor)
Return the ZIP file entries wrapped in streams.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

XMLZipFileStreamPolicy

public XMLZipFileStreamPolicy(java.io.File file,
                              java.lang.String zipEntryName)
Construct a policy for the specified ZIP file and entry.

XMLZipFileStreamPolicy

public XMLZipFileStreamPolicy(java.lang.String fileName,
                              java.lang.String zipEntryName)
Construct a policy for the specified ZIP file and entry.

XMLZipFileStreamPolicy

public XMLZipFileStreamPolicy(java.io.File file,
                              java.util.Enumeration zipEntryNames)
Construct a policy for the specified ZIP file and entry.

XMLZipFileStreamPolicy

public XMLZipFileStreamPolicy(java.lang.String fileName,
                              java.util.Enumeration zipEntryNames)
Construct a policy for the specified ZIP file and entries.

Method Detail

deleteStream

public java.lang.Integer deleteStream(java.lang.String rootElementName,
                                      DatabaseRow row,
                                      java.util.Vector orderedPrimaryKeyElements,
                                      oracle.toplink.internal.databaseaccess.Accessor accessor)
                               throws XMLDataStoreException
This implementation loops through the ZIP file, copying its entries into a new ZIP file, skipping the entry to be deleted.
Specified by:
deleteStream in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getExistenceCheckStream

public java.io.Reader getExistenceCheckStream(java.lang.String rootElementName,
                                              DatabaseRow row,
                                              java.util.Vector orderedPrimaryKeyElements,
                                              oracle.toplink.internal.databaseaccess.Accessor accessor)
                                       throws XMLDataStoreException
Return the ZIP file entry wrapped in a stream.
Specified by:
getExistenceCheckStream in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getExistingWriteStream

public java.io.Writer getExistingWriteStream(java.lang.String rootElementName,
                                             DatabaseRow row,
                                             java.util.Vector orderedPrimaryKeyElements,
                                             oracle.toplink.internal.databaseaccess.Accessor accessor)
                                      throws XMLDataStoreException
This implementation removes and adds an entry to the ZIP file and positions the stream at the end of the ZIP file.
Specified by:
getExistingWriteStream in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getNewWriteStream

public java.io.Writer getNewWriteStream(java.lang.String rootElementName,
                                        DatabaseRow row,
                                        java.util.Vector orderedPrimaryKeyElements,
                                        oracle.toplink.internal.databaseaccess.Accessor accessor)
                                 throws XMLDataStoreException
This implementation adds an entry to the ZIP file and positions the stream at the end of the ZIP file.
Specified by:
getNewWriteStream in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getReadStream

public java.io.Reader getReadStream(java.lang.String rootElementName,
                                    DatabaseRow row,
                                    java.util.Vector orderedPrimaryKeyElements,
                                    oracle.toplink.internal.databaseaccess.Accessor accessor)
                             throws XMLDataStoreException
Return the ZIP file entry wrapped in a stream.
Specified by:
getReadStream in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName,
                                            java.util.Vector foreignKeys,
                                            java.util.Vector orderedForeignKeyElements,
                                            oracle.toplink.internal.databaseaccess.Accessor accessor)
                                     throws XMLDataStoreException
Return the ZIP file entries wrapped in streams.
Specified by:
getReadStreams in interface XMLStreamPolicy
Throws:
XMLDataStoreException

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName,
                                            oracle.toplink.internal.databaseaccess.Accessor accessor)
                                     throws XMLDataStoreException
Return the ZIP file entries wrapped in streams.
Specified by:
getReadStreams in interface XMLStreamPolicy
Throws:
XMLDataStoreException

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.