Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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)

Nested Class Summary
`static class` | `RDFSchemaUtils.VocabularyFormat` Supported formats for vocabulary serialization.

Method Summary
`static void` | `serializeVocabularies(RDFSchemaUtils.VocabularyFormat format, PrintStream ps)` Serializes all the vocabularies to NQuads over the given output stream.
`static void` | `serializeVocabulary(org.openrdf.model.URI namespace, org.openrdf.model.URI[] classes, org.openrdf.model.URI[] properties, Map<org.openrdf.model.URI,String> comments, org.openrdf.rio.RDFWriter writer)` Serializes a vocabulary composed of the given `namespace`, `resources` and `properties`.
`static String` | `serializeVocabulary(Vocabulary vocabulary, RDFSchemaUtils.VocabularyFormat format)` Serialized the given `vocabulary` to NQuads and return them as string.
`static void` | `serializeVocabulary(Vocabulary vocabulary, RDFSchemaUtils.VocabularyFormat format, boolean willFollowAnother, PrintStream ps)` Serializes the given `vocabulary` to NQuads over the given output stream.
`static void` | `serializeVocabulary(Vocabulary vocabulary, org.openrdf.rio.RDFWriter writer)` Serializes the given `vocabulary` to triples over the given `writer`.

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.openrdf.model.URI namespace,
                                           org.openrdf.model.URI[] classes,
                                           org.openrdf.model.URI[] properties,
                                           Map<org.openrdf.model.URI,String> comments,
                                           org.openrdf.rio.RDFWriter writer)
                                    throws org.openrdf.rio.RDFHandlerException

  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.openrdf.rio.RDFHandlerException`

### serializeVocabulary

    public static void serializeVocabulary(Vocabulary vocabulary,
                                           org.openrdf.rio.RDFWriter writer)
                                    throws org.openrdf.rio.RDFHandlerException

  Serializes the given `vocabulary` to triples over the given `writer`.

  Parameters:
    `vocabulary` - vocabulary to be serialized.
    `writer` - output writer.
  Throws:
    `org.openrdf.rio.RDFHandlerException`

### serializeVocabulary

    public static void serializeVocabulary(Vocabulary vocabulary,
                                           RDFSchemaUtils.VocabularyFormat format,
                                           boolean willFollowAnother,
                                           PrintStream ps)
                                    throws org.openrdf.rio.RDFHandlerException

  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.openrdf.rio.RDFHandlerException`

### serializeVocabulary

    public static String serializeVocabulary(Vocabulary vocabulary,
                                             RDFSchemaUtils.VocabularyFormat format)
                                      throws org.openrdf.rio.RDFHandlerException

  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.openrdf.rio.RDFHandlerException`

### serializeVocabularies

    public static void serializeVocabularies(RDFSchemaUtils.VocabularyFormat format,
                                             PrintStream ps)

  Serializes all the vocabularies to NQuads over the given output stream.

  Parameters:
    `format` - output format for vocabularies.
    `ps` - output print stream.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.