OBDA file generator using yEd Graph Editor v 3.14.2
Branch | build status |
---|---|
master |
-
Install procedure :
mvn clean install assembly:single
-
Arguments :
-d : Directory where graphml files are located
-out : Path of output mapping obda file
-ext : extension of files involved in the process
-csv : Path of the CSV file ( containing variables )
-ig : include listed variables in graphml files
-v : enable verbose mode // not implemented yet
-
Example :
❯ java -cp target/yedGen_2.0-1.0-SNAPSHOT-jar-with-dependencies.jar entypoint.Main \
-d 'src/main/resources/demo' \
-out './mapping.obda' \
-csv './my_csv.csv' \
-ext '.graphml'
-
Supports features :
- FullGraph : One graph -> One obda file mapping
- GraphChunks : Multiple graphs -> one obda file mapping
- PatternGraphChunks : One [ multiple ] graph(s) -> multiple obda files
-
Description of PatternGraphChunks format :
-
1- Description of Patterns declarations :
##PATTERN_CODE
: Declare a specific patternNUM
: Index of the first Entity ( the following entities will have an incremental index )URI
: pattern URI for variables. Do not touch the ?VARIABLEObjectProperty
: used as object property between entities of the pattern[ ObjectProperty_Entity SqlQueryIndex ]
: Object Property "_" Entity SqlQueryIndex -
Example :
- The following pattern
-
##PATTERN_1 20 ola/observation/?ENTITY/{dty_code}/{mesure_id}
oboe-core:hasContext
[ oboe-core:Observation_Ammonium Q_20 ]
[ oboe-core:Observation_Solutes Q_21 ]
[ oboe-core:Observation_Water Q_22 ]
Gives the following mapping :
- mappingId (PATTERN_1)_Ammonium_20
- target ola/observation/ammonium/{dty_code}/{mesure_id} a oboe-core:Observation
oboe-core:ofEntity :Ammonium
oboe-core:hasContext ola/observation/solutes/{dty_code}/{mesure_id}
- source : Query_20
- mappingId (PATTERN_1)_Solutes_21
- target ola/observation/solutes/{dty_code}/{mesure_id} a oboe-core:Observation
oboe-core:ofEntity :Solutes
oboe-core:hasContext ola/observation/water/{dty_code}/{mesure_id}
- source : Query_21
- mappingId (PATTERN_1)_Water_22
- target ola/observation/water/{dty_code}/{mesure_id} a oboe-core:Observation
oboe-core:ofEntity :Water oboe-core:hasContext ...`
- source : Query_22
* 2- Description of the Variables declarations :
?VARIABLE : Declare Variable
##PATTERN_CODE : Link current Variable to the Pattern PATTERN_CODE.
:Variable : name of the Entity concerned by this Variable
{ ?Matcher=value } : replace all matchers in the result mapping by value ( for each variable )
* Example :
- The following declaration
?VARIABLE ##PATTERN_1 :Nitrogen
{ ?VAR_URI=nitrogen }
{ ?standardVar=oboe-standard:MilligramPerLiter }
{ ?NUM_DTYPE=11 }
{ ?FILTER_VAR='azote ammoniacal' }
reliying to the ##PATTERN_1 will Replace :
?VARIABLE in the Graph BY ":Nitrogen"
?VAR_URI BY nitrogen ( interesting for example for customise sql queries )
?standardVar BY oboe-standard:MilligramPerLiter
![connexion](https://cloud.githubusercontent.com/assets/7684497/17358431/4cb8b362-5962-11e6-9dce-3ccb9a59e9c4.jpg)