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
ATestResourcerepresents 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(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.URIcreatePlatformResourceURI()Creates an EMF-compatible platform resourceURIfor the current resource.booleanequals(Object anOther)StringgetName()TestResourceProvidergetProvider()inthashCode()InputStreamopenResource()Open the resource.StringtoString()
-
-
-
Constructor Detail
-
TestResource
public TestResource(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 String getName()
-
getProvider
public TestResourceProvider getProvider()
-
openResource
public InputStream openResource() throws IOException
Open the resource. This is basically a shorthand forgetProvider().openResource().- Returns:
- the opened resource
- Throws:
IOException
-
createPlatformResourceURI
public org.eclipse.emf.common.util.URI createPlatformResourceURI()
Creates an EMF-compatible platform resourceURIfor the current resource.- Returns:
- the URI
-
-