Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
melaasar committed Nov 15, 2024
1 parent f509313 commit e744629
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ buildscript {
dependencies {
classpath "org.yaml:snakeyaml:2.+"
classpath "io.opencaesar.owl:owl-fuseki-gradle:$owl"
classpath "io.opencaesar.owl:owl-query-gradle:$owl"
classpath "io.opencaesar.owl:owl-shacl-gradle:$owl"
classpath "io.opencaesar.owl:owl-query-gradle:$owl"
classpath "io.opencaesar.owl:owl-load-gradle:$owl"
classpath "io.opencaesar.owl:owl-save-gradle:$owl"
classpath "io.opencaesar.owl:owl-reason-gradle:$owl"
Expand Down Expand Up @@ -106,7 +106,7 @@ task reason(type:io.opencaesar.owl.reason.OwlReasonTask, group:"oml", dependsOn:
"$oml.dataset.iri/properties = INVERSE_PROPERTY | ALL_SUBPROPERTY",
"$oml.dataset.iri/individuals = ALL_INSTANCE | DATA_PROPERTY_VALUE | OBJECT_PROPERTY_VALUE | SAME_AS"
]
reportPath = file("build/logs/${oml.dataset.name}/reasoning.xml")
reportPath = file('build/logs/reasoning.xml')
uniqueNames = true
}

Expand All @@ -132,23 +132,41 @@ task stopFuseki(type: io.opencaesar.owl.fuseki.StopFusekiTask, group:"oml") {
* A task to load the dataset to a SPARQL tdb endpoint
* @seeAlso https://github.com/opencaesar/owl-tools/blob/master/owl-load/README.md
*/
task load(type:io.opencaesar.owl.load.OwlLoadTask, group:"oml", dependsOn: startFuseki) {
inputs.files(startFuseki.outputFolderPath) // rerun when fuseki restarts
task loadTdb(type:io.opencaesar.owl.load.OwlLoadTask, group:"oml", dependsOn: startFuseki) {
inputs.files(startFuseki.outputFolderPath.toString()+"fuseki.pid") // rerun when fuseki restarts
catalogPath = file('build/owl/catalog.xml')
endpointURL = oml.dataset.url
endpointURL = oml.dataset.url+".tdb"
fileExtensions = ['owl', 'ttl']
iris = [ "$oml.dataset.iri/classes", "$oml.dataset.iri/properties", "$oml.dataset.iri/individuals" ]
iris = [ "$oml.dataset.iri" ]
loadToDefaultGraph = false
}

/*
* A task to load the dataset to a SPARQL inference endpoint
* @seeAlso https://github.com/opencaesar/owl-tools/blob/master/owl-load/README.md
*/
task loadInf(type:io.opencaesar.owl.load.OwlLoadTask, group:"oml", dependsOn: startFuseki) {
inputs.files(startFuseki.outputFolderPath.toString()+"fuseki.pid") // rerun when fuseki restarts
catalogPath = file('build/owl/catalog.xml')
endpointURL = oml.dataset.url+".inf"
fileExtensions = ['owl', 'ttl']
iris = [ "$oml.dataset.iri/classes", "$oml.dataset.iri/properties" ]
loadToDefaultGraph = true
}

/*
* A task to load the dataset to SPARQL endpoints
*/
task load(group:"oml", dependsOn: [loadInf, loadTdb])

/*
* A task to run a set of SPARQL queries on a Fuseki dataset endpoint
* @seeAlso https://github.com/opencaesar/owl-tools/blob/master/owl-query/README.md
*/
task query(type:io.opencaesar.owl.query.OwlQueryTask, group:"oml", dependsOn: load) {
inputs.files(load.inputs.files) // rerun when the dataset changes
endpointURL = oml.dataset.url
queryPath = file(oml.dataset.queries)
endpointURL = oml.dataset.url+".inf"
queryPath = oml.dataset.queries ? file(oml.dataset.queries) : null
resultPath = file("build/results/${oml.dataset.name}")
format = 'json'
}
Expand All @@ -160,7 +178,7 @@ task query(type:io.opencaesar.owl.query.OwlQueryTask, group:"oml", dependsOn: lo
task validate(type:io.opencaesar.owl.shacl.OwlShaclTask, group:"oml", dependsOn: load) {
inputs.files(load.inputs.files) // rerun when the dataset changes
endpointURL = oml.dataset.url
queryPath = file(oml.dataset.validations)
queryPath = oml.dataset.validations ? file(oml.dataset.validations) : null
resultPath = file("build/logs/${oml.dataset.name}")
}

Expand All @@ -169,7 +187,7 @@ task validate(type:io.opencaesar.owl.shacl.OwlShaclTask, group:"oml", dependsOn:
* @seeAlso https://github.com/opencaesar/owl-tools/blob/master/owl-save/README.md
*/
task saveTdb(type:io.opencaesar.owl.save.OwlSaveTask, group:"oml") {
inputs.files(startFuseki.outputFolderPath) // rerun when fuseki restarts
inputs.files(startFuseki.outputFolderPath.toString()+"fuseki.pid") // rerun when fuseki restarts
endpointURL = oml.dataset.url+".tdb"
catalogPath = file("build/save/${oml.dataset.name}/catalog.xml")
fileExtension = 'ttl'
Expand Down Expand Up @@ -292,4 +310,4 @@ apply plugin: 'eclipse'

eclipse {
synchronizationTasks downloadDependencies
}
}

0 comments on commit e744629

Please sign in to comment.