converters
Class RDFSConverter

java.lang.Object
  extended by converters.RDFSConverter

public class RDFSConverter
extends java.lang.Object

This class is part of the YAGO converters (http://mpii.de/yago). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the YAGO team (http://mpii.de/yago). This class produces the RDFS version of YAGO

Author:
Fabian M. Suchanek

Nested Class Summary
static class RDFSConverter.RDFSDatatype
          All rdfs datatypes
 
Field Summary
static boolean deductiveClosure
          Tells whether the deductive closure shall be converted as well
static boolean includeFactFacts
          Tells whether facts about facts shall be included
static java.util.Map<java.lang.String,java.lang.String> languageCodes
          Language codes
static java.lang.String ns
          Holds the YAGO namespace (need not be a URL or valid URL)
static java.io.File outputFolder
          holds the output folder
static java.util.Map<basics.datagraph.Relation,java.lang.String> specialRelationNames
          Maps Yago relation names to their RDFS equivalent
static java.io.File yagoFolder
          holds the YAGO folder
 
Constructor Summary
RDFSConverter()
           
 
Method Summary
static java.lang.String asURI(java.lang.String entity)
          Formats a Yago entity as a URI
static void convertFactstoN3(boolean test, boolean oneFile)
          Converts all facts to N3
static void convertFactstoRDFS(boolean test)
          Converts all facts to RDFS
static void fromIniFile(java.io.File initFile)
          reads the yago.ini file
static void fromIniFileN3(java.io.File initFile)
          reads the yago.ini file
static void main(java.lang.String[] args)
          Produces the RDFS version of Yago
static void mainN3(java.lang.String[] args)
          Produces N3 output for YAGO
static java.lang.String n3NameFor(java.lang.String yagoName)
          Creates a N3 identifier for a YAGO identifier.
static java.lang.String n3String(java.lang.String string)
          Creates a N3 string
static RDFSConverter.RDFSDatatype rdfsTypeforYagoClass(basics.datagraph.YagoClass y)
          Returns the RDFSType for a YagoClass (or RESOURCE if it's a resource)
static void requestInformation()
          request information instead of using yago.ini file
static void requestInformationN3()
          request information instead of using yago.ini file
static java.io.Writer writerForN3(basics.datagraph.Relation yagoRelation, java.io.File f)
          Creates a writer for a relation and an extractor filename, writes header
static java.io.Writer writerForRDFS(basics.datagraph.Relation yagoRelation, java.io.File f)
          Creates a writer for a relation and an extractor filename, writes header
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ns

public static final java.lang.String ns
Holds the YAGO namespace (need not be a URL or valid URL)

See Also:
Constant Field Values

yagoFolder

public static java.io.File yagoFolder
holds the YAGO folder


outputFolder

public static java.io.File outputFolder
holds the output folder


deductiveClosure

public static boolean deductiveClosure
Tells whether the deductive closure shall be converted as well


includeFactFacts

public static boolean includeFactFacts
Tells whether facts about facts shall be included


specialRelationNames

public static java.util.Map<basics.datagraph.Relation,java.lang.String> specialRelationNames
Maps Yago relation names to their RDFS equivalent


languageCodes

public static java.util.Map<java.lang.String,java.lang.String> languageCodes
Language codes

Constructor Detail

RDFSConverter

public RDFSConverter()
Method Detail

rdfsTypeforYagoClass

public static RDFSConverter.RDFSDatatype rdfsTypeforYagoClass(basics.datagraph.YagoClass y)
Returns the RDFSType for a YagoClass (or RESOURCE if it's a resource)


asURI

public static java.lang.String asURI(java.lang.String entity)
Formats a Yago entity as a URI


writerForRDFS

public static java.io.Writer writerForRDFS(basics.datagraph.Relation yagoRelation,
                                           java.io.File f)
                                    throws java.io.IOException
Creates a writer for a relation and an extractor filename, writes header

Throws:
java.io.IOException

writerForN3

public static java.io.Writer writerForN3(basics.datagraph.Relation yagoRelation,
                                         java.io.File f)
                                  throws java.io.IOException
Creates a writer for a relation and an extractor filename, writes header

Throws:
java.io.IOException

convertFactstoRDFS

public static void convertFactstoRDFS(boolean test)
                               throws java.io.IOException
Converts all facts to RDFS

Throws:
java.io.IOException

n3NameFor

public static java.lang.String n3NameFor(java.lang.String yagoName)
Creates a N3 identifier for a YAGO identifier.


n3String

public static java.lang.String n3String(java.lang.String string)
Creates a N3 string


convertFactstoN3

public static void convertFactstoN3(boolean test,
                                    boolean oneFile)
                             throws java.io.IOException
Converts all facts to N3

Throws:
java.io.IOException

requestInformation

public static void requestInformation()
                               throws java.lang.Exception
request information instead of using yago.ini file

Throws:
java.lang.Exception

fromIniFile

public static void fromIniFile(java.io.File initFile)
                        throws java.lang.Exception
reads the yago.ini file

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Produces the RDFS version of Yago

Throws:
java.lang.Exception

fromIniFileN3

public static void fromIniFileN3(java.io.File initFile)
                          throws java.lang.Exception
reads the yago.ini file

Throws:
java.lang.Exception

mainN3

public static void mainN3(java.lang.String[] args)
                   throws java.lang.Exception
Produces N3 output for YAGO

Throws:
java.lang.Exception

requestInformationN3

public static void requestInformationN3()
                                 throws java.lang.Exception
request information instead of using yago.ini file

Throws:
java.lang.Exception