Java Doc for CollectionImpl.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » xml » cli » 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.cli 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ozoneDB.xml.cli.AbstractConfigurable
      org.ozoneDB.xml.cli.CollectionImpl

CollectionImpl
public class CollectionImpl extends AbstractConfigurable implements Collection(Code)
A Collection represents a collection of Resources stored within an XML database. An XML database may expose collections as a hierarchical set of parent and child collections.

A Collection provides access to the Resources stored by the Collection and to Service instances that can operate against the Collection and the Resources stored within it. The Service mechanism provides the ability to extend the functionality of a Collection in ways that allows optional functionality to be enabled for the Collection.
author:
   SMB, Per Nyfelt
version:
   $Revision: 1.1 $




Constructor Summary
protected  CollectionImpl(ExternalDatabase database, XMLCollection collection)
    

Method Summary
public  voidclose()
     Releases all resources consumed by the Collection.
public  StringcreateId()
    
public  ResourcecreateResource(String id, String type)
     Creates a new empty Resource with the provided id.
Parameters:
  id - the unique id to associate with the created Resource.
Parameters:
  type - the Resource type to create.
protected static  CollectionforName(ExternalDatabase database, String collectionName)
    
public  CollectiongetChildCollection(String name)
     Returns a Collection instance for the requested child collection if it exists.
Parameters:
  name - the name of the child collection to retrieve.
public  intgetChildCollectionCount()
     Returns the number of child collections under this collection or 0 if no child collections exist.
public  StringgetName()
     Returns the name of this Collection.
public  CollectiongetParentCollection()
     Returns the parent collection for this collection or null if no parent collection exists.
public  ResourcegetResource(String id)
    
public  intgetResourceCount()
    
public  ServicegetService(String name, String version)
     Returns the Service with the provided name and version.
public synchronized  Service[]getServices()
    
public  String[]listChildCollections()
     Returns a list of Collection names naming all child collections of the current collection.
public  String[]listResources()
     Returns a list of the ids for all resources stored in the collection.
protected static  CollectionnewCollection(ExternalDatabase database, String collectionName)
    
public synchronized  voidregisterService(Service service)
     Registers the provided Service for this Collection.
public  voidremoveResource(Resource res)
     Removes the Resource from the database.
public  voidstoreResource(Resource res)
     Stores the provided resource into the database.


Constructor Detail
CollectionImpl
protected CollectionImpl(ExternalDatabase database, XMLCollection collection)(Code)
Constuctor




Method Detail
close
public void close() throws XMLDBException(Code)
Releases all resources consumed by the Collection. The close method must always be called when use of a Collection is complete.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



createId
public String createId() throws XMLDBException(Code)
Creates a new unique ID within the context of the Collection the created id as a string.



createResource
public Resource createResource(String id, String type) throws XMLDBException(Code)
Creates a new empty Resource with the provided id.
Parameters:
  id - the unique id to associate with the created Resource.
Parameters:
  type - the Resource type to create. an empty Resource instance.



forName
protected static Collection forName(ExternalDatabase database, String collectionName) throws Exception(Code)
gets the Collection using the corresponding name from the given database



getChildCollection
public Collection getChildCollection(String name) throws XMLDBException(Code)
Returns a Collection instance for the requested child collection if it exists.
Parameters:
  name - the name of the child collection to retrieve. the requested child collection or null if it couldn't be found.
exception:
  XMLDBException -



getChildCollectionCount
public int getChildCollectionCount() throws XMLDBException(Code)
Returns the number of child collections under this collection or 0 if no child collections exist. the number of child collections.
exception:
  XMLDBException -



getName
public String getName() throws XMLDBException(Code)
Returns the name of this Collection. The name is unique. The name of this Collection.



getParentCollection
public Collection getParentCollection() throws XMLDBException(Code)
Returns the parent collection for this collection or null if no parent collection exists. the parent Collection instance.
exception:
  XMLDBException -



getResource
public Resource getResource(String id) throws XMLDBException(Code)



getResourceCount
public int getResourceCount() throws XMLDBException(Code)



getService
public Service getService(String name, String version) throws XMLDBException(Code)
Returns the Service with the provided name and version.
Parameters:
  name - the name of the requested Service
Parameters:
  version - the version of the requested Service if any



getServices
public synchronized Service[] getServices() throws XMLDBException(Code)
a String array of Services registered for this Collection.



listChildCollections
public String[] listChildCollections() throws XMLDBException(Code)
Returns a list of Collection names naming all child collections of the current collection. If no child collections exist an empty list is returned. an array containing Collection names for all childcollections.
exception:
  XMLDBException -



listResources
public String[] listResources() throws XMLDBException(Code)
Returns a list of the ids for all resources stored in the collection. a string array containing the names for allResources in the collection.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



newCollection
protected static Collection newCollection(ExternalDatabase database, String collectionName) throws Exception(Code)
creates a new Collection and stores it in the database



registerService
public synchronized void registerService(Service service) throws XMLDBException(Code)
Registers the provided Service for this Collection.
Parameters:
  service - The Service to be registered for this Collection.



removeResource
public void removeResource(Resource res) throws XMLDBException(Code)
Removes the Resource from the database.
Parameters:
  res - the resource to remove.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.INVALID_RESOURCE if the Resource isnot valid.
ErrorCodes.NO_SUCH_RESOURCE if the Resource isnot known to this Collection.



storeResource
public void storeResource(Resource res) throws XMLDBException(Code)
Stores the provided resource into the database.
Parameters:
  res - the resource to store in the database.



Methods inherited from org.ozoneDB.xml.cli.AbstractConfigurable
public String getProperty(String name) throws XMLDBException(Code)(Java Doc)
public synchronized void setProperty(String name, String value) throws XMLDBException(Code)(Java Doc)

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.