@Command(name="v1-to-v3",
description="Clean mapping file (from Ontop v1) to be readable by Ontop v3. \nYou may still need to manually adjust the converted files. \nIt does the following jobs at our best effort: \n (1) for Ontop native OBDA files, it extracts the jdbc connection info into a separate properties file\n (2) for both Ontop native and R2RML files, for each full qualified columns (e.g `table1.col1`), it generates an alias (e.g `table1.col1 AS table1_col1`")
public class OntopMappingV1ToV3
extends Object
implements OntopCommand
| Modifier and Type | Field and Description |
|---|---|
protected String |
outputMappingFile |
protected boolean |
overwriteFile |
protected boolean |
SIMPLIFY_SQL_PROJECTIONS |
| Constructor and Description |
|---|
OntopMappingV1ToV3() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractMappingColumnsFromSQL(Set<String> args,
String sql,
String mapping) |
protected String |
extractSimpleTable(String sql) |
protected String |
getRenaming(Map<String,String> renaming,
String selectClause,
String mapping) |
protected String |
getSimplifiedProjection(String sql) |
protected Set<String> |
getTemplateColumns(String template) |
void |
processOBDA(File inputFile,
File outputFile) |
void |
run() |
@Option(type=COMMAND,
name={"-o","--output"},
title="mapping.obda",
description="Output mapping file in R2RML (.ttl) or in Ontop native format (.obda)")
protected String outputMappingFile
@Option(type=COMMAND,
name="--simplify-projection",
description="Replace projection with * whenever possible in SQL queries")
protected boolean SIMPLIFY_SQL_PROJECTIONS
@Option(type=COMMAND,
name="--overwrite",
description="Overwrite the mapping file given as input")
protected boolean overwriteFile
public void processOBDA(File inputFile, File outputFile) throws Exception
Exceptionprotected String extractMappingColumnsFromSQL(Set<String> args, String sql, String mapping)
protected String getRenaming(Map<String,String> renaming, String selectClause, String mapping)
Copyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.