Package org.incenp.linkml.schema
Class XMLCatalogSchemaResolver
- java.lang.Object
-
- org.incenp.linkml.schema.XMLCatalogSchemaResolver
-
- All Implemented Interfaces:
ISchemaResolver
public class XMLCatalogSchemaResolver extends Object implements ISchemaResolver
A schema resolver that relies on a XML Catalog to resolve import names into schema sources.
-
-
Constructor Summary
Constructors Constructor Description XMLCatalogSchemaResolver(File catalogFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISchemaSourceresolve(String name, String base)Resolves the given schema name into a schema source object.
-
-
-
Constructor Detail
-
XMLCatalogSchemaResolver
public XMLCatalogSchemaResolver(File catalogFile) throws CatalogException
- Throws:
CatalogException
-
-
Method Detail
-
resolve
public ISchemaSource resolve(String name, String base) throws InvalidSchemaException
Description copied from interface:ISchemaResolverResolves the given schema name into a schema source object.- Specified by:
resolvein interfaceISchemaResolver- Parameters:
name- The name of the schema to resolve. Of note, if the name was originally provided as a Curie, this method will receive the expanded form of the original name.base- The base location from which to resolve relative names.- Returns:
- A
ISchemaSourceobject that can be used to access the content of the schema. - Throws:
InvalidSchemaException- If the name cannot be resolved into a schema source.
-
-