org.rdfcontext.signing
Class RDFSigner

java.lang.Object
  extended byorg.rdfcontext.signing.RDFSigner

public class RDFSigner
extends java.lang.Object

This object manipulate a given signed (or not signed) RDF/XML. It build a signature report list, it can add or delete a report in the list. Moreover it can paste the valid signature on the graph


Constructor Summary
RDFSigner(com.hp.hpl.jena.rdf.model.Model originalModel)
          Deprecated. This constructor create a signr given a generic Model. The signature process works only on MSGs!
RDFSigner(com.hp.hpl.jena.rdf.model.Model originalModel, IURLResolver customURLResolver)
          Deprecated. This constructor create a signr given a generic Model. The signature process works only on MSGs!
RDFSigner(MSG msgToBeSigned)
          Default constructor.
RDFSigner(MSG msgToBeSigned, IURLResolver customURLResolver)
           
 
Method Summary
 void addSignatureReport(SignatureReport sr)
          Add a SignatureReport to the signatureList
 com.hp.hpl.jena.rdf.model.Model getSignedModel()
          Returns the signed version of the model (=cleanmodel + signatures in the current report) The Signature
 boolean isAllValid()
          return true if all the signature in the signatureList has valid
 java.util.ArrayList listSignatureReports()
           
 boolean signModel(LiveDBinSignature liveSign)
          Signs a model using the given LiveSignature and the DefaultURLResolver to check the availability of the certificate.
 boolean signModel(LiveDBinSignature liveSign, IURLResolver resolver)
          Sign the current model (passed by Constructor) using the specified LiveDBinSignature.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFSigner

public RDFSigner(com.hp.hpl.jena.rdf.model.Model originalModel)
Deprecated. This constructor create a signr given a generic Model. The signature process works only on MSGs!

Parameters:
originalModel -

RDFSigner

public RDFSigner(com.hp.hpl.jena.rdf.model.Model originalModel,
                 IURLResolver customURLResolver)
Deprecated. This constructor create a signr given a generic Model. The signature process works only on MSGs!

Parameters:
originalModel -

RDFSigner

public RDFSigner(MSG msgToBeSigned)
Default constructor. This class signs an MSG reifing a random triple containded in it, it is not ment to sing a generic graph, ony MSG will be correctly signed. Certificate availability will be checked using the DefaultURLResolver.


RDFSigner

public RDFSigner(MSG msgToBeSigned,
                 IURLResolver customURLResolver)
Parameters:
msgToBeSigned - - the MSG to be signed
customURLResolver - - the URL resolver to be used to verify the availability of the online certificate.
Method Detail

isAllValid

public boolean isAllValid()
return true if all the signature in the signatureList has valid


addSignatureReport

public void addSignatureReport(SignatureReport sr)
Add a SignatureReport to the signatureList


signModel

public boolean signModel(LiveDBinSignature liveSign,
                         IURLResolver resolver)
Sign the current model (passed by Constructor) using the specified LiveDBinSignature.

Parameters:
liveSign -
resolver - The URLResolver to check the availability of the certificate via URL (provided in the RDF model).
Returns:
true if the signing proccess succeds, false otherwise
Throws:
InvalidSignedDataException
java.security.SignatureException
See Also:
LiveDBinSignature

signModel

public boolean signModel(LiveDBinSignature liveSign)
Signs a model using the given LiveSignature and the DefaultURLResolver to check the availability of the certificate.

Parameters:
liveSign -
Returns:
true if the signature process succeded, false otherwise
Throws:
java.security.SignatureException

getSignedModel

public com.hp.hpl.jena.rdf.model.Model getSignedModel()
                                               throws UnsupportedCertificateTypeException,
                                                      EmptyModelException
Returns the signed version of the model (=cleanmodel + signatures in the current report) The Signature

Throws:
EmptyModelException
UnsupportedCertificateTypeException

listSignatureReports

public java.util.ArrayList listSignatureReports()