org.apache.cocoon.components.source
Class SourceUtil

java.lang.Object
  extended byorg.apache.cocoon.components.source.util.SourceUtil
      extended byorg.apache.cocoon.components.source.SourceUtil

public abstract class SourceUtil
extends org.apache.cocoon.components.source.util.SourceUtil

This class contains some utility methods for the source resolving.

Version:
$Id: SourceUtil.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from class org.apache.cocoon.components.source.util.SourceUtil
uripattern
 
Constructor Summary
SourceUtil()
           
 
Method Summary
static Document toDOM(Source source)
          Generates a DOM from the given source
static void toSAX(Source source, ContentHandler handler)
          Generates SAX events from the given source.
static void toSAX(Source source, ContentHandler handler, Parameters typeParameters, boolean filterDocumentEvent)
          Generates SAX events from the given source with possible URL rewriting.
static void toSAX(Source source, String mimeTypeHint, ContentHandler handler)
          Generates SAX events from the given source by using XMLizer.
 
Methods inherited from class org.apache.cocoon.components.source.util.SourceUtil
getAuthority, getFragment, getInputSource, getPath, getPathWithoutAuthority, getQuery, getScheme, getSource, handle, handle, handleSAXException, parse, parse, toCharacters, toDOM, toDOM, toSAX, toSAX, toSAX, toSAX, toSAX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceUtil

public SourceUtil()
Method Detail

toSAX

public static void toSAX(Source source,
                         ContentHandler handler)
                  throws SAXException,
                         IOException,
                         org.apache.cocoon.ProcessingException
Generates SAX events from the given source.

NOTE: If the implementation can produce lexical events, care should be taken that handler can actually directly implement the LexicalHandler interface!

Parameters:
source - the data
Throws:
org.apache.cocoon.ProcessingException - if no suitable converter is found
SAXException
IOException

toSAX

public static void toSAX(Source source,
                         String mimeTypeHint,
                         ContentHandler handler)
                  throws SAXException,
                         IOException,
                         org.apache.cocoon.ProcessingException
Generates SAX events from the given source by using XMLizer. Current sitemap manager will be used to lookup XMLizer.

NOTE: If the implementation can produce lexical events, care should be taken that handler can actually directly implement the LexicalHandler interface!

Parameters:
source - the data
Throws:
org.apache.cocoon.ProcessingException - if no suitable converter is found
SAXException
IOException

toSAX

public static void toSAX(Source source,
                         ContentHandler handler,
                         Parameters typeParameters,
                         boolean filterDocumentEvent)
                  throws SAXException,
                         IOException,
                         org.apache.cocoon.ProcessingException
Generates SAX events from the given source with possible URL rewriting.

NOTE: If the implementation can produce lexical events, care should be taken that handler can actually directly implement the LexicalHandler interface!

Parameters:
source - the data
Throws:
org.apache.cocoon.ProcessingException - if no suitable converter is found
SAXException
IOException

toDOM

public static Document toDOM(Source source)
                      throws SAXException,
                             IOException,
                             org.apache.cocoon.ProcessingException
Generates a DOM from the given source

Parameters:
source - The data
Returns:
Created DOM document.
Throws:
IOException - If a io exception occurs.
org.apache.cocoon.ProcessingException - if no suitable converter is found
SAXException - If a SAX exception occurs.


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.