org.apache.lenya.cms.cocoon.source
Class RepositorySource

java.lang.Object
  extended by org.apache.excalibur.source.impl.AbstractSource
      extended by org.apache.lenya.cms.cocoon.source.RepositorySource
All Implemented Interfaces:
org.apache.excalibur.source.ModifiableSource, org.apache.excalibur.source.ModifiableTraversableSource, org.apache.excalibur.source.Source, org.apache.excalibur.source.TraversableSource

public class RepositorySource
extends org.apache.excalibur.source.impl.AbstractSource
implements org.apache.excalibur.source.ModifiableTraversableSource

Repository source.

Version:
$Id: RepositorySource.java 569341 2007-08-24 10:47:38Z andreas $

Field Summary
protected static java.lang.String SCHEME
           
 
Constructor Summary
RepositorySource(org.apache.avalon.framework.service.ServiceManager manager, java.lang.String uri, Session session, org.apache.avalon.framework.logger.Logger logger)
           
 
Method Summary
 boolean canCancel(java.io.OutputStream arg0)
           
 void cancel(java.io.OutputStream arg0)
           
protected  java.io.InputStream convert(org.w3c.dom.Document edoc)
           
 void delete()
           
 boolean exists()
           
 org.apache.excalibur.source.Source getChild(java.lang.String name)
           
 java.util.Collection getChildren()
           
 ContentHolder getContent()
           
 long getContentLength()
           
 java.io.InputStream getInputStream()
           
 long getLastModified()
           
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
 java.lang.String getMimeType()
           
 java.lang.String getName()
           
 Node getNode()
           
 java.io.OutputStream getOutputStream()
           
 org.apache.excalibur.source.Source getParent()
           
 java.lang.String getSourceURI()
           
 org.apache.excalibur.source.SourceValidity getValidity()
           
 boolean isCollection()
           
 void makeCollection()
           
 
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
checkInfos, getInfos, getScheme, getURI, refresh, setContentLength, setLastModified, setScheme, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.excalibur.source.Source
getScheme, getURI, refresh
 
Methods inherited from interface org.apache.excalibur.source.Source
getScheme, getURI, refresh
 

Field Detail

SCHEME

protected static final java.lang.String SCHEME
See Also:
Constant Field Values
Constructor Detail

RepositorySource

public RepositorySource(org.apache.avalon.framework.service.ServiceManager manager,
                        java.lang.String uri,
                        Session session,
                        org.apache.avalon.framework.logger.Logger logger)
                 throws org.apache.excalibur.source.SourceException,
                        java.net.MalformedURLException
Parameters:
manager - The service manager.
uri - The source URI.
session - The repository session.
logger - The logger.
Throws:
org.apache.excalibur.source.SourceException - if an error occurs.
java.net.MalformedURLException - if an error occurs.
Method Detail

getNode

public Node getNode()
Returns:
The repository node which is accessed by this source.

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface org.apache.excalibur.source.ModifiableSource
Throws:
java.io.IOException
See Also:
ModifiableSource.getOutputStream()

delete

public void delete()
Specified by:
delete in interface org.apache.excalibur.source.ModifiableSource
See Also:
ModifiableSource.delete()

canCancel

public boolean canCancel(java.io.OutputStream arg0)
Specified by:
canCancel in interface org.apache.excalibur.source.ModifiableSource
See Also:
ModifiableSource.canCancel(java.io.OutputStream)

cancel

public void cancel(java.io.OutputStream arg0)
            throws java.io.IOException
Specified by:
cancel in interface org.apache.excalibur.source.ModifiableSource
Throws:
java.io.IOException
See Also:
ModifiableSource.cancel(java.io.OutputStream)

exists

public boolean exists()
Specified by:
exists in interface org.apache.excalibur.source.Source
See Also:
Source.exists()

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException,
                                          org.apache.excalibur.source.SourceNotFoundException
Specified by:
getInputStream in interface org.apache.excalibur.source.Source
Overrides:
getInputStream in class org.apache.excalibur.source.impl.AbstractSource
Throws:
java.io.IOException
org.apache.excalibur.source.SourceNotFoundException
See Also:
Source.getInputStream()

convert

protected java.io.InputStream convert(org.w3c.dom.Document edoc)
                               throws java.io.IOException
Throws:
java.io.IOException

getContent

public ContentHolder getContent()
Returns:
The content of this source.

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface org.apache.excalibur.source.Source
Overrides:
getContentLength in class org.apache.excalibur.source.impl.AbstractSource
See Also:
Source.getContentLength()

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface org.apache.excalibur.source.Source
Overrides:
getLastModified in class org.apache.excalibur.source.impl.AbstractSource
See Also:
Source.getLastModified()

getSourceURI

public java.lang.String getSourceURI()
Returns:
The source URI.

getMimeType

public java.lang.String getMimeType()
Specified by:
getMimeType in interface org.apache.excalibur.source.Source
Overrides:
getMimeType in class org.apache.excalibur.source.impl.AbstractSource
See Also:
Source.getMimeType()

getParent

public org.apache.excalibur.source.Source getParent()
Specified by:
getParent in interface org.apache.excalibur.source.TraversableSource

makeCollection

public void makeCollection()
Specified by:
makeCollection in interface org.apache.excalibur.source.ModifiableTraversableSource

getName

public java.lang.String getName()
Specified by:
getName in interface org.apache.excalibur.source.TraversableSource

getChild

public org.apache.excalibur.source.Source getChild(java.lang.String name)
Specified by:
getChild in interface org.apache.excalibur.source.TraversableSource

getChildren

public java.util.Collection getChildren()
Specified by:
getChildren in interface org.apache.excalibur.source.TraversableSource

isCollection

public boolean isCollection()
Specified by:
isCollection in interface org.apache.excalibur.source.TraversableSource

getValidity

public org.apache.excalibur.source.SourceValidity getValidity()
Specified by:
getValidity in interface org.apache.excalibur.source.Source
Overrides:
getValidity in class org.apache.excalibur.source.impl.AbstractSource


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.