org.exist.xmldb
Class AbstractRemoteResource

java.lang.Object
  extended by org.exist.xmldb.AbstractRemoteResource
All Implemented Interfaces:
EXistResource, ExtendedResource, org.xmldb.api.base.Resource
Direct Known Subclasses:
RemoteBinaryResource, RemoteXMLResource

public abstract class AbstractRemoteResource
extends Object
implements EXistResource, ExtendedResource, org.xmldb.api.base.Resource


Constructor Summary
AbstractRemoteResource(RemoteCollection parent, XmldbURI documentName)
           
 
Method Summary
 void freeLocalResources()
          It erases the internal reference to any file set with getContentIntoAFile, either explicitly or implicitly using, for instance, getStreamContent.
 Object getContent()
           
 void getContentIntoAFile(File localfile)
          It saves the resource to the local file given as input parameter.
 int getContentLength()
           
 Date getCreationTime()
           
 long getExtendedContentLength()
           
 Date getLastModificationTime()
           
 String getMimeType()
           
 org.xmldb.api.base.Collection getParentCollection()
           
 Permission getPermissions()
           
 void setContentLength(int len)
           
 void setMimeType(String mime)
           
 void setPermissions(Permission perms)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exist.xmldb.EXistResource
getDocType, setDocType, setLexicalHandler
 
Methods inherited from interface org.exist.xmldb.ExtendedResource
getContentIntoAStream, getExtendedContent, getStreamContent, getStreamLength
 
Methods inherited from interface org.xmldb.api.base.Resource
getId, getResourceType, setContent
 

Constructor Detail

AbstractRemoteResource

public AbstractRemoteResource(RemoteCollection parent,
                              XmldbURI documentName)
                       throws org.xmldb.api.base.XMLDBException
Throws:
org.xmldb.api.base.XMLDBException
Method Detail

freeLocalResources

public void freeLocalResources()
Description copied from interface: ExtendedResource
It erases the internal reference to any file set with getContentIntoAFile, either explicitly or implicitly using, for instance, getStreamContent.

Specified by:
freeLocalResources in interface ExtendedResource

getContent

public Object getContent()
                  throws org.xmldb.api.base.XMLDBException
Specified by:
getContent in interface org.xmldb.api.base.Resource
Throws:
org.xmldb.api.base.XMLDBException

getContentLength

public int getContentLength()
                     throws org.xmldb.api.base.XMLDBException
Specified by:
getContentLength in interface EXistResource
Throws:
org.xmldb.api.base.XMLDBException

getCreationTime

public Date getCreationTime()
                     throws org.xmldb.api.base.XMLDBException
Specified by:
getCreationTime in interface EXistResource
Throws:
org.xmldb.api.base.XMLDBException

getExtendedContentLength

public long getExtendedContentLength()
                              throws org.xmldb.api.base.XMLDBException
Throws:
org.xmldb.api.base.XMLDBException

getLastModificationTime

public Date getLastModificationTime()
                             throws org.xmldb.api.base.XMLDBException
Specified by:
getLastModificationTime in interface EXistResource
Throws:
org.xmldb.api.base.XMLDBException

getMimeType

public String getMimeType()
Specified by:
getMimeType in interface EXistResource

getParentCollection

public org.xmldb.api.base.Collection getParentCollection()
                                                  throws org.xmldb.api.base.XMLDBException
Specified by:
getParentCollection in interface org.xmldb.api.base.Resource
Throws:
org.xmldb.api.base.XMLDBException

getPermissions

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

setContentLength

public void setContentLength(int len)

setMimeType

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

setPermissions

public void setPermissions(Permission perms)

getContentIntoAFile

public void getContentIntoAFile(File localfile)
                         throws org.xmldb.api.base.XMLDBException
Description copied from interface: ExtendedResource
It saves the resource to the local file given as input parameter. Do NOT confuse with set content.

Specified by:
getContentIntoAFile in interface ExtendedResource
Throws:
org.xmldb.api.base.XMLDBException


Copyright (C) Wolfgang Meier. All rights reserved.