org.rdfcontext.model.MSG.jena
Class MSG

java.lang.Object
  extended byorg.rdfcontext.model.MSG.jena.MSG
All Implemented Interfaces:
IMSG

public class MSG
extends java.lang.Object
implements IMSG

A MSG(Minimum Signable Graph) is the atomic graph taken in consideration. Given a RDF statement, the MSG containing the statement is unique. An MSG is a ground statement or a closures on blank nodes calculated starting form the statement itself. MSG of a statement does not contain reifications af the statements contained in ti, except the reifications used to sign the MSG. This special reifications are blank nodes of type MSGSignatureStatement, that is a subclass of rdf:Statement. For furter details see the RDFGrowth paper.


Constructor Summary
MSG(com.hp.hpl.jena.rdf.model.Model model, com.hp.hpl.jena.rdf.model.Statement st)
          Default constructor.
 
Method Summary
 java.lang.String[] getInvolvedURIs()
          Gets al the URI involved in the MSG as Strings.
 com.hp.hpl.jena.rdf.model.Model getModel()
           
 java.lang.String getRDFXML()
          Serializes the MSG and return it as RDF/XML.
 SignatureReport getSignatureReport()
           
 java.util.ArrayList getSignatureReports()
          Returns the list of Signature Reports on this MSG
 SignatureReport[] getSignatureReportsArray()
           
 com.hp.hpl.jena.rdf.model.StmtIterator getStatements()
           
 boolean hasSemanticsOf(IMSG msg)
          Detect if the current MSG has the same semantics of a given MSG.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MSG

public MSG(com.hp.hpl.jena.rdf.model.Model model,
           com.hp.hpl.jena.rdf.model.Statement st)
Default constructor. It build an MSG given a jena Model and an initial Statement. All the Graph's statements will be analyzed and only the statements belonging to the MSG will be stored in this object.

Method Detail

getInvolvedURIs

public java.lang.String[] getInvolvedURIs()
Description copied from interface: IMSG
Gets al the URI involved in the MSG as Strings.

Specified by:
getInvolvedURIs in interface IMSG

getRDFXML

public java.lang.String getRDFXML()
Serializes the MSG and return it as RDF/XML.

Specified by:
getRDFXML in interface IMSG
Returns:
an InputStream containing the MSG statements serialized in RDF/XML
Throws:
org.openrdf.sesame.sail.SailUpdateException
java.io.IOException
org.openrdf.sesame.config.AccessDeniedException

getStatements

public com.hp.hpl.jena.rdf.model.StmtIterator getStatements()
Returns:
A StatementIterator containg all the statements in the MSG.

getModel

public com.hp.hpl.jena.rdf.model.Model getModel()
Returns:
A Graph representation of this MSG.

hasSemanticsOf

public boolean hasSemanticsOf(IMSG msg)
Description copied from interface: IMSG
Detect if the current MSG has the same semantics of a given MSG. Two MSGs have the same semantics (according to RDF Semantics) if they represent the same "information", that is if they have the same structure involing the same URIs. They can differ only for the blank nodes ID used.

Specified by:
hasSemanticsOf in interface IMSG
Parameters:
msg -
Returns:
true if tht MSGs have represent the same information, that is if they have the same structure and use he same URIs.

toString

public java.lang.String toString()
Returns:
a String representation of the MSG listing all the statements in the MSG in this way: " subject - object - predicate ".

getSignatureReports

public java.util.ArrayList getSignatureReports()
Returns the list of Signature Reports on this MSG

Specified by:
getSignatureReports in interface IMSG
Returns:
an ArrayList of SignatureReport

getSignatureReportsArray

public SignatureReport[] getSignatureReportsArray()

getSignatureReport

public SignatureReport getSignatureReport()
Returns:
The signature Report attached to the MSG. If more exist, it is undefined which will be returned.