Java Doc for Collection.java in  » Database-DBMS » Ozone-1.1 » org » xmldb » api » base » 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.xmldb.api.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.xmldb.api.base.Collection

All known Subclasses:   org.ozoneDB.xml.cli.CollectionImpl,
Collection
public interface Collection extends Configurable(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.





Method Summary
 voidclose()
     Releases all resources consumed by the Collection.
 StringcreateId()
    
 ResourcecreateResource(String id, String type)
     Creates a new empty Resource with the provided id.
 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.
 intgetChildCollectionCount()
     Returns the number of child collections under this Collection or 0 if no child collections exist.
 CollectiongetParentCollection()
     Returns the parent collection for this collection or null if no parent collection exists.
 ResourcegetResource(String id)
     Retrieves a Resource from the database.
 intgetResourceCount()
     Returns the number of resources currently stored in this collection or 0 if the collection is empty.
 ServicegetService(String name, String version)
     Returns a Service instance for the requested service name and version.
 Service[]getServices()
     Provides a list of all services known to the collection.
 String[]listChildCollections()
     Returns a list of collection names naming all child collections of the current collection.
 String[]listResources()
     Returns a list of the ids for all resources stored in the collection.
 voidregisterService(Service serv)
     Registers a new Service implementation with the collection. The Service implementation is queried for the name and version that will be used to retrieve the service.
 voidremoveResource(Resource res)
     Removes the Resource from the database.
 voidstoreResource(Resource res)
     Stores the provided resource into the database.



Method Detail
close
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
String createId() throws XMLDBException(Code)
Creates a new unique ID within the context of the Collection the created id as a string.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



createResource
Resource createResource(String id, String type) throws XMLDBException(Code)
Creates a new empty Resource with the provided id. The type of Resource returned is determined by the type parameter. The XML:DB API currently defines "XMLResource" and "BinaryResource" as valid resource types. The id provided must be unique within the scope of the collection. If id is null or its value is empty then an id is generated by calling createId(). The Resource created is not stored to the database until storeResource() is called.
Parameters:
  id - the unique id to associate with the created Resource.
Parameters:
  type - the Resource type to create. an empty Resource instance.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.UNKNOWN_RESOURCE_TYPE if the typeparameter is not a known Resource type.



getChildCollection
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 - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getChildCollectionCount
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 - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getParentCollection
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 - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getResource
Resource getResource(String id) throws XMLDBException(Code)
Retrieves a Resource from the database. If the Resource could not be located a null value will be returned.
Parameters:
  id - the unique id for the requested resource. The retrieved Resource instance.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getResourceCount
int getResourceCount() throws XMLDBException(Code)
Returns the number of resources currently stored in this collection or 0 if the collection is empty. the number of resource in the collection.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getService
Service getService(String name, String version) throws XMLDBException(Code)
Returns a Service instance for the requested service name and version. If no Service exists for those parameters a null value is returned.
Parameters:
  name - Description of Parameter
Parameters:
  version - Description of Parameter the Service instance or null if no Service could be found.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



getServices
Service[] getServices() throws XMLDBException(Code)
Provides a list of all services known to the collection. If no services are known an empty list is returned. An array of registered Service implementations.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



listChildCollections
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 - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



listResources
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 all Resources in the collection.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.



registerService
void registerService(Service serv) throws XMLDBException(Code)
Registers a new Service implementation with the collection. The Service implementation is queried for the name and version that will be used to retrieve the service. The Service instance must be a valid service for this collection or an exception will be raised.
Parameters:
  serv - the service instance to register.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.INVALID_SERVICE if the Serviceinstance does not have a proper name or version or the instance is null.



removeResource
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
void storeResource(Resource res) throws XMLDBException(Code)
Stores the provided resource into the database. If the resource does not already exist it will be created. If it does already exist it will be updated.
Parameters:
  res - the resource to store in the database.
exception:
  XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.INVALID_RESOURCE if the Resource isnot valid.



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