|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
---|
SdxObject.ConfigurationNode |
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME_SUFFIX
|
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 |
Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable |
---|
DEFAULT_ENCODING |
Method Summary | |
---|---|
java.lang.String |
getDocType()
Gets the docType for the document |
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 fr.gouv.culture.sdx.utils.SdxObject |
---|
getLog |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
---|
enableLogging |
Methods inherited from interface org.apache.avalon.framework.context.Contextualizable |
---|
contextualize |
Methods inherited from interface org.apache.avalon.framework.service.Serviceable |
---|
service |
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable |
---|
configure |
Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable |
---|
getId |
Methods inherited from interface fr.gouv.culture.sdx.utils.Describable |
---|
getDescription, setDescription |
Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable |
---|
getEncoding, setEncoding |
Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable |
---|
getLocale, getXmlLang, setLocale, setXmlLang |
Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable |
---|
toSAX |
Field Detail |
---|
static final java.lang.String CLASS_NAME_SUFFIX
static final java.lang.String DOCTYPE_HTML
static final java.lang.String DOCTYPE_XML
static final java.lang.String DOCTYPE_USER
static final java.lang.String DOCTYPE_GROUP
static final java.lang.String DOCTYPE_BINARY
Method Detail |
---|
void setId(java.lang.String id) throws SDXException
setId
in interface Identifiable
SDXException
java.io.InputStream openStream() throws SDXException
SDXException
void setContent(byte[] b)
void setContent(java.io.File f)
void setContent(java.net.URL r)
void setContent(java.io.InputStream is)
void save(Repository r) throws SDXException
SDXException
int getLength()
java.lang.String getPreferredFilename()
java.net.URL getURL() throws SDXException
SDXException
void setURL(java.net.URL url)
java.lang.String getMimeType()
void setMimeType(java.lang.String mimeType)
java.lang.String getDocType()
void setPreferredFilename(java.lang.String filename)
void setIdGenerator(IDGenerator idGen, java.lang.String idPrefix, java.lang.String idSuffix)
void setIdGenerator(IDGenerator idGen)
java.lang.String getRepositoryForStorage()
void setRepositoryForStorage(java.lang.String repoId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |