Package org.eclipse.lemminx.extensions.contentmodel.uriresolver

## 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
`XMLCatalogResolverExtension()`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `expandSystemId​(String path)`
`String[]` `getCatalogs()` Get the XML catalogs.
`String` `getName()`
`void` `refreshCatalogs()` Refresh the XML catalogs.
`String` `resolve​(String baseURI, String publicId, String systemId)`
`org.apache.xerces.xni.parser.XMLInputSource` `resolveEntity​(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)`
`boolean` `setCatalogs​(String[] catalogs)` Initialize catalogs path.
`void` `setRootUri​(String rootUri)` Set the root URI

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XMLCatalogResolverExtension

    public XMLCatalogResolverExtension()

### Method Detail

#### getName

    public String getName()

Specified by:
  `getName` in interface `URIResolverExtension`

#### resolve

    public String resolve​(String baseURI,
                          String publicId,
                          String systemId)

Specified by:
  `resolve` in interface `URIResolverExtension`
Parameters:
  `baseURI` - - the location of the resource that contains the uri
  `publicId` - - an optional public identifier (i.e. namespace name), or null if none
  `systemId` - - 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:
  `resolveEntity` in interface `URIResolverExtension`
Specified by:
  `resolveEntity` in interface `org.apache.xerces.xni.parser.XMLEntityResolver`
Throws:
  `org.apache.xerces.xni.XNIException`
  `IOException`

#### 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

#### expandSystemId

    public String expandSystemId​(String path)

#### refreshCatalogs

    public void refreshCatalogs()

Refresh the XML catalogs.

#### getCatalogs

    public String[] getCatalogs()

Get the XML catalogs.