Skip to content

Commit e22afca

Browse files
committed
update plugin signatures
1 parent 36c21b0 commit e22afca

File tree

78 files changed

+305
-357
lines changed

Some content is hidden

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

78 files changed

+305
-357
lines changed

examples/healthcare/plugins/entities/Patients/conformance/final/collector/collector.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/collector";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare option xdmp:mapping "false";
66

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/content";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,20 +9,21 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Content Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
16-
: @param $options - a map containing options. Options are sent from Java
12+
: @param $id - the identifier returned by the collector
13+
: @param $options - a map containing options. Options are sent from Java
1714
:
1815
: @return - your transformed content
1916
:)
2017
declare function plugin:create-content(
2118
$id as xs:string,
22-
$content as node()?,
23-
$headers as node()*,
24-
$triples as sem:triple*,
2519
$options as map:map) as node()?
2620
{
27-
fn:doc($id)/envelope:envelope/envelope:content/node()
21+
let $doc := fn:doc($id)
22+
return
23+
if ($doc/envelope:envelope) then
24+
$doc/envelope:envelope/envelope:content/node()
25+
else if ($doc/content) then
26+
$doc/content
27+
else
28+
$doc
2829
};

examples/healthcare/plugins/entities/Patients/conformance/final/headers/headers.xqy

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/headers";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -11,19 +11,15 @@ declare option xdmp:mapping "false";
1111
(:~
1212
: Create Headers Plugin
1313
:
14-
: @param id - the identifier returned by the collector
15-
: @param content - your final content
16-
: @param headers - a sequence of header nodes
17-
: @param triples - a sequence of triples
14+
: @param $id - the identifier returned by the collector
15+
: @param $content - the output of your content plugin
1816
: @param $options - a map containing options. Options are sent from Java
1917
:
2018
: @return - zero or more header nodes
2119
:)
2220
declare function plugin:create-headers(
2321
$id as xs:string,
2422
$content as node()?,
25-
$headers as node()*,
26-
$triples as sem:triple*,
2723
$options as map:map) as node()*
2824
{
2925
(

examples/healthcare/plugins/entities/Patients/conformance/final/triples/triples.xqy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/triples";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,10 +9,9 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Triples Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
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
1615
: @param $options - a map containing options. Options are sent from Java
1716
:
1817
: @return - zero or more triples
@@ -21,7 +20,6 @@ declare function plugin:create-triples(
2120
$id as xs:string,
2221
$content as node()?,
2322
$headers as node()*,
24-
$triples as sem:triple*,
2523
$options as map:map) as sem:triple*
2624
{
2725
()
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/content";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,20 +9,16 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Content Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
16-
: @param $options - a map containing options. Options are sent from Java
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
1715
:
1816
: @return - your transformed content
1917
:)
2018
declare function plugin:create-content(
2119
$id as xs:string,
22-
$content as node()?,
23-
$headers as node()*,
24-
$triples as sem:triple*,
20+
$raw-content as node()?,
2521
$options as map:map) as node()?
2622
{
27-
$content
23+
$raw-content
2824
};

examples/healthcare/plugins/entities/Patients/input/hl7/headers/headers.xqy

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/headers";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,19 +9,15 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Headers Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
12+
: @param $id - the identifier returned by the collector
13+
: @param $content - the output of your content plugin
1614
: @param $options - a map containing options. Options are sent from Java
1715
:
1816
: @return - zero or more header nodes
1917
:)
2018
declare function plugin:create-headers(
2119
$id as xs:string,
2220
$content as node()?,
23-
$headers as node()*,
24-
$triples as sem:triple*,
2521
$options as map:map) as node()*
2622
{
2723
()

examples/healthcare/plugins/entities/Patients/input/hl7/triples/triples.xqy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/triples";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,10 +9,9 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Triples Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
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
1615
: @param $options - a map containing options. Options are sent from Java
1716
:
1817
: @return - zero or more triples
@@ -21,7 +20,6 @@ declare function plugin:create-triples(
2120
$id as xs:string,
2221
$content as node()?,
2322
$headers as node()*,
24-
$triples as sem:triple*,
2523
$options as map:map) as sem:triple*
2624
{
2725
()
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/content";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,20 +9,16 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Content Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
16-
: @param $options - a map containing options. Options are sent from Java
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
1715
:
1816
: @return - your transformed content
1917
:)
2018
declare function plugin:create-content(
2119
$id as xs:string,
22-
$content as node()?,
23-
$headers as node()*,
24-
$triples as sem:triple*,
20+
$raw-content as node()?,
2521
$options as map:map) as node()?
2622
{
27-
$content
23+
$raw-content
2824
};

examples/healthcare/plugins/entities/Patients/input/nppes/headers/headers.xqy

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/headers";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,19 +9,15 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Headers Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
12+
: @param $id - the identifier returned by the collector
13+
: @param $content - the output of your content plugin
1614
: @param $options - a map containing options. Options are sent from Java
1715
:
1816
: @return - zero or more header nodes
1917
:)
2018
declare function plugin:create-headers(
2119
$id as xs:string,
2220
$content as node()?,
23-
$headers as node()*,
24-
$triples as sem:triple*,
2521
$options as map:map) as node()*
2622
{
2723
()

examples/healthcare/plugins/entities/Patients/input/nppes/triples/triples.xqy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
xquery version "1.0-ml";
22

3-
module namespace plugin = "http://marklogic.com/data-hub/plugins/triples";
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
44

55
declare namespace envelope = "http://marklogic.com/data-hub/envelope";
66

@@ -9,10 +9,9 @@ declare option xdmp:mapping "false";
99
(:~
1010
: Create Triples Plugin
1111
:
12-
: @param id - the identifier returned by the collector
13-
: @param content - your final content
14-
: @param headers - a sequence of header nodes
15-
: @param triples - a sequence of triples
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
1615
: @param $options - a map containing options. Options are sent from Java
1716
:
1817
: @return - zero or more triples
@@ -21,7 +20,6 @@ declare function plugin:create-triples(
2120
$id as xs:string,
2221
$content as node()?,
2322
$headers as node()*,
24-
$triples as sem:triple*,
2523
$options as map:map) as sem:triple*
2624
{
2725
()

0 commit comments

Comments
 (0)