org.ontoware.rdf2go.util
Class VocabularyWriter

java.lang.Object
  extended by org.ontoware.rdf2go.util.VocabularyWriter

public class VocabularyWriter
extends java.lang.Object

reads an RDF/S file and creates an RDF2Go Vocabulary file from it. usage:

  VocabularyWriter -i <inputrdfsfile> -o <outputdir> 
  --package <packagename> -a <namespace> -n <nameofjavafile>
  -namespacestrict <false|true>
 
  -namespacestrict If true, only elements from within the namespace (-a)
  are generated. Default false.
 
  Example values:
  --package  org.semanticdesktop.aperture.outlook.vocabulary 
  -o src/outlook/org/semanticdesktop/aperture/outlook/vocabulary/
  -i doc/ontology/data.rdfs
  -a http://aperture.semanticdesktop.org/ontology/data#
  -n DATA

Author:
sauermann $Id: VocabularyWriter.java,v 1.14 2007/02/20 09:13:33 leo_sauermann Exp $

Constructor Summary
VocabularyWriter()
           
 
Method Summary
protected  java.lang.String asLegalJavaID(java.lang.String s, boolean cap)
          Convert s to a legal Java identifier; capitalise first char if cap is true this method is copied from jena code.
 void generateElement(URI type, boolean isProperty)
           
 void getOpt(java.lang.String[] args)
           
 void go(java.lang.String[] args)
           
static void main(java.lang.String[] args)
          documentation see class, above.
 void printCommentAndLabel(URI uri)
          print comment and label of the uri to the passed stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VocabularyWriter

public VocabularyWriter()
Method Detail

go

public void go(java.lang.String[] args)
        throws java.lang.Exception
Throws:
java.lang.Exception

generateElement

public void generateElement(URI type,
                            boolean isProperty)
                     throws java.lang.Exception
Throws:
java.lang.Exception

printCommentAndLabel

public void printCommentAndLabel(URI uri)
                          throws java.lang.Exception
print comment and label of the uri to the passed stream

Parameters:
uri -
Throws:
java.lang.Exception

getOpt

public void getOpt(java.lang.String[] args)
            throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
documentation see class, above.

Throws:
java.lang.Exception

asLegalJavaID

protected java.lang.String asLegalJavaID(java.lang.String s,
                                         boolean cap)
Convert s to a legal Java identifier; capitalise first char if cap is true this method is copied from jena code.



Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.