diff --git a/build.gradle b/build.gradle index cd5eb1d..585b66b 100755 --- a/build.gradle +++ b/build.gradle @@ -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" @@ -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" diff --git a/src/example/ml-config/databases/content-database.json b/src/example/ml-config/databases/content-database.json index 44f4531..e6b641a 100755 --- a/src/example/ml-config/databases/content-database.json +++ b/src/example/ml-config/databases/content-database.json @@ -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": [ @@ -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" - } ] } diff --git a/src/koop/package.json b/src/koop/package.json index c0fae00..f2d2bcf 100755 --- a/src/koop/package.json +++ b/src/koop/package.json @@ -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",