You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/08/25 09:49:53 UTC

[2/2] camel git commit: Added terser-language to Gitbook

Added terser-language to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/caa44659
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/caa44659
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/caa44659

Branch: refs/heads/master
Commit: caa4465999dbc8f441930f3ff943a80a9cfc221d
Parents: 3ac6302
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Aug 25 11:45:01 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Aug 25 11:48:15 2016 +0200

----------------------------------------------------------------------
 .../src/main/docs/terser-language.adoc          | 47 ++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/caa44659/components/camel-hl7/src/main/docs/terser-language.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/main/docs/terser-language.adoc b/components/camel-hl7/src/main/docs/terser-language.adoc
new file mode 100644
index 0000000..9bd6970
--- /dev/null
+++ b/components/camel-hl7/src/main/docs/terser-language.adoc
@@ -0,0 +1,47 @@
+[[HL7-Terserlanguage]]
+Terser language
+^^^^^^^^^^^^^^^
+
+http://hl7api.sourceforge.net[HAPI] provides a
+http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/util/Terser.html[Terser]
+class that provides access to fields using a commonly used terse
+location specification syntax. The Terser language allows to use this
+syntax to extract values from messages and to use them as expressions
+and predicates for filtering, content-based routing etc.
+
+Sample:
+
+[source,java]
+--------------------------------------------------------------------------------------------------
+import static org.apache.camel.component.hl7.HL7.terser;
+...
+
+   // extract patient ID from field QRD-8 in the QRY_A19 message above and put into message header
+   from("direct:test1")
+      .setHeader("PATIENT_ID",terser("QRD-8(0)-1"))
+      .to("mock:test1");
+
+  �// continue processing if extracted field equals a message header
+   from("direct:test2")
+      .filter(terser("QRD-8(0)-1").isEqualTo(header("PATIENT_ID"))
+      .to("mock:test2");
+--------------------------------------------------------------------------------------------------
+
+[[HL7-Terserlanguage-options]]
+Terser Language options
+^^^^^^^^^^^^^^^^^^^^^^^
+
+// language options: START
+The HL7 Terser language supports 1 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2,1m,1m,6",options="header"]
+|=======================================================================
+| Name | Default | Java Type | Description
+| trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces and line breaks
+|=======================================================================
+{% endraw %}
+// language options: END
+