|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.components.source.SourceDTO
public class SourceDTO
Data transfer object for a Source object.
| Constructor Summary | |
|---|---|
SourceDTO(Source source)
Create a data transfer object for a Source. |
|
SourceDTO(Source source,
boolean deep)
Create a data transfer object for a Source. |
|
| Method Summary | |
|---|---|
void |
addSourceLocks(SourceLock sourcelock)
Add a lock to this source |
boolean |
canCancel(OutputStream stream)
Can the data sent to an OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(OutputStream stream)
Cancel the data sent to an OutputStream returned by
getOutputStream(). |
void |
copyTo(Source source)
Copy the current source to a specified destination. |
void |
delete()
Delete the source. |
boolean |
exists()
Does this source actually exist ? |
String |
getAuthority()
Return the authority of a URI. |
Source |
getChild(String name)
|
Collection |
getChildren()
|
long |
getContentLength()
Return the content length of the content or -1 if the length is unknown. |
String |
getFragment()
Return the fragment of a URI. |
InputStream |
getInputStream()
Return an InputStream object to read from the source. |
long |
getLastModified()
Get the last modification date of the source or 0 if it is not possible to determine the date. |
String |
getLatestSourceRevision()
Get the latest revision |
String |
getMimeType()
The mime-type of the content described by this object. |
String |
getName()
|
OutputStream |
getOutputStream()
Get an OutputStream where raw bytes can be written to. |
Source |
getParent()
|
String |
getPath()
Return the path of a URI. |
String |
getQuery()
Return the query of a URI. |
String |
getScheme()
|
SourceLock[] |
getSourceLocks()
Returns a enumeration of the existing locks |
SourceProperty[] |
getSourceProperties()
Returns a enumeration of the properties |
SourceProperty |
getSourceProperty(String namespace,
String name)
Returns a property from a source. |
String |
getSourceRevision()
Get the current revision of the source |
String |
getSourceRevisionBranch()
Get the current branch of the revision from the source |
String |
getURI()
Return the unique identifer for this source |
SourceValidity |
getValidity()
Get the Validity object. |
boolean |
isCollection()
|
boolean |
isVersioned()
If this source versioned |
void |
makeCollection()
|
void |
moveTo(Source source)
Move the current source to a specified destination. |
void |
refresh()
Refresh the content of this object after the underlying data content has changed. |
void |
removeSourceProperty(String namespace,
String name)
Remove a specified source property. |
void |
setSourceProperty(SourceProperty property)
Sets a property for a source. |
void |
setSourceRevision(String revision)
Not implemented. |
void |
setSourceRevisionBranch(String branch)
Not implemented. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceDTO(Source source)
source - Source
public SourceDTO(Source source,
boolean deep)
source - Source| Method Detail |
|---|
public InputStream getInputStream()
throws IOException,
SourceException
InputStream object to read from the source.
This is the data at the point of invocation of this method,
so if this is Modifiable, you might get different content
from two different invocations.
getInputStream in interface SourceIOException - If an IO excepetion occurs.
SourceException - If an exception occurs.public String getURI()
getURI in interface Sourcepublic String getScheme()
getScheme in interface SourceSource.getScheme()public String getAuthority()
public String getPath()
public String getQuery()
public String getFragment()
public SourceValidity getValidity()
null is returned.
getValidity in interface Sourcepublic void refresh()
refresh in interface Sourcepublic String getMimeType()
getMimeType in interface Sourcepublic boolean exists()
exists in interface Sourcepublic long getContentLength()
getContentLength in interface Sourcepublic long getLastModified()
getLastModified in interface Source
public OutputStream getOutputStream()
throws IOException,
SourceException
OutputStream where raw bytes can be written to.
The signification of these bytes is implementation-dependent and
is not restricted to a serialized XML document.
getOutputStream in interface ModifiableSourceIOException
SourceExceptionpublic boolean canCancel(OutputStream stream)
OutputStream returned by
getOutputStream() be cancelled ?
canCancel in interface ModifiableSourcestream - The ouput stream, which should be cancelled.
public void cancel(OutputStream stream)
throws SourceException
OutputStream returned by
getOutputStream().
After cancel, the stream should no more be used.
cancel in interface ModifiableSourcestream - The ouput stream, which should be cancelled.
SourceException - If the ouput stream can't be cancelled.public void delete()
delete in interface ModifiableSource
public void makeCollection()
throws SourceException
makeCollection in interface ModifiableTraversableSourceSourceException
public Source getChild(String name)
throws SourceException
getChild in interface TraversableSourceSourceException
public Collection getChildren()
throws SourceException
getChildren in interface TraversableSourceSourceExceptionpublic String getName()
getName in interface TraversableSource
public Source getParent()
throws SourceException
getParent in interface TraversableSourceSourceExceptionpublic boolean isCollection()
isCollection in interface TraversableSource
public void moveTo(Source source)
throws SourceException
moveTo in interface MoveableSourcesource -
SourceException - If an exception occurs during the move.
public void copyTo(Source source)
throws SourceException
copyTo in interface MoveableSourcesource -
SourceException - If an exception occurs during the copy.
public SourceProperty getSourceProperty(String namespace,
String name)
throws SourceException
getSourceProperty in interface InspectableSourcenamespace - Namespace of the propertyname - Name of the property
SourceException - If an exception occurs.
public void setSourceProperty(SourceProperty property)
throws SourceException
setSourceProperty in interface InspectableSourceproperty - Property of the source
SourceException - If an exception occurs during this operation
public SourceProperty[] getSourceProperties()
throws SourceException
getSourceProperties in interface InspectableSourceSourceException - If an exception occurs.
public void removeSourceProperty(String namespace,
String name)
throws SourceException
removeSourceProperty in interface InspectableSourcenamespace - Namespace of the property.name - Name of the property.
SourceException - If an exception occurs.
public void addSourceLocks(SourceLock sourcelock)
throws SourceException
addSourceLocks in interface LockableSourcesourcelock - Lock, which should be added
SourceException - If an exception occurs during this operation
public SourceLock[] getSourceLocks()
throws SourceException
getSourceLocks in interface LockableSourceSourceException - If an exception occurs.
public boolean isVersioned()
throws SourceException
isVersioned in interface VersionableSourceSourceException - If an exception occurs.public String getSourceRevision()
getSourceRevision in interface VersionableSource
public void setSourceRevision(String revision)
throws SourceException
setSourceRevision in interface VersionableSourcerevision - The revision, which should be used.
SourceException - If an exception occurs.
public String getSourceRevisionBranch()
throws SourceException
getSourceRevisionBranch in interface VersionableSourceSourceException - If an exception occurs.
public void setSourceRevisionBranch(String branch)
throws SourceException
setSourceRevisionBranch in interface VersionableSourcebranch - The branch, which should be used.
SourceException - If an exception occurs.
public String getLatestSourceRevision()
throws SourceException
getLatestSourceRevision in interface VersionableSourceSourceException - If an exception occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||