Package net.shibboleth.shared.xml
Class ClasspathResolver
java.lang.Object
net.shibboleth.shared.xml.ClasspathResolver
- All Implemented Interfaces:
LSResourceResolver,EntityResolver
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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringURI scheme for classpath locations.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveEntity(String publicId, String systemId) protected InputStreamResolves an id against the classpath.
-
Field Details
-
CLASSPATH_URI_SCHEME
URI scheme for classpath locations.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
ClasspathResolver
public ClasspathResolver()
-
-
Method Details
-
resolveEntity
- 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
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
-