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 given `vocabulary` to NQuads and return them as string.
    `static void` | `serializeVocabulary​(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFFormat format, boolean willFollowAnother, PrintStream ps)` | Serializes the given `vocabulary` to NQuads over the given output stream.
    `static void` | `serializeVocabulary​(Vocabulary vocabulary, org.eclipse.rdf4j.rio.RDFWriter writer)` | Serializes the given `vocabulary` to triples over the given `writer`.
    `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 given `namespace`, `resources` and `properties`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 given `namespace`, `resources` and `properties`.
      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 given `vocabulary` to triples over the given `writer`.
      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 given `vocabulary` to NQuads over the given output stream.
      Parameters:
        `vocabulary` - vocabulary to be serialized.
        `format` - output format for vocabulary.
        `willFollowAnother` - if `true` 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 given `vocabulary` 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.