|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.connectivity.oda.util.ResourceIdentifiers
public class ResourceIdentifiers
Represents the resource identifiers of an ODA consumer application. An ODA consumer application may optionally specify its resource identifiers in an instance, and pass it to an ODA runtime driver in an application context map. An application context map is normally passed through the ODA runtime interfaces' setAppContext method(s). Its support and usage by an individual ODA runtime driver is optional and implementation-dependent.
Nested Class Summary | |
---|---|
class |
ResourceIdentifiers.URILocator
The default locator of a resource URI relative to a specified base URI. |
Field Summary | |
---|---|
static java.lang.String |
ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS
A pre-defined key to associate an instance of ResourceIdentifiers in an application context map. |
Constructor Summary | |
---|---|
ResourceIdentifiers()
|
Method Summary | |
---|---|
static ResourceIdentifiers |
get(java.lang.Object appContext)
A convenience method to obtain the ResourceIdentifiers instance stored in the specified application context Map with the pre-defined key. |
java.net.URI |
getApplResourceBaseURI()
Returns the base URI of general purpose resources of an ODA consumer application. |
ResourceIdentifiers.URILocator |
getApplResourceURILocator()
Returns the URI Locator registered by an ODA consumer application for its application resources. |
java.net.URI |
getDesignResourceBaseURI()
Returns the base URI of the design resources of an ODA consumer application. |
ResourceIdentifiers.URILocator |
getDesignResourceURILocator()
Returns the URI Locator registered by an ODA consumer application for its design resources. |
void |
registerApplResourceURILocator(ResourceIdentifiers.URILocator uriLocator)
Registers an URILocator defined by an ODA consumer application for its application resources. |
void |
registerDesignResourceURILocator(ResourceIdentifiers.URILocator uriLocator)
Registers a URILocator defined by an ODA consumer application for its design resources. |
java.net.URI |
resolveApplResource(java.net.URI uri)
Resolves the specified URI against the base URI of an ODA consumer application's general purpose resources. |
java.net.URI |
resolveDesignResource(java.net.URI uri)
Resolves the specified URI against the base URI of an ODA consumer application's design resources. |
java.net.URI |
resolveResourceLocation(java.lang.String resourcePath)
EXPERIMENTAL Converts and resolves the specified resource location path to a URI, based on the registered resource URILocator and its base URI. |
void |
setApplResourceBaseURI(java.net.URI baseURI)
Specifies the base URI of general purpose resources of an ODA consumer application. |
void |
setDesignResourceBaseURI(java.net.URI baseURI)
Specifies the base URI of the design resources of an ODA consumer application. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS
Constructor Detail |
---|
public ResourceIdentifiers()
Method Detail |
---|
public static ResourceIdentifiers get(java.lang.Object appContext)
appContext
- an application context Map
public java.net.URI resolveApplResource(java.net.URI uri)
uri
- the URI to be resolved against the application resource base URI
public java.net.URI getApplResourceBaseURI()
resolveApplResource(URI)
or
get the URI locator in getApplResourceURILocator()
to resolve a relative URI reference.
resolveApplResource(URI)
,
getApplResourceURILocator()
public void setApplResourceBaseURI(java.net.URI baseURI)
ResourceIdentifiers.URILocator
that can be used by a client
to resolve a resource URI against the specified baseURI.
Any previously registered application resource URILocator and its base URI is replaced.
baseURI
- base URI; may be nullregisterApplResourceURILocator(URILocator)
public ResourceIdentifiers.URILocator getApplResourceURILocator()
getApplResourceBaseURI()
public void registerApplResourceURILocator(ResourceIdentifiers.URILocator uriLocator)
uriLocator
- an application resource URI locatorsetApplResourceBaseURI(URI)
public java.net.URI resolveDesignResource(java.net.URI uri)
uri
- the URI to be resolved against the design resource base URI
public java.net.URI getDesignResourceBaseURI()
resolveDesignResource(URI)
or
get the URI locator in getDesignResourceURILocator()
to resolve a relative URI reference.
resolveDesignResource(URI)
,
getDesignResourceURILocator()
public void setDesignResourceBaseURI(java.net.URI baseURI)
ResourceIdentifiers.URILocator
that can be used by a client
to resolve a resource URI against the specified baseURI.
Any previously registered design resource URILocator and its base URI is replaced.
baseURI
- base URI; may be nullregisterDesignResourceURILocator(URILocator)
public ResourceIdentifiers.URILocator getDesignResourceURILocator()
getDesignResourceBaseURI()
public void registerDesignResourceURILocator(ResourceIdentifiers.URILocator uriLocator)
uriLocator
- a design resource URI locatorsetDesignResourceBaseURI(URI)
public java.net.URI resolveResourceLocation(java.lang.String resourcePath)
resourcePath
- the path to be encoded and resolved to a URI;
may be an absolute or relative path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |