Class XMLFileAssociationResolverExtension
java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.uriresolver.XMLFileAssociationResolverExtension
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLEntityResolver,IExternalGrammarLocationProvider,URIResolverExtension
public class XMLFileAssociationResolverExtension
extends Object
implements URIResolverExtension, IExternalGrammarLocationProvider
XML file association URI resolver.
-
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.getName()booleansetFileAssociations(XMLFileAssociation[] fileAssociations) voidsetRootUri(String rootUri) Set the root URIMethods 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
resolveEntity
-
Constructor Details
-
XMLFileAssociationResolverExtension
public XMLFileAssociationResolverExtension()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceURIResolverExtension
-
setFileAssociations
- Parameters:
fileAssociations-- Returns:
- true if file associations changed and false otherwise
-
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
-
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
-
setRootUri
Set the root URI- Parameters:
rootUri- the root URI
-