=================================== | ConvertToRDF Version 1.21 Readme | =================================== TABLE OF CONTENTS ------------------ 1. Installing the Software 2. Running the Software 3. Creating the Mapping file 4. Command Line Options 5. Known Bugs 6. Version History 7. Contacting the author =================================== 1. INSTALLING THE SOFTWARE -------------------------- Decompress the archive file using your favorite archiving tool. This will create a folder called ConvertToRdf. 2. RUNNING THE SOFTWARE ----------------------- The program requires several user supplied files to run. 1) The input data file. This can be any delimited text file. The default delimiter is ','. The title for each field should be in the first row of data. Below is a sample data file: Name,Height,Weight,Eye Color,Hair Color Adam,6,150,blue,brown Chris,5.5,102,brown,brown Joe,5.7,183,green,blond Marvin,6.3,212,blue,black 2) The mapping file. This file specifies which ontologies to use and how to label each field of data. Instructions for creating the mapping file are below. These two files should be placed in the ConvertToRDF directory. To run the software, you will also need to specify the name of the output file. From within the ConvertToRDF directory, type the following at the command line: java util/ConvertToRDF fileIn="inputFile.csv" fileOut="outputFile.rdf" mapFile="mappingFile.txt" useRowHeader="true" Make sure your classpath is set to the current directory '.'. 3. CREATING THE MAPPING FILE ---------------------------- NEW!! The mapping file can be in RDF/DAML. The ontology for creating the map file can be found at http://www.mindswap.org/~mhgrove/ConvertToRDF/convertOnt.rdf (you MUST use this ontology to use RDF/DAML files with the tool). The fields take the same format of data, it's just represented in RDF for ease of use. An example RDF mapfile is included in the distribution file. It is suggested that users download and use the RDF Instance Creator (RIC) to create their RDF map files as it will allow them to create map files easily and quickly without having to write the RDF themselves. To use an RDF/DAML you specify it the same with with the mapFile option, just make sure the file has a .rdf or .daml extension. ------ The mapping file has a standard form. First, you must import all of the ontologies you plan to use. In your file, insert this line for each ontology: IPT http://ontologyURLhere/ abb where abb is the abbreviation you want to use for that ontology. If you were using the personOnt.rdf ontology, your import would look like this: IPT http://www.wam.umd.edu/~mhgrove/personOnt.rdf pers Next, you must specify what object you will create for each item in your data file. This is done as shown: USE abb:ClassName For example, if you have a data file of people, you may want to use the class Person in the RDF. This class is specified with the line: USE pers:Person Finally, you need to specify the mappings. These give the RDF label that corresponds to a field in the data file. These take the form: MAP abb:propertyName "Field Label" For example, if your data file has fields labeled Name, Height, Weight, Eye Color, and Hair Color, your MAP statements might look like this: MAP pers:height "Height" MAP pers:weight "Weight" MAP pers:eyeColor "Eye Color" MAP pers:hairColor "Hair Color" MAP ID "Name" 4. COMMAND LINE OPTIONS ----------------------- fileIn="$FILENAME" Input delimited text file location fileOut="$FILENAME" RDF output destination mapFile="$FILENAME" Map file location useRowHeader="(true|false)" First row contains header information. Should be set to true. useColumnHeader="(true|false)" First column contains header information. If true, skips first column. excludeCols="$INTLIST" Columns to exclude from file in comma separated list. Can use "-" to specify ranges. Ex: "3,5,9,24,38-52". NO WHITESPACE. excludeRows="$INTLIST" Rows to exclude from file in comma separated list. See above for format and rules. colDelims="$CHARLIST" Delimiters between columns. Default is "," for compatibility with .csv files. For specifying the tab value use keyword "TAB." Row delimiters are always assumed to be the new line character. 5. KNOWN BUGS ------------- - When using tab as a column delimiter, it is the only delimiter you can use. If you find a bug, please contact the author with a specific description of what the bug is and send the error.log file that should be in your "ConvertToRdf" directory. 6. Version History ------------------ Version 1.21 Fixed small bug in DataRow read algorithm that occasionally missed columns in the row. Made necessary changes to use ConvertToRDF in RIC. Version 1.2 Implemented using the new, more robust RDFParser Fixed a bug where blank columns messed up parsing Version 1.1 Added the ability to use RDF map files Version 1.0 Initial release 7. CONTACTING THE AUTHOR ------------------------ Michael Grove Email: mhgrove@hotmail.com A MIND-SWAP Project (http://www.mindswap.org)