org.apache.cocoon.components.language.markup.sitemap
Class SitemapMarkupLanguage
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.components.language.markup.AbstractMarkupLanguage
|
+--org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable, MarkupLanguage, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable
- public class SitemapMarkupLanguage
- extends AbstractMarkupLanguage
This class implements MarkupLanguage
for Cocoon's
Sitemap.
- Version:
- CVS $Revision: 1.4 $ $Date: 2002/01/29 15:46:08 $
- Author:
- Giacomo Pati
Fields inherited from interface org.apache.cocoon.components.language.markup.MarkupLanguage |
ROLE |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SitemapMarkupLanguage
public SitemapMarkupLanguage()
throws org.xml.sax.SAXException,
java.io.IOException
- The default constructor.
recycle
public void recycle()
- Overrides:
recycle
in class AbstractMarkupLanguage
getName
public java.lang.String getName()
- Return the Sitemap language name: map :-)
- Returns:
- The map constant
getEncoding
public java.lang.String getEncoding()
- FIXME (SSA) : See interface. For now returns null.
Return the document-declared encoding or
null
if it's the
platform's default encoding
- Overrides:
getEncoding
in class AbstractMarkupLanguage
- Returns:
- The document-declared encoding
getPreprocessFilter
protected org.xml.sax.XMLFilter getPreprocessFilter(java.lang.String filename,
ProgrammingLanguage language)
- Prepare the input source for logicsheet processing and code generation
with a preprocess filter.
The return
XMLFilter
object is the first filter on the
transformer chain.
The Sitemap preprocess filter adds information on the root element such as
creation-date, file-name and file-path, plus it use the the passed
programming language to quote Strings
on PCDATA node.
- Overrides:
getPreprocessFilter
in class AbstractMarkupLanguage
- Parameters:
filename
- The source filenamelanguage
- The target programming language- Returns:
- The preprocess filter
- See Also:
SitemapMarkupLanguage.PreProcessFilter
addDependency
protected void addDependency(java.lang.String location)
- Add a dependency on an external file to the document for inclusion in
generated code. This is used to populate a list of
File
's
tested for change on each invocation; this information is used to assert
whether regeneration is necessary.
- Overrides:
addDependency
in class AbstractMarkupLanguage
- Parameters:
location
- The file path of the dependent file- See Also:
AbstractMarkupLanguage
, ServerPagesGenerator
and AbstractServerPage
addLogicsheetToList
protected void addLogicsheetToList(AbstractMarkupLanguage.LanguageDescriptor language,
java.lang.String logicsheetLocation,
SourceResolver resolver)
throws java.io.IOException,
org.xml.sax.SAXException,
ProcessingException
- Description copied from class:
AbstractMarkupLanguage
- Add a logicsheet to the code generator.
- Overrides:
addLogicsheetToList
in class AbstractMarkupLanguage
- Following copied from class:
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage
- Parameters:
logicsheetLocation
- Location of the logicsheet to be addeddocument
- The input document- Throws:
java.net.MalformedURLException
- If location is invalidjava.io.IOException
- IO Errororg.xml.sax.SAXException
- Logicsheet parse error
getTransformerChainBuilder
protected AbstractMarkupLanguage.TransformerChainBuilderFilter getTransformerChainBuilder(LogicsheetCodeGenerator logicsheetMarkupGenerator,
SourceResolver resolver)
- Returns a filter that chain on the fly the requested transformers
for source code generation. This method scans the input SAX events for
<?xml-logicsheet?> processing instructions and top-level
<map:logicsheet> elements. Logicsheet declarations are removed from
the input document.
- Overrides:
getTransformerChainBuilder
in class AbstractMarkupLanguage
- Parameters:
logicsheetMarkupGenerator
- the logicsheet markup generatorlanguage
- the language descriptorresolver
- the entity resolver- Returns:
- XMLFilter the filter that build on the fly the transformer chain
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.