|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.dspace.app.xmlui.wing.AbstractWingTransformer
public abstract class AbstractWingTransformer
This class handles receiving SAX events and translating them into DRI events. These DRI events are then routed to the individual implementing components where they fill in and construct the DRI document. The document they construct is known as the feeder document, this is merged into the main document that was generated from the previous component in the Cocoon pipeline. The merge takes place in accordance with the DRI schema's rules for merging two DRI documents.
| Field Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
AbstractWingTransformer()
|
|
| Method Summary | |
|---|---|
void |
addBody(Body body)
Abstract implementations of WingTransformer |
void |
addOptions(Options options)
What to add to the options list |
void |
addPageMeta(PageMeta pageMeta)
What page metadata to add to the document |
void |
addUserMeta(UserMeta userMeta)
What user metadata to add to the document |
protected WingDocument |
createWingDocument(WingContext wingContext)
Construct a new WingDocument. |
void |
dispose()
Dispose |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Receive notification of the end of an element. |
void |
endPrefixMapping(String prefix)
End the scope of a prefix-URI mapping. |
String |
getComponentName()
Return the name of this component. |
static String |
getDefaultMessageCatalogue()
Return the default i18n message catalogue that should be used when no others are specified. |
ObjectManager |
getObjectManager()
Return the ObjectManager associated with this component. |
protected void |
handleException(Exception e)
Handle exceptions that occurred during the document's creation. |
static Message |
message(String key)
This is a short cut method for creating a new message object, this allows them to be created with one simple method call that uses the default catalogue. |
static Message |
message(String catalogue,
String key)
This is a short cut method for creating a new message object. |
void |
recycle()
Recyle |
void |
setupWing()
Set up the transformer so that it can build a feeder Wing document and merge it into the main document FIXME: Update document: - this method must be called to initialize the framework. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes attributes)
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, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
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.xml.sax.ContentHandler |
|---|
characters, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity |
| Methods inherited from interface org.xml.sax.ext.LexicalHandler |
|---|
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
|---|
setConsumer |
| Methods inherited from interface org.apache.cocoon.sitemap.SitemapModelComponent |
|---|
setup |
| Constructor Detail |
|---|
public AbstractWingTransformer()
| Method Detail |
|---|
public void setupWing()
throws WingException
WingException
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.apache.cocoon.xml.AbstractXMLPipeSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class org.apache.cocoon.xml.AbstractXMLPipeSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.apache.cocoon.xml.AbstractXMLPipeprefix - The Namespace prefix being declared.uri - The Namespace URI the prefix is mapped to.
SAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class org.apache.cocoon.xml.AbstractXMLPipeprefix - The prefix that was being mapping.
SAXException
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes attributes)
throws SAXException
startElement in interface ContentHandlerstartElement in class org.apache.cocoon.xml.AbstractXMLPipenamespaceURI - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace processing is not being
performed.localName - The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName - The raw XML 1.0 name (with prefix), or the empty string if raw
names are not available.attributes - The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class org.apache.cocoon.xml.AbstractXMLPipenamespaceURI - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace processing is not being
performed.localName - The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName - The raw XML 1.0 name (with prefix), or the empty string if raw
names are not available.
SAXException
protected void handleException(Exception e)
throws SAXException
e - The thrown exception
SAXException
protected WingDocument createWingDocument(WingContext wingContext)
throws WingException
wingContext - The current wing context this transformer is operating under.
WingException
public void addBody(Body body)
throws Exception
addBody in interface WingTransformerException
public void addOptions(Options options)
throws Exception
WingTransformer
addOptions in interface WingTransformerException
public void addUserMeta(UserMeta userMeta)
throws Exception
WingTransformer
addUserMeta in interface WingTransformerException
public void addPageMeta(PageMeta pageMeta)
throws Exception
WingTransformer
addPageMeta in interface WingTransformerExceptionpublic ObjectManager getObjectManager()
public String getComponentName()
getComponentName in interface WingTransformerpublic static String getDefaultMessageCatalogue()
public static Message message(String key)
key - The catalogue key used to look up a message.
public static Message message(String catalogue,
String key)
catalogue - The catalogue where translations will be located.key - The catalogue key used to look up a translation within the
catalogue.
public void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class org.apache.cocoon.xml.AbstractXMLProducerpublic void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||