org.opensaml.xml.parse
Class ClasspathResolver

java.lang.Object
  extended by org.opensaml.xml.parse.ClasspathResolver
All Implemented Interfaces:
org.w3c.dom.ls.LSResourceResolver, org.xml.sax.EntityResolver

public class ClasspathResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver, org.w3c.dom.ls.LSResourceResolver

A entity resolver that resolves an entity's location within the classpath. Entity URIs must begin with the prefix classpath: and be followed by either an absolute or relative classpath. Relative classpaths are relative to this class. This resolver will not attempt to resolve any other URIs.


Nested Class Summary
protected  class ClasspathResolver.LSInputImpl
          Implementation of DOM 3 LSInput.
 
Field Summary
static java.lang.String CLASSPATH_URI_SCHEME
          UR scheme for classpath locations.
 
Constructor Summary
ClasspathResolver()
           
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          
protected  java.io.InputStream resolver(java.lang.String publicId, java.lang.String systemId)
          Resolves an id against the classpath.
 org.w3c.dom.ls.LSInput resolveResource(java.lang.String type, java.lang.String namespaceURI, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSPATH_URI_SCHEME

public static final java.lang.String CLASSPATH_URI_SCHEME
UR scheme for classpath locations.

See Also:
Constant Field Values
Constructor Detail

ClasspathResolver

public ClasspathResolver()
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Throws:
org.xml.sax.SAXException
java.io.IOException

resolveResource

public org.w3c.dom.ls.LSInput resolveResource(java.lang.String type,
                                              java.lang.String namespaceURI,
                                              java.lang.String publicId,
                                              java.lang.String systemId,
                                              java.lang.String baseURI)

Specified by:
resolveResource in interface org.w3c.dom.ls.LSResourceResolver

resolver

protected java.io.InputStream resolver(java.lang.String publicId,
                                       java.lang.String systemId)
Resolves an id against the classpath. System ID is tried first, then public ID.

Parameters:
publicId - resources public ID
systemId - resources system ID
Returns:
resolved resource or null


Copyright © 2006-2012 Internet2. All Rights Reserved.