Class XMLCatalogResolverExtension
- java.lang.Object
-
- org.eclipse.lemminx.extensions.contentmodel.uriresolver.XMLCatalogResolverExtension
-
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLEntityResolver,URIResolverExtension
public class XMLCatalogResolverExtension extends Object implements URIResolverExtension
XML catalog URI resolver.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.lemminx.uriresolver.URIResolverExtension
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description XMLCatalogResolverExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringexpandSystemId(String path)String[]getCatalogs()Get the XML catalogs.StringgetName()voidrefreshCatalogs()Refresh the XML catalogs.Stringresolve(String baseURI, String publicId, String systemId)org.apache.xerces.xni.parser.XMLInputSourceresolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)booleansetCatalogs(String[] catalogs)Initialize catalogs path.voidsetRootUri(String rootUri)Set the root URI
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceURIResolverExtension
-
resolve
public String resolve(String baseURI, String publicId, String systemId)
- Specified by:
resolvein interfaceURIResolverExtension- Parameters:
baseURI- - 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
-
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
-
setRootUri
public void setRootUri(String rootUri)
Set the root URI- Parameters:
rootUri- the root URI
-
setCatalogs
public boolean setCatalogs(String[] catalogs)
Initialize catalogs path.- Parameters:
catalogs- the catalog path array.- Returns:
- true if catalogs changed and false otherwise
-
refreshCatalogs
public void refreshCatalogs()
Refresh the XML catalogs.
-
getCatalogs
public String[] getCatalogs()
Get the XML catalogs.
-
-