Java Doc for URIResolver.java in  » Database-ORM » MMBase » org » mmbase » util » xml » 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 » Database ORM » MMBase » org.mmbase.util.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.util.xml.URIResolver

URIResolver
public class URIResolver implements javax.xml.transform.URIResolver,SizeMeasurable,Serializable(Code)
This URIResolver can be used to resolve URI's, also in TransformerFactory's. It has knowledge of a kind of path (as used by shells). Every entry of this path is labeled with a 'prefix'. This path always has at least (and on default) two entries:
  1. Current working directory (prefix: none or 'file:')
  2. MMBase configuration directory (prefix: 'mm:')
Optionially you can add other dirs between these two. When you start searching in the current working dir, and the URI does not point to an existing file, it starts searching downwards in this list, until it finds a file that does exist.
author:
   Michiel Meeuwissen.
since:
   MMBase-1.6
version:
   $Id: URIResolver.java,v 1.29 2008/02/12 17:21:22 michiel Exp $

Inner Class :public static class EntryList extends ArrayList implements Serializable
Inner Class :static class Entry implements java.io.Serializable


Constructor Summary
public  URIResolver(URL c, boolean overhead)
     This constructor does not create an actual object that can be used.
public  URIResolver(URL c)
     Create an URIResolver for a certain directory.
public  URIResolver(File f)
    
public  URIResolver()
     Create an URIResolver without support for a certain directory.
public  URIResolver(File f, EntryList extraDirs)
    
public  URIResolver(URL c, EntryList extraDirs)
     Besides the current working directory you can also supply an ordered list of URIResolver.Entry's.

Method Summary
public  booleanequals(Object o)
     URIResolver can be used as a key in Maps (Caches).
public  intgetByteSize()
    
public  intgetByteSize(org.mmbase.util.SizeOf sizeof)
    
public  URLgetCwd()
     Returns the working directory which was supplied in the constructor.
public  StringgetPath()
     Creates a 'path' string, which is a list of directories.
public  List<String>getPrefixPath()
     Creates a List of strings, every entry is a directory prefixed with its 'prefix'.
public  inthashCode()
     URIResolver can be used as a key in Maps (Caches).
public static  voidmain(String argv)
    
public  Sourceresolve(String href, String base)
     Implementation of the resolve method of javax.xml.transform.URIResolver.
public  FileresolveToFile(String href)
    
public  FileresolveToFile(String href, String base)
    
public  URLresolveToURL(String href, String base)
    
public  StringtoString()
    


Constructor Detail
URIResolver
public URIResolver(URL c, boolean overhead)(Code)
This constructor does not create an actual object that can be used. Only the hashCode is filled. This is because I liked it possible a URIResolver to be equal to a File. But 'equals' must be symmetric, and only a File can be equal to a File. It seemed stupid to extend URIResolver from File, only for this. If you want to compare a File to to an URIResolver (in Maps), you could wrap the file in such an empty URIResolver, and avoid all further overhead.
Parameters:
  c - The directory for which this URIResolver must (not) be created.
Parameters:
  overhead - A boolean. It is ignored. It serves only to distinct this constructor from the other one.
See Also:   org.mmbase.cache.xslt.FactoryCache



URIResolver
public URIResolver(URL c)(Code)
Create an URIResolver for a certain directory.
Parameters:
  c - The directory for which this URIResolver must be created.



URIResolver
public URIResolver(File f)(Code)



URIResolver
public URIResolver()(Code)
Create an URIResolver without support for a certain directory. (Will be taken the first root).



URIResolver
public URIResolver(File f, EntryList extraDirs)(Code)



URIResolver
public URIResolver(URL c, EntryList extraDirs)(Code)
Besides the current working directory you can also supply an ordered list of URIResolver.Entry's. First in this list are the directories which must be checked first, in case no prefix is given.
Parameters:
  c - 'Current working dir'
Parameters:
  extraDirs - A EntryList, containing 'extra' dirs withprefixes. If not specified or null, there will still be one'extra dir' available, namely the MMBase configurationdirectory (with prefix mm:)




Method Detail
equals
public boolean equals(Object o)(Code)
URIResolver can be used as a key in Maps (Caches).



getByteSize
public int getByteSize()(Code)



getByteSize
public int getByteSize(org.mmbase.util.SizeOf sizeof)(Code)



getCwd
public URL getCwd()(Code)
Returns the working directory which was supplied in the constructor.



getPath
public String getPath()(Code)
Creates a 'path' string, which is a list of directories. Mainly usefull for debugging, of course. A String which could be used as a shell's path.



getPrefixPath
public List<String> getPrefixPath()(Code)
Creates a List of strings, every entry is a directory prefixed with its 'prefix'. Handy during debugging. A List with prefix:path Strings.



hashCode
public int hashCode()(Code)
URIResolver can be used as a key in Maps (Caches).



main
public static void main(String argv) throws Exception(Code)
For testing only
since:
   MMBase-1.8



resolve
public Source resolve(String href, String base) throws TransformerException(Code)
Implementation of the resolve method of javax.xml.transform.URIResolver.
See Also:   javax.xml.transform.URIResolver



resolveToFile
public File resolveToFile(String href)(Code)



resolveToFile
public File resolveToFile(String href, String base)(Code)



resolveToURL
public URL resolveToURL(String href, String base) throws TransformerException(Code)



toString
public String toString()(Code)



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.