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 void
serializeVocabularies(org.eclipse.rdf4j.rio.RDFFormat format, PrintStream ps)
Serializes all the vocabularies to NQuads over the given output stream.static String
serializeVocabulary(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format)
Serialized the givenvocabulary
to NQuads and return them as string.static void
serializeVocabulary(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format, boolean willFollowAnother, PrintStream ps)
Serializes the givenvocabulary
to NQuads over the given output stream.static void
serializeVocabulary(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFWriter writer)
Serializes the givenvocabulary
to triples over the givenwriter
.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
,resources
andproperties
.
-
-
-
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
,resources
andproperties
.- 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(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFWriter writer)
Serializes the givenvocabulary
to 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(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format, boolean willFollowAnother, PrintStream ps)
Serializes the givenvocabulary
to NQuads over the given output stream.- Parameters:
vocabulary
- vocabulary to be serialized.format
- output format for vocabulary.willFollowAnother
- iftrue
another 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(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format)
Serialized the givenvocabulary
to 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.
-
-