Package de.gebit.integrity.providers
Class TestResource
- java.lang.Object
-
- de.gebit.integrity.providers.TestResource
-
- Direct Known Subclasses:
ArchiveTestResourceProvider.ArchivedTestResource
public class TestResource extends java.lang.Object
ATestResource
represents a single entity of an Integrity test script, which can be read by aTestResourceProvider
. 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(java.lang.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 resourceURI
for the current resource.boolean
equals(java.lang.Object anOther)
java.lang.String
getName()
TestResourceProvider
getProvider()
int
hashCode()
java.io.InputStream
openResource()
Open the resource.java.lang.String
toString()
-
-
-
Constructor Detail
-
TestResource
public TestResource(java.lang.String aName, TestResourceProvider aProvider)
Creates an instance.- Parameters:
aName
- the name of the resourceaProvider
- the resource provider
-
TestResource
public TestResource()
No-arg constructor for serialization.
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getProvider
public TestResourceProvider getProvider()
-
openResource
public java.io.InputStream openResource() throws java.io.IOException
Open the resource. This is basically a shorthand forgetProvider()
.openResource().- Returns:
- the opened resource
- Throws:
java.io.IOException
-
createPlatformResourceURI
public org.eclipse.emf.common.util.URI createPlatformResourceURI()
Creates an EMF-compatible platform resourceURI
for the current resource.- Returns:
- the URI
-
equals
public boolean equals(java.lang.Object anOther)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-