org.openanzo.commands
Class Precondition

java.lang.Object
  extended by org.openanzo.commands.Precondition
All Implemented Interfaces:
IPrecondition

public class Precondition
extends java.lang.Object
implements IPrecondition

Implementation of IPrecondition

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
Precondition()
          Create a new Precondition
Precondition(java.util.Set<org.openrdf.model.URI> defaultUris, java.util.Set<org.openrdf.model.URI> namedGraphUris, java.lang.String queryString, IResult result)
          Create a new Precondition
 
Method Summary
 java.util.Set<org.openrdf.model.URI> getDefaultGraphUris()
          Get the set of NamedGraph URIs that make up the default graph for the dataset for this precondition.
 java.util.Set<org.openrdf.model.URI> getNamedGraphUris()
          Get the set of NamedGraph URIs that make up the dataset for this precondition.
 java.lang.String getQuery()
          Get the Sparql query string that defines the precondition
 IResult getResult()
          Get the expected result from the sparql query.
 void setDefaultGraphUris(java.util.Set<org.openrdf.model.URI> defaultUris)
          Set the set of NamedGraph URIs that make up the default graph for the dataset for this precondition.
 void setNamedGraphUris(java.util.Set<org.openrdf.model.URI> namedGraphUris)
          Set the set of NamedGraph URIs that make up the dataset for this precondition.
 void setQuery(java.lang.String queryString)
          Set the Sparql query string that defines the precondition.
 void setResult(IResult result)
          Set the expected result from the sparql query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Precondition

public Precondition(java.util.Set<org.openrdf.model.URI> defaultUris,
                    java.util.Set<org.openrdf.model.URI> namedGraphUris,
                    java.lang.String queryString,
                    IResult result)
Create a new Precondition

Parameters:
defaultUris - set of default graph URIs used during precondition query
namedGraphUris - set of named graph URIs used during precondition query
queryString - Sparql query string to run as precondition
result - Expected results of running query

Precondition

public Precondition()
Create a new Precondition

Method Detail

getQuery

public java.lang.String getQuery()
Description copied from interface: IPrecondition
Get the Sparql query string that defines the precondition

Specified by:
getQuery in interface IPrecondition
Returns:
Sparql query string

getResult

public IResult getResult()
Description copied from interface: IPrecondition
Get the expected result from the sparql query.

Specified by:
getResult in interface IPrecondition
Returns:
The expected result.

getDefaultGraphUris

public java.util.Set<org.openrdf.model.URI> getDefaultGraphUris()
Description copied from interface: IPrecondition
Get the set of NamedGraph URIs that make up the default graph for the dataset for this precondition.

Specified by:
getDefaultGraphUris in interface IPrecondition
Returns:
Set of NamedGraph URIs

getNamedGraphUris

public java.util.Set<org.openrdf.model.URI> getNamedGraphUris()
Description copied from interface: IPrecondition
Get the set of NamedGraph URIs that make up the dataset for this precondition.

Specified by:
getNamedGraphUris in interface IPrecondition
Returns:
Set of NamedGraph URIs

setDefaultGraphUris

public void setDefaultGraphUris(java.util.Set<org.openrdf.model.URI> defaultUris)
Description copied from interface: IPrecondition
Set the set of NamedGraph URIs that make up the default graph for the dataset for this precondition.

Specified by:
setDefaultGraphUris in interface IPrecondition
Parameters:
defaultUris - Set of NamedGraph URIs that make up the dataset.

setNamedGraphUris

public void setNamedGraphUris(java.util.Set<org.openrdf.model.URI> namedGraphUris)
Description copied from interface: IPrecondition
Set the set of NamedGraph URIs that make up the dataset for this precondition.

Specified by:
setNamedGraphUris in interface IPrecondition
Parameters:
namedGraphUris - Set of NamedGraph URIs that make up the dataset.

setQuery

public void setQuery(java.lang.String queryString)
Description copied from interface: IPrecondition
Set the Sparql query string that defines the precondition.

Specified by:
setQuery in interface IPrecondition

setResult

public void setResult(IResult result)
Description copied from interface: IPrecondition
Set the expected result from the sparql query.

Specified by:
setResult in interface IPrecondition
Parameters:
result - the expected results from the query


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.