Package be.ugent.rml.conformer
Class MappingConformer
- java.lang.Object
-
- be.ugent.rml.conformer.MappingConformer
-
public class MappingConformer extends Object
Only validates by checking for at least one TriplesMap. Converts mapping files to RML. Currently only R2RML converter is implemented. InputStream of mapping file is used to create a store. TriplesMaps in store that need conversion are detected by applying the converters detection methods and saved. convert tries to convert these to RML. Exceptions can be raised during validation and conversion, which the caller has to handle. Output of detect() informs if convert() should be used to convert to valid RML. The validated RML can be returned as a QuadStore with getStore().
-
-
Constructor Summary
Constructors Constructor Description MappingConformer(QuadStore store)Create MappingConformer from InputStream of mapping file in RDF.MappingConformer(QuadStore store, Map<String,String> mappingOptions)Create MappingConformer from InputStream of mapping file in RDF.
-
-
-
Constructor Detail
-
MappingConformer
public MappingConformer(QuadStore store) throws Exception
Create MappingConformer from InputStream of mapping file in RDF.- Parameters:
store- A QuadStore with the mapping rules.- Throws:
FileNotFoundExceptionException
-
-
Method Detail
-
conform
public boolean conform() throws ExceptionThis method makes the QuadStore conformant to the RML spec.- Returns:
- True if the store had to be updated, else false.
- Throws:
Exception- if something goes wrong during detection or conversion.
-
getStore
public QuadStore getStore()
Get a valid QuadStore- Returns:
- a valid QuadStore
-
-