Class ClasspathResolver
- java.lang.Object
-
- net.shibboleth.utilities.java.support.xml.ClasspathResolver
-
- All Implemented Interfaces:
LSResourceResolver,EntityResolver
public class ClasspathResolver extends Object implements EntityResolver, LSResourceResolver
A entity resolver that resolves an entity's location within the classpath. Entity URIs must begin with the prefixclasspath: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
Nested Classes Modifier and Type Class Description protected classClasspathResolver.LSInputImplImplementation of DOM 3LSInput.
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSPATH_URI_SCHEMEURI scheme for classpath locations.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description ClasspathResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSourceresolveEntity(String publicId, String systemId)protected InputStreamresolver(String publicId, String systemId)Resolves an id against the classpath.LSInputresolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
-
-
-
Field Detail
-
CLASSPATH_URI_SCHEME
public static final String CLASSPATH_URI_SCHEME
URI scheme for classpath locations.- See Also:
- Constant Field Values
-
log
private final org.slf4j.Logger log
Class logger.
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException
-
resolveResource
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
- Specified by:
resolveResourcein interfaceLSResourceResolver
-
resolver
protected InputStream resolver(String publicId, String systemId)
Resolves an id against the classpath. System ID is tried first, then public ID.- Parameters:
publicId- resources public IDsystemId- resources system ID- Returns:
- resolved resource or null
-
-