de.fuberlin.wiwiss.ng4j.swp
Interface SWPNamedGraphSet

All Superinterfaces:
NamedGraphSet
All Known Implementing Classes:
SWPNamedGraphSetImpl

public interface SWPNamedGraphSet
extends NamedGraphSet

Author:
chris bizer, rowland watkins

Method Summary
 boolean assertGraphs(ArrayList listOfGraphNames, SWPAuthority authority, ArrayList listOfAuthorityProperties)
          Given an list of graph names and an SWP authority, assert each listed graph with this authority.
 boolean assertGraphsWithSignature(ArrayList listOfGraphNames, SWPAuthority authority, Node signatureMethod, Node digestMethod, ArrayList listOfAuthorityProperties, String keystore, String password)
          Given an list of graphs and an SWP Authority, assert each graph in the graphset with this Authority.
 boolean assertWithSignature(SWPAuthority authority, Node signatureMethod, Node digestMethod, ArrayList listOfAuthorityProperties, String keystore, String password)
          Same as swpAssert, except instead of simply asserting a graph, we sign the asserted graph with a digital signature according to the specified signatureMethod.
 ExtendedIterator getAllAssertedGraphs(SWPAuthority authority)
          Returns an iterator over all named graphs asserted by a given authority.
 ExtendedIterator getAllQuotedGraphs(SWPAuthority authority)
          Returns an iterator over all named graphs quoted by a given authority.
 ExtendedIterator getAllWarrants(SWPAuthority authority)
          Returns an iterator over all SWPWarrants for a given authority.
 boolean quoteGraphs(ArrayList listOfGraphNames, SWPAuthority authority, ArrayList listOfAuthorityProperties)
           
 boolean quoteWithSignature(SWPAuthority authority, Node signatureMethod, Node digestMethod, ArrayList listOfAuthorityProperties, String keystore, String password)
          Same as swpQuote, except instead of simply quoting a graph, we sign the quoted graph with a digital signature according to the specified signatureMethod.
 boolean swpAssert(SWPAuthority authority)
           
 boolean swpAssert(SWPAuthority authority, ArrayList listOfAuthorityProperties)
          Given an SWP Authority, assert all graphs in the graphset with this Authority.
 boolean swpQuote(SWPAuthority authority)
           
 boolean swpQuote(SWPAuthority authority, ArrayList listOfAuthorityProperties)
          Given an SWP Authority, quote all graphs in the graphset with this Authority.
 boolean verifyAllSignatures()
          For all signature graphs in the set, verify all signatures.
 
Methods inherited from interface de.fuberlin.wiwiss.ng4j.NamedGraphSet
addGraph, addQuad, asJenaGraph, asJenaModel, clear, close, containsGraph, containsGraph, containsQuad, countGraphs, countQuads, createGraph, createGraph, findQuads, findQuads, getGraph, getGraph, isEmpty, listGraphs, read, read, read, removeGraph, removeGraph, removeQuad, write, write
 

Method Detail

swpAssert

boolean swpAssert(SWPAuthority authority,
                  ArrayList listOfAuthorityProperties)

Given an SWP Authority, assert all graphs in the graphset with this Authority. This will add a warrant graph asserting all other graphs to the graph set. The listOfAuthorityProperties contains list of properties names (as nodes) describing the authority. These properties will be included into the warrant graph, e.g. foaf:name, foaf:mbox

The new graph will be named using a UUID. If the Authority doesn't have a URI, then a blank node will be used to identify the authority and a additional triple containing the foaf:mbox adress of the authority will be added. Return true if successful.

Parameters:
authority -
listOfAuthorityProperties -
Returns:
boolean

swpAssert

boolean swpAssert(SWPAuthority authority)

swpQuote

boolean swpQuote(SWPAuthority authority,
                 ArrayList listOfAuthorityProperties)

Given an SWP Authority, quote all graphs in the graphset with this Authority.

Quotes are not as strong semantically as assertions. Quotes are really used when using second hand information, i.e. the Authority is not the creator of the original graph.

The listOfAuthorityProperties contains list of properties names (as nodes) describing the authority. These properties will be included into the warrant graph, e.g. foaf:name, foaf:mbox,


swpQuote

boolean swpQuote(SWPAuthority authority)

assertWithSignature

boolean assertWithSignature(SWPAuthority authority,
                            Node signatureMethod,
                            Node digestMethod,
                            ArrayList listOfAuthorityProperties,
                            String keystore,
                            String password)
                            throws SWPBadSignatureException,
                                   SWPBadDigestException
Same as swpAssert, except instead of simply asserting a graph, we sign the asserted graph with a digital signature according to the specified signatureMethod. Example: :Timestamp { :G1 swp:assertedBy :Timestamp . :G1 swp:digestMethod swp:JjcRdfC14N-sha1 . :G1 swp:digest "..." . :G2 swp:assertedBy :Timestamp . :G2 swp:digestMethod swp:JjcRdfC14N-sha1 . :G2 swp:digest "..." . :Timestamp swp:assertedBy :Timestamp . :Timestamp swp:authority . :Timestamp swp:signatureMethod swp:JjcRdfC14N-rsa-sha1 . :Timestamp swp:signature "..." } The listOfAuthorityProperties contains list of properties names (as nodes) describing the authority. These properties will be included into the warrant graph, e.g. foaf:name, foaf:mbox, swp:key, swp:certificate Return true is successful.

Parameters:
authority -
signatureMethod -
digestMethod -
listOfAuthorityProperties -
Returns:
Throws:
SWPBadSignatureException
SWPBadDigestException

quoteWithSignature

boolean quoteWithSignature(SWPAuthority authority,
                           Node signatureMethod,
                           Node digestMethod,
                           ArrayList listOfAuthorityProperties,
                           String keystore,
                           String password)
                           throws SWPBadSignatureException,
                                  SWPBadDigestException
Same as swpQuote, except instead of simply quoting a graph, we sign the quoted graph with a digital signature according to the specified signatureMethod. Example: :Timestamp { :G1 swp:quotedBy :Timestamp . :G1 swp:digestMethod swp:JjcRdfC14N-sha1 . :G1 swp:digest "..." . :G2 swp:quotedBy :Timestamp . :G2 swp:digestMethod swp:JjcRdfC14N-sha1 . :G2 swp:digest "..." . :Timestamp swp:assertedBy :Timestamp . :Timestamp swp:authority . :Timestamp swp:signatureMethod swp:JjcRdfC14N-rsa-sha1 . :Timestamp swp:signature "..." } The listOfAuthorityProperties contains list of properties names (as nodes) describing the authority. These properties will be included into the warrant graph, e.g. foaf:name, foaf:mbox, swp:key, swp:certificate Return true of successful.

Parameters:
authority -
signatureMethod -
digestMethod -
listOfAuthorityProperties -
Returns:
Throws:
SWPBadSignatureException
SWPBadDigestException

assertGraphs

boolean assertGraphs(ArrayList listOfGraphNames,
                     SWPAuthority authority,
                     ArrayList listOfAuthorityProperties)
Given an list of graph names and an SWP authority, assert each listed graph with this authority. Return true if successful.

Parameters:
listOfGraphnames - as Nodes
authority -
listOfAuthorityProperties -
Returns:

quoteGraphs

boolean quoteGraphs(ArrayList listOfGraphNames,
                    SWPAuthority authority,
                    ArrayList listOfAuthorityProperties)

assertGraphsWithSignature

boolean assertGraphsWithSignature(ArrayList listOfGraphNames,
                                  SWPAuthority authority,
                                  Node signatureMethod,
                                  Node digestMethod,
                                  ArrayList listOfAuthorityProperties,
                                  String keystore,
                                  String password)
                                  throws SWPBadSignatureException,
                                         SWPBadDigestException
Given an list of graphs and an SWP Authority, assert each graph in the graphset with this Authority. Return true if successful.

Parameters:
listOfGraphURIs -
authority -
Returns:
Throws:
SWPBadSignatureException
SWPBadDigestException

verifyAllSignatures

boolean verifyAllSignatures()
For all signature graphs in the set, verify all signatures. Calling this method requires adding a graph called before. This graph has to contain the public keys and certificates of authorities or root certificates by CAs trusted by the user. The content of this graph will be treated as trustworthy information in the signature verification process. The results of the signature verification process will be added as a new graph called to the graphset. Example graph { :Warrent1 swp:signatureVerification swp:sucessful . :Warrent2 swp:signatureVerification swp:notSucessful . :Warrent3 swp:signatureVerification swp:sucessful } Return true if successful.

Returns:

getAllWarrants

ExtendedIterator getAllWarrants(SWPAuthority authority)
Returns an iterator over all SWPWarrants for a given authority.


getAllAssertedGraphs

ExtendedIterator getAllAssertedGraphs(SWPAuthority authority)
Returns an iterator over all named graphs asserted by a given authority.


getAllQuotedGraphs

ExtendedIterator getAllQuotedGraphs(SWPAuthority authority)
Returns an iterator over all named graphs quoted by a given authority.