eu.larkc.shared
Class SerializationHelper

java.lang.Object
  extended by eu.larkc.shared.SerializationHelper

public class SerializationHelper
extends java.lang.Object

Utility class for RDF serialization.

Author:
Christoph Fuchs

Constructor Summary
SerializationHelper()
           
 
Method Summary
static java.util.Set<org.openrdf.model.Statement> convertToSet(SetOfStatements statements)
          Converts a eu.larkc.core.data.SetOfStatements to a java.util.Set<Statement>
static void printSetOfStatements(java.util.Collection<org.openrdf.model.Statement> stmtList, java.io.OutputStream outputStream, org.openrdf.rio.RDFFormat format)
          Prints the list of statements to the given output Stream.
static void printSetOfStatements(SetOfStatements statements, java.io.OutputStream outputStream, org.openrdf.rio.RDFFormat format)
          Prints the list of statements to the given output Stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationHelper

public SerializationHelper()
Method Detail

printSetOfStatements

public static void printSetOfStatements(java.util.Collection<org.openrdf.model.Statement> stmtList,
                                        java.io.OutputStream outputStream,
                                        org.openrdf.rio.RDFFormat format)
Prints the list of statements to the given output Stream. Call with System.out to print to stdout.

Parameters:
stmtList - the list of statements
outputStream - the output stream to which to print. Call with System.out to print to stdout.
format - the RDFFormat which is used for serialization

printSetOfStatements

public static void printSetOfStatements(SetOfStatements statements,
                                        java.io.OutputStream outputStream,
                                        org.openrdf.rio.RDFFormat format)
Prints the list of statements to the given output Stream. Call with System.out to print to stdout.

Parameters:
statements - the set of statements
outputStream - the output stream to which to print. Call with System.out to print to stdout.
format - the RDFFormat which is used for serialization

convertToSet

public static java.util.Set<org.openrdf.model.Statement> convertToSet(SetOfStatements statements)
Converts a eu.larkc.core.data.SetOfStatements to a java.util.Set<Statement>

Parameters:
statements - the eu.larkc.core.data.SetOfStatements to convert
Returns:
a java.util.Set<Statement> containing the statements