public class XMLDocument extends AbstractIndexableDocument implements ParsableDocument
AbstractIndexableDocument.StoreHandlerSdxObject.ConfigurationNode_boost, _currentFieldBoost, _msgHandler, _xmlFieldList, _xmlFieldOutput, _xmlFieldTransformer, attachedDocuments, characterBuffer, contentHandler, currentFieldName, DOC_ATTACHEDOC_ELEMENT_NAME, DOC_FIELD_ELEMENT_NAME, DOC_MSG_ELEMENT_NAME, DOC_NAMESPACE, DOC_ROOT_ELEMENT_NAME, lexicalHandler, nsTable, openSdxDocElems, properties, storeHandler, subDoc, subDocBytes, subDocuments, transformedDoc, withinSdxElement, withinXmlField, xmlConsumeridGenerator, idPrefix, idSuffix, mimeType, storeRepo_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 |
|---|
XMLDocument()
Creates a document.
|
XMLDocument(java.lang.String id)
Creates a document with a given id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalSystemFields(org.apache.lucene.document.Document doc)
Some additional system fields adding to the Lucene document
|
java.lang.String |
getDocType()
Gets the docType for the document
|
int |
getLength()
Returns the length of the document.
|
java.lang.String |
getMimeType()
Returns the mimeType field (A String) for this document
|
java.io.InputStream |
openStream()
Opens a stream for reading the document's content.
|
void |
parse(org.apache.excalibur.xml.sax.SAXParser parser)
Parses the document.
|
void |
parse(org.apache.excalibur.xml.sax.SAXParser parser,
org.apache.cocoon.xml.XMLConsumer consumer)
Parses a document using a specific consumer.
|
void |
setContent(org.w3c.dom.Document d)
Set the content as a DOM.
|
void |
setTransformedDocument(byte[] content)
Set's the transformed document for the parent document.
|
void |
setTransformedDocument(java.io.File file)
Set's the transformed document for the parent document.
|
void |
startIndexing(org.apache.excalibur.xml.sax.SAXParser parser,
org.apache.cocoon.xml.XMLConsumer consumer)
Starts the indexing process.
|
addAttachedDocument, characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, generateId, getAttachedDocuments, getAttachedDocumentsSize, getBoost, getFieldValues, getStoreHandler, getSubDocuments, getSubDocumentsSize, getTransformedDocument, handleDocumentId, ignorableWhitespace, processingInstruction, resetAttachedDocuments, resetFields, setAttachedDocuments, setBoost, setConsumer, setContentHandler, setDocumentLocator, setLexicalHandler, setMessageHandler, setUpdateAttachedDocuments, setUpTransformedDocument, setXMLFieldList, setXMLTransformerHandler, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, updateAttachedDocumentsgetClassNameSuffix, getInputSource, getPreferredFilename, getRepositoryForStorage, getURL, initToSax, initVolatileObjectsToSax, save, setContent, setContent, setContent, setContent, setIdGenerator, setIdGenerator, setMimeType, setPreferredFilename, setPreferredFilename, setRepositoryForStorage, setURLconfigure, 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, waitgetPreferredFilename, getRepositoryForStorage, getURL, save, setContent, setContent, setContent, setContent, setId, setIdGenerator, setIdGenerator, setMimeType, setPreferredFilename, setRepositoryForStorage, setURLgetIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangpublic XMLDocument(java.lang.String id)
throws SDXException
id - The document's id.
If logging is desired the super.getLog() should be set after creation.SDXExceptionAbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)public XMLDocument()
public java.io.InputStream openStream()
throws SDXException
openStream in interface DocumentopenStream in class AbstractDocumentSDXExceptionpublic void setContent(org.w3c.dom.Document d)
public int getLength()
getLength in interface DocumentgetLength in class AbstractDocumentpublic void parse(org.apache.excalibur.xml.sax.SAXParser parser)
throws SDXException
parse in interface ParsableDocumentparser - The parser to useSDXExceptionpublic void startIndexing(org.apache.excalibur.xml.sax.SAXParser parser,
org.apache.cocoon.xml.XMLConsumer consumer)
throws SDXException
startIndexing in interface IndexableDocumentparser - The parser to useconsumer - The consumer for the events generated by the indexing processSDXExceptionpublic void parse(org.apache.excalibur.xml.sax.SAXParser parser,
org.apache.cocoon.xml.XMLConsumer consumer)
throws SDXException
parse in interface ParsableDocumentparser - The parser to useconsumer - The consumer of the events generated by the parseSDXExceptionpublic java.lang.String getDocType()
getDocType in interface Documentpublic void setTransformedDocument(byte[] content)
throws SDXException
setTransformedDocument in interface IndexableDocumentcontent - The byte array of dataSDXExceptionpublic void setTransformedDocument(java.io.File file)
throws SDXException
setTransformedDocument in interface IndexableDocumentfile - The transformed document fileSDXExceptionpublic java.lang.String getMimeType()
getMimeType in interface DocumentgetMimeType in class AbstractDocumentpublic void addAdditionalSystemFields(org.apache.lucene.document.Document doc)
addAdditionalSystemFields in interface IndexableDocumentCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.