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_LOCATION
-
Fields inherited from interface org.eclipse.lemminx.uriresolver.URIResolverExtension
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description URIResolverExtensionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getExternalGrammarLocation(URI fileURI)Provided the file path URI, this will return the external schema location.voidregisterResolver(URIResolverExtension resolver)Register an URI resolver.Stringresolve(String baseLocation, String publicId, String systemId)org.apache.xerces.xni.parser.XMLInputSourceresolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)ResolvedURIInforesolveInfo(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, wait
-
Methods inherited from interface org.eclipse.lemminx.uriresolver.URIResolverExtension
getName
-
-
-
-
Method Detail
-
registerResolver
public void registerResolver(URIResolverExtension resolver)
Register an URI resolver.- Parameters:
resolver- the URI resolver to register.
-
unregisterResolver
public void unregisterResolver(URIResolverExtension resolver)
Unregister an URI resolver.- Parameters:
resolver- the URI resolver to unregister.
-
resolve
public String resolve(String baseLocation, String publicId, String systemId)
- 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
public ResolvedURIInfo resolveInfo(String baseLocation, String publicId, String systemId)
-
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
public Map<String,String> getExternalGrammarLocation(URI fileURI)
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
-
-