Package org.xmldb.api.sdk.modules
Class BaseResource
java.lang.Object
org.xmldb.api.sdk.modules.BaseResource
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
SimpleBinaryResource
,SimpleXMLResource
Resource for encapsulation of binary data that is stored in the data base.
Support for BinaryResources is optional.
The standard
getContent
method returns a OutputStream
and the standard setContent expects an InputStream
.
The stream types should be better clarified-
Constructor Summary
ConstructorsConstructorDescriptionBaseResource
(Collection parent, String id) Create a new BinaryResource without any content.BaseResource
(Collection parent, String id, String content) Create a fully initialized BinaryResource -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the unique id for this Resource or null if the resource is anonymous.Returns theCollection
instance that this resource is associated with.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xmldb.api.base.Resource
getContent, getResourceType, setContent
-
Constructor Details
-
BaseResource
Create a new BinaryResource without any content. -
BaseResource
Create a fully initialized BinaryResource
-
-
Method Details
-
getParentCollection
Returns theCollection
instance that this resource is associated with.- Specified by:
getParentCollection
in interfaceResource
- Returns:
- the collection associated with the resource.
- Throws:
XMLDBException
- with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor specific errors that occur.
-
getId
Returns the unique id for this Resource or null if the resource is anonymous.- Specified by:
getId
in interfaceResource
- Returns:
- the id for the Resource or null if no id exists.
- Throws:
XMLDBException
- with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor specific errors that occur.
-