public abstract class AbstractDocument extends AbstractSdxObject implements Document
Implements all methods from the Document interface.
SdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
protected IDGenerator |
idGenerator
The id generator for the document
|
protected java.lang.String |
idPrefix
Prefix for generated id's
|
protected java.lang.String |
idSuffix
Suffix for generated id's
|
protected java.lang.String |
mimeType
The mime type of the document.
|
protected java.lang.String |
storeRepo
The id of the repository in which the document should be stored
|
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedCLASS_NAME_SUFFIX, DOCTYPE_BINARY, DOCTYPE_GROUP, DOCTYPE_HTML, DOCTYPE_USER, DOCTYPE_XMLDEFAULT_ENCODING| Constructor and Description |
|---|
AbstractDocument() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output
|
protected org.xml.sax.InputSource |
getInputSource()
Returns a SAX InputSource for this document
|
int |
getLength()
Returns the length of the document.
|
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()
Sets the URL according to the source.
|
java.net.URL |
getURL()
Returns a URL for this document, null if no URL can be given.
|
protected boolean |
initToSax()
Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
|
protected void |
initVolatileObjectsToSax()
Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML
Some objects need to be refresh each time a toSAX is called
|
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 u)
Sets the content from a URL.
|
void |
setIdGenerator(IDGenerator idGen) |
void |
setIdGenerator(IDGenerator idGen,
java.lang.String idPrefix,
java.lang.String idSuffix) |
void |
setMimeType(java.lang.String mimeType)
Sets the mimeType field (A String) for this document
|
protected void |
setPreferredFilename()
Sets the preferred filename according to the source.
|
void |
setPreferredFilename(java.lang.String filename)
Sets the preferred filename.
|
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.
|
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResourcesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDocType, setIdgetIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangprotected java.lang.String storeRepo
protected java.lang.String mimeType
protected IDGenerator idGenerator
protected java.lang.String idPrefix
protected java.lang.String idSuffix
public java.io.InputStream openStream()
throws SDXException
openStream in interface DocumentSDXExceptionprotected org.xml.sax.InputSource getInputSource()
throws SDXException
SDXExceptionpublic java.lang.String getMimeType()
getMimeType in interface Documentpublic void setMimeType(java.lang.String mimeType)
setMimeType in interface Documentpublic void setContent(byte[] b)
setContent in interface Documentpublic void setContent(java.io.File f)
setContent in interface Documentpublic void setContent(java.net.URL u)
setContent in interface Documentpublic void setContent(java.io.InputStream is)
DocumentsetContent in interface Documentpublic void save(Repository r) throws SDXException
save in interface Documentr - The repository where to save the document.SDXExceptionpublic int getLength()
public java.lang.String getPreferredFilename()
getPreferredFilename in interface Documentprotected void setPreferredFilename()
public java.net.URL getURL()
throws SDXException
getURL in interface DocumentSDXExceptionpublic void setURL(java.net.URL url)
public void setPreferredFilename(java.lang.String filename)
setPreferredFilename in interface Documentfilename - The filename (may be null).public void setIdGenerator(IDGenerator idGen)
setIdGenerator in interface Documentpublic void setIdGenerator(IDGenerator idGen, java.lang.String idPrefix, java.lang.String idSuffix)
setIdGenerator in interface Documentpublic java.lang.String getRepositoryForStorage()
getRepositoryForStorage in interface Documentpublic void setRepositoryForStorage(java.lang.String repoId)
DocumentsetRepositoryForStorage in interface Documentprotected java.lang.String getClassNameSuffix()
AbstractSdxObjectgetClassNameSuffix in class AbstractSdxObjectprotected boolean initToSax()
AbstractSdxObjectinitToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxObjectCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.