Class AppSchemaEntityResolver
Object
AppSchemaEntityResolver
- All Implemented Interfaces:
EntityResolver3,EntityResolver,EntityResolver2
An
EntityResolver2 that uses the enclosing instance's SchemaResolver to look up XML entities (that
is, XML schemas).-
Constructor Summary
ConstructorsConstructorDescriptionAppSchemaEntityResolver(SchemaResolver resolver) EntityResolver backed by SchemaResolver to identify and trust local resources.AppSchemaEntityResolver(SchemaResolver resolver, Hints hints) EntityResolver backed by SchemaResolver to identify and trust local resources, then GeoTools library configuration to locate resources.AppSchemaEntityResolver(SchemaResolver resolver, EntityResolver entityResolver) EntityResolver backed by SchemaResolver to identify and trust local resources, then GeoTools library configuration to locate resources. -
Method Summary
Modifier and TypeMethodDescriptionComma seperated list of entity resolution protocols required for EntityResolver to function.getExternalSubset(String name, String baseURI) Delegate to library entity resolver, ornullto indicate that there is no external subset.resolveEntity(String publicId, String systemId) Always throwsUnsupportedOperationException.resolveEntity(String name, String publicId, String baseURI, String systemId) Return anInputSourcefor the resolved schema location.toString()
-
Constructor Details
-
AppSchemaEntityResolver
EntityResolver backed by SchemaResolver to identify and trust local resources.- Parameters:
resolver-
-
AppSchemaEntityResolver
EntityResolver backed by SchemaResolver to identify and trust local resources, then GeoTools library configuration to locate resources.- Parameters:
resolver-hints-
-
AppSchemaEntityResolver
EntityResolver backed by SchemaResolver to identify and trust local resources, then GeoTools library configuration to locate resources.- Parameters:
resolver-entityResolver-
-
-
Method Details
-
getAccess
Description copied from interface:EntityResolver3Comma seperated list of entity resolution protocols required for EntityResolver to function.Common examples:
"http","file", or combined"file,http".To allow all access
"all", or to suppress all access""supported.- Specified by:
getAccessin interfaceEntityResolver3- Returns:
- Comma seperated list of protocols, allow all
"all", or none"".
-
resolveEntity
Always throwsUnsupportedOperationException. TheEntityResolver2interface must be used so that relative URLs are resolved correctly. If this method is called, it means that the parser is probably misconfigured.- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException- See Also:
-
getExternalSubset
Delegate to library entity resolver, ornullto indicate that there is no external subset.- Specified by:
getExternalSubsetin interfaceEntityResolver2- Throws:
SAXExceptionIOException- See Also:
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException Return anInputSourcefor the resolved schema location. Note that theEntityResolver2interface must be used because baseURI is needed to resolve relative URIs. The resolver uses baseURI to find the original unresolved context (which it has stored); this is then used to construct the unresolved URI of the schema. In the case of downloaded schemas, the original URI is used to download the schema into the cache; the resolved URI is the location of the cached schema.- Specified by:
resolveEntityin interfaceEntityResolver2- Throws:
SAXExceptionIOException- See Also:
-
toString
-