public abstract class AbstractIndexableDocument extends AbstractDocument implements IndexableDocument
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractIndexableDocument.StoreHandler |
SdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
protected float |
_boost |
protected float |
_currentFieldBoost |
protected org.xml.sax.ContentHandler |
_msgHandler |
protected java.util.HashMap |
_xmlFieldList
list of fields with a a XML type
|
protected java.io.ByteArrayOutputStream |
_xmlFieldOutput
The output of the parsed xml field
|
protected javax.xml.transform.sax.TransformerHandler |
_xmlFieldTransformer
The transfomer used to parse the xml fields
|
protected java.util.Vector |
attachedDocuments
A list of attached documents
|
protected java.lang.StringBuffer |
characterBuffer
A character buffer for element content.
|
protected org.xml.sax.ContentHandler |
contentHandler
The
ContentHandler receiving SAX events. |
protected java.lang.String |
currentFieldName
The current field name
|
protected java.lang.String |
DOC_ATTACHEDOC_ELEMENT_NAME |
protected java.lang.String |
DOC_FIELD_ELEMENT_NAME |
protected java.lang.String |
DOC_MSG_ELEMENT_NAME |
protected java.lang.String |
DOC_NAMESPACE |
protected java.lang.String |
DOC_ROOT_ELEMENT_NAME |
protected org.xml.sax.ext.LexicalHandler |
lexicalHandler
The
LexicalHandler receiving SAX events. |
protected org.apache.avalon.framework.parameters.Parameters |
nsTable |
protected int |
openSdxDocElems |
protected java.util.Vector |
properties
List of fields for indexing.
|
protected AbstractIndexableDocument.StoreHandler |
storeHandler |
protected IndexableDocument |
subDoc |
protected java.io.ByteArrayOutputStream |
subDocBytes |
protected java.util.Vector |
subDocuments
A list of sub(Indexable) documents
|
protected IndexableDocument |
transformedDoc
A document resulting from a transformation
|
protected boolean |
withinSdxElement |
protected boolean |
withinXmlField |
protected org.apache.cocoon.xml.XMLConsumer |
xmlConsumer
The
XMLConsumer receiving SAX events. |
idGenerator, 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 |
|---|
AbstractIndexableDocument() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachedDocument(java.lang.String id,
java.net.URL baseURL,
java.lang.String url,
java.lang.String mimetype,
java.lang.String repoId)
Add an attached document to the list for this document.
|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] chars,
int i,
int i1)
Currently has no function
|
void |
endCDATA()
Currently has no function
|
void |
endDocument()
Currently has no function
|
void |
endDTD()
Currently has no function
|
void |
endElement(java.lang.String nsURI,
java.lang.String name,
java.lang.String qName) |
void |
endEntity(java.lang.String s)
Currently has no function
|
void |
endPrefixMapping(java.lang.String s)
Currently has no function
|
protected java.lang.String |
generateId() |
java.util.Enumeration |
getAttachedDocuments()
Retrieves an Enumeration of attached documents
|
int |
getAttachedDocumentsSize() |
float |
getBoost()
Gets a boost factor for scoring (currently Lucene specific)
|
java.util.Enumeration |
getFieldValues()
Returns field values.
|
AbstractIndexableDocument.StoreHandler |
getStoreHandler() |
java.util.Enumeration |
getSubDocuments()
Retrieves an Enumeration of sub(Indexable) documents
|
int |
getSubDocumentsSize() |
IndexableDocument |
getTransformedDocument()
Returns the transformed document object or
null if no transformed document
during the indexation pipeline |
protected void |
handleDocumentId(org.xml.sax.Attributes atts) |
void |
ignorableWhitespace(char[] chars,
int i,
int i1)
Currently has no function
|
void |
processingInstruction(java.lang.String s,
java.lang.String s1)
Currently has no function
|
void |
resetAttachedDocuments()
Reinits the Vector of attached documents
|
protected void |
resetFields()
Resets the objects we need to store indexation data
or creates them if they do not exist
|
void |
setAttachedDocuments(java.util.Vector list)
Set's the list of attached documents for this document.
|
void |
setBoost(float boost)
Sets a boost factor for scoring (currently Lucene specific)
|
void |
setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Set the
XMLConsumer that will receive XML data. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the
ContentHandler that will receive XML data. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Currently has no function
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the
LexicalHandler that will receive XML data. |
void |
setMessageHandler(org.xml.sax.ContentHandler handler) |
void |
setUpdateAttachedDocuments(boolean updateAttachedDocuments)
Indicates wheter the list of attached documents must be refreshed.
|
protected void |
setUpTransformedDocument() |
void |
setXMLFieldList(java.util.HashMap fieldList)
Sets the XMLFieldList of the DocumentBase where the document is stored.
|
void |
setXMLTransformerHandler(javax.xml.transform.sax.TransformerHandler xmlFieldTransformer)
Sets the XMLTransformer used to parse the xml fields
|
void |
skippedEntity(java.lang.String s)
Currently has no function
|
void |
startCDATA()
Currently has no function
|
void |
startDocument()
Currently has no function
|
void |
startDTD(java.lang.String s,
java.lang.String s1,
java.lang.String s2)
Currently has no function
|
void |
startElement(java.lang.String nsURI,
java.lang.String name,
java.lang.String qName,
org.xml.sax.Attributes atts) |
void |
startEntity(java.lang.String s)
Currently has no function
|
void |
startPrefixMapping(java.lang.String s,
java.lang.String s1)
Currently has no function
|
boolean |
updateAttachedDocuments()
Indicates wheter the documents must be refreshed.
|
getClassNameSuffix, getInputSource, getLength, getMimeType, getPreferredFilename, getRepositoryForStorage, getURL, initToSax, initVolatileObjectsToSax, openStream, 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, waitaddAdditionalSystemFields, setTransformedDocument, setTransformedDocument, startIndexinggetDocType, getLength, getMimeType, getPreferredFilename, getRepositoryForStorage, getURL, openStream, save, setContent, setContent, setContent, setContent, setId, setIdGenerator, setIdGenerator, setMimeType, setPreferredFilename, setRepositoryForStorage, setURLgetIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangprotected java.lang.String DOC_NAMESPACE
protected java.lang.String DOC_ROOT_ELEMENT_NAME
protected java.lang.String DOC_FIELD_ELEMENT_NAME
protected java.lang.String DOC_ATTACHEDOC_ELEMENT_NAME
protected java.lang.String DOC_MSG_ELEMENT_NAME
protected org.apache.avalon.framework.parameters.Parameters nsTable
protected java.util.Vector properties
protected java.lang.StringBuffer characterBuffer
protected java.lang.String currentFieldName
protected int openSdxDocElems
protected java.util.Vector attachedDocuments
protected java.util.Vector subDocuments
protected IndexableDocument transformedDoc
protected IndexableDocument subDoc
protected java.io.ByteArrayOutputStream subDocBytes
protected boolean withinSdxElement
protected boolean withinXmlField
protected org.xml.sax.ContentHandler _msgHandler
protected float _boost
Document.boostprotected float _currentFieldBoost
protected java.util.HashMap _xmlFieldList
protected javax.xml.transform.sax.TransformerHandler _xmlFieldTransformer
protected java.io.ByteArrayOutputStream _xmlFieldOutput
protected org.apache.cocoon.xml.XMLConsumer xmlConsumer
XMLConsumer receiving SAX events.protected org.xml.sax.ContentHandler contentHandler
ContentHandler receiving SAX events.protected org.xml.sax.ext.LexicalHandler lexicalHandler
LexicalHandler receiving SAX events.protected AbstractIndexableDocument.StoreHandler storeHandler
public void startElement(java.lang.String nsURI,
java.lang.String name,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionprotected void handleDocumentId(org.xml.sax.Attributes atts)
throws SDXException
SDXExceptionprotected java.lang.String generateId()
throws SDXException
SDXExceptionpublic void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void comment(char[] chars,
int i,
int i1)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endCDATA()
throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endDTD()
throws org.xml.sax.SAXException
endDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void endEntity(java.lang.String s)
throws org.xml.sax.SAXException
endEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endPrefixMapping(java.lang.String s)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void ignorableWhitespace(char[] chars,
int i,
int i1)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void processingInstruction(java.lang.String s,
java.lang.String s1)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlerpublic void skippedEntity(java.lang.String s)
throws org.xml.sax.SAXException
skippedEntity in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void startCDATA()
throws org.xml.sax.SAXException
startCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startDTD(java.lang.String s,
java.lang.String s1,
java.lang.String s2)
throws org.xml.sax.SAXException
startDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void startEntity(java.lang.String s)
throws org.xml.sax.SAXException
startEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startPrefixMapping(java.lang.String s,
java.lang.String s1)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String nsURI,
java.lang.String name,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
XMLConsumer that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer).public void setContentHandler(org.xml.sax.ContentHandler handler)
ContentHandler that will receive XML data.
ContentHandler instance
accessing the protected super.contentHandler field.public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
LexicalHandler that will receive XML data.
LexicalHandler instance
accessing the protected super.lexicalHandler field.java.lang.IllegalStateException - If the LexicalHandler or
the XMLConsumer were
already set.public java.util.Enumeration getFieldValues()
getFieldValues in interface IndexableDocumentpublic void addAttachedDocument(java.lang.String id,
java.net.URL baseURL,
java.lang.String url,
java.lang.String mimetype,
java.lang.String repoId)
throws SDXException
id - The document id.baseURL - The base URL, usually the parent document's URLurl - URL of the attached document.mimetype - Mime type of the document, can be null.repoId - SDXExceptionpublic void setAttachedDocuments(java.util.Vector list)
list - The list of attached documents.public boolean updateAttachedDocuments()
public void setUpdateAttachedDocuments(boolean updateAttachedDocuments)
updateAttachedDocuments - A boolean indicator.public java.util.Enumeration getAttachedDocuments()
getAttachedDocuments in interface IndexableDocumentpublic int getAttachedDocumentsSize()
protected void resetFields()
public void resetAttachedDocuments()
resetAttachedDocuments in interface IndexableDocumentpublic IndexableDocument getTransformedDocument()
null if no transformed document
during the indexation pipelinegetTransformedDocument in interface IndexableDocumentprotected void setUpTransformedDocument()
throws SDXException
SDXExceptionpublic java.util.Enumeration getSubDocuments()
getSubDocuments in interface IndexableDocumentpublic int getSubDocumentsSize()
public AbstractIndexableDocument.StoreHandler getStoreHandler()
getStoreHandler in interface IndexableDocumentpublic void setMessageHandler(org.xml.sax.ContentHandler handler)
setMessageHandler in interface IndexableDocumentpublic void setBoost(float boost)
setBoost in interface IndexableDocumentDocument.setBoost(float)public float getBoost()
getBoost in interface IndexableDocumentDocument.getBoost()public void setXMLFieldList(java.util.HashMap fieldList)
IndexableDocumentsetXMLFieldList in interface IndexableDocumentfr.gouv.culture.sdx.document.IndexableDocument#setFieldList(java.util.HashMap)public void setXMLTransformerHandler(javax.xml.transform.sax.TransformerHandler xmlFieldTransformer)
IndexableDocumentsetXMLTransformerHandler in interface IndexableDocumentfr.gouv.culture.sdx.document.IndexableDocument#setXMLTransformer(javax.xml.transform.Transformer)Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.