Package org.pentaho.reporting.libraries.resourceloader

# Class ResourceKey

java.lang.Object
org.pentaho.reporting.libraries.resourceloader.ResourceKey

All Implemented Interfaces:
  `Serializable`

public final class ResourceKey extends Object implements 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:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ResourceKey(Object schema, Object identifier, Map factoryParameters)`
`ResourceKey(ResourceKey parent, Object schema, Object identifier, Map factoryParameters)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`Map`
`getFactoryParameters()`
`Object`
`getIdentifier()`
`String`
`getIdentifierAsString()`
Returns a String version of the identifier.
`ResourceKey`
`getParent()`
`Object`
`getSchema()`
Returns the schema of this resource key.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ResourceKey

public ResourceKey(Object schema, Object identifier, Map factoryParameters)

### ResourceKey

public ResourceKey(ResourceKey parent, Object schema, Object identifier, Map factoryParameters)

## Method Details

### getParent

public ResourceKey getParent()

### getFactoryParameters

public Map getFactoryParameters()

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### getIdentifier

public Object getIdentifier()

### getIdentifierAsString

public 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 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 String toString()

Overrides:
  `toString` in class `Object`