|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A document that can be managed by SDX.
SDX is mainly a search engine for XML documents, but these documents can be linked with other documents or they may not be in XML at first. That's why we abstracted the concept of documents with this interface.
Field Summary | |
static java.lang.String |
DOCTYPE_BINARY
doctype Binary |
static java.lang.String |
DOCTYPE_GROUP
doctype Group |
static java.lang.String |
DOCTYPE_HTML
doctype HTMLDocument |
static java.lang.String |
DOCTYPE_USER
doctype User |
static java.lang.String |
DOCTYPE_XML
doctype XMLDocument |
Method Summary | |
java.lang.String |
getDocType()
Gets the docType for the document |
java.lang.String |
getId()
Returns the document's id. |
int |
getLength()
Returns the length of the document (-1 if length can't be known). |
java.lang.String |
getMimeType()
Returns the mimeType field (A String) for this document |
java.lang.String |
getPreferredFilename()
Returns a preferred filename for this document. |
java.lang.String |
getRepositoryForStorage()
|
java.net.URL |
getURL()
Returns a URL for this document, null if no URL can be given. |
java.io.InputStream |
openStream()
Opens a stream for reading the document's content. |
void |
save(Repository r)
Saves the document within a repository. |
void |
setContent(byte[] b)
Sets the content from a memory representation of the raw data. |
void |
setContent(java.io.File f)
Sets the content from a file. |
void |
setContent(java.io.InputStream is)
Sets the content from an InputStream. |
void |
setContent(java.net.URL r)
Sets the content from a URL. |
void |
setId(java.lang.String id)
Sets the document's id. |
void |
setIdGenerator(IDGenerator idGen)
|
void |
setIdGenerator(IDGenerator idGen,
java.lang.String idPrefix,
java.lang.String idSuffix)
|
void |
setMimeType(java.lang.String mimeType)
Sets the mime type for the document |
void |
setPreferredFilename(java.lang.String filename)
Sets the preferred filename for this document. |
void |
setRepositoryForStorage(java.lang.String repoId)
Sets the id of the repository in which the document should be stored |
void |
setURL(java.net.URL url)
Sets the URL of this document. |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
Field Detail |
public static final java.lang.String DOCTYPE_HTML
public static final java.lang.String DOCTYPE_XML
public static final java.lang.String DOCTYPE_USER
public static final java.lang.String DOCTYPE_GROUP
public static final java.lang.String DOCTYPE_BINARY
Method Detail |
public java.lang.String getId()
public void setId(java.lang.String id) throws SDXException
SDXException
public java.io.InputStream openStream() throws SDXException
SDXException
public void setContent(byte[] b)
public void setContent(java.io.File f)
public void setContent(java.net.URL r)
public void setContent(java.io.InputStream is)
public void save(Repository r) throws SDXException
SDXException
public int getLength()
public java.lang.String getPreferredFilename()
public java.net.URL getURL() throws SDXException
SDXException
public void setURL(java.net.URL url)
public java.lang.String getMimeType()
public void setMimeType(java.lang.String mimeType)
public java.lang.String getDocType()
public void setPreferredFilename(java.lang.String filename)
public void setIdGenerator(IDGenerator idGen, java.lang.String idPrefix, java.lang.String idSuffix)
public void setIdGenerator(IDGenerator idGen)
public java.lang.String getRepositoryForStorage()
public void setRepositoryForStorage(java.lang.String repoId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |