org.exist.xmldb
Class RemoteBinaryResource

java.lang.Object
  extended byorg.exist.xmldb.RemoteBinaryResource
All Implemented Interfaces:
BinaryResource, EXistResource, Resource

public class RemoteBinaryResource
extends java.lang.Object
implements BinaryResource, EXistResource

Author:
wolf

Field Summary
 
Fields inherited from interface org.xmldb.api.modules.BinaryResource
RESOURCE_TYPE
 
Constructor Summary
RemoteBinaryResource(RemoteCollection parent, XmldbURI documentName)
           
 
Method Summary
 java.lang.Object getContent()
          Retrieves the content from the resource.
 int getContentLength()
           
 java.util.Date getCreationTime()
           
 org.w3c.dom.DocumentType getDocType()
           
 java.lang.String getId()
          Returns the unique id for this Resource or null if the Resource is anonymous.
 java.util.Date getLastModificationTime()
           
 java.lang.String getMimeType()
           
 Collection getParentCollection()
          Returns the Collection instance that this resource is associated with.
 Permission getPermissions()
           
 java.lang.String getResourceType()
          Returns the resource type for this Resource.
 void setContent(java.lang.Object obj)
          Sets the content for this resource.
 void setContentLength(int len)
           
 void setDocType(org.w3c.dom.DocumentType doctype)
           
 void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
           
 void setMimeType(java.lang.String mime)
           
 void setPermissions(Permission perms)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteBinaryResource

public RemoteBinaryResource(RemoteCollection parent,
                            XmldbURI documentName)
                     throws XMLDBException
Method Detail

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 java.lang.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 java.lang.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 java.lang.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(java.lang.Object obj)
                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:
obj - 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 java.util.Date getCreationTime()
                               throws XMLDBException
Specified by:
getCreationTime in interface EXistResource
Throws:
XMLDBException

getLastModificationTime

public java.util.Date getLastModificationTime()
                                       throws XMLDBException
Specified by:
getLastModificationTime in interface EXistResource
Throws:
XMLDBException

setPermissions

public void setPermissions(Permission perms)

getPermissions

public Permission getPermissions()
Specified by:
getPermissions in interface EXistResource

setContentLength

public void setContentLength(int len)

getContentLength

public int getContentLength()
                     throws XMLDBException
Specified by:
getContentLength in interface EXistResource
Throws:
XMLDBException

setLexicalHandler

public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Specified by:
setLexicalHandler in interface EXistResource

setMimeType

public void setMimeType(java.lang.String mime)
Specified by:
setMimeType in interface EXistResource

getMimeType

public java.lang.String getMimeType()
Specified by:
getMimeType in interface EXistResource

getDocType

public org.w3c.dom.DocumentType getDocType()
                                    throws XMLDBException
Specified by:
getDocType in interface EXistResource
Throws:
XMLDBException

setDocType

public void setDocType(org.w3c.dom.DocumentType doctype)
                throws XMLDBException
Specified by:
setDocType in interface EXistResource
Throws:
XMLDBException


Copyright (C) Wolfgang Meier. All rights reserved.