Skip to content

Commit

Permalink
Merge pull request #144 from koopjs/feature/143
Browse files Browse the repository at this point in the history
Configuration updates
  • Loading branch information
jkerr5 authored Dec 14, 2018
2 parents 56b9d95 + 183fa2a commit 68cfae1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 116 deletions.
32 changes: 18 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,15 @@ task loadQueryOptions(type : com.marklogic.gradle.task.MarkLogicTask, dependsOn:
def client = newClient()
def manager = client.newServerConfigManager().newQueryOptionsManager()

def files = files(file("config/${fsConfig}/options").listFiles())
files.each { file ->
def optionsName = file.name.substring(0, file.name.lastIndexOf("."))
manager.writeOptions(
optionsName, new com.marklogic.client.io.FileHandle().with(file)
)
println "Loaded query options: ${optionsName}"
if (file("config/${fsConfig}/options").exists()) {
def files = files(file("config/${fsConfig}/options").listFiles())
files.each { file ->
def optionsName = file.name.substring(0, file.name.lastIndexOf("."))
manager.writeOptions(
optionsName, new com.marklogic.client.io.FileHandle().with(file)
)
println "Loaded query options: ${optionsName}"
}
}

println "Query options loaded"
Expand All @@ -396,13 +398,15 @@ task loadQueryTransforms(type : com.marklogic.gradle.task.MarkLogicTask, depends
def client = newClient()
def manager = client.newServerConfigManager().newTransformExtensionsManager()

def files = files(file("config/${fsConfig}/transforms").listFiles())
files.each { file ->
def transformName = file.name.substring(0, file.name.lastIndexOf("."))
manager.writeXQueryTransform(
transformName, new com.marklogic.client.io.FileHandle().with(file)
)
println "Loaded transform: ${transformName}"
if (file("config/${fsConfig}/transforms").exists()) {
def files = files(file("config/${fsConfig}/transforms").listFiles())
files.each { file ->
def transformName = file.name.substring(0, file.name.lastIndexOf("."))
manager.writeXQueryTransform(
transformName, new com.marklogic.client.io.FileHandle().with(file)
)
println "Loaded transform: ${transformName}"
}
}

println "Query transforms loaded"
Expand Down
101 changes: 0 additions & 101 deletions src/example/ml-config/databases/content-database.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,6 @@
"point-format": "long-lat-point",
"range-value-positions": false,
"invalid-values": "reject"
},
{
"path-expression" : "//location/item/Point",
"coordinate-system": "wgs84",
"point-format": "point",
"range-value-positions": false,
"invalid-values": "reject"
},
{
"path-expression" : "//location/item/coords",
"coordinate-system": "wgs84",
"point-format": "point",
"range-value-positions": false,
"invalid-values": "reject"
}
],
"geospatial-region-path-index": [
Expand All @@ -98,92 +84,5 @@
"geohash-precision": 2,
"invalid-values": "reject"
}
],
"geospatial-element-child-index" : [
{
"parent-namespace-uri" : "http://www.opengis.net/gml/3.2",
"parent-localname" : "Point",
"namespace-uri" : "http://www.opengis.net/gml/3.2",
"localname" : "pos",
"coordinate-system" : "wgs84",
"point-format" : "point",
"range-value-positions" : false,
"invalid-values" : "reject"
},
{
"parent-namespace-uri" : "http://www.opengis.net/kml/2.2",
"parent-localname" : "Point",
"namespace-uri" : "http://www.opengis.net/kml/2.2",
"localname" : "coordinates",
"coordinate-system" : "wgs84",
"point-format" : "long-lat-point",
"range-value-positions" : false,
"invalid-values" : "reject"
},
{
"parent-namespace-uri" : "http://www.marklogic.com/element-child",
"parent-localname" : "point",
"namespace-uri" : "",
"localname" : "coords",
"coordinate-system" : "wgs84",
"point-format" : "point",
"range-value-positions" : false,
"invalid-values" : "reject"
}
],
"geospatial-element-index" : [
{
"namespace-uri" : "http://www.georss.org/georss",
"localname" : "point",
"coordinate-system" : "wgs84",
"point-format" : "point",
"range-value-positions" : false,
"invalid-values" : "reject"
},
{
"namespace-uri" : "http://www.marklogic.com/element",
"localname" : "coords",
"coordinate-system" : "wgs84",
"point-format" : "point",
"range-value-positions" : false,
"invalid-values" : "reject"
}
],
"geospatial-element-attribute-pair-index" : [
{
"parent-namespace-uri" : "",
"parent-localname" : "Dot",
"latitude-namespace-uri" : "",
"latitude-localname" : "Latitude",
"longitude-namespace-uri" : "",
"longitude-localname" : "Longitude",
"coordinate-system" : "wgs84",
"range-value-positions" : false,
"invalid-values" : "reject"
},
{
"parent-namespace-uri" : "http://www.marklogic.com/element-attribute",
"parent-localname" : "point",
"latitude-namespace-uri" : "",
"latitude-localname" : "latitude",
"longitude-namespace-uri" : "",
"longitude-localname" : "longitude",
"coordinate-system" : "wgs84",
"range-value-positions" : false,
"invalid-values" : "reject"
}
],
"geospatial-element-pair-index" : [
{
"parent-namespace-uri" : "",
"parent-localname" : "point",
"latitude-namespace-uri" : "",
"latitude-localname" : "latitude",
"longitude-namespace-uri" : "",
"longitude-localname" : "longitude",
"coordinate-system" : "wgs84",
"range-value-positions" : false,
"invalid-values" : "reject"
}
]
}
3 changes: 2 additions & 1 deletion src/koop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"config": "^1.25.1",
"winston": "^2.4.1",
"express": "^4.15.3",
"koop": "^3.5.4",
"koop": "3.10.1",
"featureserver": "2.16.2",
"marklogic": "^2.0.2"
},
"author": "MarkLogic",
Expand Down

0 comments on commit 68cfae1

Please sign in to comment.