Package org.eclipse.lemminx.uriresolver
Class URIResolverExtensionManager
java.lang.Object
org.eclipse.lemminx.uriresolver.URIResolverExtensionManager
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLEntityResolver,IExternalGrammarLocationProvider,URIResolverExtension
public class URIResolverExtensionManager
extends Object
implements URIResolverExtension, IExternalGrammarLocationProvider
URI resolver manager.
-
Field Summary
Fields inherited from interface org.eclipse.lemminx.uriresolver.IExternalGrammarLocationProvider
DOCTYPE, NO_NAMESPACE_SCHEMA_LOCATION, RELAXNG, SCHEMA_LOCATIONFields inherited from interface org.eclipse.lemminx.uriresolver.URIResolverExtension
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExternalGrammarLocation(URI fileURI) Provided the file path URI, this will return the external schema location.voidregisterResolver(URIResolverExtension resolver) Register an URI resolver.org.apache.xerces.xni.parser.XMLInputSourceresolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) resolveInfo(String baseLocation, String publicId, String systemId) voidunregisterResolver(URIResolverExtension resolver) Unregister an URI resolver.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.lemminx.uriresolver.URIResolverExtension
getName
-
Constructor Details
-
URIResolverExtensionManager
public URIResolverExtensionManager()
-
-
Method Details
-
registerResolver
Register an URI resolver.- Parameters:
resolver- the URI resolver to register.
-
unregisterResolver
Unregister an URI resolver.- Parameters:
resolver- the URI resolver to unregister.
-
resolve
- Specified by:
resolvein interfaceURIResolverExtension- Parameters:
baseLocation- - the location of the resource that contains the uripublicId- - an optional public identifier (i.e. namespace name), or null if nonesystemId- - an absolute or relative URI, or null if none- Returns:
- an absolute URI representation of the 'logical' location of the resource
-
resolveInfo
-
resolveEntity
public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) throws org.apache.xerces.xni.XNIException, IOException - Specified by:
resolveEntityin interfaceURIResolverExtension- Specified by:
resolveEntityin interfaceorg.apache.xerces.xni.parser.XMLEntityResolver- Throws:
org.apache.xerces.xni.XNIExceptionIOException
-
getExternalGrammarLocation
Description copied from interface:IExternalGrammarLocationProviderProvided the file path URI, this will return the external schema location. The schema location is associated to a specific property, which serves as the key in the map. The supported properties are:http://apache.org/xml/properties/schema/external-schemaLocation - The value for this property follows the same rules as the schemaLocation attribute for an XML document (i.e., multiple schemas are acceptable and must be white-space separated).
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation - The value for this property follows the same rules as the noNamespaceSchemaLocation attribute for an XML document (i.e., only one schema is allowed).
- Specified by:
getExternalGrammarLocationin interfaceIExternalGrammarLocationProvider- Returns:
- a
Mapassociating the external-schemaLocation and/or external-noNamespaceSchemaLocation to the schema location
-