Class ResourceKey
- java.lang.Object
-
- org.pentaho.reporting.libraries.resourceloader.ResourceKey
-
- All Implemented Interfaces:
java.io.Serializable
public final class ResourceKey extends java.lang.Object implements java.io.SerializableThe 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResourceKey(java.lang.Object schema, java.lang.Object identifier, java.util.Map factoryParameters)ResourceKey(ResourceKey parent, java.lang.Object schema, java.lang.Object identifier, java.util.Map factoryParameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.MapgetFactoryParameters()java.lang.ObjectgetIdentifier()java.lang.StringgetIdentifierAsString()Returns a String version of the identifier.ResourceKeygetParent()java.lang.ObjectgetSchema()Returns the schema of this resource key.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ResourceKey
public ResourceKey(java.lang.Object schema, java.lang.Object identifier, java.util.Map factoryParameters)
-
ResourceKey
public ResourceKey(ResourceKey parent, java.lang.Object schema, java.lang.Object identifier, java.util.Map factoryParameters)
-
-
Method Detail
-
getParent
public ResourceKey getParent()
-
getFactoryParameters
public java.util.Map getFactoryParameters()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getIdentifier
public java.lang.Object getIdentifier()
-
getIdentifierAsString
public java.lang.String getIdentifierAsString()
Returns a String version of the identifier.- Returns:
- the identifier as string or null, if the identifier could not be converted easily.
-
getSchema
public java.lang.Object 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-