Permalink
Browse files

Saving to not lose changes....

  • Loading branch information...
garyvidal committed Oct 5, 2011
1 parent 591ed59 commit c54e894a515f39deaa8e79f4755152d704fdc543
Showing with 60 additions and 31 deletions.
  1. +60 −31 README.markdown
View
@@ -27,20 +27,26 @@ Provides various support for MarkLogic Functionality to use in Build Deployment
###<load> Task
======
-####Parameters
+Description:
+Load content from filesystem into MarkLogic database.
+
+####Attribute Parameters
<table>
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr><td>xccurl</td><td>XCC Connection string</td><td>Yes</td></tr>
<tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No</td></tr>
+ <tr><td>contenttype</td><td>Sets the default contentType for defined docset. This parameter is useful there is an unknown mimetype and you want to
+ explicitly set the type. Value can be xml|binary|text.
+ </td><td>No,<br/> default=false</td></tr>
</table>
####Elements Nested Parameters
<table>
<tr><th>Element Name</th><th>Description</th><th>Required</th></tr>
- <tr><td>docset</td><td></td><td>Yes</td></tr>
+ <tr><td>docset</td><td>Defines the uri where the content will be loaded and additional permissions, collections and fileset residing on local filesystem.</td><td>Yes</td></tr>
<tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No</td></tr>
</table>
Example (Complete):
-Loads a document into /test-dir/ from ../src directory using fileset vector. Additionally a set of permissions and collections are assigned.
+Loads a document into /test-dir/ from ../src directory using fileset vector. Additionally a set of permissions and collections are assigned to documents loaded.
```xml
<ml:load xccurl="${xccstring}">
@@ -62,23 +68,27 @@ Loads a document into /test-dir/ from ../src directory using fileset vector. Ad
###&lt;delete&gt; Task
======
-####Parameters
+
+Description: Deletes files/directories/collections from MarkLogic database.
+
+####Attribute Parameters
<table>
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr><td>xccurl</td><td>XCC Connection string</td><td>Yes</td></tr>
<tr><td>documents</td><td>Comma Seperated List of document uris to delete</td><td>No</td></tr>
<tr><td>directories</td><td>Comma Seperated List of directory uris to delete</td><td>No</td></tr>
<tr><td>collections</td><td>Comma Seperated List of collection names to delete</td><td>Yes</td></tr>
- <tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No, Default 'true'</td></tr>
+ <tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No<br/>default=false</td></tr>
</table>
-Example:
+
+Example: Deletes files from various documents, directories, or collections
```xml
<ml:delete xccurl="${xccstring}"
- documents="/path/to/doc1.xml,/path/to/doc2.xml"
- directories="/dir1/,/dir2/"
- collections="collection1,collection2"
- failonerror="false"
+ documents="/path/to/doc1.xml,/path/to/doc2.xml"
+ directories="/dir1/,/dir2/"
+ collections="collection1,collection2"
+ failonerror="false"
/>
```
@@ -89,7 +99,9 @@ Example:
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr><td>xccurl</td><td>XCC Connection string</td><td>Yes</td></tr>
<tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No</td></tr>
- <tr><td>query</td><td>XQuery code to execute.</td><td>No</td></tr>
+ <tr><td>query</td><td>XQuery code to execute. At least the query attribute or a fileset is required to execute a given query task.</td><td>No</td></tr>
+ <tr><td>output</td><td>File system path to write output for queries. If not set will write output to standard output</td><td>No</td></tr>
+ <tr><td>appendOutput</td><td>Boolean value to determine if any output is appended to the output uri value</td><td>No<br/>default=false</td></tr>
</table>
#### Nested Element Parameters
<table>
@@ -104,6 +116,11 @@ Example 1:(Simple Query)
<ml:query xccurl="${xccstring}" query="1 + 2">
```
+Returns
+```text
+3
+```
+
Example 2:(Passing External Arguments against query attribute)
```xml
@@ -140,9 +157,19 @@ Same as Example 2 except the query is saved in test-parameters.xqy
</ml:query>
```
+Returns
+
+```xml
+ Douglass
+ Douglass
+ Douglass
+```
+
###&lt;invoke&gt; Task
=========
-####Parameters
+Description: Invokes a mainModule at a given uri. The module must exists in the modules database configured for the app-server.
+
+####Attribute Parameters
<table>
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr><td>xccurl</td><td>XCC Connection string</td><td>Yes</td></tr>
@@ -154,21 +181,22 @@ Same as Example 2 except the query is saved in test-parameters.xqy
<table>
<tr><th>Element</th><th>Description</th><th>Required</th></tr>
<tr><td>paramset</td><td>Allows parameters to be passed to query or query files.</td><td>No</td></tr>
-
+ <tr><td>options</td><td>Invoke options to control invocation</td><td>No</td></tr>
</table>
Example:
```xml
<ml:invoke xccurl="${xccstring}" moduleUri="test/test.xqy">
<ml:paramset>
- <ml:param name="foo" ns="" type="string" value="Douglass"/>
+ <ml:param name="foo" ns="" type="string" value="Douglass"/>
</ml:paramset>
</ml:invoke>
```
###&lt;spawn&gt; Task
-
+=====
+Description : Spawns a task on the Marklogic Task Server against a given moduleUri. The moduleUri must exist in the modules database for the appserver.
####Parameters
<table>
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
@@ -181,9 +209,9 @@ Example:
<table>
<tr><th>Element</th><th>Description</th><th>Required</th></tr>
<tr><td>paramset</td><td>Allows parameters to be passed to query or query files.</td><td>No</td></tr>
-
</table>
+Example 1: Spawns the 'test/test.xqy' passing parameter name foo
```xml
<ml:spawn xccurl="${xccstring}" moduleUri="test/test.xqy">
<ml:paramset>
@@ -193,30 +221,31 @@ Example:
```
###&lt;corb&gt; Task
+Description: Executes a Corb task. This is a wrapper for the corb.jar. The latest version of corb.jar can be found at here: https://github.com/marklogic/corb
======
####Parameters
<table>
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr><td>xccurl</td><td>XCC Connection string</td><td>Yes</td></tr>
- <tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No</td></tr>
- <tr><td>module</td><td></td><td>Yes</td></tr>
- <tr><td>collection</td><td>collection to for uri selection</td><td>No</td></tr>
- <tr><td>moduleuri</td><td></td><td>Yes</td></tr>
- <tr><td>moduledb</td><td></td><td>Yes</td></tr>
- <tr><td>threads</td><td></td><td>No</td></tr>
- <tr><td>install</td><td></td><td>Yes</td></tr>
+ <tr><td>failonerror</td><td>Determines wether an exception will cause task to fail</td><td>No<br/>default=false</td></tr>
+ <tr><td>module</td><td>Module to execute when processing a given document uri</td><td>Yes</td></tr>
+ <tr><td>collection</td><td>collection for uri selection</td><td>No</td></tr>
+ <tr><td>urismodule</td><td>Custom uri module to invoked to select uris to process</td><td>No</td></tr>
+ <tr><td>moduledb</td><td>Modules database to use when executing the module</td><td>No</td></tr>
+ <tr><td>threads</td><td>Number of threads to run in parrallel when processing requests</td><td>No<br/>default=1</td></tr>
+ <tr><td>install</td><td>Determines whether modules should be installed before executing the corb process. It is important to note if the modules URI</td><td>No<br/>default=false</td></tr>
</table>
Example:
```xml
- <ml:corb xccurl="${xccstring}"
- collection=""
- module="${basedir}/tests/corb/uri-logger.xqy"
- moduledb="Documents"
- moduleroot="/"
- threads="4"
- install="false"
- />
+<ml:corb xccurl="${xccstring}"
+ collection=""
+ module="${basedir}/tests/corb/uri-logger.xqy"
+ moduledb="Documents"
+ moduleroot="/"
+ threads="4"
+ install="false"
+/>
```
###&lt;xqdoc&gt; Task

0 comments on commit c54e894

Please sign in to comment.