|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.xml.ClasspathEntityResolver
public class ClasspathEntityResolver
Class ClasspathEntityResolver tries to load external entities from the classpath.
To find the entities in the classpath a mapping file must be specified. The mapping file is located at "META-INF/xml/entity-mapping.properties". The file contains entries structured like this:[publicId|systemId]=path in classpath
e.g.:
http://tempuri.org/test.dtd=META-INF/xml/dtds/test.dtd
Constructor Summary | |
---|---|
ClasspathEntityResolver()
Constructor creates a new instance in quite mode. |
|
ClasspathEntityResolver(boolean quite)
Constructor creates a new instance. |
|
ClasspathEntityResolver(boolean quite,
java.lang.ClassLoader loader)
Constructor creates a new instance. |
Method Summary | |
---|---|
protected org.xml.sax.InputSource |
createInputSource(java.lang.String resourcefile)
Method creates an input source for the given resource file. |
protected org.xml.sax.InputSource |
emptyInputSource()
Method creates an InputSource which points to an empty resource. |
protected java.lang.String |
getMappedResourceFileName(java.lang.String identifier)
Method gets the mapped resource file name for the given identifier. |
boolean |
isQuite()
Method gets the quite state. |
protected void |
loadMapping(java.lang.ClassLoader classloader)
Method loads all entries from the mapping files located at META-INF/xml/entity-mapping.properties. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Method resolves an entity by looking in a special mapping file located at "META-INF/xml/entity-mapping.properties". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClasspathEntityResolver()
public ClasspathEntityResolver(boolean quite)
quite
- the quite mode.public ClasspathEntityResolver(boolean quite, java.lang.ClassLoader loader)
quite
- the quite mode.loader
- the classloader to use, if null this.getClass().getClassLoader() is used.Method Detail |
---|
protected void loadMapping(java.lang.ClassLoader classloader)
[publicId|systemId]=path in classpath
e.g.:
http://tempuri.org/test.dtd=META-INF/xml/dtds/test.dtd
classloader
- the classloader if null this.getClass().getClassLoader() is used.public boolean isQuite()
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
resolveEntity
in interface org.xml.sax.EntityResolver
publicId
- the publicId.systemId
- the systemId.
protected org.xml.sax.InputSource createInputSource(java.lang.String resourcefile)
resourcefile
- the resourcefile.
protected org.xml.sax.InputSource emptyInputSource()
protected java.lang.String getMappedResourceFileName(java.lang.String identifier)
identifier
- the identifier (e.g. publicId or systemId).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |