Java Doc for XMLContainer.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » xml » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » Ozone 1.1 » org.ozoneDB.xml.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ozoneDB.xml.util.XMLContainer

XMLContainer
public class XMLContainer implements Externalizable,SAXChunkProducerDelegate(Code)

This class is the central part of the ozone/XML API. Basically it provides a persistent container for a XML document, which is stored in an ozone database.

IMPORTANT:
Before calling one of the store or extract methods the thread must have joined a transaction.

Usage of the SAX methods is recomended, because of the better performance.
version:
   $Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
author:
   SMB


Field Summary
final public static  booleandebug
    

Constructor Summary
protected  XMLContainer(OzoneInterface _db, XMLContainerHelper _helper)
    

Method Summary
public synchronized  voiddelete()
     Deletes the container (and the associated document) from the database.
protected  XObjectexecuteXPath(OzoneXPathQuery _query)
    
protected  voidexecuteXUpdate(OzoneXUpdateQuery _query)
    
public  DocumentextractDOM(Document _domFactory)
    
public  NodeextractDOM(Document _domFactory, Node _pNode, Node _appendTo)
    
public  NodeextractDOM(Document _domFactory, Node _pNode, Node _appendTo, int _depth)
     Extracts a given DOM node and all its descendants.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction .

public  NodeListextractDOM(Document _domFactory, NodeList _pNodes, Node _appendTo, int _depth)
    
public  voidextractSAX(ContentHandler _contentHandler)
    
public  voidextractSAX(ContentHandler _contentHandler, Node _pNode)
    
public  voidextractSAX(ContentHandler _contentHandler, Node _pNode, int _depth)
     Extracts a given DOM node and all its descendants.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction .

public static  XMLContainerforName(OzoneInterface _db, String _docName)
     Returns the XMLContainer representing the document with the given name.
Parameters:
  _db - The database where the container is stored.
Parameters:
  _docName - The name under which the container has been stored.
public static  XMLContainerforNode(OzoneInterface _db, Node _pNode)
     Returns the XMLContainer representing the document the given node belongs to.
Parameters:
  _db - The database where the container is stored.
Parameters:
  _pNode - A node of the document the container represents.
public  DocumentgetPDocument()
     Get the underlying persistent document that this container is working on.
public static  XMLContainernewContainer(OzoneInterface _db, String _docName)
     Creates a new container with the given name.
Parameters:
  _db - The database where the container will be stored.
Parameters:
  _docName - The name of the container (and the document).
public  OzoneXPathQuerynewXPathQuery()
     Create a new XPath query.
public  OzoneXUpdateQuerynewXUpdateQuery()
     Create a new XUpdate query.
public  voidprocessChunk(SAXChunkProducer _producer)
     This method is for internal use only.
public  voidreadExternal(ObjectInput _in)
    
public  voidsetName(String _name)
     Changes the name of this container.
public  voidstoreDOM(Document _tNode)
     Stores a transient DOM tree database.
public  voidstoreDOM(Node _pNode, Node _tNode)
     Stores a transient node into the database.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction .

public  ContentHandlerstoreSAX()
     Stores a DOM tree represented by SAX events in the datasabase.
public  ContentHandlerstoreSAX(Node _pNode)
     Stores XML represented by SAX events into the database.

The entire storage process must be enclosed by an org.ozoneDB.ExternalTransaction explicit Transaction .

public  voidwriteExternal(ObjectOutput _out)
    
public  StringxpathForNode(Node _pnode)
     Determines the absolute XPath for the given node.
Parameters:
  node - The W3C DOM node whose XPath is to determine.

Field Detail
debug
final public static boolean debug(Code)




Constructor Detail
XMLContainer
protected XMLContainer(OzoneInterface _db, XMLContainerHelper _helper)(Code)




Method Detail
delete
public synchronized void delete() throws Exception(Code)
Deletes the container (and the associated document) from the database.



executeXPath
protected XObject executeXPath(OzoneXPathQuery _query) throws Exception(Code)



executeXUpdate
protected void executeXUpdate(OzoneXUpdateQuery _query) throws Exception(Code)



extractDOM
public Document extractDOM(Document _domFactory) throws Exception(Code)

See Also:   XMLContainer.extractDOM(Document,Node,Node,int)



extractDOM
public Node extractDOM(Document _domFactory, Node _pNode, Node _appendTo) throws Exception(Code)

See Also:   XMLContainer.extractDOM(Document,Node,Node,int)



extractDOM
public Node extractDOM(Document _domFactory, Node _pNode, Node _appendTo, int _depth) throws Exception(Code)
Extracts a given DOM node and all its descendants.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction . This is an exception to the normal case, where an implicit transaction (handled by Ozone) is more appropriate.

Note:
If possible, the corresponding XMLContainer.extractSAX(ContentHandler) SAX method should be used, because the performance of SAX retrieval is much better.


Parameters:
  _domFactory - The DOM Document that is used to create the extracted DOM nodes.
Parameters:
  _pNode - The persistent DOM node
Parameters:
  _appendTo - The transient DOM node where the extracted content willwill be appended to.
Parameters:
  _depth - The number of hierarchy steps that should be extracted ornull if the entire hierarchy should be extracted.



extractDOM
public NodeList extractDOM(Document _domFactory, NodeList _pNodes, Node _appendTo, int _depth) throws Exception(Code)



extractSAX
public void extractSAX(ContentHandler _contentHandler) throws Exception(Code)

See Also:   XMLContainer.extractSAX(ContentHandler,Node,int)



extractSAX
public void extractSAX(ContentHandler _contentHandler, Node _pNode) throws Exception(Code)

See Also:   XMLContainer.extractSAX(ContentHandler,Node,int)



extractSAX
public void extractSAX(ContentHandler _contentHandler, Node _pNode, int _depth) throws Exception(Code)
Extracts a given DOM node and all its descendants.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction . This is an exception to the normal case, where an implicit transaction (handled by Ozone) is more appropriate.


Parameters:
  _contentHandler - The ContentHandler that will receive the generatedSAX events.
Parameters:
  _pNode - The persistent DOM node that is the starting point, or nullif the entire document should be extracted.
Parameters:
  _depth - The number of hierarchy steps that should be extracted ornull if the entire hierarchy should be extracted.



forName
public static XMLContainer forName(OzoneInterface _db, String _docName) throws Exception(Code)
Returns the XMLContainer representing the document with the given name.
Parameters:
  _db - The database where the container is stored.
Parameters:
  _docName - The name under which the container has been stored. the container for the given name or null if the containerdoes not exist.



forNode
public static XMLContainer forNode(OzoneInterface _db, Node _pNode) throws Exception(Code)
Returns the XMLContainer representing the document the given node belongs to.
Parameters:
  _db - The database where the container is stored.
Parameters:
  _pNode - A node of the document the container represents. the container for the given node or null if the node has notbeen stored using the XMLContainer class.



getPDocument
public Document getPDocument() throws Exception(Code)
Get the underlying persistent document that this container is working on. The persistent document.



newContainer
public static XMLContainer newContainer(OzoneInterface _db, String _docName) throws Exception(Code)
Creates a new container with the given name.
Parameters:
  _db - The database where the container will be stored.
Parameters:
  _docName - The name of the container (and the document). the new container.



newXPathQuery
public OzoneXPathQuery newXPathQuery()(Code)
Create a new XPath query.
See Also:   OzoneXPathQuery



newXUpdateQuery
public OzoneXUpdateQuery newXUpdateQuery()(Code)
Create a new XUpdate query. XUpdate is a descriptive XML update language. XUpdate is the recommended way to change a document in the database. See www.xmldb.org for more information and some XUpdate documentation.
See Also:   OzoneXUpdateQuery



processChunk
public void processChunk(SAXChunkProducer _producer) throws Exception(Code)
This method is for internal use only. Don't call it directly.



readExternal
public void readExternal(ObjectInput _in) throws IOException, ClassNotFoundException(Code)



setName
public void setName(String _name) throws Exception(Code)
Changes the name of this container.
Parameters:
  _name - The new name of this container or null to remove thecurrent name.



storeDOM
public void storeDOM(Document _tNode) throws Exception(Code)
Stores a transient DOM tree database. The newly created Nodes are appended to the Document Node of this container.
See Also:   XMLContainer.storeDOM(Node,Node)



storeDOM
public void storeDOM(Node _pNode, Node _tNode) throws Exception(Code)
Stores a transient node into the database.

Before calling this method the current thread must have joined an org.ozoneDB.ExternalTransaction explicit Transaction . This is an exception to the normal case, where an implicit transaction (handled by Ozone) is more appropriate.

Note:
If ever possible the corresponding XMLContainer.storeSAX(Node) SAX method should be used, because the performance of SAX storage is much better.


Parameters:
  _pNode - The persistent node where the stored node will be appended to.Null replaces the current document.
Parameters:
  _tnode - The transient node to be stored.
throws:
  IllegalStateException - if the underlying document has already been deleted.
throws:
  IllegalArgumentException - if _tnode was null.
throws:
  IllegalStateException - if the current thread has not joined aorg.ozoneDB.ExternalTransaction transaction.
See Also:   org.ozoneDB.ExternalTransaction
See Also:   org.ozoneDB.ExternalDatabase.newTransaction



storeSAX
public ContentHandler storeSAX() throws Exception(Code)
Stores a DOM tree represented by SAX events in the datasabase. The newly created Nodes are appended to the Document Node of this container.
See Also:   XMLContainer.storeSAX(Node)



storeSAX
public ContentHandler storeSAX(Node _pNode) throws Exception(Code)
Stores XML represented by SAX events into the database.

The entire storage process must be enclosed by an org.ozoneDB.ExternalTransaction explicit Transaction . This is an exception to the normal case, where an implicit transaction (handled by Ozone) is more appropriate. The storage process starts with the call to this method and ends with the last event send to the content handler. The SAX events must be properly terminated, i.e. there must be an end event for for every start event, otherwise the correct storage can't be guaranteed.


Parameters:
  _pNode - The persistent node where the stored data will be appended to. the content handler which stores all XML data it recieves into thedatabase.
throws:
  IllegalStateException - if the underlying document has already been deleted.
throws:
  IllegalStateException - if the current thread has not joined aorg.ozoneDB.ExternalTransaction transaction.
See Also:   org.ozoneDB.ExternalTransaction
See Also:   org.ozoneDB.ExternalDatabase.newTransaction



writeExternal
public void writeExternal(ObjectOutput _out) throws IOException(Code)



xpathForNode
public String xpathForNode(Node _pnode)(Code)
Determines the absolute XPath for the given node.
Parameters:
  node - The W3C DOM node whose XPath is to determine. The string representing the absolute XPath for this node.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.