Skip to content

Commit b62027d

Browse files
DHFPROD-2673: New NOTICE.txt from Legal (#2671) (#2672)
* DHFPROD-2673 New NOTICE.txt from Legal (#2671) Switched to singular (NOTICE) again. The old rename seems to be undone. * DHFPROD-2449: Headers and triples no longer contain empty XML elements Also moved buildInvokeHookOptions into a directory based on its module name * update page object * update verification * add await * undo the wrong lines * Updated Changelog and ReadMe (#2674) * Updated release branch * Release/5.0.0 (#2478) * updated Read me and Contributing for the release 5.0 * updated change log for 5.0.0 * Update README.md Co-Authored-By: Akshay Sonvane <[email protected]> * Update marklogic-data-hub/src/main/resources/scaffolding/build_gradle Co-Authored-By: Akshay Sonvane <[email protected]> * Update marklogic-data-hub/src/main/resources/scaffolding/build_gradle Co-Authored-By: Akshay Sonvane <[email protected]> * updated font * Updated the spaces * Updated the spaces * Updated the spaces * Updated the spaces * Updated the spaces * Updated the spaces * Updated the spaces * updated gradle org and vcs url * missing file (#2676) * Update CHANGELOG.md (#2675) adding change log for 5.0.1
1 parent 0843ac1 commit b62027d

File tree

14 files changed

+5718
-3851
lines changed

14 files changed

+5718
-3851
lines changed

CHANGELOG.md

Lines changed: 366 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 395 additions & 363 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 4639 additions & 0 deletions
Large diffs are not rendered by default.

NOTICES.txt

Lines changed: 0 additions & 3294 deletions
This file was deleted.

README.md

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
1-
# MarkLogic Data Hub
2-
3-
Go from nothing to an Operational Data Hub in a matter of minutes.
4-
5-
The MarkLogic Data Hub Framework is a data integration framework and toolset to quickly and efficiently integrate data from many sources into a single MarkLogic database and then expose that data.
6-
7-
# Version Support
8-
MarkLogic 9.0-5 or later is required with version 4.0.0+ of the DHF.
9-
10-
# Getting Started
11-
Grab the [latest release](https://github.com/marklogic/marklogic-data-hub/releases) then visit our [Data Hub Framework website](https://marklogic.github.io/marklogic-data-hub/) to get started.
12-
13-
14-
## Advanced Hub Usage
15-
Ready to go beyond the Developer QuickStart and start using DHF in your own Java or Gradle project? The [Data Hub Framework website](https://marklogic.github.io/marklogic-data-hub/) also provides that.
16-
17-
## Don't get this code
18-
You don't need to checkout this repo unless you plan to actively contribute changes to the Data Hub Framework. Go to [our website](https://marklogic.github.io/marklogic-data-hub/) to get started with DHF.
19-
20-
If you really do want to contribute, see our [Contributing Guide](https://github.com/marklogic/marklogic-data-hub/blob/master/CONTRIBUTING.md) to get started.
21-
22-
# Support
23-
24-
The MarkLogic Data Hub Framework is maintained by [MarkLogic][marklogic]
25-
Engineering and is made available under the [Apache License 2.0][apache]. _The
26-
Data Hub Framework core Java libraries and gradle commands are supported
27-
software for production use with MarkLogic Server. The QuickStart UI is
28-
designed for use in a development environment and is not currently supported
29-
for production use._ Everyone is encouraged to file bug reports, feature
30-
requests, and pull requests through [GitHub][issues]. This input is critical
31-
and will be carefully considered. However, we can't promise a specific
32-
resolution or timeframe for any request. In addition, MarkLogic provides
33-
technical support for [release tags][releases] of the MarkLogic Data Hub
34-
Framework to licensed customers under the terms outlined in the [MarkLogic
35-
Technical Support Handbook][handbook]. Customers with an active maintenance
36-
contract can sign up for MarkLogic Technical Support on our
37-
[support portal][support].
38-
39-
[marklogic]: https://www.marklogic.com/
40-
[apache]: https://www.apache.org/licenses/LICENSE-2.0
41-
[issues]: https://github.com/marklogic/marklogic-data-hub/issues
42-
[releases]: https://github.com/marklogic/marklogic-data-hub/releases
43-
[handbook]: http://www.marklogic.com/files/Mark_Logic_Support_Handbook.pdf
44-
[support]: https://help.marklogic.com/
1+
# MarkLogic Data Hub
2+
3+
Go from nothing to an Operational Data Hub in a matter of minutes.
4+
5+
MarkLogic Data Hub is a data integration platform and toolset that helps you quickly and efficiently integrate data from many sources into a single MarkLogic database and then expose that data.
6+
7+
8+
# Version Support
9+
10+
For Data Hub version 5.0, you need:
11+
12+
- MarkLogic 9.0-7 or later
13+
- Gradle 4.6 or later
14+
- Java JDK 8 or later
15+
16+
17+
# Getting Started
18+
Grab the [latest release](https://github.com/marklogic/marklogic-data-hub/releases). Visit our [Data Hub website](https://docs.marklogic.com/datahub/) to get started.
19+
20+
21+
## Advanced Hub Usage
22+
You can also go beyond the QuickStart app and start using Data Hub in your own Java or Gradle project. Visit our [Data Hub website](https://docs.marklogic.com/datahub/) for more information.
23+
24+
25+
## Contribute
26+
You do not need to download the code in the repository to use MarkLogic Data Hub.
27+
28+
If you would like to plan to actively contribute changes to the Data Hub.
29+
30+
If you really do want to contribute, see our [Contributing Guide](https://github.com/marklogic/marklogic-data-hub/blob/master/CONTRIBUTING.md) to get started.
31+
32+
33+
# Support
34+
The MarkLogic Data Hub is maintained by [MarkLogic][marklogic] Engineering and is made available under the [Apache License 2.0][apache].
35+
36+
_The Data Hub core Java libraries and Gradle commands are supported software for production use with MarkLogic Server. QuickStart is designed for use in a development environment and is not currently supported for production use._
37+
38+
Everyone is encouraged to file bug reports, feature requests, and pull requests through [GitHub][issues]. This input is critical and will be carefully considered. However, we cannot promise a specific resolution or timeframe for any request.
39+
40+
In addition, MarkLogic provides technical support for [release tags][releases] of MarkLogic Data Hub to licensed customers under the terms outlined in the [MarkLogic Technical Support Handbook][handbook]. Customers with an active maintenance contract can sign up for MarkLogic Technical Support on our [support portal][support].
41+
42+
43+
[marklogic]: https://www.marklogic.com/
44+
[apache]: https://www.apache.org/licenses/LICENSE-2.0
45+
[issues]: https://github.com/marklogic/marklogic-data-hub/issues
46+
[releases]: https://github.com/marklogic/marklogic-data-hub/releases
47+
[handbook]: http://www.marklogic.com/files/Mark_Logic_Support_Handbook.pdf
48+
[support]: https://help.marklogic.com/

marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/impl/flow-utils.sjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,21 @@ class FlowUtils {
531531

532532
getHeaders(doc) {
533533
let headers = fn.head(doc.xpath('/*:envelope/*:headers'));
534-
if(fn.count(headers) === 0) {
534+
if (fn.count(headers) === 0) {
535+
headers = null;
536+
}
537+
else if (fn.count(fn.head(doc.xpath('/*:envelope/*:headers/*'))) == 0) {
535538
headers = null;
536539
}
537540
return headers;
538541
}
539542

540543
getTriples(doc) {
541544
let triples = doc.xpath('/*:envelope/*:triples');
542-
if(fn.count(triples) === 0) {
545+
if (fn.count(triples) === 0) {
546+
triples = null;
547+
}
548+
else if (fn.count(fn.head(doc.xpath('/*:envelope/*:triples/*'))) == 0) {
543549
triples = null;
544550
}
545551
return triples;
Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
buildscript {
2-
repositories {
3-
maven {url 'http://developer.marklogic.com/maven2/'}
4-
}
5-
}
6-
7-
plugins {
8-
id 'java'
9-
id 'eclipse'
10-
id 'idea'
11-
12-
// This plugin allows you to create different environments
13-
// for your gradle deploy. Each environment is represented
14-
// by a gradle-${env}.properties file
15-
// See https://github.com/stevesaliman/gradle-properties-plugin
16-
// specify the env on the command line with:
17-
// gradle -PenvironmentName=x ...
18-
id 'net.saliman.properties' version '1.4.6'
19-
20-
// This gradle plugin extends the ml-gradle plugin with
21-
// commands that make the Data Hub Framework do its magic
22-
id 'com.marklogic.ml-data-hub' version '5.0-SNAPSHOT'
23-
}
24-
25-
repositories {
26-
jcenter()
27-
maven {url 'http://developer.marklogic.com/maven2/'}
28-
}
29-
30-
dependencies {
31-
// this allows you to write custom java code that depends
32-
// on the Data Hub Framework library
33-
compile 'com.marklogic:marklogic-data-hub:5.0-SNAPSHOT'
34-
compile 'com.marklogic:marklogic-xcc:9.0.7'
35-
}
36-
1+
buildscript {
2+
repositories {
3+
maven {url 'http://developer.marklogic.com/maven2/'}
4+
}
5+
}
6+
7+
plugins {
8+
id 'java'
9+
id 'eclipse'
10+
id 'idea'
11+
12+
// This plugin allows you to create different environments
13+
// for your gradle deploy. Each environment is represented
14+
// by a gradle-${env}.properties file
15+
// See https://github.com/stevesaliman/gradle-properties-plugin
16+
// specify the env on the command line with:
17+
// gradle -PenvironmentName=x ...
18+
id 'net.saliman.properties' version '1.4.6'
19+
20+
// This gradle plugin extends the ml-gradle plugin with
21+
// commands that make the Data Hub Framework do its magic
22+
id 'com.marklogic.ml-data-hub' version '5.0-SNAPSHOT'
23+
}
24+
25+
repositories {
26+
jcenter()
27+
maven {url 'http://developer.marklogic.com/maven2/'}
28+
}
29+
30+
dependencies {
31+
// this allows you to write custom java code that depends
32+
// on the Data Hub Framework library
33+
compile 'com.marklogic:marklogic-data-hub:5.0-SNAPSHOT'
34+
compile 'com.marklogic:marklogic-xcc:9.0.7'
35+
}
36+
37+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const test = require("/test/test-helper.xqy");
2+
3+
const FlowUtils = require("/data-hub/5/impl/flow-utils.sjs");
4+
const flowUtils = new FlowUtils();
5+
6+
const results = [];
7+
8+
function getHeadersFromXml(xml) {
9+
return flowUtils.getHeaders(fn.head(xdmp.unquote(xml)));
10+
}
11+
12+
let headers = getHeadersFromXml('<envelope xmlns="http://marklogic.com/entity-services"><headers></headers></envelope>');
13+
results.push(test.assertEqual(null, headers));
14+
15+
headers = getHeadersFromXml('<envelope xmlns="http://marklogic.com/entity-services"><headers><hello>world</hello></headers></envelope>');
16+
results.push(test.assertEqual(
17+
'<headers xmlns="http://marklogic.com/entity-services"><hello>world</hello></headers>',
18+
xdmp.quote(headers)
19+
));
20+
21+
headers = flowUtils.getHeaders(xdmp.toJSON({"envelope": {"headers": {}}}));
22+
results.push(test.assertEqual(null, headers));
23+
24+
headers = flowUtils.getHeaders(xdmp.toJSON({"envelope": {"headers": {"hello": "world"}}}));
25+
results.push(test.assertEqual("world", xs.string(headers.hello)));
26+
27+
results;
28+
29+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const test = require("/test/test-helper.xqy");
2+
3+
const FlowUtils = require("/data-hub/5/impl/flow-utils.sjs");
4+
const flowUtils = new FlowUtils();
5+
6+
const results = [];
7+
8+
function getTriplesFromXml(xml) {
9+
return flowUtils.getTriples(fn.head(xdmp.unquote(xml)));
10+
}
11+
12+
let triples = getTriplesFromXml('<envelope xmlns="http://marklogic.com/entity-services"><triples></triples></envelope>');
13+
results.push(test.assertEqual(null, triples));
14+
15+
// We don't need real triples inside the "triples" element, just need at least one element to verify that it's returned
16+
triples = getTriplesFromXml('<envelope xmlns="http://marklogic.com/entity-services">' +
17+
'<triples><test/></triples>' +
18+
'</envelope>');
19+
results.push(test.assertEqual(
20+
'<triples xmlns="http://marklogic.com/entity-services"><test/></triples>',
21+
xdmp.quote(triples)
22+
));
23+
24+
triples = flowUtils.getTriples(xdmp.toJSON({"envelope": {"triples": {}}}));
25+
results.push(test.assertEqual(null, triples));
26+
27+
triples = flowUtils.getTriples(xdmp.toJSON({
28+
"envelope": {
29+
"triples": [
30+
{
31+
"triple": {
32+
"subject": "s1",
33+
"predicate": "p1",
34+
"object": "o1"
35+
}
36+
},
37+
{
38+
"triple": {
39+
"subject": "s2",
40+
"predicate": "p2",
41+
"object": "o2"
42+
}
43+
}
44+
]
45+
}
46+
})).toArray();
47+
48+
results.push(
49+
test.assertEqual("s1", xs.string(triples[0].triple.subject)),
50+
test.assertEqual("p1", xs.string(triples[0].triple.predicate)),
51+
test.assertEqual("o1", xs.string(triples[0].triple.object)),
52+
test.assertEqual("s2", xs.string(triples[1].triple.subject)),
53+
test.assertEqual("p2", xs.string(triples[1].triple.predicate)),
54+
test.assertEqual("o2", xs.string(triples[1].triple.object))
55+
);
56+
57+
results;
58+
59+

0 commit comments

Comments
 (0)