org.exist.xmldb
Class LocalBinaryResource
java.lang.Object
org.exist.xmldb.AbstractEXistResource
org.exist.xmldb.LocalBinaryResource
- All Implemented Interfaces:
- EXistResource, Resource, BinaryResource
public class LocalBinaryResource
- extends AbstractEXistResource
- implements BinaryResource
- Author:
- wolf
LocalBinaryResource
public LocalBinaryResource(User user,
BrokerPool pool,
LocalCollection collection,
XmldbURI docId)
getParentCollection
public Collection getParentCollection()
throws XMLDBException
- Description copied from interface:
Resource
- Returns the
Collection instance that this resource is
associated with. All resources must exist within the context of a
collection.
- Specified by:
getParentCollection in interface Resource
- Returns:
- the collection associated with the resource.
- Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
getId
public String getId()
throws XMLDBException
- Description copied from interface:
Resource
- Returns the unique id for this
Resource or null if the
Resource is anonymous. The Resource will be
anonymous if it is obtained as the result of a query.
- Specified by:
getId in interface Resource
- 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.
getResourceType
public String getResourceType()
throws XMLDBException
- Description copied from interface:
Resource
- Returns the resource type for this Resource.
XML:DB defined resource types are:
XMLResource - all XML data stored in the database
BinaryResource - Binary blob data stored in the database
- Specified by:
getResourceType in interface Resource
- Returns:
- the resource type for the Resource.
- Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
getContent
public Object getContent()
throws XMLDBException
- Description copied from interface:
Resource
- Retrieves the content from the resource. The type of the content varies
depending what type of resource is being used.
- Specified by:
getContent in interface Resource
- Returns:
- the content of the resource.
- Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
setContent
public void setContent(Object value)
throws XMLDBException
- Description copied from interface:
Resource
- Sets the content for this resource. The type of content that can be set
depends on the type of resource being used.
- Specified by:
setContent in interface Resource
- Parameters:
value - the content value to set for the resource.
- Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
getCreationTime
public Date getCreationTime()
throws XMLDBException
- Specified by:
getCreationTime in interface EXistResource- Specified by:
getCreationTime in class AbstractEXistResource
- Throws:
XMLDBException
getLastModificationTime
public Date getLastModificationTime()
throws XMLDBException
- Specified by:
getLastModificationTime in interface EXistResource- Specified by:
getLastModificationTime in class AbstractEXistResource
- Throws:
XMLDBException
getMimeType
public String getMimeType()
throws XMLDBException
- Specified by:
getMimeType in interface EXistResource- Overrides:
getMimeType in class AbstractEXistResource
- Throws:
XMLDBException
getPermissions
public Permission getPermissions()
throws XMLDBException
- Specified by:
getPermissions in interface EXistResource- Specified by:
getPermissions in class AbstractEXistResource
- Throws:
XMLDBException
getContentLength
public int getContentLength()
throws XMLDBException
- Specified by:
getContentLength in interface EXistResource
- Throws:
XMLDBException
Copyright (C) Wolfgang Meier. All rights reserved.