Java Doc for SourceUtil.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » source » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.source 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.components.source.SourceUtil

SourceUtil
final public class SourceUtil (Code)
This class contains some utility methods for the source resolving.
author:
   Carsten Ziegeler
author:
   Stephan Michels
version:
   $Id: SourceUtil.java 485224 2006-12-10 17:24:05Z cziegeler $




Method Summary
public static  StringgetAuthority(String uri)
     Return the authority of a URI.
public static  StringgetFragment(String uri)
     Return the fragment of a URI.
public static  InputSourcegetInputSource(Source source)
     Get an InputSource object
Parameters:
  source - Source.
public static  StringgetPath(String uri)
     Return the path of a URI.
public static  StringgetPathWithoutAuthority(String uri)
     Return the path of a URI, if the URI can't contains a authority. This implementation differ to the RFC 2396.
Parameters:
  uri - Uniform resource identifier.
public static  StringgetQuery(String uri)
     Return the query of a URI.
public static  StringgetScheme(String uri)
     Return the scheme of a URI.
public static  SourcegetSource(String uri, Parameters typeParameters, SourceParameters resourceParameters, SourceResolver resolver)
     Get a Source object
Parameters:
  uri - URI of the source.
Parameters:
  typeParameters - Type of Source query.
public static  ProcessingExceptionhandle(SourceException se)
     Make a ProcessingException from a SourceException.
public static  ProcessingExceptionhandle(String message, SourceException se)
     Make a ProcessingException from a SourceException. If the exception is a SourceNotFoundException then a ResourceNotFoundException is thrown.
Parameters:
  message - Additional exception message.
Parameters:
  se - Source exception.
public static  voidhandleSAXException(String source, SAXException e)
     Handle SAXException catched in Generator's generate method.
public static  voidparse(ComponentManager manager, Source source, ContentHandler handler)
     Generates SAX events from the given source by parsing it.
public static  voidparse(ServiceManager manager, Source source, ContentHandler handler)
     Generates SAX events from the given source by parsing it.
public static  DocumentFragmentreadDOM(String location, Parameters typeParameters, SourceParameters parameters, SourceResolver resolver)
     Read a DOM Fragment from a source
Parameters:
  location - URI of the Source
Parameters:
  typeParameters - Type of Source query.
public static  voidtoCharacters(Source source, String encoding, ContentHandler handler)
     Generates character SAX events from the given source.
public static  DocumenttoDOM(Source source)
    
public static  DocumenttoDOM(ServiceManager manager, Source source)
    
public static  DocumenttoDOM(ServiceManager manager, String mimeTypeHint, Source source)
    
public static  voidtoSAX(XMLizable source, ContentHandler handler)
     Generates SAX events from the XMLizable and handle SAXException.
public static  voidtoSAX(Source source, ContentHandler handler)
     Generates SAX events from the given source.
public static  voidtoSAX(Source source, String mimeTypeHint, ContentHandler handler)
     Generates SAX events from the given source by using XMLizer.
public static  voidtoSAX(ComponentManager manager, Source source, String mimeTypeHint, ContentHandler handler)
     Generates SAX events from the given source by using XMLizer.
public static  voidtoSAX(ServiceManager manager, Source source, String mimeTypeHint, ContentHandler handler)
    
public static  voidtoSAX(Source source, ContentHandler handler, Parameters typeParameters, boolean filterDocumentEvent)
    
public static  voidwriteDOM(String location, Parameters typeParameters, SourceParameters parameters, DocumentFragment frag, SourceResolver resolver, String serializerName)
     Write a DOM Fragment to a source. If the source is a ModifiableSource the interface is used. If not, the source is invoked with an additional parameter named "content" containing the XML.
Parameters:
  location - URI of the Source
Parameters:
  typeParameters - Type of Source query.



Method Detail
getAuthority
public static String getAuthority(String uri)(Code)
Return the authority of a URI. This authority is typically defined by an Internet-based server or a scheme-specific registry of naming authorities (see RFC 2396).
Parameters:
  uri - Uniform resource identifier. Scheme of the URI.



getFragment
public static String getFragment(String uri)(Code)
Return the fragment of a URI. When a URI reference is used to perform a retrieval action on the identified resource, the optional fragment identifier, consists of additional reference information to be interpreted by the user agent after the retrieval action has been successfully completed (see RFC 2396).
Parameters:
  uri - Uniform resource identifier. Fragment of the URI.



getInputSource
public static InputSource getInputSource(Source source) throws IOException, ProcessingException(Code)
Get an InputSource object
Parameters:
  source - Source. Input stream of the source.
throws:
  IOException - If a io exception occurs.
throws:
  ProcessingException - If an exception occurs duringprocessing.



getPath
public static String getPath(String uri)(Code)
Return the path of a URI. The path contains data, specific to the authority (or the scheme if there is no authority component), identifying the resource within the scope of that scheme and authority (see RFC 2396).
Parameters:
  uri - Uniform resource identifier. Path of the URI.



getPathWithoutAuthority
public static String getPathWithoutAuthority(String uri)(Code)
Return the path of a URI, if the URI can't contains a authority. This implementation differ to the RFC 2396.
Parameters:
  uri - Uniform resource identifier. Path of the URI.



getQuery
public static String getQuery(String uri)(Code)
Return the query of a URI. The query is a string of information to be interpreted by the resource (see RFC 2396).
Parameters:
  uri - Uniform resource identifier. Query of the URI.



getScheme
public static String getScheme(String uri)(Code)
Return the scheme of a URI. Just as there are many different methods of access to resources, there are a variety of schemes for identifying such resources. (see RFC 2396).
Parameters:
  uri - Uniform resource identifier. Scheme of the URI.



getSource
public static Source getSource(String uri, Parameters typeParameters, SourceParameters resourceParameters, SourceResolver resolver) throws IOException, SAXException, SourceException(Code)
Get a Source object
Parameters:
  uri - URI of the source.
Parameters:
  typeParameters - Type of Source query. Currently, onlymethod parameter (value typically GET orPOST) is recognized. May be null.
Parameters:
  resourceParameters - Parameters of the source. May be null
Parameters:
  resolver - Resolver for the source. The resolved source.
throws:
  IOException - If a io exception occurs.
throws:
  SAXException - If a SAX exception occurs.
throws:
  SourceException - If the source an exception throws.



handle
public static ProcessingException handle(SourceException se)(Code)
Make a ProcessingException from a SourceException. If the exception is a SourceNotFoundException then a ResourceNotFoundException is thrown.
Parameters:
  se - Source exception Created processing exception.



handle
public static ProcessingException handle(String message, SourceException se)(Code)
Make a ProcessingException from a SourceException. If the exception is a SourceNotFoundException then a ResourceNotFoundException is thrown.
Parameters:
  message - Additional exception message.
Parameters:
  se - Source exception. Created processing exception.



handleSAXException
public static void handleSAXException(String source, SAXException e) throws ProcessingException, IOException, SAXException(Code)
Handle SAXException catched in Generator's generate method.
Parameters:
  source - Generator's source
Parameters:
  e - SAXException happened in the generator's generate method.



parse
public static void parse(ComponentManager manager, Source source, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
Generates SAX events from the given source by parsing it.

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:
  ProcessingException - if no suitable converter is foundSourceUtil.parse(ServiceManager,Source,ContentHandler)



parse
public static void parse(ServiceManager manager, Source source, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
Generates SAX events from the given source by parsing it.

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:
  ProcessingException - if no suitable converter is found



readDOM
public static DocumentFragment readDOM(String location, Parameters typeParameters, SourceParameters parameters, SourceResolver resolver) throws ProcessingException(Code)
Read a DOM Fragment from a source
Parameters:
  location - URI of the Source
Parameters:
  typeParameters - Type of Source query. Currently, onlymethod parameter (value typically GET orPOST) is recognized. May be null.
Parameters:
  parameters - Parameters (e.g. URL params) of the source.May be null
Parameters:
  resolver - Resolver for the source. DOM DocumentFragment constructed from the specifiedsource.
throws:
  ProcessingException -



toCharacters
public static void toCharacters(Source source, String encoding, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
Generates character SAX events from the given source.
Parameters:
  source - The data
Parameters:
  encoding - The character encoding of the data



toDOM
public static Document toDOM(Source source) throws SAXException, IOException, ProcessingException(Code)
Generates a DOM from the given source
Parameters:
  source - The data Created DOM document.
throws:
  IOException - If a io exception occurs.
throws:
  ProcessingException - if no suitable converter is found
throws:
  SAXException - If a SAX exception occurs.



toDOM
public static Document toDOM(ServiceManager manager, Source source) throws SAXException, IOException, ProcessingException(Code)
Generates a DOM from the given source
Parameters:
  source - The data Created DOM document.
throws:
  IOException - If a io exception occurs.
throws:
  ProcessingException - if no suitable converter is found
throws:
  SAXException - If a SAX exception occurs.



toDOM
public static Document toDOM(ServiceManager manager, String mimeTypeHint, Source source) throws SAXException, IOException, ProcessingException(Code)
Generates a DOM from the given source
Parameters:
  source - The data Created DOM document.
throws:
  IOException - If a io exception occurs.
throws:
  ProcessingException - if no suitable converter is found
throws:
  SAXException - If a SAX exception occurs.



toSAX
public static void toSAX(XMLizable source, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
Generates SAX events from the XMLizable and handle SAXException.
Parameters:
  source - the data



toSAX
public static void toSAX(Source source, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
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:
  ProcessingException - if no suitable converter is found



toSAX
public static void toSAX(Source source, String mimeTypeHint, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
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:
  ProcessingException - if no suitable converter is found



toSAX
public static void toSAX(ComponentManager manager, Source source, String mimeTypeHint, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
Generates SAX events from the given source by using 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:
  ProcessingException - if no suitable converter is foundSourceUtil.toSAX(ServiceManager,Source,String,ContentHandler)



toSAX
public static void toSAX(ServiceManager manager, Source source, String mimeTypeHint, ContentHandler handler) throws SAXException, IOException, ProcessingException(Code)
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:
  ProcessingException - if no suitable converter is found



toSAX
public static void toSAX(Source source, ContentHandler handler, Parameters typeParameters, boolean filterDocumentEvent) throws SAXException, IOException, ProcessingException(Code)
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:
  ProcessingException - if no suitable converter is found



writeDOM
public static void writeDOM(String location, Parameters typeParameters, SourceParameters parameters, DocumentFragment frag, SourceResolver resolver, String serializerName) throws ProcessingException(Code)
Write a DOM Fragment to a source. If the source is a ModifiableSource the interface is used. If not, the source is invoked with an additional parameter named "content" containing the XML.
Parameters:
  location - URI of the Source
Parameters:
  typeParameters - Type of Source query. Currently, onlymethod parameter (value typically GET orPOST) is recognized. May be null.
Parameters:
  parameters - Parameters (e.g. URL params) of the source.May be null
Parameters:
  frag - DOM fragment to serialize to the Source
Parameters:
  resolver - Resolver for the source.
Parameters:
  serializerName - The serializer to use
throws:
  ProcessingException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.