org.rdfcontext.model.MSG.sesame
Class MSG

java.lang.Object
  extended byorg.rdfcontext.model.MSG.sesame.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 reification af the statement, 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.

Author:
cristian

Constructor Summary
MSG(org.openrdf.model.Graph graph, org.openrdf.model.Statement st)
          Default constructor.
 
Method Summary
 org.openrdf.model.Graph getGraph()
           
 java.lang.String[] getInvolvedURIs()
          Gets al the URI involved in the MSG as Strings.
 java.lang.String getRDFXML()
          Serializes the MSG and return it as RDF/XML.
 java.util.ArrayList getSignatureReports()
          Returns the list of Signature Reports attached to this MSG.
 SignatureReport[] getSignatureReportsArray()
          Returns the list of Signature Reports on this MSG
 org.openrdf.sesame.sail.StatementIterator getStatements()
           
 boolean hasSemanticsOf(IMSG msg)
          Detect if the current MSG has the same semantics of a given MSG.
static void main(java.lang.String[] args)
           
 org.openrdf.model.Value skipIfBNode(org.openrdf.model.Value value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MSG

public MSG(org.openrdf.model.Graph graph,
           org.openrdf.model.Statement st)
Default constructor. It build an MSG given a Graph and an initial Statement. All the Graph's statements will be analyzed and only the statements belonging to the MSG are stored in this object.

Parameters:
graph -
st -
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 org.openrdf.sesame.sail.StatementIterator getStatements()
Returns:
A StatementIterator containg all the statements in the MSG.

getGraph

public org.openrdf.model.Graph getGraph()
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.

skipIfBNode

public org.openrdf.model.Value skipIfBNode(org.openrdf.model.Value value)

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 ".

getSignatureReportsArray

public SignatureReport[] getSignatureReportsArray()
Returns the list of Signature Reports on this MSG

Returns:
an ArrayList of SignatureReport

main

public static void main(java.lang.String[] args)
                 throws org.openrdf.sesame.sail.SailUpdateException,
                        java.io.IOException,
                        org.openrdf.sesame.config.AccessDeniedException
Throws:
org.openrdf.sesame.sail.SailUpdateException
java.io.IOException
org.openrdf.sesame.config.AccessDeniedException

getSignatureReports

public java.util.ArrayList getSignatureReports()
Description copied from interface: IMSG
Returns the list of Signature Reports attached to this MSG.

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