org.dspace.app.xmlui.cocoon
Class NamespaceFilterTransformer
java.lang.Object
org.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.dspace.app.xmlui.cocoon.NamespaceFilterTransformer
- All Implemented Interfaces:
- org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.cocoon.caching.CacheableProcessingComponent, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer, org.apache.excalibur.xml.sax.XMLConsumer, ContentHandler, LexicalHandler
public class NamespaceFilterTransformer
- extends org.apache.cocoon.transformation.AbstractTransformer
- implements org.apache.cocoon.caching.CacheableProcessingComponent
Filter out an unwanted namespace from the pipeline. Any elements or attributes
which use this namespaces will be removed from pipeline.
- Author:
- Scott Phillips
| Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
| Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
|
Method Summary |
void |
endElement(String uri,
String loc,
String raw)
Receive notification of the end of an element. |
void |
endPrefixMapping(String prefix)
End the scope of a prefix-URI mapping. |
Serializable |
getKey()
Return the cache key |
org.apache.excalibur.source.SourceValidity |
getValidity()
This cache never invalidates, always return a validating cache. |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters parameters)
Setup the processing instruction transformer. |
void |
startElement(String uri,
String loc,
String raw,
Attributes a)
Receive notification of the beginning of an element. |
void |
startPrefixMapping(String prefix,
String uri)
Begin the scope of a prefix-URI Namespace mapping. |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDocument, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
recycle, setConsumer, setContentHandler, setLexicalHandler |
| Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
NamespaceFilterTransformer
public NamespaceFilterTransformer()
getKey
public Serializable getKey()
- Return the cache key
- Specified by:
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponent
getValidity
public org.apache.excalibur.source.SourceValidity getValidity()
- This cache never invalidates, always return a validating cache.
- Specified by:
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent
setup
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.cocoon.ProcessingException,
SAXException,
IOException
- Setup the processing instruction transformer. The only parameter that
matters in the src parameter which should be the path to an XSL
stylesheet to be applied by the clients browser.
Setup the namespace filter by getting a list of namespaces to be filtered
from the pipeline.
- Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
- Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
- Begin the scope of a prefix-URI Namespace mapping.
- Specified by:
startPrefixMapping in interface ContentHandler- Overrides:
startPrefixMapping in class org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
prefix - The Namespace prefix being declared.uri - The Namespace URI the prefix is mapped to.
- Throws:
SAXException
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
- End the scope of a prefix-URI mapping.
- Specified by:
endPrefixMapping in interface ContentHandler- Overrides:
endPrefixMapping in class org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
prefix - The prefix that was being mapping.
- Throws:
SAXException
startElement
public void startElement(String uri,
String loc,
String raw,
Attributes a)
throws SAXException
- Receive notification of the beginning of an element.
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class org.apache.cocoon.xml.AbstractXMLPipe
- Throws:
SAXException
endElement
public void endElement(String uri,
String loc,
String raw)
throws SAXException
- Receive notification of the end of an element.
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class org.apache.cocoon.xml.AbstractXMLPipe
- Throws:
SAXException
Copyright © 2012 DuraSpace. All Rights Reserved.