info.sswap.api.model
Interface SSWAPResource

All Superinterfaces:
SSWAPElement, SSWAPIndividual, SSWAPModel, SSWAPNode

public interface SSWAPResource
extends SSWAPNode

Describes a resource (a service) in SSWAP. Services in SSWAP are described by canonical/protocol graphs (e.g., RDG).

Author:
Blazej Bulka
See Also:
RDG

Method Summary
 java.net.URI getAboutURI()
          Gets the URI pointing to a human-readable description of this resource.
 SSWAPGraph getGraph()
          Gets the SSWAP graph of the resource.
 java.util.Collection<SSWAPGraph> getGraphs()
          Gets all the SSWAP graphs of the resource.
 java.net.URI getIcon()
          Gets the URI of the icon for this resource (if defined).
 java.net.URI getInputURI()
          Gets the URI pointing to a human-readable user interface for this resource.
 java.net.URI getMetadata()
          Gets the URI containing the machine-readable metadata for this resource.
 java.lang.String getName()
          Gets the name of the resource.
 java.lang.String getOneLineDescription()
          Gets one line description of the resource.
 java.net.URI getOutputURI()
           
 SSWAPProvider getProvider()
          Gets the object describing the provider of this resource.
 RDG getRDG()
          Gets the RDG where this resource is defined.
 void setAboutURI(java.net.URI aboutURI)
          Sets the URI pointing to a human-readable description of this resource.
 void setGraph(SSWAPGraph graph)
          Sets the SSWAPGraph for this resource.
 void setGraphs(java.util.Collection<SSWAPGraph> graphs)
          Sets the SSWAPGraphs for this resource.
 void setIcon(java.net.URI icon)
          Sets the URI of the icon for this resource
 void setInputURI(java.net.URI inputURI)
          Sets the URI pointing to a human-readable user interface for this resource.
 void setMetadata(java.net.URI metadata)
          Sets the URI pointing to the machine-readable metadata for this resource.
 void setName(java.lang.String name)
          Sets the name of the resource.
 void setOneLineDescription(java.lang.String oneLineDescription)
          Sets one line description of the resource.
 void setOutputURI(java.net.URI outputURI)
           
 void setProvider(SSWAPProvider provider)
          Sets the provider for this resource.
 void validateProvider()
           
 
Methods inherited from interface info.sswap.api.model.SSWAPNode
asSSWAPGraph, asSSWAPObject, asSSWAPProvider, asSSWAPResource, asSSWAPSubject, getID, isSSWAPGraph, isSSWAPObject, isSSWAPProvider, isSSWAPResource, isSSWAPSubject
 
Methods inherited from interface info.sswap.api.model.SSWAPIndividual
addProperty, addProperty, addProperty, addProperty, addType, clearProperty, getDeclaredType, getDeclaredTypes, getInferredIndividual, getProperties, getProperties, getProperty, getType, getTypes, hasValue, hasValue, isAnonymous, isCompatibleWith, isOfType, removeProperty, removeProperty, removeType, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from interface info.sswap.api.model.SSWAPElement
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getLabel, isIndividual, isList, isLiteral
 
Methods inherited from interface info.sswap.api.model.SSWAPModel
addImport, checkProfile, dereference, dereference, doClosure, getDocument, getImports, getInputStream, getNsPrefixMap, getReasoningService, getTypeSignature, getURI, isDereferenced, removeImport, removeNsPrefix, serialize, serialize, setNsPrefix, validate
 

Method Detail

getName

java.lang.String getName()
Gets the name of the resource. A valid description of the resource must include the information about the name. (The invalid graphs that do not provide this information about the resource, will cause this method to return null.)

Returns:
name of the resource (or null for invalid graphs)

setName

void setName(java.lang.String name)
Sets the name of the resource. A valid name of the resource must not be null.

Parameters:
name - the name of the resource (must not be null).

getOneLineDescription

java.lang.String getOneLineDescription()
Gets one line description of the resource.

Returns:
one line description of the resource (or null if not available).

setOneLineDescription

void setOneLineDescription(java.lang.String oneLineDescription)
Sets one line description of the resource.

Parameters:
oneLineDescription - the new one line description of the resource, or null if the current description is to be removed.

getAboutURI

java.net.URI getAboutURI()
Gets the URI pointing to a human-readable description of this resource. This URI should be dereferenceable if not null.

Returns:
URI pointing to a human-readable description, or null if there is no such description for the resource.

setAboutURI

void setAboutURI(java.net.URI aboutURI)
Sets the URI pointing to a human-readable description of this resource. This URI should be dereferenceable or null.

Parameters:
aboutURI - URI pointing to a human-readable description of this resource, or null if there is no such description for the resource.

getMetadata

java.net.URI getMetadata()
Gets the URI containing the machine-readable metadata for this resource. This URI should be dereferenceable or null.

Returns:
URI pointing to a machine-readable metadata for this resource, or null if there is no metadata for this resource.

setMetadata

void setMetadata(java.net.URI metadata)
Sets the URI pointing to the machine-readable metadata for this resource. This URI should be dereferenceable or null.

Parameters:
metadata - URI pointing to a machine-readable metadata for this resource, or null if there is no metadata for this resource.

getInputURI

java.net.URI getInputURI()
Gets the URI pointing to a human-readable user interface for this resource. This URI should be dereferenceable or null.

Returns:
URI pointing to a human-readable user interface for this resource, or null if there is no such interface for this resource.

setInputURI

void setInputURI(java.net.URI inputURI)
Sets the URI pointing to a human-readable user interface for this resource. This URI should be dereferencable or null.

Parameters:
inputURI - URI pointing to a human-readable interface for this resource, or null if there is no such interface for this resource.

getOutputURI

java.net.URI getOutputURI()

setOutputURI

void setOutputURI(java.net.URI outputURI)

getProvider

SSWAPProvider getProvider()
Gets the object describing the provider of this resource. Since the information about the provider is typically stored in another graph (PDG), this object is not dereferenced.

Returns:
a non-dereferenced SSWAPProvider for this resource.

setProvider

void setProvider(SSWAPProvider provider)
Sets the provider for this resource. Since the resource descriptions usually do not contain more information than the URI of the provider, this method can accept either dereferenced or non-dereferenced SSWAPProvider object.

Parameters:
provider - a SSWAPProvider object.

getGraph

SSWAPGraph getGraph()
Gets the SSWAP graph of the resource. If the resource has more than one graph, the first graph is returned.

Returns:
the SSWAPGraph object (a dereferenced one, since this information is typically within the same document as the resource description).

setGraph

void setGraph(SSWAPGraph graph)
Sets the SSWAPGraph for this resource. If the resource has more than one graph at the moment, they will be removed, and only the one set here will remain.

Parameters:
graph - the graph to be set for this resource

getGraphs

java.util.Collection<SSWAPGraph> getGraphs()
Gets all the SSWAP graphs of the resource.

Returns:
a collection of the SSWAPGraph objects. All objects are dereferenced one, since this information is typically within the same document as the resource description.

setGraphs

void setGraphs(java.util.Collection<SSWAPGraph> graphs)
Sets the SSWAPGraphs for this resource. If the resource has any other graphs, they will be replaced with the ones provided here.

Parameters:
graphs - a collection of SSWAPGraphs

getIcon

java.net.URI getIcon()
Gets the URI of the icon for this resource (if defined).

Returns:
the URI of the icon or null

setIcon

void setIcon(java.net.URI icon)
Sets the URI of the icon for this resource

Parameters:
icon - the URI of the icon or null

getRDG

RDG getRDG()
           throws DataAccessException
Gets the RDG where this resource is defined.

Returns:
the RDG
Throws:
DataAccessException - if it is necessary to retrieve the whole RDG and an error should occur while accessing it

validateProvider

void validateProvider()
                      throws ValidationException
Throws:
ValidationException


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.