{"id":21614760,"url":"https://github.com/eea/rdfexport","last_synced_at":"2026-01-02T04:07:55.868Z","repository":{"id":23289068,"uuid":"26648061","full_name":"eea/rdfexport","owner":"eea","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-10T06:30:32.000Z","size":604,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":60,"default_branch":"master","last_synced_at":"2024-11-24T22:09:07.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-14T16:50:50.000Z","updated_at":"2024-11-22T21:34:20.000Z","dependencies_parsed_at":"2024-09-10T08:23:52.075Z","dependency_job_id":"a918fb11-ea90-4cea-bcaa-e6e6920b06e3","html_url":"https://github.com/eea/rdfexport","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Frdfexport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Frdfexport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Frdfexport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Frdfexport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eea","download_url":"https://codeload.github.com/eea/rdfexport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235504037,"owners_count":19000704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T22:09:16.339Z","updated_at":"2025-10-06T06:30:26.397Z","avatar_url":"https://github.com/eea.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"RDFExport\r\n=========\r\n\r\nIntroduction\r\n------------\r\n\r\nThis README explains how to use the RDF exporter JAR that\r\nyou can build with Maven by issuing the following command\r\nin the root directory of this project:\r\n\r\n```\r\n$ mvn clean install\r\n```\r\nor\r\n```\r\n$ mvn -Dmaven.test.skip=true clean install\r\n```\r\n\r\nThe JAR is generated into the target/ directory auto-created\r\nby Maven. It will be named rdf-exporter-xx.jar, where the\r\n'xx' is the version number or version label stated in pom.xml.\r\n\r\nWhat this JAR does and how to use it\r\n------------------------------------\r\n\r\nThe JAR is capable of generating RDF out of a given relational\r\ndatabase, using the JDBC protocol. Depending on command-line\r\noptions, it can automatically discover all the tables, columns,\r\nprimary and foreign keys by itself, or you can provide the\r\ntables-to-export and queries-to-run through a properties\r\nfile that we call below as \"RDF export properties file\".\r\n\r\nThe output file is specified with the `-o` option. If it's not given,\r\nstandard output is used.\r\n\r\nFor the auto-discovery, provide `-x` as command line option. If you\r\nsupply `-xa`, the auto-discovery mode will prompt you for confirmation\r\non all tables and foreign keys discovered.\r\n\r\nAuto-discovered information will be saved into a given output\r\nfile and no RDF exported, when you provide `-p` command line option.\r\n\r\nThe database connection properties and also numerous properties required\r\nfor the RDF generation are given in a properties file whose path is\r\nsupplied via the `-f` command line option.\r\n\r\nIf the database is an MS-Access file (aka MDB file) or a dBase (aka DBF)\r\ndirectory, then it can be provided with the `-T` command line option.\r\nAlternatively, it can be provided through the full JDBC connection URL\r\nin database connection properties or via the db.templateFilePath property.\r\n\r\nNote that the DBF driver needs a directory name, and it then looks for DBF\r\nfiles in it. Those are then seen as tables. You therefore specify the folder-\r\nnot the file.\r\n\r\nNaturally, the JDBC driver must be on the class path. You include a `classpath`\r\nproperty in rdfexport.properties containing a colon or semicolon list of JAR\r\nfiles to load before doing any actions.\r\n\r\nThe properties file\r\n-------------------\r\n\r\nQueries are stored in a Java properties file. The full description is\r\nprovided in the docs/FILEFORMAT.html\r\n\r\nExecution and command line options\r\n----------------------------------\r\n\r\nThe usage of rdf-exporter-xx.jar is as follows:\r\n\r\n```\r\n$ java -cp target/rdf-exporter-1.2-SNAPSHOT.jar eionet.rdfexport.Execute \u003coptions\u003e\r\n```\r\n  or:\r\n```\r\n$ java -jar target/rdf-exporter-1.2-SNAPSHOT-jar-with-dependencies.jar \u003coptions\u003e\r\n```\r\n\r\nIf `\u003coptions\u003e` is not supplied, then a help text on possible options is printed:\r\n\r\n----\r\nUsage: This command accepts the following command line arguments:\r\n\r\n```\r\n -f input_properties_file    Path of the input properties file containing everything needed for RDF generation. That includes the database's JDBC url, JDBC driver class name, datatype mappings, namespaces, SQL queries to export, etc.\r\n -d input_properties_file    Path of the input properties file containing database URL, user name and password.\r\n -o rdf_output_file          Path of the RDF output file to be generated.\r\n -T template_properties_file From this file and auto-discovered info about the database, the output_properties_file is generated that can then be used as an input_properties_file for multiple reuse.\r\n -J jdbc_database_url        The URL to the database.\r\n -D jdbc_driver_class        For MySQL use com.mysql.jdbc.Driver.\r\n -U database_user            The user to log into the database.\r\n -P password                 The password for the database.\r\n -p                          Generate a properties file from auto-discovered info. If -T and -p have been specified, then -f is ignored and no RDF output generated. Instead, the output_properties_file will be generated and the program exits.\r\n -z                          The RDF output file will be zipped. if this argument is present.\r\n -m                          Path of the MS Access file to query from. Overrides the one given in input_properties_file or template_properties_file.\r\n -l                          List tables in the database.\r\n -x                          Tables/keys of the database will be auto-discovered.\r\n -xc                         Tables/keys will be auto-discovered, user prompted for confirmation.\r\n -B base_uri                 Base URI which overrides the one in the input_properties_file or template_properties_file.\r\n -V vocabulary_uri           Vocabulary URI which overrides the one in the input_properties_file or template_properties_file.\r\n -i rowId                    Only records with this primary key value will be exported.\r\n -h or -?                    Show this help\r\n```\r\nUnrecognized arguments will be treated as names of tables to export. If no arguments are found, all tables will be exported.\r\n\r\nExample\r\n-------\r\nTo discover the tables and create rdf of an MS-Access file, you first make a file called `database.properties` with the content below.\r\nYou don't need the path to the database driver in the classpath property as UCanAccess is included.\r\n\r\n```\r\nclasspath =\r\n\r\ndb.driver = net.ucanaccess.jdbc.UcanaccessDriver\r\ndb.database = jdbc:ucanaccess://MyAccessFile.mdb\r\ndb.user =\r\ndb.password =\r\n```\r\n\r\nThen you discover the tables in the file and write the queries to `rdfexport.properties`:\r\n\r\n```\r\njava -jar target/rdf-exporter-1.2-SNAPSHOT-jar-with-dependencies.jar \\\r\n     -d database.properties -o rdfexport.properties -xp\r\n```\r\nModify rdfexport.properties as needed and generate the RDF file. At minimum you want to set the `baseurl` and `vocabulary`\r\nproperties to URLs you control and you won't use for other things. The identifiers in the tables are prefixed with the baseurl\r\nand table name to make them *globally unique identifiers.*\r\n```\r\nbaseurl=http://mywebsite.com/myaccessfile/\r\nvocabulary=http://mywebsite.com/myaccessfile/ontology/\r\n```\r\nRun the generation.\r\n```\r\njava -jar target/rdf-exporter-1.2-SNAPSHOT-jar-with-dependencies.jar \\\r\n     -f rdfexport.properties -o MyRDFFile.rdf\r\n```\r\nEnjoy your RDF file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Frdfexport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feea%2Frdfexport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Frdfexport/lists"}