Package org.apache.any23.vocab
Class RDFSchemaUtils
- java.lang.Object
-
- org.apache.any23.vocab.RDFSchemaUtils
-
public class RDFSchemaUtils extends Object
This class provides a set of methods for generating RDF Schema.- Author:
- Michele Mostarda (mostarda@fbk.eu)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidserializeVocabularies(org.eclipse.rdf4j.rio.RDFFormat format, PrintStream ps)Serializes all the vocabularies to NQuads over the given output stream.static StringserializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format)Serialized the givenvocabularyto NQuads and return them as string.static voidserializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format, boolean willFollowAnother, PrintStream ps)Serializes the givenvocabularyto NQuads over the given output stream.static voidserializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFWriter writer)Serializes the givenvocabularyto triples over the givenwriter.static voidserializeVocabulary(org.eclipse.rdf4j.model.IRI namespace, org.eclipse.rdf4j.model.IRI[] classes, org.eclipse.rdf4j.model.IRI[] properties, Map<org.eclipse.rdf4j.model.IRI,String> comments, org.eclipse.rdf4j.rio.RDFWriter writer)Serializes a vocabulary composed of the givennamespace,resourcesandproperties.
-
-
-
Method Detail
-
serializeVocabulary
public static void serializeVocabulary(org.eclipse.rdf4j.model.IRI namespace, org.eclipse.rdf4j.model.IRI[] classes, org.eclipse.rdf4j.model.IRI[] properties, Map<org.eclipse.rdf4j.model.IRI,String> comments, org.eclipse.rdf4j.rio.RDFWriter writer)Serializes a vocabulary composed of the givennamespace,resourcesandproperties.- Parameters:
namespace- vocabulary namespace.classes- list of classes.properties- list of properties.comments- map of resource comments.writer- writer to print out the RDF Schema triples.- Throws:
org.eclipse.rdf4j.rio.RDFHandlerException- if there is an error handling the RDF
-
serializeVocabulary
public static void serializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFWriter writer)Serializes the givenvocabularyto triples over the givenwriter.- Parameters:
vocabulary- vocabulary to be serialized.writer- output writer.- Throws:
org.eclipse.rdf4j.rio.RDFHandlerException- if there is an error handling the RDF
-
serializeVocabulary
public static void serializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format, boolean willFollowAnother, PrintStream ps)Serializes the givenvocabularyto NQuads over the given output stream.- Parameters:
vocabulary- vocabulary to be serialized.format- output format for vocabulary.willFollowAnother- iftrueanother vocab will be printed in the same stream.ps- output stream.- Throws:
org.eclipse.rdf4j.rio.RDFHandlerException- if there is an error handling the RDF
-
serializeVocabulary
public static String serializeVocabulary(org.apache.any23.vocab.Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format)
Serialized the givenvocabularyto NQuads and return them as string.- Parameters:
vocabulary- vocabulary to be serialized.format- output format for vocabulary.- Returns:
- string contained serialization.
- Throws:
org.eclipse.rdf4j.rio.RDFHandlerException- if there is an error handling the RDF
-
serializeVocabularies
public static void serializeVocabularies(org.eclipse.rdf4j.rio.RDFFormat format, PrintStream ps)Serializes all the vocabularies to NQuads over the given output stream.- Parameters:
format- output format for vocabularies.ps- output print stream.
-
-