Package be.ugent.rml.conformer
Class R2RMLConverter
- java.lang.Object
-
- be.ugent.rml.conformer.R2RMLConverter
-
public class R2RMLConverter extends Object
Converts InputStream of R2RML or RML mapping files to RML mapping files. convert() can fail with an Exception No support for quoted database identifiers Uses the first "a d2rq:Database" it finds as source
-
-
Method Summary
Modifier and Type Method Description voidconvert(Term triplesMap, Map<String,String> mappingOptions)Tries to convert R2RML TriplesMap to rml by: - renaming logicalTable to logicalSource - adding referenceFormulation: CSV - adding sqlVersion: SQL2008 - renaming rr:sqlQuery to rml:query - renaming all rr:column properties to rml:reference - removing all rr:logicalTable nodes, leaving rml:logicalSource to take their place - moving rest over from logicalTable to logicalSourcebooleandetect(Term triplesMap)TriplesMap is R2RML if RR:logicalTable property is found
-
-
-
Method Detail
-
detect
public boolean detect(Term triplesMap)
TriplesMap is R2RML if RR:logicalTable property is found- Parameters:
triplesMap-- Returns:
- true if triplesMap is R2RML (tripleMap contains a rr:logicalTable)
-
convert
public void convert(Term triplesMap, Map<String,String> mappingOptions) throws Exception
Tries to convert R2RML TriplesMap to rml by: - renaming logicalTable to logicalSource - adding referenceFormulation: CSV - adding sqlVersion: SQL2008 - renaming rr:sqlQuery to rml:query - renaming all rr:column properties to rml:reference - removing all rr:logicalTable nodes, leaving rml:logicalSource to take their place - moving rest over from logicalTable to logicalSource- Parameters:
triplesMap- rr:TriplesMap- Throws:
Exception
-
-