Class ResourceKey
java.lang.Object
org.pentaho.reporting.libraries.resourceloader.ResourceKey
- All Implemented Interfaces:
Serializable
The key is an unique identifier for the resource. Most of the time, this may be an URL, but other (especially
database based) schemas are possible.
A resource key must provide an 'equals' implementation. ResourceKeys should be implemented as immutable classes, so
that they can be safely stored in collections or on external storages (like caches).
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorDescriptionResourceKey
(Object schema, Object identifier, Map<? extends ParameterKey, Object> factoryParameters) ResourceKey
(ResourceKey parent, Object schema, Object identifier, Map<? extends ParameterKey, Object> factoryParameters) -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceKey
createAsDerived
(ResourceKey parent, ResourceKey child) boolean
Returns a String version of the identifier.Returns the schema of this resource key.int
hashCode()
toString()
-
Constructor Details
-
ResourceKey
public ResourceKey(Object schema, Object identifier, Map<? extends ParameterKey, Object> factoryParameters) -
ResourceKey
public ResourceKey(ResourceKey parent, Object schema, Object identifier, Map<? extends ParameterKey, Object> factoryParameters)
-
-
Method Details
-
createAsDerived
-
getParent
-
getFactoryParameters
-
equals
-
hashCode
public int hashCode() -
getIdentifier
-
getIdentifierAsString
Returns a String version of the identifier.- Returns:
- the identifier as string or null, if the identifier could not be converted easily.
-
getSchema
Returns the schema of this resource key. The schema is an internal identifier to locate the resource-loader implementation that was responsible for creating the key in the first place. The schema has no meaning outside the resource loading framework.- Returns:
-
toString
-