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, isToSaxInitialized
CLASS_NAME_SUFFIX, DOCTYPE_BINARY, DOCTYPE_GROUP, DOCTYPE_HTML, DOCTYPE_USER, DOCTYPE_XML
DEFAULT_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, setURL
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAdditionalSystemFields, setTransformedDocument, setTransformedDocument, startIndexing
getDocType, getLength, getMimeType, getPreferredFilename, getRepositoryForStorage, getURL, openStream, save, setContent, setContent, setContent, setContent, setId, setIdGenerator, setIdGenerator, setMimeType, setPreferredFilename, setRepositoryForStorage, setURL
getId
getDescription, setDescription
getEncoding, setEncoding
getLocale, getXmlLang, setLocale, setXmlLang
protected 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.boost
protected 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.ContentHandler
org.xml.sax.SAXException
protected void handleDocumentId(org.xml.sax.Attributes atts) throws SDXException
SDXException
protected java.lang.String generateId() throws SDXException
SDXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void comment(char[] chars, int i, int i1) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endEntity(java.lang.String s) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String s) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] chars, int i, int i1) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String s, java.lang.String s1) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public void skippedEntity(java.lang.String s) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public 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.LexicalHandler
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String s) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String s, java.lang.String s1) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public 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.ContentHandler
org.xml.sax.SAXException
public 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 IndexableDocument
public 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
- SDXException
public 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 IndexableDocument
public int getAttachedDocumentsSize()
protected void resetFields()
public void resetAttachedDocuments()
resetAttachedDocuments
in interface IndexableDocument
public IndexableDocument getTransformedDocument()
null if no transformed document
during the indexation pipeline
getTransformedDocument
in interface IndexableDocument
protected void setUpTransformedDocument() throws SDXException
SDXException
public java.util.Enumeration getSubDocuments()
getSubDocuments
in interface IndexableDocument
public int getSubDocumentsSize()
public AbstractIndexableDocument.StoreHandler getStoreHandler()
getStoreHandler
in interface IndexableDocument
public void setMessageHandler(org.xml.sax.ContentHandler handler)
setMessageHandler
in interface IndexableDocument
public void setBoost(float boost)
setBoost
in interface IndexableDocument
Document.setBoost(float)
public float getBoost()
getBoost
in interface IndexableDocument
Document.getBoost()
public void setXMLFieldList(java.util.HashMap fieldList)
IndexableDocument
setXMLFieldList
in interface IndexableDocument
fr.gouv.culture.sdx.document.IndexableDocument#setFieldList(java.util.HashMap)
public void setXMLTransformerHandler(javax.xml.transform.sax.TransformerHandler xmlFieldTransformer)
IndexableDocument
setXMLTransformerHandler
in interface IndexableDocument
fr.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.