Package io.opencaesar.oml.util
Class OmlCatalog
java.lang.Object
io.opencaesar.oml.util.OmlCatalog
The Catalog that resolves logical IRIs to physical URIs. It is a wrapper around the the Apache XML Resolver Catalog.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OmlCatalog
create
(org.eclipse.emf.common.util.URI catalogUri) Creates a new Oml Catalog given a catalog URIstatic OmlCatalog
Creates a new Oml Catalog given a catalog URIorg.eclipse.emf.common.util.URI
deresolveUri
(org.eclipse.emf.common.util.URI path) Deresolves the given physical URI to a logical URIList<org.eclipse.emf.common.util.URI>
Gets the physical URIs that are resolved by this catalogGets the rewrite URIs supported by this catalogorg.eclipse.emf.common.util.URI
resolveUri
(org.eclipse.emf.common.util.URI uri) Resolves the given logical URI to a physical URI
-
Method Details
-
create
public static OmlCatalog create(org.eclipse.emf.common.util.URI catalogUri, List<String> extensions) throws IOException Creates a new Oml Catalog given a catalog URI- Parameters:
catalogUri
- The URI of a catalog file named 'catalog.xml'extensions
- The supported OML file extensions- Returns:
- A new instance of Oml Catalog
- Throws:
IOException
- When there are problems parsing the catalog
-
create
Creates a new Oml Catalog given a catalog URI- Parameters:
catalogUri
- The URI of a catalog file named 'catalog.xml'- Returns:
- A new instance of Oml Catalog
- Throws:
IOException
- When there are problems parsing the catalog
-
resolveUri
public org.eclipse.emf.common.util.URI resolveUri(org.eclipse.emf.common.util.URI uri) throws IOException Resolves the given logical URI to a physical URI- Parameters:
uri
- The logical URI to resolve- Returns:
- The resolved physical URI
- Throws:
IOException
- if the logical URI cannot be resolved to a physical path
-
deresolveUri
public org.eclipse.emf.common.util.URI deresolveUri(org.eclipse.emf.common.util.URI path) throws IOException Deresolves the given physical URI to a logical URI- Parameters:
path
- The physical URI to deresolve- Returns:
- The deresolved logical URI
- Throws:
IOException
- if the physical URI cannot be deresolved to a logical URI
-
getResolvedUris
Gets the physical URIs that are resolved by this catalog- Returns:
- a list of physical URIs
- Throws:
IOException
-
getRewriteUris
Gets the rewrite URIs supported by this catalog- Returns:
- a list of rewrite URIs
- Throws:
IOException
-