|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.collections.triggers.FilteringTrigger
Abstract default implementation of a Trigger. This implementation just forwards all SAX events to the output content handler.
| Field Summary | |
protected Collection |
collection
|
protected org.xml.sax.ext.LexicalHandler |
lexicalOutputHandler
|
protected Logger |
LOG
|
protected org.xml.sax.ContentHandler |
outputHandler
|
protected boolean |
validating
|
| Fields inherited from interface org.exist.collections.triggers.Trigger |
CREATE_COLLECTION_EVENT, DELETE_COLLECTION_EVENT, REMOVE_DOCUMENT_EVENT, RENAME_COLLECTION_EVENT, STORE_DOCUMENT_EVENT, UPDATE_DOCUMENT_EVENT |
| Constructor Summary | |
FilteringTrigger()
|
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
|
void |
comment(char[] ch,
int start,
int length)
|
void |
configure(DBBroker broker,
Collection parent,
java.util.Map parameters)
Configure the trigger. |
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qname)
|
void |
endEntity(java.lang.String arg0)
|
void |
endPrefixMapping(java.lang.String prefix)
|
void |
finish(int event,
DBBroker broker,
Txn transaction,
DocumentImpl document)
This method is called after the operation completed. |
Collection |
getCollection()
|
org.xml.sax.ContentHandler |
getInputHandler()
Returns the input content handler. |
org.xml.sax.ext.LexicalHandler |
getLexicalInputHandler()
Returns the lexical input handler for this trigger. |
org.xml.sax.ext.LexicalHandler |
getLexicalOutputHandler()
Called by the database to set the lexical output handler for this trigger. |
Logger |
getLogger()
Returns a Logger object. |
org.xml.sax.ContentHandler |
getOutputHandler()
Returns the output handler to which SAX events should be forwarded. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isValidating()
Returns true if the SAX parser is currently in validation phase. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setLexicalOutputHandler(org.xml.sax.ext.LexicalHandler handler)
Called by the database to set the lexical output content handler for this trigger. |
void |
setOutputHandler(org.xml.sax.ContentHandler handler)
Called by the database to set the output content handler for this trigger. |
void |
setValidating(boolean validating)
Called by the database to report that it is entering validation phase. |
void |
skippedEntity(java.lang.String arg0)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attributes)
|
void |
startEntity(java.lang.String arg0)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String namespaceURI)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exist.collections.triggers.DocumentTrigger |
prepare |
| Field Detail |
protected Logger LOG
protected org.xml.sax.ContentHandler outputHandler
protected org.xml.sax.ext.LexicalHandler lexicalOutputHandler
protected Collection collection
protected boolean validating
| Constructor Detail |
public FilteringTrigger()
| Method Detail |
public void configure(DBBroker broker,
Collection parent,
java.util.Map parameters)
throws CollectionConfigurationException
collection. Use method getCollection
to later retrieve the collection.
configure in interface Triggerbroker - the database instance used to load the collection configuration. The broker object is
required for all database actions. Please note: the broker instance used for configuration is probably
different from the one passed to the prepare method. Don't store the broker object in your class.parent - the collection to which this trigger belongs.parameters - a Map containing any key/value parameters defined in the configuration file.
CollectionConfigurationException - if the trigger cannot be initialized.
public void finish(int event,
DBBroker broker,
Txn transaction,
DocumentImpl document)
DocumentTrigger
finish in interface DocumentTriggerevent - the type of event that triggered this call (see the constants defined in this interface).broker - the database instance used to process the current action.transaction - the current transaction contextdocument - the stored documentpublic void setValidating(boolean validating)
DocumentTrigger
setValidating in interface DocumentTriggervalidating - public boolean isValidating()
DocumentTriggerisValidating returns false, no exceptions should be
thrown.
isValidating in interface DocumentTriggerpublic Collection getCollection()
public org.xml.sax.ContentHandler getInputHandler()
DocumentTrigger
getInputHandler in interface DocumentTriggerpublic org.xml.sax.ext.LexicalHandler getLexicalInputHandler()
DocumentTriggergetInputHandler.
getLexicalInputHandler in interface DocumentTriggerpublic org.xml.sax.ContentHandler getOutputHandler()
DocumentTrigger
getOutputHandler in interface DocumentTriggerpublic org.xml.sax.ext.LexicalHandler getLexicalOutputHandler()
DocumentTrigger
getLexicalOutputHandler in interface DocumentTriggerpublic void setOutputHandler(org.xml.sax.ContentHandler handler)
DocumentTrigger
setOutputHandler in interface DocumentTriggerhandler - public void setLexicalOutputHandler(org.xml.sax.ext.LexicalHandler handler)
DocumentTrigger
setLexicalOutputHandler in interface DocumentTriggerhandler - public Logger getLogger()
Trigger
getLogger in interface Triggerpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandler
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix,
java.lang.String namespaceURI)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qname)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void skippedEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
skippedEntity in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
startDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endDTD()
throws org.xml.sax.SAXException
endDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void startEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
startEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
endEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void startCDATA()
throws org.xml.sax.SAXException
startCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endCDATA()
throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void comment(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||