Skip to content

Commit 0dd796e

Browse files
committed
Merge branch 'release/1.0.0-rc.3'
2 parents 5c50bae + c3a47af commit 0dd796e

File tree

230 files changed

+5596
-2779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+5596
-2779
lines changed

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
# Change Log
22

3-
## [v1.0.0-rc.2](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.2)
3+
## [v1.0.0-rc.3](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.3)
44

5+
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.2...v1.0.0-rc.3)
6+
7+
**Fixed bugs:**
8+
9+
- Better support for mixed flow and file type [\#228](https://github.com/marklogic/marklogic-data-hub/issues/228)
10+
11+
**Closed issues:**
12+
13+
- better support for binaries [\#259](https://github.com/marklogic/marklogic-data-hub/issues/259)
14+
- Get traces is super slow [\#258](https://github.com/marklogic/marklogic-data-hub/issues/258)
15+
- Job Output window stuck and not close-able [\#256](https://github.com/marklogic/marklogic-data-hub/issues/256)
16+
- mlcp uri replace is busted when run from cygwin [\#255](https://github.com/marklogic/marklogic-data-hub/issues/255)
17+
- Enable tracing by default [\#254](https://github.com/marklogic/marklogic-data-hub/issues/254)
18+
- Clear modules / Redeploy [\#252](https://github.com/marklogic/marklogic-data-hub/issues/252)
19+
- quickstart should be deployable to an appserver under a subdir [\#249](https://github.com/marklogic/marklogic-data-hub/issues/249)
20+
- Install status window too narrow [\#248](https://github.com/marklogic/marklogic-data-hub/issues/248)
21+
- gradle tasks need to force deploy content [\#246](https://github.com/marklogic/marklogic-data-hub/issues/246)
22+
- Running MLCP on non-existing flow causes error [\#243](https://github.com/marklogic/marklogic-data-hub/issues/243)
23+
- Loading GlobalCorp dataset results in deadlocks [\#225](https://github.com/marklogic/marklogic-data-hub/issues/225)
24+
- Deploy modules button should clear out the modules first [\#214](https://github.com/marklogic/marklogic-data-hub/issues/214)
25+
- Better error handling for failed hub install [\#176](https://github.com/marklogic/marklogic-data-hub/issues/176)
26+
27+
## [v1.0.0-rc.2](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-rc.2) (2016-08-10)
528
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-rc.1...v1.0.0-rc.2)
629

730
**Closed issues:**

examples/healthcare/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ The sample data is located in the input/ folder.
2121

2222
1. Open your web browser to [http://localhost:8080](http://localhost:8080).
2323

24-
1. Point the Login box to your MarkLogic installation.
24+
1. Browse to this folder from the login screen.
2525

26-
1. Deploy your modules by pressing the **Deploy Modules** button.
26+
1. Initialize the project (if necessary)
27+
28+
1. Login with your MarkLogic credentials
29+
30+
1. Install the Hub into MarkLogic (if necessary)
2731

2832
1. Load hl7 data by pressing the **Load Data** button next to hl7. When prompted Set the Path to **input/hl7**. Set the collection to **hl7**. Set the Data Format to **Documents**. Now Press **Submit**.
2933

examples/load-binaries/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Example Binary Loading
2+
This example shows how to load binary documents with the Hub Framework.
3+
4+
# TLDR; How do I run it?
5+
1. Download the latest quick-start jar from the [releases page](https://github.com/marklogic/marklogic-data-hub/releases) into this folder.
6+
7+
1. Run the quick-start jar `java -jar quick-start.jar`
8+
9+
1. Open your web browser to [http://localhost:8080](http://localhost:8080).
10+
11+
1. Browse to this folder from the login screen.
12+
13+
1. Initialize the project (if necessary)
14+
15+
1. Login with your MarkLogic credentials
16+
17+
1. Install the Hub into MarkLogic (if necessary)
18+
19+
1. Load the sample pdf.
20+
21+
1. Click on the Guides entity on the left.
22+
1. Click on the "LoadAsXml" input flow.
23+
1. Click on the "Run Flow" button.
24+
1. Browse to the input folder.
25+
1. Expand the "General Options" section.
26+
1. Add ,\\.pdf,'.xml' to the end of "Output URI Replace". It should look something like: /Users/yourname/data-hub/examples/load-binaries,'','\\.pdf','.xml'
27+
1. Change "Document Type" to "binary".
28+
1. Scroll down and press the "RUN IMPORT" button.
29+
30+
1. At this point you have loaded the sample data. You can browse the data via [QConsole](http://localhost:8000/qconsole) or by searching the REST endpoint on the Staging Http Server [http://localhost:8010/v1/search](http://localhost:8010/v1/search). *Your port may be different if you changed it during setup*
31+
32+
# Ingesting Binaries
33+
34+
When you ingest a binary via the Quick Start MLCP process you will want to do a few things.
35+
36+
1. Change the file extension to xml or json via "Output URI Replace".
37+
38+
This is because we will be manually storing the binary an using the ingest for creating XML or JSON metadata.
39+
40+
1. Change the document type to binary via the "Document Type" option. This is necessary because MLCP might think this document is an XML or JSON after we changed the file extension above.
41+
42+
1. Store the binary manually and return the metatada. In your content.xqy put this:
43+
44+
```xquery
45+
declare function plugin:create-content(
46+
$id as xs:string,
47+
$raw-content as node()?,
48+
$options as map:map) as node()?
49+
{
50+
(: name the binary uri with a pdf extension :)
51+
let $binary-uri := fn:replace($id, ".xml", ".pdf")
52+
53+
(: stash the binary uri in the options map for later:)
54+
let $_ := map:put($options, 'binary-uri', $binary-uri)
55+
56+
(: save the incoming binary as a pdf :)
57+
return
58+
xdmp:document-insert($binary-uri, $raw-content),
59+
60+
(: extract the contents of the pdf and return them
61+
: as the content for the envelope
62+
:)
63+
xdmp:document-filter($raw-content)
64+
};
65+
```
66+
67+
Now you have loaded the binary manually and returned xhtml content to store in the envelope.
269 KB
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--This file is autogenerated. Please don't edit.-->
3+
<flow xmlns="http://marklogic.com/data-hub">
4+
<complexity>simple</complexity>
5+
<data-format>application/xml</data-format>
6+
<plugins/>
7+
</flow>
8+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
xquery version "1.0-ml";
2+
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
4+
5+
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
6+
7+
declare option xdmp:mapping "false";
8+
9+
(:~
10+
: Create Content Plugin
11+
:
12+
: @param $id - the identifier returned by the collector
13+
: @param $raw-content - the raw content being loaded.
14+
: @param $options - a map containing options. Options are sent from Java
15+
:
16+
: @return - your transformed content
17+
:)
18+
declare function plugin:create-content(
19+
$id as xs:string,
20+
$raw-content as node()?,
21+
$options as map:map) as node()?
22+
{
23+
(: name the binary uri with a pdf extension :)
24+
let $binary-uri := fn:replace($id, ".xml", ".pdf")
25+
26+
(: stash the binary uri in the options map for later:)
27+
let $_ := map:put($options, 'binary-uri', $binary-uri)
28+
29+
(: save the incoming binary as a pdf :)
30+
return
31+
xdmp:document-insert($binary-uri, $raw-content),
32+
33+
(: extract the contents of the pdf and return them
34+
: as the content for the envelope
35+
:)
36+
xdmp:document-filter($raw-content)
37+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
xquery version "1.0-ml";
2+
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
4+
5+
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
6+
7+
declare option xdmp:mapping "false";
8+
9+
(:~
10+
: Create Headers Plugin
11+
:
12+
: @param $id - the identifier returned by the collector
13+
: @param $content - the output of your content plugin
14+
: @param $options - a map containing options. Options are sent from Java
15+
:
16+
: @return - zero or more header nodes
17+
:)
18+
declare function plugin:create-headers(
19+
$id as xs:string,
20+
$content as node()?,
21+
$options as map:map) as node()*
22+
{
23+
(: put the binary uri in the header of the envelope :)
24+
(
25+
<binary-uri>{map:get($options, "binary-uri")}</binary-uri>
26+
)
27+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
xquery version "1.0-ml";
2+
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
4+
5+
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
6+
7+
declare option xdmp:mapping "false";
8+
9+
(:~
10+
: Create Triples Plugin
11+
:
12+
: @param $id - the identifier returned by the collector
13+
: @param $content - the output of your content plugin
14+
: @param $headers - the output of your headers plugin
15+
: @param $options - a map containing options. Options are sent from Java
16+
:
17+
: @return - zero or more triples
18+
:)
19+
declare function plugin:create-triples(
20+
$id as xs:string,
21+
$content as node()?,
22+
$headers as node()*,
23+
$options as map:map) as sem:triple*
24+
{
25+
()
26+
};

marklogic-data-hub/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies {
3030
testCompile 'org.springframework.batch:spring-batch-test:3.0.6.RELEASE'
3131
testCompile 'junit:junit:4.12'
3232
testCompile 'xmlunit:xmlunit:1.3'
33+
testCompile 'org.skyscreamer:jsonassert:1.3.0'
3334
testCompile 'org.hamcrest:hamcrest-junit:2.0.0.0'
3435
testCompile 'org.easymock:easymock:3.4'
3536
}

marklogic-data-hub/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ mlSchemasDbName=data-hub-SCHEMAS
3333

3434
hubModulesPath=examples/hr-hub/plugins
3535

36-
version=1.0.0-rc.2
36+
version=1.0.0-rc.3
3737

3838

0 commit comments

Comments
 (0)