Package de.gebit.integrity.providers

## Class TestResource

- java.lang.Object
- - de.gebit.integrity.providers.TestResource

- Direct Known Subclasses:
    `ArchiveTestResourceProvider.ArchivedTestResource`

      public class TestResource
      extends Object

  A `TestResource` represents a single entity of an Integrity test script, which can be read by a `TestResourceProvider`. It basically consists of a unique name and provider combination.
  Author:
    Rene Schneider - initial API and implementation

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TestResource()` | No-arg constructor for serialization.
    `TestResource​(String aName, TestResourceProvider aProvider)` | Creates an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.eclipse.emf.common.util.URI` | `createPlatformResourceURI()` | Creates an EMF-compatible platform resource `URI` for the current resource.
    `boolean` | `equals​(Object anOther)` |
    `String` | `getName()` |
    `TestResourceProvider` | `getProvider()` |
    `int` | `hashCode()` |
    `InputStream` | `openResource()` | Open the resource.
    `String` | `toString()` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TestResource

          public TestResource​(String aName,
                              TestResourceProvider aProvider)

      Creates an instance.
      Parameters:
        `aName` - the name of the resource
        `aProvider` - the resource provider

    - #### TestResource

          public TestResource()

      No-arg constructor for serialization.

  - ### Method Detail

    - #### getName

          public String getName()

    - #### getProvider

          public TestResourceProvider getProvider()

    - #### openResource

          public InputStream openResource()
                                   throws IOException

      Open the resource. This is basically a shorthand for `getProvider()`.openResource().
      Returns:
        the opened resource
      Throws:
        `IOException`

    - #### createPlatformResourceURI

          public org.eclipse.emf.common.util.URI createPlatformResourceURI()

      Creates an EMF-compatible platform resource `URI` for the current resource.
      Returns:
        the URI

    - #### equals

          public boolean equals​(Object anOther)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`