You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/08/24 21:28:39 UTC

[01/32] airavata-sandbox git commit: adding datacat system

Repository: airavata-sandbox
Updated Branches:
  refs/heads/master 54254034e -> 4231ac353


http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/styles/main.css
----------------------------------------------------------------------
diff --git a/datacat/web/portal/styles/main.css b/datacat/web/portal/styles/main.css
new file mode 100755
index 0000000..8de5c8b
--- /dev/null
+++ b/datacat/web/portal/styles/main.css
@@ -0,0 +1,144 @@
+body {
+    max-width: 992px;
+    margin: 0 auto !important;
+    padding: 0 !important;
+}
+
+.header-wrapper {
+    height: 92px;
+    background-color: #c1c64c;
+}
+
+.header {
+    text-align: center;
+    padding: 20px 0 !important;
+}
+
+.header h1 {
+    margin: 0;
+}
+
+.header #login-popover-btn {
+    text-align: right;
+}
+
+.header .arrow {
+    top: -11px !important;
+}
+
+#login-form-wrapper, #logout-form-wrapper {
+    padding: 0 10px;
+}
+
+#login-btn-wrapper, #logout-btn-wrapper{
+    margin-bottom: 0 !important;
+}
+
+.content-wrapper {
+}
+
+.content {
+
+}
+
+.query-form-wrapper {
+    margin-top: 15px;
+    padding: 10px 0 !important;
+}
+
+.query-form-wrapper .form-inline div {
+    padding: 0 6px !important;
+}
+
+
+#query-search {
+    width: 100%;
+}
+
+#query-search-btn {
+}
+
+.fielded-form-wrapper {
+    margin-top: 15px;
+    padding: 0 !important;
+}
+
+.fielded-form-inner-wrapper {
+    padding: 15px;
+}
+
+.fielded-field .fielded-form-input-wrapper{
+    padding: 0 6px !important;
+}
+
+.fielded-field div {
+    padding: 0 3px !important;
+}
+
+.range-form-wrapper {
+    margin-top: 15px;
+    padding: 0 !important;
+}
+
+.range-form-inner-wrapper {
+    padding: 15px;
+}
+
+#form-outer-wrapper {
+    margin-top: 15px;
+    padding: 0 15px 15px 15px !important;
+}
+
+.results-table-wrapper {
+    margin-top: 15px;
+    padding: 10px 0 !important;
+    overflow-x: auto;
+}
+
+.bordered {
+    border: 1px solid #222222;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+    -khtml-border-radius: 10px;
+}
+
+#results-table th a {
+    color: #428bca;
+}
+
+/*#search-btn {
+    margin-top: 15px;
+}*/
+
+@media (min-width: 992px) {                                 /* responsive css for large screens */
+
+    .fielded-form-inner-wrapper {
+        margin-right: 7px;
+    }
+
+    .range-form-inner-wrapper {
+        margin-left: 7px;
+    }
+}
+
+@media (max-width: 767px) {                                 /* responsive css for small / mobile screens */
+
+    .header h1 {
+        font-size: 24px;
+    }
+
+    .bootstrap-select{
+        margin-bottom: 10px !important;
+    }
+
+}
+
+@media (max-width: 992px) {                                 /* responsive css for medium size / tablet screens */
+
+    .content-wrapper {
+        padding-left: 5px !important;
+        padding-right: 5px !important;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/wso2_is.cer
----------------------------------------------------------------------
diff --git a/datacat/wso2_is.cer b/datacat/wso2_is.cer
new file mode 100644
index 0000000..f0fac8d
--- /dev/null
+++ b/datacat/wso2_is.cer
@@ -0,0 +1,14 @@
+-----BEGIN CERTIFICATE-----
+MIICNTCCAZ6gAwIBAgIES343gjANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJV
+UzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxDTALBgNVBAoM
+BFdTTzIxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xMDAyMTkwNzAyMjZaFw0zNTAy
+MTMwNzAyMjZaMFUxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEWMBQGA1UEBwwN
+TW91bnRhaW4gVmlldzENMAsGA1UECgwEV1NPMjESMBAGA1UEAwwJbG9jYWxob3N0
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUp/oV1vWc8/TkQSiAvTousMzO
+M4asB2iltr2QKozni5aVFu818MpOLZIr8LMnTzWllJvvaA5RAAdpbECb+48FjbBe
+0hseUdN5HpwvnH/DW8ZccGvk53I6Orq7hLCv1ZHtuOCokghz/ATrhyPq+QktMfXn
+RS4HrKGJTzxaCcU7OQIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcN
+AQEFBQADgYEAW5wPR7cr1LAdq+IrR44iQlRG5ITCZXY9hI0PygLP2rHANh+PYfTm
+xbuOnykNGyhM6FjFLbW2uZHQTY1jMrPprjOrmyK5sjJRO4d1DeGHT/YnIjs9JogR
+Kv4XHECwLtIVdAbIdWHEtVZJyMSktcyysFcvuhPQK8Qc/E/Wq8uHSCo=
+-----END CERTIFICATE-----


[09/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/fonts/glyphicons-halflings-regular.svg
----------------------------------------------------------------------
diff --git a/datacat/web/portal/fonts/glyphicons-halflings-regular.svg b/datacat/web/portal/fonts/glyphicons-halflings-regular.svg
new file mode 100755
index 0000000..e3e2dc7
--- /dev/null
+++ b/datacat/web/portal/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph />
+<glyph />
+<glyph unicode="&#xd;" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
+<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#x2000;" horiz-adv-x="652" />
+<glyph unicode="&#x2001;" horiz-adv-x="1304" />
+<glyph unicode="&#x2002;" horiz-adv-x="652" />
+<glyph unicode="&#x2003;" horiz-adv-x="1304" />
+<glyph unicode="&#x2004;" horiz-adv-x="434" />
+<glyph unicode="&#x2005;" horiz-adv-x="326" />
+<glyph unicode="&#x2006;" horiz-adv-x="217" />
+<glyph unicode="&#x2007;" horiz-adv-x="217" />
+<glyph unicode="&#x2008;" horiz-adv-x="163" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="326" />
+<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
+<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
+<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
+<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
+<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
+<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
+<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
+<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
+<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
+<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
+<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
+<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
+<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 
 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
+<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
+<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
+<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
+<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
+<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
+<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
+<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
+<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
+<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
+<glyph unicode="&#xe023;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
+<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
+<glyph unicode="&#xe026;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
+<glyph unicode="&#xe027;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
+<glyph unicode="&#xe028;" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
+<glyph unicode="&#xe029;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
+<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
+<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
+<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
+<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
+<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
+<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
+<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
+<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
+<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
+<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
+<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
+<glyph unicode="&#xe041;" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
+<glyph unicode="&#xe042;" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
+<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
+<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
+<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
+<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
+<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
+<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
+<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
+<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
+<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
+<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-10
 0q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
+<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
+<glyph unicode="&#xe062;" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
+<glyph unicode="&#xe063;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
+<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
+<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
+<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
+<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
+<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
+<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
+<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
+<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
+<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
+<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
+<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
+<glyph unicode="&#xe079;" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
+<glyph unicode="&#xe080;" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
+<glyph unicode="&#xe081;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
+<glyph unicode="&#xe082;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
+<glyph unicode="&#xe083;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
+<glyph unicode="&#xe084;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
+<glyph unicode="&#xe085;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
+<glyph unicode="&#xe086;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
+<glyph unicode="&#xe087;" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
+<glyph unicode="&#xe088;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
+<glyph unicode="&#xe089;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
+<glyph unicode="&#xe090;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
+<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
+<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
+<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
+<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
+<glyph unicode="&#xe095;" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
+<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
+<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
+<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
+<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
+<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
+<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
+<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
+<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
+<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
+<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
+<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
+<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
+<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
+<glyph unicode="&#xe112;" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
+<glyph unicode="&#xe113;" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
+<glyph unicode="&#xe114;" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
+<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
+<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
+<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
+<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
+<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
+<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
+<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
+<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
+<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
+<glyph unicode="&#xe125;" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
+<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
+<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
+<glyph unicode="&#xe128;" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
+<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
+<glyph unicode="&#xe130;" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
+<glyph unicode="&#xe131;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
+<glyph unicode="&#xe132;" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
+<glyph unicode="&#xe133;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
+<glyph unicode="&#xe134;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
+<glyph unicode="&#xe135;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-5
 6 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
+<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
+<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
+<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
+<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
+<glyph unicode="&#xe141;" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
+<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
+<glyph unicode="&#xe143;" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
+<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
+<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
+<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
+<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
+<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
+<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
+<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
+<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
+<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
+<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
+<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
+<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
+<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
+<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
+<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
+<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
+<glyph unicode="&#xe161;" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
+<glyph unicode="&#xe162;" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
+<glyph unicode="&#xe163;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
+<glyph unicode="&#xe164;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
+<glyph unicode="&#xe165;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
+<glyph unicode="&#xe166;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe167;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe168;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe169;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe170;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe171;" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
+<glyph unicode="&#xe172;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe173;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe174;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
+<glyph unicode="&#xe175;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe176;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe177;" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
+<glyph unicode="&#xe178;" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
+<glyph unicode="&#xe179;" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
+<glyph unicode="&#xe180;" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
+<glyph unicode="&#xe181;" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
+<glyph unicode="&#xe182;" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
+<glyph unicode="&#xe183;" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
+<glyph unicode="&#xe184;" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
+<glyph unicode="&#xe185;" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
+<glyph unicode="&#xe186;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe187;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe188;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
+<glyph unicode="&#xe189;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
+<glyph unicode="&#xe190;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
+<glyph unicode="&#xe191;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe192;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe193;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
+<glyph unicode="&#xe194;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
+<glyph unicode="&#xe195;" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
+<glyph unicode="&#xe197;" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
+<glyph unicode="&#xe198;" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
+<glyph unicode="&#xe199;" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
+<glyph unicode="&#xe200;" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
+</font>
+</defs></svg> 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/fonts/glyphicons-halflings-regular.ttf
----------------------------------------------------------------------
diff --git a/datacat/web/portal/fonts/glyphicons-halflings-regular.ttf b/datacat/web/portal/fonts/glyphicons-halflings-regular.ttf
new file mode 100755
index 0000000..67fa00b
Binary files /dev/null and b/datacat/web/portal/fonts/glyphicons-halflings-regular.ttf differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/fonts/glyphicons-halflings-regular.woff
----------------------------------------------------------------------
diff --git a/datacat/web/portal/fonts/glyphicons-halflings-regular.woff b/datacat/web/portal/fonts/glyphicons-halflings-regular.woff
new file mode 100755
index 0000000..8c54182
Binary files /dev/null and b/datacat/web/portal/fonts/glyphicons-halflings-regular.woff differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/index.php
----------------------------------------------------------------------
diff --git a/datacat/web/portal/index.php b/datacat/web/portal/index.php
new file mode 100755
index 0000000..98451e2
--- /dev/null
+++ b/datacat/web/portal/index.php
@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta name="description" content=""/>
+    <meta name="keywords" content=""/>
+    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale = 1.0">
+
+    <title>ADS web Portal</title>
+
+    <link rel="stylesheet" href="styles/main.css"/>
+    <link rel="stylesheet" href="styles/bootstrap.css"/>
+    <link rel="stylesheet" href="styles/bootstrap-theme.css"/>
+    <link rel="stylesheet" href="styles/bootstrap-datetimepicker.min.css"/>
+
+    <script src="scripts/jquery-1.11.1.js"></script>
+    <script src="scripts/moment.js"></script>
+    <script src="scripts/bootstrap.js"></script>
+    <script src="scripts/bootstrap-datetimepicker.js"></script>
+    <script src="scripts/main.js"></script>
+</head>
+
+<body>
+
+<div class="header-wrapper">
+    <div class="header col-xs-12">
+        <div class="col-xs-7">
+            <h1>Airavata Data Store</h1>
+        </div>
+        <div class="col-xs-5">
+            <p id="logged-is-as"></p>
+            <button id="logout-btn" type="button" class="btn btn-default btn-success">Log out</button>
+            <button id="login-popover-btn" type="button" class="btn btn-primary">Log in</button>
+        </div>
+    </div>
+</div>
+
+<div class="content-wrapper">
+    <div class="content">
+
+        <div class="col-xs-12" id="form-outer-wrapper">
+
+            <div class="fielded-form-wrapper col-xs-12">
+                <div class="fielded-form-inner-wrapper">
+                    <form class="form-horizontal" role="form">
+
+                        <div id="fielded-fields">
+                        </div>
+
+                        <div class="form-group">
+                            <button type="button" class="btn btn-default col-xs-offset-1 col-xs-2" id="fielded-add-btn">
+                                Add Field
+                            </button>
+                            <button type="button" class="btn btn-default col-xs-offset-1 col-xs-2"
+                                    id="fielded-remove-btn">Remove Field
+                            </button>
+                            <button type="button" class="btn btn-default btn-primary col-xs-offset-2 col-xs-2"
+                                    id="search-btn">Search
+                            </button>
+                        </div>
+
+                    </form>
+                </div>
+            </div>
+
+            <!--<div class="form-group">
+                <button type="button" class="btn btn-default btn-success col-xs-offset-4 col-xs-4" id="search-btn">Search</button>
+            </div>-->
+
+        </div>
+
+        <div class="col-xs-12" id="results"></div>
+
+        <div class="modal fade" id="myModal">
+            <div class="modal-dialog">
+                <div class="modal-content">
+                    <div class="modal-header">
+                        <h4 class="modal-title">Select groups you want to share this document with.</h4>
+                    </div>
+                    <div class="modal-body" id="modal-body">
+                    </div>
+                    <div class="modal-footer">
+                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+                        <button type="button" class="btn btn-primary" id="update-acl-btn">Save changes</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+    </div>
+</div>
+
+
+</body>
+</html>
\ No newline at end of file


[03/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/styles/bootstrap-datetimepicker.min.css
----------------------------------------------------------------------
diff --git a/datacat/web/portal/styles/bootstrap-datetimepicker.min.css b/datacat/web/portal/styles/bootstrap-datetimepicker.min.css
new file mode 100755
index 0000000..cf838a3
--- /dev/null
+++ b/datacat/web/portal/styles/bootstrap-datetimepicker.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Datetimepicker for Bootstrap v3
+//! version : 3.1.3
+ * https://github.com/Eonasdan/bootstrap-datetimepicker/
+ */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transpar
 ent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center
 }.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget td.cw{font-size:10px;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#777}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4p
 x;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#777}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget th{height:20px;line-he
 ight:20px;width:20px}.bootstrap-datetimepicker-widget th.picker-switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important}@media screen and (max-width:767px){.bootstrap-datetimepicker-widget.timepicker-sbs{width:283px}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/styles/bootstrap-theme.css
----------------------------------------------------------------------
diff --git a/datacat/web/portal/styles/bootstrap-theme.css b/datacat/web/portal/styles/bootstrap-theme.css
new file mode 100755
index 0000000..f860bbc
--- /dev/null
+++ b/datacat/web/portal/styles/bootstrap-theme.css
@@ -0,0 +1,442 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+.btn-default,
+.btn-primary,
+.btn-success,
+.btn-info,
+.btn-warning,
+.btn-danger {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+}
+.btn-default:active,
+.btn-primary:active,
+.btn-success:active,
+.btn-info:active,
+.btn-warning:active,
+.btn-danger:active,
+.btn-default.active,
+.btn-primary.active,
+.btn-success.active,
+.btn-info.active,
+.btn-warning.active,
+.btn-danger.active {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn:active,
+.btn.active {
+  background-image: none;
+}
+.btn-default {
+  text-shadow: 0 1px 0 #fff;
+  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #dbdbdb;
+  border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus {
+  background-color: #e0e0e0;
+  background-position: 0 -15px;
+}
+.btn-default:active,
+.btn-default.active {
+  background-color: #e0e0e0;
+  border-color: #dbdbdb;
+}
+.btn-default:disabled,
+.btn-default[disabled] {
+  background-color: #e0e0e0;
+  background-image: none;
+}
+.btn-primary {
+  background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
+  background-image:      -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#2d6ca2));
+  background-image:         linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #2b669a;
+}
+.btn-primary:hover,
+.btn-primary:focus {
+  background-color: #2d6ca2;
+  background-position: 0 -15px;
+}
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #2d6ca2;
+  border-color: #2b669a;
+}
+.btn-primary:disabled,
+.btn-primary[disabled] {
+  background-color: #2d6ca2;
+  background-image: none;
+}
+.btn-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #3e8f3e;
+}
+.btn-success:hover,
+.btn-success:focus {
+  background-color: #419641;
+  background-position: 0 -15px;
+}
+.btn-success:active,
+.btn-success.active {
+  background-color: #419641;
+  border-color: #3e8f3e;
+}
+.btn-success:disabled,
+.btn-success[disabled] {
+  background-color: #419641;
+  background-image: none;
+}
+.btn-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #28a4c9;
+}
+.btn-info:hover,
+.btn-info:focus {
+  background-color: #2aabd2;
+  background-position: 0 -15px;
+}
+.btn-info:active,
+.btn-info.active {
+  background-color: #2aabd2;
+  border-color: #28a4c9;
+}
+.btn-info:disabled,
+.btn-info[disabled] {
+  background-color: #2aabd2;
+  background-image: none;
+}
+.btn-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #e38d13;
+}
+.btn-warning:hover,
+.btn-warning:focus {
+  background-color: #eb9316;
+  background-position: 0 -15px;
+}
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #eb9316;
+  border-color: #e38d13;
+}
+.btn-warning:disabled,
+.btn-warning[disabled] {
+  background-color: #eb9316;
+  background-image: none;
+}
+.btn-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #b92c28;
+}
+.btn-danger:hover,
+.btn-danger:focus {
+  background-color: #c12e2a;
+  background-position: 0 -15px;
+}
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #c12e2a;
+  border-color: #b92c28;
+}
+.btn-danger:disabled,
+.btn-danger[disabled] {
+  background-color: #c12e2a;
+  background-image: none;
+}
+.thumbnail,
+.img-thumbnail {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  background-color: #e8e8e8;
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  background-color: #357ebd;
+  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
+  background-image:      -o-linear-gradient(top, #428bca 0%, #357ebd 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd));
+  background-image:         linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
+  background-repeat: repeat-x;
+}
+.navbar-default {
+  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
+  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+}
+.navbar-default .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
+  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f3f3f3));
+  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+}
+.navbar-brand,
+.navbar-nav > li > a {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
+}
+.navbar-inverse {
+  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
+  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+}
+.navbar-inverse .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%);
+  background-image:      -o-linear-gradient(top, #222 0%, #282828 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#222), to(#282828));
+  background-image:         linear-gradient(to bottom, #222 0%, #282828 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+}
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-nav > li > a {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
+}
+.navbar-static-top,
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  border-radius: 0;
+}
+.alert {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+}
+.alert-success {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #b2dba1;
+}
+.alert-info {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #9acfea;
+}
+.alert-warning {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #f5e79e;
+}
+.alert-danger {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dca7a7;
+}
+.progress {
+  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar {
+  background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
+  background-image:      -o-linear-gradient(top, #428bca 0%, #3071a9 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3071a9));
+  background-image:         linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-striped {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.list-group {
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+  text-shadow: 0 -1px 0 #3071a9;
+  background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
+  background-image:      -o-linear-gradient(top, #428bca 0%, #3278b3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3278b3));
+  background-image:         linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #3278b3;
+}
+.panel {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+}
+.panel-default > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-primary > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
+  background-image:      -o-linear-gradient(top, #428bca 0%, #357ebd 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd));
+  background-image:         linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-success > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-info > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-warning > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-danger > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.well {
+  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dcdcdc;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+}
+/*# sourceMappingURL=bootstrap-theme.css.map */


[24/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CBSQLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CBSQLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CBSQLexer.java
new file mode 100644
index 0000000..2f18708
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CBSQLexer.java
@@ -0,0 +1,879 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.cbsQ;/* The following code was generated by JFlex 1.4.3 on 9/10/14 8:08 AM */
+
+import java_cup.runtime.*;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.IOException;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/10/14 8:08 AM from the specification file
+ * <tt>cbsQ.flex</tt>
+ */
+public class CBSQLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int FLOATMP3 = 24;
+  public static final int ITER2 = 4;
+  public static final int FLOATMP2 = 22;
+  public static final int FLOATMP1 = 20;
+  public static final int MPOPT = 18;
+  public static final int INTMP = 28;
+  public static final int INTVALUE = 8;
+  public static final int IGNOREALL = 26;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int MP2 = 16;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10, 11, 11,  2,  2, 12, 12
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    13,  0,  0,  0,  0,  0,  0, 46, 28,  6,  0,  3,  0, 42,  4,  1, 
+     2, 44, 40, 43,  2,  2, 41,  2,  2,  2, 26,  0,  0,  5,  0,  0, 
+     0,  0,  0, 23, 25, 27, 24, 45, 30,  0,  0,  0,  0, 31,  7, 35, 
+    39,  0, 29, 22,  0, 47,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0, 32, 10, 34, 38, 11, 15,  0, 21, 19,  0,  0, 37,  9, 20, 14, 
+    18,  0, 12, 16, 17,  8,  0,  0, 33,  0, 36,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\15\0\6\1\1\2\23\1\1\3\1\1\36\0\1\4"+
+    "\1\5\1\6\6\0\1\7\1\10\1\11\70\0\1\12"+
+    "\32\0\1\13\5\0\1\14\16\0\1\15\1\16\2\0"+
+    "\1\17\1\20\33\0\1\21\14\0\1\22\1\23\1\24"+
+    "\4\0\1\25";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[241];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\60\0\140\0\220\0\300\0\360\0\u0120\0\u0150"+
+    "\0\u0180\0\u01b0\0\u01e0\0\u0210\0\u0240\0\u0270\0\u02a0\0\u02d0"+
+    "\0\u0300\0\u0330\0\u0360\0\u0390\0\u0390\0\u03c0\0\u03f0\0\u0420"+
+    "\0\u0450\0\u0480\0\u04b0\0\u04e0\0\u0510\0\u0540\0\u0570\0\u05a0"+
+    "\0\u05d0\0\u0600\0\u0630\0\u0660\0\u0690\0\u06c0\0\u06f0\0\u0720"+
+    "\0\u0720\0\u0750\0\u0780\0\u07b0\0\u07e0\0\u0810\0\u0840\0\u03c0"+
+    "\0\u0870\0\u0420\0\u08a0\0\u0480\0\u08d0\0\u0900\0\u0930\0\u0960"+
+    "\0\u0990\0\u09c0\0\u09f0\0\u0600\0\u0a20\0\u0660\0\u0a50\0\u06c0"+
+    "\0\u0a80\0\u0ab0\0\u0ae0\0\u0b10\0\u0b40\0\u0b70\0\u0ba0\0\u0870"+
+    "\0\u08a0\0\u08d0\0\u0bd0\0\u0c00\0\u0c30\0\u0c60\0\u0c90\0\u0cc0"+
+    "\0\u0a20\0\u0a50\0\u0a80\0\u0cf0\0\u0d20\0\u0d50\0\u0d80\0\u0db0"+
+    "\0\u0de0\0\u0e10\0\u0e40\0\u0e70\0\u0ea0\0\u0ed0\0\u0f00\0\u0f30"+
+    "\0\u0f60\0\u0f90\0\u0fc0\0\u0ff0\0\u1020\0\u1050\0\u1080\0\u10b0"+
+    "\0\u10e0\0\u1110\0\u1140\0\u1170\0\u11a0\0\u11d0\0\u1200\0\u1230"+
+    "\0\u1260\0\u1290\0\u12c0\0\u12f0\0\u1320\0\u1350\0\u1380\0\u13b0"+
+    "\0\u13e0\0\u1410\0\u1440\0\u1470\0\u14a0\0\u14d0\0\u1500\0\u1530"+
+    "\0\u1560\0\u1590\0\u15c0\0\u15f0\0\u1620\0\u1650\0\u1680\0\u16b0"+
+    "\0\u16e0\0\u1710\0\u1740\0\u0270\0\u1770\0\u17a0\0\u17d0\0\u1800"+
+    "\0\u1830\0\u1860\0\u1890\0\u18c0\0\u18f0\0\u1920\0\u1950\0\u1980"+
+    "\0\u19b0\0\u19e0\0\u1a10\0\u1a40\0\u1a70\0\u1aa0\0\u1ad0\0\u1b00"+
+    "\0\u1b30\0\u1b60\0\u1b90\0\u1bc0\0\u1bf0\0\u1c20\0\u0270\0\u1c50"+
+    "\0\u1c80\0\u1cb0\0\u1ce0\0\u1d10\0\u0270\0\u1d40\0\u1d70\0\u1da0"+
+    "\0\u1dd0\0\u1e00\0\u1e30\0\u1e60\0\u1e90\0\u1ec0\0\u1ef0\0\u1f20"+
+    "\0\u1f50\0\u1f80\0\u1fb0\0\u0270\0\u0270\0\u1fe0\0\u2010\0\u0270"+
+    "\0\u0270\0\u2040\0\u2070\0\u20a0\0\u20d0\0\u2100\0\u2130\0\u2160"+
+    "\0\u2190\0\u21c0\0\u21f0\0\u2220\0\u2250\0\u2280\0\u22b0\0\u22e0"+
+    "\0\u2310\0\u2340\0\u2370\0\u23a0\0\u23d0\0\u2400\0\u2430\0\u2460"+
+    "\0\u2490\0\u24c0\0\u24f0\0\u2520\0\u0270\0\u2550\0\u2580\0\u25b0"+
+    "\0\u25e0\0\u2610\0\u2640\0\u2670\0\u26a0\0\u26d0\0\u2700\0\u2730"+
+    "\0\u2760\0\u0270\0\u0270\0\u0270\0\u2790\0\u27c0\0\u27f0\0\u2820"+
+    "\0\u0270";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[241];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\7\16\1\17\76\16\1\20\6\16\1\21\1\16\1\22"+
+    "\3\16\1\23\76\16\1\24\1\25\44\16\2\24\1\25"+
+    "\2\24\5\16\1\26\1\27\44\16\2\26\1\27\2\26"+
+    "\5\16\1\30\1\31\44\16\2\30\1\31\2\30\5\16"+
+    "\1\32\1\33\44\16\2\32\1\33\2\32\42\16\1\34"+
+    "\46\16\1\35\4\16\1\36\1\16\1\37\1\16\1\40"+
+    "\3\16\1\41\16\16\1\42\1\43\44\16\2\42\1\43"+
+    "\2\42\5\16\1\44\1\45\44\16\2\44\1\45\2\44"+
+    "\5\16\1\46\1\47\44\16\2\46\1\47\2\46\5\16"+
+    "\1\50\1\51\44\16\2\50\1\51\2\50\3\16\70\0"+
+    "\1\52\70\0\1\53\5\0\1\54\67\0\1\55\60\0"+
+    "\1\56\41\0\1\57\37\0\1\24\45\0\2\24\1\0"+
+    "\2\24\5\0\1\60\1\0\1\61\43\0\2\60\1\0"+
+    "\2\60\5\0\1\60\45\0\2\60\1\0\2\60\5\0"+
+    "\1\62\1\0\1\63\43\0\2\62\1\0\2\62\5\0"+
+    "\1\62\45\0\2\62\1\0\2\62\5\0\1\64\1\0"+
+    "\1\65\43\0\2\64\1\0\2\64\5\0\1\64\45\0"+
+    "\2\64\1\0\2\64\52\0\1\66\31\0\1\67\115\0"+
+    "\1\70\37\0\1\71\60\0\1\72\41\0\1\73\37\0"+
+    "\1\74\1\0\1\75\43\0\2\74\1\0\2\74\5\0"+
+    "\1\74\45\0\2\74\1\0\2\74\5\0\1\76\1\0"+
+    "\1\77\43\0\2\76\1\0\2\76\5\0\1\76\45\0"+
+    "\2\76\1\0\2\76\5\0\1\100\1\0\1\101\43\0"+
+    "\2\100\1\0\2\100\5\0\1\100\45\0\2\100\1\0"+
+    "\2\100\5\0\1\50\45\0\2\50\1\0\2\50\14\0"+
+    "\1\102\61\0\1\103\74\0\1\104\55\0\1\105\72\0"+
+    "\1\106\37\0\1\107\40\0\1\110\45\0\2\110\1\0"+
+    "\2\110\5\0\1\111\45\0\2\111\1\0\2\111\5\0"+
+    "\1\112\45\0\2\112\1\0\2\112\53\0\1\113\22\0"+
+    "\1\114\103\0\1\115\46\0\1\116\72\0\1\117\37\0"+
+    "\1\120\40\0\1\121\45\0\2\121\1\0\2\121\5\0"+
+    "\1\122\45\0\2\122\1\0\2\122\5\0\1\123\45\0"+
+    "\2\123\1\0\2\123\15\0\1\124\67\0\1\125\52\0"+
+    "\1\126\57\0\1\127\65\0\1\130\57\0\1\131\35\0"+
+    "\1\132\100\0\1\133\104\0\1\134\25\0\1\135\65\0"+
+    "\1\136\57\0\1\137\47\0\1\140\61\0\1\141\73\0"+
+    "\1\142\43\0\1\143\53\0\1\144\57\0\1\145\117\0"+
+    "\1\146\23\0\1\147\112\0\1\150\24\0\1\151\53\0"+
+    "\1\152\57\0\1\153\62\0\1\154\67\0\1\155\51\0"+
+    "\1\156\56\0\1\157\52\0\1\160\72\0\1\161\106\0"+
+    "\1\162\31\0\1\163\50\0\1\164\57\0\1\165\52\0"+
+    "\1\166\72\0\1\167\51\0\1\170\52\0\1\171\73\0"+
+    "\1\172\50\0\1\173\53\0\1\174\112\0\1\175\66\0"+
+    "\1\176\14\0\1\177\54\0\1\200\67\0\1\201\53\0"+
+    "\1\202\112\0\1\203\31\0\1\204\52\0\1\205\61\0"+
+    "\1\206\61\0\1\207\57\0\1\210\102\0\1\211\73\0"+
+    "\1\212\14\0\1\213\63\0\1\214\57\0\1\215\57\0"+
+    "\1\216\102\0\1\217\36\0\1\220\52\0\1\221\77\0"+
+    "\1\222\55\0\1\223\57\0\1\224\50\0\1\225\113\0"+
+    "\1\226\14\0\1\227\75\0\1\230\57\0\1\231\50\0"+
+    "\1\232\53\0\1\233\55\0\1\234\61\0\1\235\60\0"+
+    "\1\236\57\0\1\237\64\0\1\240\70\0\1\241\36\0"+
+    "\1\242\62\0\1\243\57\0\1\244\64\0\1\245\54\0"+
+    "\1\246\53\0\1\247\60\0\1\250\56\0\1\251\57\0"+
+    "\1\252\61\0\1\253\107\0\1\254\25\0\1\255\57\0"+
+    "\1\256\57\0\1\257\61\0\1\260\62\0\1\261\71\0"+
+    "\1\262\66\0\1\263\57\0\1\264\41\0\1\265\111\0"+
+    "\1\266\43\0\1\267\57\0\1\270\41\0\1\271\46\0"+
+    "\1\272\100\0\1\273\36\0\1\274\57\0\1\275\61\0"+
+    "\1\276\50\0\1\277\64\0\1\300\57\0\1\301\61\0"+
+    "\1\302\64\0\1\303\72\0\1\304\64\0\1\305\32\0"+
+    "\1\306\104\0\1\307\35\0\1\310\75\0\1\311\37\0"+
+    "\1\312\104\0\1\313\32\0\1\314\56\0\1\315\72\0"+
+    "\1\316\40\0\1\317\70\0\1\320\46\0\1\321\71\0"+
+    "\1\322\42\0\1\323\73\0\1\324\56\0\1\325\60\0"+
+    "\1\326\61\0\1\327\50\0\1\330\107\0\1\331\17\0"+
+    "\1\332\117\0\1\333\27\0\1\334\47\0\1\335\65\0"+
+    "\1\336\101\0\1\337\35\0\1\340\65\0\1\341\57\0"+
+    "\1\342\65\0\1\343\51\0\1\344\63\0\1\345\45\0"+
+    "\1\346\74\0\1\347\42\0\1\350\67\0\1\351\102\0"+
+    "\1\352\40\0\1\353\76\0\1\354\31\0\1\355\54\0"+
+    "\1\356\56\0\1\357\53\0\1\360\73\0\1\361\33\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[10320];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\15\0\1\11\33\1\36\0\3\1\6\0\3\1\70\0"+
+    "\1\11\32\0\1\11\5\0\1\11\16\0\2\11\2\0"+
+    "\2\11\33\0\1\11\14\0\3\11\4\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[241];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public CBSQLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public CBSQLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public Symbol next_token() throws IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 20: 
+          { yybegin(IGNOREALL);
+      return new Symbol(CbsQSym.MPDONE);
+          }
+        case 22: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(CbsQSym.MGRAD1, new Float(yytext()));
+          }
+        case 23: break;
+        case 15: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(CbsQSym.MPRms);
+          }
+        case 24: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(CbsQSym.MPMGRAD, new Float(yytext()));
+          }
+        case 25: break;
+        case 19: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(CbsQSym.MPStart);
+          }
+        case 26: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(CbsQSym.ENERGY1, new Float(yytext()));
+          }
+        case 27: break;
+        case 21: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(CbsQSym.FOUNDITER1);
+          }
+        case 28: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(CbsQSym.NSearch1);
+          }
+        case 29: break;
+        case 13: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(CbsQSym.RmsGrad1);
+          }
+        case 30: break;
+        case 18: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(CbsQSym.SCFDONE1);
+          }
+        case 31: break;
+        case 17: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(CbsQSym.Energ1);
+          }
+        case 32: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(CbsQSym.MPRGRAD, new Float(yytext()));
+          }
+        case 33: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(CbsQSym.MaxGrad1);
+          }
+        case 34: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("CBSQFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(CbsQSym.ITERATION1, new Integer(yytext()));
+          }
+        case 35: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(CbsQSym.RGRAD1, new Float(yytext()));
+          }
+        case 36: break;
+        case 16: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(CbsQSym.MPMax);
+          }
+        case 37: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(CbsQSym.MPENERGY, new Float(yytext()));
+          }
+        case 38: break;
+        case 3: 
+          { if  (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(CbsQSym.MPITER, new Integer(yytext()));
+          }
+        case 39: break;
+        case 12: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(CbsQSym.NMP);
+          }
+        case 40: break;
+        case 10: 
+          { if (Settings.DEBUG) System.out.println("CBSQFlex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(CbsQSym.MPEnerg);
+          }
+        case 41: break;
+        case 1: 
+          { 
+          }
+        case 42: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new Symbol(CbsQSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = CbsQSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java CBSQLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        CBSQLexer scanner = null;
+        try {
+          scanner = new CBSQLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQParser.java
new file mode 100644
index 0000000..2282121
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQParser.java
@@ -0,0 +1,543 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.cbsQ;
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class CbsQParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public CbsQParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public CbsQParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public CbsQParser(final FileReader fileReader) {
+        super(new CBSQLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\025\000\002\003\007\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\021\002" +
+                    "\000\002\006\006\000\002\022\002\000\002\007\007\000" +
+                    "\002\010\004\000\002\011\004\000\002\012\004\000\002" +
+                    "\013\003\000\002\014\004\000\002\014\003\000\002\023" +
+                    "\002\000\002\016\006\000\002\024\002\000\002\015\007" +
+                    "\000\002\017\004\000\002\020\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\004\004\005\001\002\000\004\007\012\001" +
+                    "\002\000\004\007\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\027\007\012\001" +
+                    "\002\000\006\005\ufffd\007\ufffd\001\002\000\004\022\013" +
+                    "\001\002\000\004\006\ufffc\001\002\000\004\006\016\001" +
+                    "\002\000\006\005\ufffb\007\ufffb\001\002\000\004\020\017" +
+                    "\001\002\000\004\010\ufffa\001\002\000\004\010\022\001" +
+                    "\002\000\004\011\024\001\002\000\004\023\023\001\002" +
+                    "\000\004\011\ufff8\001\002\000\004\024\026\001\002\000" +
+                    "\006\005\ufff9\007\ufff9\001\002\000\006\005\ufff7\007\ufff7" +
+                    "\001\002\000\004\012\031\001\002\000\006\005\ufffe\007" +
+                    "\ufffe\001\002\000\004\014\ufff5\001\002\000\004\017\054" +
+                    "\001\002\000\004\014\035\001\002\000\006\014\035\017" +
+                    "\ufff6\001\002\000\004\025\037\001\002\000\006\014\ufff3" +
+                    "\017\ufff3\001\002\000\004\013\ufff2\001\002\000\004\013" +
+                    "\041\001\002\000\004\021\043\001\002\000\006\014\ufff1" +
+                    "\017\ufff1\001\002\000\004\015\ufff0\001\002\000\004\015" +
+                    "\046\001\002\000\004\016\051\001\002\000\004\026\047" +
+                    "\001\002\000\004\016\uffee\001\002\000\006\014\uffef\017" +
+                    "\uffef\001\002\000\004\027\052\001\002\000\006\014\uffed" +
+                    "\017\uffed\001\002\000\006\014\ufff4\017\ufff4\001\002\000" +
+                    "\004\002\001\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\027\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\021\013\001\001\000\004" +
+                    "\007\014\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\004\022\017\001\001\000\004\010\020\001\001\000\004" +
+                    "\011\024\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\006" +
+                    "\012\031\013\032\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\006\014\033\016\035\001\001" +
+                    "\000\004\016\052\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\004\023\037\001\001\000\004\015\041\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\024\043\001" +
+                    "\001\000\004\017\044\001\001\000\004\020\047\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+    //Each string is of the format
+    //rmsForce, maximum force, iteration and energy
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+
+    /* Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int mpRMSForceCount=0;
+        int mpMaximumForceCount=0;
+        int mpIterationCount=0;
+        int energyCount=0;
+        int rmsForceCount=0;
+        int maximumForceCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp = singleString.split(" ");
+            String secondElement=temp[1];
+            String thirdElement=temp[2];
+            if(thirdElement.equals("RMS")){
+                results.put("CbsQ_Mp_RMS_Force_"+mpRMSForceCount,temp[4]);
+                mpRMSForceCount++;
+            }else if (thirdElement.equals("Maximum")){
+                results.put("CbsQ_MP_Maximum_Force_"+mpMaximumForceCount,temp[4]);
+                mpMaximumForceCount++;
+            }else if (thirdElement.equals("ITERATION")&&temp[1].equals("MP")){
+                results.put("CbsQ_MP_Iteration_"+mpIterationCount,temp[3]);
+                mpIterationCount++;
+            }else if(thirdElement.equals("ENERGY")){
+                results.put("CbsQ_Energy_"+energyCount,temp[3]);
+                energyCount++;
+            }else if(secondElement.equals("RMS")){
+                results.put("CbsQ_RMS_Force"+rmsForceCount,temp[3]);
+                rmsForceCount++;
+            }else if(secondElement.equals("Maximum")){
+                results.put("CbsQ_Maximum_Force"+maximumForceCount,temp[3]);
+                maximumForceCount++;
+            }else if(thirdElement.equals("ITERATION")){
+                results.put("CbsQ_Iteration_"+iterationCount,temp[3]);
+                iterationCount++;
+            }
+
+
+        }
+        return null;
+    }
+
+
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final CbsQParser CbsQParser;
+
+  /** Constructor */
+  CUP$parser$actions(CbsQParser CbsQParser) {
+    this.CbsQParser = CbsQParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 20: // force2 ::= MPRms MPRGRAD 
+            {
+              Object RESULT = null;
+		int mprgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mprgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mprg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+   CbsQParser.addToResult("CUP:g1: MP RMS Force "+mprg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(14/*force2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 19: // force1 ::= MPMax MPMGRAD 
+            {
+              Object RESULT = null;
+		int mpmgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpmgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpmg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+   CbsQParser.addToResult("CUP:g1: MP Maximum Force "+mpmg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*force1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 18: // mpcycle ::= NMP MPITER NT$3 force1 force2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$3
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*mpcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 17: // NT$3 ::= 
+            {
+              Object RESULT = null;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+   CbsQParser.addToResult("CUP:g1:  MP ITERATION "+it);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(18/*NT$3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 16: // mpcycle1 ::= MPEnerg MPENERGY NT$2 mpcycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$2
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*mpcycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 15: // NT$2 ::= 
+            {
+              Object RESULT = null;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+   CbsQParser.addToResult("CUP:g1:  ENERGY "+mpen);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(17/*NT$2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 14: // mppat ::= mpcycle1 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // mppat ::= mppat mpcycle1 
+            {
+              Object RESULT = null;
+		
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // mpintro ::= MPStart 
+            {
+              Object RESULT = null;
+		
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*mpintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // mp2 ::= mpintro mppat 
+            {
+              Object RESULT = null;
+		
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*mp2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // grad2 ::= RmsGrad1 RGRAD1 
+            {
+              Object RESULT = null;
+		int rgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int rgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float rg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+   CbsQParser.addToResult("CUP:gopt: RMS Force "+rg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(7/*grad2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // grad1 ::= MaxGrad1 MGRAD1 
+            {
+              Object RESULT = null;
+		int mgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+   CbsQParser.addToResult("CUP:gopt: Maximum Force "+mg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*grad1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle ::= NSearch1 ITERATION1 NT$1 grad1 grad2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$1
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*cycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // NT$1 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c);
+   CbsQParser.addToResult("CUP:gopt:  ITERATION "+c);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(16/*NT$1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= Energ1 ENERGY1 NT$0 cycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+   CbsQParser.addToResult("CUP:gopt:  ENERGY "+e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(15/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER1 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE1 mp2 MPDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQSym.java
new file mode 100644
index 0000000..cfe8bfa
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/cbsQ/CbsQSym.java
@@ -0,0 +1,53 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.cbsQ;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Sep 10 08:08:52 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class CbsQSym {
+  /* terminals */
+  public static final int ENERGY1 = 16;
+  public static final int MPMGRAD = 20;
+  public static final int MGRAD1 = 17;
+  public static final int MaxGrad1 = 6;
+  public static final int NSearch1 = 4;
+  public static final int MPRGRAD = 21;
+  public static final int MPRms = 12;
+  public static final int RmsGrad1 = 7;
+  public static final int MPMax = 11;
+  public static final int MPDONE = 13;
+  public static final int EOF = 0;
+  public static final int MPENERGY = 19;
+  public static final int ITERATION1 = 14;
+  public static final int NMP = 9;
+  public static final int MPEnerg = 10;
+  public static final int error = 1;
+  public static final int MPITER = 15;
+  public static final int MPStart = 8;
+  public static final int FOUNDITER1 = 2;
+  public static final int Energ1 = 5;
+  public static final int SCFDONE1 = 3;
+  public static final int RGRAD1 = 18;
+}
+


[31/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/IMonitor.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/IMonitor.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/IMonitor.java
new file mode 100644
index 0000000..133ca5c
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/IMonitor.java
@@ -0,0 +1,37 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.monitor;
+
+import java.io.IOException;
+import java.nio.file.Path;
+
+public interface IMonitor {
+
+    /**
+     * Start directory monitoring
+     */
+    public void startMonitor(Path path) throws IOException;
+
+    /**
+     * Stop directory monitoring
+     */
+    public void stopMonitor();
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/LocalFileSystemMonitor.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/LocalFileSystemMonitor.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/LocalFileSystemMonitor.java
new file mode 100644
index 0000000..68121d6
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/LocalFileSystemMonitor.java
@@ -0,0 +1,261 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.monitor.impl;
+
+import org.apache.airavata.datacat.agent.dispatcher.DispatcherService;
+import org.apache.airavata.datacat.agent.monitor.IMonitor;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.models.OutputMonitorMessageType;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.*;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import static java.nio.file.StandardWatchEventKinds.*;
+
+/**
+ * This monitor is specifically targeting the GridChem use case
+ */
+
+public class LocalFileSystemMonitor implements IMonitor {
+
+    private final Logger logger = LogManager.getLogger(LocalFileSystemMonitor.class);
+    private final WatchService watcher;
+    private final Map<WatchKey, Path> keys;
+    private boolean runMonitor = false;
+    private boolean trace = false;
+    private long waitTime;
+
+    private ArrayList<OutputInfo> snapshot;
+    private String serialisedFileName = "snapshot.ser";
+
+    private DispatcherService dispatcherService;
+
+    public LocalFileSystemMonitor() throws Exception {
+        this.watcher = FileSystems.getDefault().newWatchService();
+        this.keys = new HashMap<WatchKey, Path>();
+        waitTime = Integer.parseInt(
+                AgentProperties.getInstance().getProperty(Constants.BATCH_MONITOR_WAIT_TIME, "1000"));
+        dispatcherService = DispatcherService.getInstance();
+
+        runMonitor = false;
+        if ((new File(serialisedFileName)).exists()) {
+                snapshot = (ArrayList<OutputInfo>) (new ObjectInputStream(new FileInputStream(serialisedFileName))).readObject();
+        } else {
+
+            logger.info("Starting Batch Monitor Scan...");
+
+            ArrayList<OutputInfo> currentFiles = getCurrentFilesList(
+                    getCurrentFilesMap(AgentProperties.getInstance().getProperty(Constants.DATA_ROOT, "")));
+
+            ArrayList<OutputMonitorMessage> outputMonitorMessages = new ArrayList<OutputMonitorMessage>();
+            for (int i = 0; i < currentFiles.size(); i++) {
+                OutputMonitorMessage fileWatcherMessage = new OutputMonitorMessage();
+                //fileWatcherMessage.setOutputPath(currentFiles.get(i).getOutputName());
+                fileWatcherMessage.setOutputPath(currentFiles.get(i).getOutputPath());
+                fileWatcherMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_CREATED);
+
+                outputMonitorMessages.add(fileWatcherMessage);
+            }
+
+            logger.info("Ending Batch Monitor Scan...");
+
+            for (int i = 0; i < outputMonitorMessages.size(); i++) {
+                logger.info("Adding file monitor message for "+ outputMonitorMessages.get(i).getOutputPath());
+                dispatcherService.addFileMonitorMessage(outputMonitorMessages.get(i));
+            }
+
+            ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(serialisedFileName));
+            outputStream.writeObject(currentFiles);
+            this.snapshot = currentFiles;
+        }
+    }
+
+    /**
+     * Start directory monitoring
+     */
+    @Override
+    public void startMonitor(Path path) throws IOException {
+        init(path);
+        runMonitor = true;
+        processEvents();
+        logger.info("Started directory watching");
+    }
+
+    /**
+     * Stop directory monitoring
+     */
+    @Override
+    public void stopMonitor() {
+        runMonitor = false;
+        logger.info("Stopped directory watching");
+    }
+
+    /**
+     * Initializing the FileSystemMonitor
+     *
+     * @param path
+     * @throws java.io.IOException
+     */
+    private void init(Path path) throws IOException {
+        this.trace = false;
+
+        logger.info("Scanning " + path);
+        registerAll(path);
+        logger.info("Done.");
+
+        // enable trace after initial registration
+        this.trace = true;
+
+    }
+
+    /**
+     * Register the given directory with the WatchService
+     */
+    private void register(Path dir) throws IOException {
+        WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
+        if (trace) {
+            Path prev = keys.get(key);
+            if (prev == null) {
+                logger.info("register: " + dir);
+            } else {
+                if (!dir.equals(prev)) {
+                    logger.info("update: " + prev + " -> " + dir);
+                }
+            }
+        }
+        keys.put(key, dir);
+    }
+
+    /**
+     * Register the given directory, and all its sub-directories, with the
+     * WatchService.
+     */
+    private void registerAll(final Path start) throws IOException {
+        // register directory and sub-directories
+        Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
+                    throws IOException {
+                register(dir);
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    /**
+     * Processing directory update events
+     */
+    @SuppressWarnings("unchecked")
+    private void processEvents() {
+        (new Thread(new Runnable() {
+            @Override
+            public void run() {
+                while (runMonitor) {
+                    try {
+                        logger.info("Starting Batch Monitor Scan...");
+                        Thread.sleep(waitTime);
+                        HashMap<String, OutputInfo> currentFilesMap = getCurrentFilesMap(
+                                AgentProperties.getInstance().getProperty(Constants.DATA_ROOT, ""));
+                        ArrayList<OutputInfo> currentFilesList = getCurrentFilesList(currentFilesMap);
+                        ArrayList<OutputMonitorMessage> outputMonitorMessages = new ArrayList<OutputMonitorMessage>();
+                        for (int i = 0; i < snapshot.size(); i++) {
+                            OutputInfo fSnap = snapshot.get(i);
+                            OutputInfo fCurrent = currentFilesMap.get(fSnap.getOutputPath());
+                            if (fCurrent == null) {
+                                OutputMonitorMessage fileWatcherMessage = new OutputMonitorMessage();
+                                fileWatcherMessage.setOutputPath(fSnap.getOutputName());
+                                fileWatcherMessage.setOutputPath(fSnap.getOutputPath());
+                                fileWatcherMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_DELETED);
+                                outputMonitorMessages.add(fileWatcherMessage);
+                            } else {
+                                if (fSnap.getLastModifiedTime() != fCurrent.getLastModifiedTime()) {
+                                    OutputMonitorMessage fileWatcherMessage = new OutputMonitorMessage();
+                                    fileWatcherMessage.setOutputPath(fSnap.getOutputName());
+                                    fileWatcherMessage.setOutputPath(fSnap.getOutputPath());
+                                    fileWatcherMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_MODIFIED);
+                                    outputMonitorMessages.add(fileWatcherMessage);
+                                }
+                                currentFilesMap.remove(fSnap.getOutputPath());
+                            }
+                        }
+                        ArrayList<OutputInfo> newlyCreatedFiles = new ArrayList<OutputInfo>(currentFilesMap.values());
+                        for (int i = 0; i < newlyCreatedFiles.size(); i++) {
+                            OutputInfo fNew = newlyCreatedFiles.get(i);
+                            OutputMonitorMessage outputMonitorMessage = new OutputMonitorMessage();
+                            outputMonitorMessage.setOutputPath(fNew.getOutputName());
+                            outputMonitorMessage.setOutputPath(fNew.getOutputPath());
+                            outputMonitorMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_MODIFIED);
+                            outputMonitorMessages.add(outputMonitorMessage);
+                        }
+                        logger.info("Ending Batch Monitor Scan...");
+
+                        for (int i = 0; i < outputMonitorMessages.size(); i++) {
+                            logger.info("Adding file monitor message for "+ outputMonitorMessages.get(i).getOutputPath());
+                            dispatcherService.addFileMonitorMessage(outputMonitorMessages.get(i));
+                        }
+
+
+                        ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(serialisedFileName));
+                        outputStream.writeObject(currentFilesList);
+
+                        logger.info("Successfully serialized new directory snapshot...");
+                        snapshot = currentFilesList;
+
+                    } catch (InterruptedException e) {
+                        logger.error(e.toString());
+                    } catch (IOException e){
+                        logger.error(e.toString());
+                    }
+                }
+            }
+        })).start();
+    }
+
+    private HashMap<String, OutputInfo> getCurrentFilesMap(String path) {
+        HashMap<String, OutputInfo> currentFiles = new HashMap<String, OutputInfo>();
+        File root = new File(path);
+        File[] list = root.listFiles();
+
+        if (list == null) return currentFiles;
+
+        for (File f : list) {
+            if (f.isDirectory()) {
+                OutputInfo newOutputInfo = new OutputInfo(f.getName(), f.getPath(), f.lastModified());
+                currentFiles.put(f.getPath(), newOutputInfo);
+            }
+        }
+
+        return currentFiles;
+    }
+
+    private ArrayList<OutputInfo> getCurrentFilesList(HashMap<String, OutputInfo> currentFilesMap) {
+        ArrayList<OutputInfo> currentFiles = new ArrayList<OutputInfo>(currentFilesMap.values());
+        return currentFiles;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/OutputInfo.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/OutputInfo.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/OutputInfo.java
new file mode 100644
index 0000000..0b3ed14
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/monitor/impl/OutputInfo.java
@@ -0,0 +1,62 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.monitor.impl;
+
+import java.io.Serializable;
+
+public class OutputInfo implements Serializable {
+
+    private String outputName;
+
+    private String outputPath;
+
+    private long lastModifiedTime;
+
+    public OutputInfo(String outputName, String outputPath, long lastModified) {
+        this.outputName = outputName;
+        this.outputPath = outputPath;
+        this.lastModifiedTime = lastModified;
+    }
+
+    public String getOutputName() {
+        return outputName;
+    }
+
+    public void setOutputName(String outputName) {
+        this.outputName = outputName;
+    }
+
+    public String getOutputPath() {
+        return outputPath;
+    }
+
+    public void setOutputPath(String outputPath) {
+        this.outputPath = outputPath;
+    }
+
+    public long getLastModifiedTime() {
+        return lastModifiedTime;
+    }
+
+    public void setLastModifiedTime(long lastModified) {
+        this.lastModifiedTime = lastModified;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/AgentProperties.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/AgentProperties.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/AgentProperties.java
new file mode 100644
index 0000000..f51403b
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/AgentProperties.java
@@ -0,0 +1,75 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.util;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.*;
+
+public class AgentProperties {
+
+    public static final String AGENT_PROPERTY_FILE = "../conf/agent.properties";
+    public static final String DEFAULT_AGENT_PROPERTY_FILE = "conf/agent.properties";
+
+    private static AgentProperties instance;
+
+    private final Logger logger = LogManager.getLogger(AgentProperties.class);
+    private java.util.Properties properties = null;
+
+    private AgentProperties() {
+        try {
+            InputStream fileInput;
+            if (new File(AGENT_PROPERTY_FILE).exists()) {
+                fileInput = new FileInputStream(AGENT_PROPERTY_FILE);
+                logger.info("Using configured agent property (agent.properties) file");
+            } else {
+                logger.info("Using default agent property (agent.properties) file");
+                fileInput = ClassLoader.getSystemResource(DEFAULT_AGENT_PROPERTY_FILE).openStream();
+            }
+            java.util.Properties properties = new java.util.Properties();
+            properties.load(fileInput);
+            fileInput.close();
+            this.properties = properties;
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static AgentProperties getInstance() {
+        if (instance == null) {
+            instance = new AgentProperties();
+        }
+        return instance;
+    }
+
+    public String getProperty(String key, String defaultVal) {
+        String val = this.properties.getProperty(key);
+
+        if (val.isEmpty() || val == "") {
+            return defaultVal;
+        } else {
+            return val;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/Constants.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/Constants.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/Constants.java
new file mode 100644
index 0000000..50089ce
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/Constants.java
@@ -0,0 +1,56 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.util;
+
+public class Constants {
+    public static final String DATA_ROOT = "DATA_ROOT";
+
+    public static final String FILE_UPDATE_MESSAGE_DELAY = "FILE_UPDATE_MESSAGE_DELAY";
+
+    public static final String MAX_PARSER_THREADS = "MAX_PARSER_THREADS";
+
+    public static final String BATCH_MONITOR_WAIT_TIME = "BATCH_MONITOR_WAIT_TIME";
+
+    public static final String PUBLISHER_ADD_ENDPOINT = "PUBLISHER_ADD_ENDPOINT";
+
+    public static final String FILE_INFO_QUEUE_NAME = "FILE_INFO_QUEUE_NAME";
+
+    public static final String MONITOR_TYPE = "MONITOR_TYPE";
+
+    public static final String RABBITMQ_HOST = "RABBITMQ_HOST";
+
+    public static final String BINDING_KEY = "BINDING_KEY";
+
+    public static final String EXCHANGE_NAME = "EXCHANGE_NAME";
+
+    public static final String PARSER_CLASS = "PARSER_CLASS";
+
+    public static final String ZK_HOST = "ZK_HOST";
+
+    public static final String KEYSTORE_FILE = "KEYSTORE_FILE";
+
+    public static final String KEYSTORE_PWD = "KEYSTORE_PWD";
+
+    public static final String TRUSTSTORE_FILE = "TRUSTSTORE_FILE";
+
+    public static final String TRUSTSTORE_PWD = "TRUSTSTORE_PWD";
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/ThriftUtils.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/ThriftUtils.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/ThriftUtils.java
new file mode 100644
index 0000000..b165aab
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/util/ThriftUtils.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.datacat.agent.util;
+
+import org.apache.thrift.TBase;
+import org.apache.thrift.TDeserializer;
+import org.apache.thrift.TException;
+import org.apache.thrift.TSerializer;
+
+public class ThriftUtils {
+    public static byte[] serializeThriftObject(TBase object) throws TException {
+        return new TSerializer().serialize(object);
+    }
+
+    public static void createThriftFromBytes(byte []bytes, TBase object) throws TException {
+        new TDeserializer().deserialize(object, bytes);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/bin/datacat-agent.sh
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/bin/datacat-agent.sh b/datacat/agent/src/main/resources/bin/datacat-agent.sh
new file mode 100644
index 0000000..12f5cee
--- /dev/null
+++ b/datacat/agent/src/main/resources/bin/datacat-agent.sh
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. `dirname $0`/setenv.sh
+cd $DATACAT_AGENT_HOME
+
+IS_DAEMON_MODE=false
+DATACAT_AGENT_COMMAND=""
+STOP=false
+FORCE=false
+
+for var in "$@"
+do
+    case $var in
+	start)
+	    IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    STOP=true
+	    DATACAT_SERVER_COMMAND="$
+	    DATACAT_AGENT_COMMAND $var"
+            shift
+        ;;
+        -h)
+            echo "Usage: datacat-agent.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start agent in daemon mode"
+	    echo "  stop               Stop server."
+	    echo "  -h                 Display this help and exit"
+	        shift
+            exit 0
+        ;;
+	*)
+	    DATACAT_SERVER_COMMAND="$DATACAT_AGENT_COMMAND $var"
+            shift
+    esac
+done
+
+if $STOP;
+then
+	for f in `find . -name "*-start_*"`; do
+		IFS='_' read -a f_split <<< "$f"
+		echo "Found process file : $f"
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting DataCat agent in daemon mode..."
+		cd "$DATACAT_AGENT_HOME"/lib
+		nohup $JAVA_HOME/bin/java -jar agent-1.0-SNAPSHOT.jar > ../datacat-agent.out & echo $! > "../agent-start_$!"
+	else
+	    cd "$DATACAT_AGENT_HOME"/lib
+		$JAVA_HOME/bin/java -jar agent-1.0-SNAPSHOT.jar & echo $! > "agent-start_$!"
+	fi
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/bin/setenv.sh b/datacat/agent/src/main/resources/bin/setenv.sh
new file mode 100644
index 0000000..724c51f
--- /dev/null
+++ b/datacat/agent/src/main/resources/bin/setenv.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Get standard environment variables
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running datacat-server scripts."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+PRGDIR=`dirname "$PRG"`
+
+# Only set DATACAT_AGENT_HOME if not already set
+[ -z "$DATACAT_AGENT_HOME" ] && DATACAT_AGENT_HOME=`cd "$PRGDIR/.." ; pwd`
+
+DATACAT_AGENT_CLASSPATH=""
+
+
+
+for f in "DATACAT_AGENT_HOME"/lib/*.jar
+do
+  DATACAT_AGENT_CLASSPATH="$DATACAT_AGENT_CLASSPATH":$f
+done
+
+DATACAT_AGENT_CLASSPATH="$DATACAT_AGENT_CLASSPATH":"$DATACAT_AGENT_HOME"/conf/log4j.properties
+
+export DATACAT_AGENT_HOME
+export DATACAT_AGENT_CLASSPATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/conf/agent.properties
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/conf/agent.properties b/datacat/agent/src/main/resources/conf/agent.properties
new file mode 100644
index 0000000..5c8f3d3
--- /dev/null
+++ b/datacat/agent/src/main/resources/conf/agent.properties
@@ -0,0 +1,44 @@
+#Max parser threads
+MAX_PARSER_THREADS=1000
+
+#Wait time for the local file system bath monitor
+BATCH_MONITOR_WAIT_TIME=2000
+
+#file update delay time for the local file system batch monitor
+FILE_UPDATE_MESSAGE_DELAY=5
+
+#Metadata publisher end point
+PUBLISHER_ADD_ENDPOINT=https://192.168.0.4:8888/publisher/addFileMetadata/
+
+#Monitor type is FILE_SYSTEM or RABBITMQ
+MONITOR_TYPE=RABBITMQ
+
+#Data Root for the local file system scanner
+DATA_ROOT=/home/supun/datacat/data_root
+
+#Rabbitmq file info message queue
+FILE_INFO_QUEUE_NAME=file_info_queue
+
+#RabbitMQ host name
+RABBITMQ_HOST=localhost
+
+#Binding key for the RabbitMQ queue
+BINDING_KEY=*
+
+#RabbitMQ Exchange Name
+EXCHANGE_NAME=datacat
+
+PARSER_CLASS=org.apache.airavata.datacat.parsers.gridchem.GridChemDemoParser
+#PARSER_CLASS=org.apache.airavata.datacat.regexParser.RegexParser
+
+#Security Specific Configurations
+KEYSTORE_FILE=keystore.jks
+
+KEYSTORE_PWD=wso2carbon
+
+TRUSTSTORE_FILE=client-truststore.jks
+
+TRUSTSTORE_PWD=wso2carbon
+
+#Zookeeper Host Name
+ZK_HOST=localhost
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/log4j.properties b/datacat/agent/src/main/resources/log4j.properties
new file mode 100644
index 0000000..f0a97e9
--- /dev/null
+++ b/datacat/agent/src/main/resources/log4j.properties
@@ -0,0 +1,16 @@
+#CONSOLE AND FILE LOGGING
+#CONSOLE LOGGING
+log4j.rootLogger=ALL, CONSOLE
+log4j.logger.console=WARN, CONSOLE
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.CONSOLE.Threshold=DEBUG
+
+#FILE LOGGING
+log4j.logger.file=ALL, DAILYROLLINGFILEAPPENDER
+log4j.appender.DAILYROLLINGFILEAPPENDER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DAILYROLLINGFILEAPPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.DAILYROLLINGFILEAPPENDER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.DAILYROLLINGFILEAPPENDER.File=/tmp/datacat-agent.log
+log4j.appender.DAILYROLLINGFILEAPPENDER.Threshold=ALL
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/security/client-truststore.jks
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/security/client-truststore.jks b/datacat/agent/src/main/resources/security/client-truststore.jks
new file mode 100644
index 0000000..be441f3
Binary files /dev/null and b/datacat/agent/src/main/resources/security/client-truststore.jks differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/resources/security/keystore.jks
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/resources/security/keystore.jks b/datacat/agent/src/main/resources/security/keystore.jks
new file mode 100644
index 0000000..7942c53
Binary files /dev/null and b/datacat/agent/src/main/resources/security/keystore.jks differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQConsumerTest.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQConsumerTest.java b/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQConsumerTest.java
new file mode 100644
index 0000000..8cdec43
--- /dev/null
+++ b/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQConsumerTest.java
@@ -0,0 +1,124 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.org.apache.airavata.datacat.agent.messageBroker;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import org.apache.airavata.datacat.agent.messageBroker.AiravataUpdateListener;
+import org.apache.airavata.datacat.agent.messageBroker.IMessageBroker;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.agent.util.ThriftUtils;
+import org.apache.airavata.datacat.models.Messaging.ExperimentOutputCreatedEvent;
+import org.apache.airavata.datacat.models.Messaging.Message;
+import org.apache.airavata.datacat.models.Messaging.MessageType;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.thrift.TException;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class RabbitMQConsumerTest {
+
+    private static final Logger logger = LogManager.getLogger(RabbitMQConsumerTest.class);
+
+    private final String RABBITMQ_HOST = AgentProperties.getInstance().getProperty(Constants.RABBITMQ_HOST, "");
+    private final String EXCHANGE_NAME = AgentProperties.getInstance().getProperty(Constants.EXCHANGE_NAME, "");
+    private final String BINDING_KEY = AgentProperties.getInstance().getProperty(Constants.BINDING_KEY, "");
+
+    private IMessageBroker messageBroker;
+
+    /**
+     * RabbitMQ server should be started to run this test
+     */
+    @Before
+    public void init() {
+        //start the RabbitMQConsumer
+        messageBroker = new AiravataUpdateListener();
+        try {
+            messageBroker.startBroker();
+            logger.info("Started Message Broker!!!");
+            Thread.sleep(4000);
+        } catch (Exception e) {
+            logger.error("Exception occured while starting the message broker!! " + e);
+        }
+    }
+
+    @Test
+    public void testRabbitMQConsumer() {
+        try {
+            //publish test data
+            publish(MessageType.EXPERIMENT_OUTPUT);
+
+            //wait for the consumer to recieve the message
+            Thread.sleep(4000);
+        } catch (Exception e) {
+            logger.error(e);
+        }
+        messageBroker.stopBroker();
+    }
+
+    /**
+     * Test method to publish dummy data to RabbitMQ
+     * @param messageType
+     * @throws java.io.IOException
+     * @throws TException
+     */
+    public void publish(MessageType messageType)
+            throws java.io.IOException, TException {
+
+        //establishing the connection
+        ConnectionFactory factory = new ConnectionFactory();
+        factory.setHost(RABBITMQ_HOST);
+        Connection connection = factory.newConnection();
+        Channel channel = connection.createChannel();
+
+        channel.exchangeDeclare(EXCHANGE_NAME, "topic");
+
+        String DATA_ROOT = AgentProperties.getInstance().getProperty(Constants.DATA_ROOT, "");
+
+        //creating the output created Event
+        ExperimentOutputCreatedEvent event = new ExperimentOutputCreatedEvent();
+        event.setExperimentId("test");
+        event.setOutputPath(DATA_ROOT + "/2H2OOHNCmin.com.out");
+
+        //serializing the event
+        byte[] body = ThriftUtils.serializeThriftObject(event);
+        Message message = new Message();
+        message.setEvent(body);
+        message.setMessageId("sad");
+        message.setMessageType(messageType);
+        message.setUpdatedTime(993344232);
+        String routingKey = "*";
+
+        //serializing the message object
+        byte[] messageArray = ThriftUtils.serializeThriftObject(message);
+        channel.basicPublish(EXCHANGE_NAME, BINDING_KEY, null, messageArray);
+
+        logger.debug(" [x] Sent '" + message + "'");
+
+        channel.close();
+        connection.close();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisherTest.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisherTest.java b/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisherTest.java
new file mode 100644
index 0000000..539b452
--- /dev/null
+++ b/datacat/agent/src/test/java/org/apache/airavata/datacat/agent/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisherTest.java
@@ -0,0 +1,78 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.org.apache.airavata.datacat.agent.messageBroker;
+
+import org.apache.airavata.datacat.agent.messageBroker.AiravataUpdateListener;
+import org.apache.airavata.datacat.agent.messageBroker.IMessageBroker;
+import org.apache.airavata.datacat.agent.messageBroker.RabbitMQPublisher;
+import org.apache.airavata.datacat.models.Messaging.ExperimentOutputParsedEvent;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RabbitMQPublisherTest {
+    private static final Logger logger = LogManager.getLogger(RabbitMQPublisherTest.class);
+
+    private RabbitMQPublisher rabbitMQPublisher;
+    private IMessageBroker messageBroker;
+
+    @Before
+    public void setup() {
+        try {
+            rabbitMQPublisher = new RabbitMQPublisher();
+            logger.info("Started the RabbitMQPublisher");
+
+            //start the RabbitMQConsumer
+            messageBroker = new AiravataUpdateListener();
+            messageBroker.startBroker();
+            logger.info("Started Message Broker!!!");
+            Thread.sleep(4000);
+
+        } catch (Exception e) {
+            logger.error(e);
+        }
+    }
+
+    @Test
+    public void testRabbitMQPublisher() {
+        rabbitMQPublisher.publish(getDummyOutputParsedEvent());
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException e) {
+            logger.error(e);
+        }finally {
+            messageBroker.stopBroker();
+        }
+    }
+
+    /**
+     * a test method to return dummy data
+     * @return ExperimentOutputParsedEvent
+     */
+    public ExperimentOutputParsedEvent getDummyOutputParsedEvent() {
+        ExperimentOutputParsedEvent experimentOutputParsedEvent = new ExperimentOutputParsedEvent();
+        experimentOutputParsedEvent.setExperimentId("3343243234");
+        experimentOutputParsedEvent.setStatus("success");
+        experimentOutputParsedEvent.setDocumentID("sadas3qe34");
+        return experimentOutputParsedEvent;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/B3PW91.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/B3PW91.cup b/datacat/cup_flex/B3PW91.cup
new file mode 100644
index 0000000..d601fa9
--- /dev/null
+++ b/datacat/cup_flex/B3PW91.cup
@@ -0,0 +1,166 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RB+HF-PW91)=  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER1, SCFDONE1, NSearch1, Energ1, MaxGrad1, RmsGrad1;
+terminal           MPStart, NMP, MPEnerg, MPMax, MPRms, MPDONE;
+terminal Integer     ITERATION1, MPITER;
+terminal Float     ENERGY1, MGRAD1, RGRAD1, MPENERGY, MPMGRAD, MPRGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal mp2, mpintro, mppat, mpcycle, mpcycle1, force1, force2;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+           SCFDONE1
+           mp2
+            MPDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER1 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+// Originally:  SCFDONE1 
+;
+
+scfcycle ::= Energ1 ENERGY1:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= NSearch1 ITERATION1:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+grad1
+grad2
+ ;
+
+grad1 ::= MaxGrad1  MGRAD1:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad1  RGRAD1:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;
+
+mp2 ::= mpintro mppat
+{:
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ :}
+;
+
+mpintro ::=
+MPStart
+{:
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ :}
+;
+
+mppat ::= mppat mpcycle1
+{:
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ :}
+|
+mpcycle1
+;
+
+mpcycle1 ::= MPEnerg MPENERGY:mpen
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+ :}
+mpcycle
+;
+
+
+mpcycle ::= NMP MPITER:it
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+ :}
+force1
+force2
+;
+
+force1 ::= MPMax  MPMGRAD:mpmg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+ :}
+;
+ 
+force2 ::= MPRms  MPRGRAD:mprg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/B3PW91.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/B3PW91.flex b/datacat/cup_flex/B3PW91.flex
new file mode 100644
index 0000000..d988603
--- /dev/null
+++ b/datacat/cup_flex/B3PW91.flex
@@ -0,0 +1,204 @@
+Fimport java_cup.runtime.*;
+
+%%
+
+%class B3PW91Lexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state MP2
+%state MPOPT
+%state FLOATMP1
+%state FLOATMP2
+%state FLOATMP3
+%state IGNOREALL
+%state INTMP
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(B3Pw91Sym.FOUNDITER1); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(B3Pw91Sym.NSearch1);}
+
+  "SCF Done:  E(RB+HF-PW91) =" {
+       if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(B3Pw91Sym.Energ1);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(B3Pw91Sym.MaxGrad1);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(B3Pw91Sym.RmsGrad1);}
+
+
+  "Optimization completed" {
+if (Settings.DEBUG) System.out.println("B3PW91Flex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(B3Pw91Sym.SCFDONE1);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3Pw91Sym.ENERGY1, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3Pw91Sym.MGRAD1, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3Pw91Sym.RGRAD1, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("B3PW91Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(B3Pw91Sym.ITERATION1, new Integer(yytext()));
+}
+}
+
+<MP2>{
+  "MP2/6-31G(d') Opt=RCFC" {
+  if (Settings.DEBUG) System.out.println("B3PW91Flex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(B3Pw91Sym.MPStart);}
+  }
+
+
+<MPOPT>{
+
+   "Step number" {
+if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(B3Pw91Sym.NMP);}
+
+  "EUMP2 = " {
+       if (Settings.DEBUG) System.out.println("B3PW91Flex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(B3Pw91Sym.MPEnerg);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(B3Pw91Sym.MPMax);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(B3Pw91Sym.MPRms);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(B3Pw91Sym.MPDONE);}
+
+
+  .|\n {}
+  }
+
+
+<FLOATMP1>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3Pw91Sym.MPENERGY, new Float(yytext()));}
+}
+
+<FLOATMP2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3Pw91Sym.MPMGRAD, new Float(yytext()));}
+}
+
+<FLOATMP3>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3Pw91Sym.MPRGRAD, new Float(yytext()));}
+}
+
+<INTMP>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(B3Pw91Sym.MPITER, new Integer(yytext()));}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/Makefile
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/Makefile b/datacat/cup_flex/Makefile
new file mode 100644
index 0000000..158f3f3
--- /dev/null
+++ b/datacat/cup_flex/Makefile
@@ -0,0 +1,60 @@
+# GridChem CUP_FLEX Makefile.
+# First order draft.  Perhaps this will be replaced by ant.
+# Scott Brozell, OSC, May 10, 2005
+
+JAVA=java
+JAVAC=javac
+JAVA_CUP=java_cup
+JAVA_CUP_MAIN=$(JAVA_CUP).Main
+JAVA_CUP_PARENT_PATH=..
+JFLEX=JFlex
+JFLEX_MAIN=$(JFLEX).Main
+JFLEX_PARENT_PATH=..
+LEXER_CLASS_NAME_TAIL=Lexer
+PARSER_CLASS_NAME_TAIL=Parser
+SCANNER_PARSER_BASENAMES=whichProgram
+SYMBOLS_CLASS_NAME_TAIL=Sym
+
+# This target builds all the parsers.
+# It assumes that java_cup and JFlex are built, but they could be dependencies.
+all: $(SCANNER_PARSER_BASENAMES)
+
+# This target builds the Java parser generator CUP.
+java_cup: 
+	cd $(JAVA_CUP_PARENT_PATH); \
+	$(JAVAC) $(JAVA_CUP)/*.java $(JAVA_CUP)/runtime/*.java
+
+# This target builds the Java lexical analyzer generator JFlex.
+# The java_cup runtime package is required; thus the classpath specification.
+jflex: 
+	cd $(JFLEX_PARENT_PATH); \
+	$(JAVAC) -classpath . $(JFLEX)/*.java $(JFLEX)/gui/*.java
+
+# These targets build parsers by invoking CUP, via the method java_cup.Main.
+# Note the annoying lack of consistency between file and class names.
+
+SCFa: scfaLexer scfaParserandSym 
+
+whichProgram: WhichProgram
+
+WhichProgram: whichProgram.cup whichProgram.flex
+	$(JAVA) -classpath $(JAVA_CUP_PARENT_PATH) $(JAVA_CUP_MAIN) \
+	    -parser $@$(PARSER_CLASS_NAME_TAIL) \
+	    -symbols $@$(SYMBOLS_CLASS_NAME_TAIL) < whichProgram.cup
+	$(JAVA) -classpath $(JFLEX_PARENT_PATH) $(JFLEX_MAIN) whichProgram.flex
+
+
+%$(LEXER_CLASS_NAME_TAIL): %.flex
+	$(JAVA) -classpath $(JFLEX_PARENT_PATH) $(JFLEX_MAIN) $<
+
+%$(PARSER_CLASS_NAME_TAIL)and$(SYMBOLS_CLASS_NAME_TAIL): %.cup
+	$(JAVA) -classpath $(JAVA_CUP_PARENT_PATH) $(JAVA_CUP_MAIN) \
+	    -parser $*$(PARSER_CLASS_NAME_TAIL) \
+	    -symbols $*$(SYMBOLS_CLASS_NAME_TAIL) < $<
+
+install: all
+	mv *.java ../GridChem/
+
+clean:
+	-$(RM) *.java *.java~
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/casscf.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/casscf.flex b/datacat/cup_flex/casscf.flex
new file mode 100644
index 0000000..68899f3
--- /dev/null
+++ b/datacat/cup_flex/casscf.flex
@@ -0,0 +1,237 @@
+/* CASSCF Keyword 
+   Last Update: 6/26/2001 
+   http://www.gaussian.com/00000419.htm
+*/
+
+
+ 
+%%
+
+
+
+%class CASSCF
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state GETN
+%state GETCOMMA
+%state GETM
+%state ITN
+%state ITNFLOAT
+%state FLOATVAL
+%state INTVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+<GETN>{ 
+  /* get number of electrons */
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(GETCOMMA);
+  }
+}
+
+<GETCOMMA>{
+  "," {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(GETM);
+  }
+}
+
+<GETM>{
+  /* get number of orbitals */
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+<YYINITIAL>{
+  "CASSCF(" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(GETN);
+  }
+  "CAS(" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(GETN);
+  }
+  "Guess=Alter" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Guess=Only" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Guess=Read,Alter" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Pop=Regular=" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Pop=Full" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "SCF=Conven" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MP2" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "NRoot=" {if (Settings.DEBUG) System.out.println(yytext());
+	    yybegin(INTVAL);
+  }
+  "StateAverage" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Opt=Conical" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Spin" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "OrbLocal" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "OrbLocal=" {if (Settings.DEBUG) System.out.println(yytext());
+	       yybegin(INTVAL);
+  }
+  "DavidsonDiag" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "FullDiag" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "NoFullDiag" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "StateGuess=" {if (Settings.DEBUG) System.out.println(yytext());
+		 yybegin(INTVAL);
+  }
+  "StateGuess=Read" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "OrbRoot" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "SlaterDet" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "HWDet" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "RFO" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "QC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "UNO" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Guess=Read" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Pop=NaturalOrbital" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "NPairs=" {if (Settings.DEBUG) System.out.println(yytext());
+		  yybegin(INTVAL);
+  }
+  "Restart" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "DoOff" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Thresh=" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(INTVAL);
+  }
+  "MP2States=" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "NFC=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(INTVAL);
+  }
+  "NFV=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(INTVAL);
+  }
+  "UseL906" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Polar=Numer" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "ITN" {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(ITN);
+  }
+  "E2=" {if (Settings.DEBUG) System.out.println(yytext());
+		 yybegin(FLOATVAL);
+  }
+  "EUMP2=" {if (Settings.DEBUG) System.out.println(yytext());
+		 yybegin(FLOATVAL);
+  }
+  "QC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+<ITN>{
+  "=" {if (Settings.DEBUG) System.out.println(yytext());	  
+       yybegin(ITNFLOAT);
+  }
+  "MaxIt=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ITNFLOAT);
+  }
+  "E=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ITNFLOAT);
+  }
+  "DE=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ITNFLOAT);
+  }
+  "Acc=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ITNFLOAT);
+  }
+  "MCSCF converged." {if (Settings.DEBUG) System.out.println(yytext());
+		      yybegin(YYINITIAL);
+  }
+}
+
+<ITNFLOAT>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(ITN);
+  }
+}
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<INTVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/cbsQ.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/cbsQ.cup b/datacat/cup_flex/cbsQ.cup
new file mode 100644
index 0000000..4ff460a
--- /dev/null
+++ b/datacat/cup_flex/cbsQ.cup
@@ -0,0 +1,166 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER1, SCFDONE1, NSearch1, Energ1, MaxGrad1, RmsGrad1;
+terminal           MPStart, NMP, MPEnerg, MPMax, MPRms, MPDONE;
+terminal Integer     ITERATION1, MPITER;
+terminal Float     ENERGY1, MGRAD1, RGRAD1, MPENERGY, MPMGRAD, MPRGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal mp2, mpintro, mppat, mpcycle, mpcycle1, force1, force2;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+           SCFDONE1
+           mp2
+            MPDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER1 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+// Originally:  SCFDONE1 
+;
+
+scfcycle ::= Energ1 ENERGY1:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= NSearch1 ITERATION1:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+grad1
+grad2
+ ;
+
+grad1 ::= MaxGrad1  MGRAD1:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad1  RGRAD1:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;
+
+mp2 ::= mpintro mppat
+{:
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ :}
+;
+
+mpintro ::=
+MPStart
+{:
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ :}
+;
+
+mppat ::= mppat mpcycle1
+{:
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ :}
+|
+mpcycle1
+;
+
+mpcycle1 ::= MPEnerg MPENERGY:mpen
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+ :}
+mpcycle
+;
+
+
+mpcycle ::= NMP MPITER:it
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+ :}
+force1
+force2
+;
+
+force1 ::= MPMax  MPMGRAD:mpmg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+ :}
+;
+ 
+force2 ::= MPRms  MPRGRAD:mprg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/cbsQ.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/cbsQ.flex b/datacat/cup_flex/cbsQ.flex
new file mode 100644
index 0000000..8914f8e
--- /dev/null
+++ b/datacat/cup_flex/cbsQ.flex
@@ -0,0 +1,204 @@
+import java_cup.runtime.*;
+
+%%
+
+%class CBSQLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state MP2
+%state MPOPT
+%state FLOATMP1
+%state FLOATMP2
+%state FLOATMP3
+%state IGNOREALL
+%state INTMP
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("CBSQFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(G1Sym.FOUNDITER1); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(G1Sym.NSearch1);}
+
+  "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("CBSQFlex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(G1Sym.Energ1);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(G1Sym.MaxGrad1);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(G1Sym.RmsGrad1);}
+
+
+  "Optimization completed" {
+if (Settings.DEBUG) System.out.println("CBSQFlex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.ENERGY1, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("CBSQFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.MGRAD1, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("CBSQFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.RGRAD1, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("CBSQFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(G1Sym.ITERATION1, new Integer(yytext()));
+}
+}
+
+<MP2>{
+  "MP2/6-31G(d') Opt=RCFC" {
+  if (Settings.DEBUG) System.out.println("CBSQFlex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(G1Sym.MPStart);}
+  }
+
+
+<MPOPT>{
+
+   "Step number" {
+if (Settings.DEBUG) System.out.println("CBSQFlex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(G1Sym.NMP);}
+
+  "EUMP2 = " {
+       if (Settings.DEBUG) System.out.println("CBSQFlex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(G1Sym.MPEnerg);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(G1Sym.MPMax);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(G1Sym.MPRms);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);}
+
+
+  .|\n {}
+  }
+
+
+<FLOATMP1>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPENERGY, new Float(yytext()));}
+}
+
+<FLOATMP2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPMGRAD, new Float(yytext()));}
+}
+
+<FLOATMP3>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPRGRAD, new Float(yytext()));}
+}
+
+<INTMP>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("CBSQFlex: MP2 Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(G1Sym.MPITER, new Integer(yytext()));}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/ci.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/ci.flex b/datacat/cup_flex/ci.flex
new file mode 100644
index 0000000..e5a9860
--- /dev/null
+++ b/datacat/cup_flex/ci.flex
@@ -0,0 +1,134 @@
+/* CID and CISD Keywords
+   Last Update: 6/26/2001 
+   http://www.gaussian.com/00000423.htm
+*/
+
+
+ 
+%%
+
+
+
+%class CI
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state FLOATVAL
+%state INTVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/* ___________
+   Description */
+
+<YYINITIAL>{
+  "CID" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "CISD" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "CI" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+/* _______
+   Options */
+
+<YYINITIAL>{
+  "FC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Full" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Conver=" {yybegin(INTVAL); 
+	     if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MaxCyc=" {yybegin(INTVAL); 
+	     if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+/* __________________
+   Examples, Energies */
+
+<YYINITIAL>{
+  "DE(CI)=" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(FLOATVAL); 
+  }
+  "E(CI)=" {if (Settings.DEBUG) System.out.println(yytext());
+	    yybegin(FLOATVAL); 
+  }
+  "NORM(A)=" {if (Settings.DEBUG) System.out.println(yytext());
+	      yybegin(FLOATVAL); 
+  }
+  .|\n {}
+}
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<INTVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/cis.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/cis.flex b/datacat/cup_flex/cis.flex
new file mode 100644
index 0000000..265874e
--- /dev/null
+++ b/datacat/cup_flex/cis.flex
@@ -0,0 +1,328 @@
+/* CIS Keyword
+   Last Update: 6/26/2001 
+   http://www.gaussian.com/00000426.htm
+*/
+
+
+ 
+%%
+
+
+
+%class CIS
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state ITERATIONVAL
+%state DIMENSIONVAL
+%state ROOTVAL
+%state AFTERROOT
+%state DELTAVAL
+%state ROOTEV
+%state CHANGEIS
+%state CHANGEVAL
+%state EXCITATION
+%state EXCITEDSTATE
+%state SYMMETRY
+%state EXCITENERGY
+%state EV
+%state FREQ
+%state NM
+%state FVAL
+%state STRENGTH
+%state TRANSITION
+%state CISENERGY
+%state FLOATVAL
+%state INTVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/* ____________________________________
+   Description, state selection options */
+
+<YYINITIAL>{
+  "Density" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Singlets" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Triplets" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "50-50" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Root=" {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(INTVAL);
+  }
+  "NStates=" {if (Settings.DEBUG) System.out.println(yytext());
+	      yybegin(INTVAL);
+  }
+  "Add=" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(INTVAL);
+  }
+  "Densities" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "TransitionDensities" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "AllTransitionDensities" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Direct" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MO" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "AO" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "FC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Conver=" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(INTVAL);
+  }
+  "Read" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Restart" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "RWFRestart" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+/* _________________
+   Debugging options */
+<YYINITIAL>{
+  "ICDiag" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MaxDiag=" {if (Settings.DEBUG) System.out.println(yytext());
+	      yybegin(INTVAL);
+  }
+  "MaxDavidson" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+/* __________________
+   Examples, Energies */
+
+<YYINITIAL>{
+  "DE(CI)=" {if (Settings.DEBUG) System.out.println(yytext());
+	     yybegin(FLOATVAL); 
+  }
+  "Iteration" {if (Settings.DEBUG) System.out.println(yytext());
+	       yybegin(ITERATIONVAL); 
+  }
+  "Dimension" {if (Settings.DEBUG) System.out.println(yytext());
+	       yybegin(DIMENSIONVAL); 
+  }
+  "Root" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ROOTVAL);
+  }
+  "Excitation Energies [eV] at current iteration:" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Excited States From <AA,BB:AA,BB> singles matrix:" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Excitation energies and oscillator strengths:" {if (Settings.DEBUG) System.out.println(yytext());
+						   yybegin(EXCITATION);
+  }
+  .|\n {}
+}
+
+<ITERATIONVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+<DIMENSIONVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+
+
+/* ROOTVAL and related states */
+
+<ROOTVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(AFTERROOT);
+  }
+}
+
+<AFTERROOT>{
+  "not converged, maximum delta is" {if (Settings.DEBUG) System.out.println(yytext());
+				     yybegin(DELTAVAL);
+  }
+  ":" {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(ROOTEV);
+  }
+}
+
+<DELTAVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<ROOTEV>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(CHANGEIS);
+  }
+}
+
+<CHANGEIS>{
+  "Change is" {if (Settings.DEBUG) System.out.println(yytext());
+	       yybegin(CHANGEVAL);
+  }
+}
+
+<CHANGEVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+
+
+
+
+/* EXCITATION and related states */
+
+<EXCITATION>{
+  "Excited State" {if (Settings.DEBUG) System.out.println(yytext());
+		   yybegin(EXCITEDSTATE);
+  }
+}
+
+<EXCITEDSTATE>{
+  {INT}":" {if (Settings.DEBUG) System.out.println(yytext());
+	    yybegin(SYMMETRY);
+  }
+}
+
+<SYMMETRY>{
+  {WORD} {if (Settings.DEBUG) System.out.println(yytext());
+	  yybegin(EXCITENERGY);
+  }
+}
+
+<EXCITENERGY>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(EV);
+  }
+}
+
+<EV>{
+  "eV" {if (Settings.DEBUG) System.out.println(yytext());
+	yybegin(FREQ);
+  }
+}
+
+<FREQ>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(NM);
+  }
+}
+
+<NM>{
+  "nm" {if (Settings.DEBUG) System.out.println(yytext());
+	yybegin(FVAL);
+  }
+}
+
+<FVAL>{
+  "f=" {if (Settings.DEBUG) System.out.println(yytext());
+	yybegin(STRENGTH);
+  }
+}
+
+<STRENGTH>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(TRANSITION);
+  }
+}
+
+<TRANSITION>{
+  {INT}"->"{INT} {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Total Energy, E(Cis) =" {if (Settings.DEBUG) System.out.println(yytext());
+			    yybegin(CISENERGY);
+  }
+}
+
+<CISENERGY>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(IGNOREALL);
+  }
+}
+
+
+
+
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<INTVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/conf.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/conf.flex b/datacat/cup_flex/conf.flex
new file mode 100644
index 0000000..1a4f430
--- /dev/null
+++ b/datacat/cup_flex/conf.flex
@@ -0,0 +1,66 @@
+package GridChem;
+import java.util.*;
+import GridChem.*;
+import GridChem.util.Settings;
+ 
+%%
+
+
+
+%class Conf
+%public
+%unicode
+/*
+%cup
+%cupdebug
+%ignorecase
+*/
+
+%state SEQ
+%state DATAF
+%state IGNOREALL
+
+%standalone
+%8bit
+
+%{
+  public static boolean DEBUG = false;
+  public static Set datafileList;
+%}
+
+FNAME          = [A-Za-z0-9_"."" ":\-\\\/]+
+DIGIT          = [0-9]
+INT            = [+|-]?{DIGIT}+
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+
+ 
+%%
+
+
+
+<YYINITIAL>{
+  "qcrjm2002" {if (Settings.DEBUG) System.out.println(yytext());
+               Conf.datafileList = new TreeSet();
+  }
+  "datafile" {yybegin(SEQ);}
+}
+
+<SEQ>{
+  "=" {yybegin(DATAF);}
+}
+
+<DATAF>{
+  {FNAME} {Conf.datafileList.add(yytext());
+	   for(Iterator myi = Conf.datafileList.iterator(); myi.hasNext();)
+             if (Settings.DEBUG) System.out.println(myi.next());
+	   if (Settings.DEBUG) System.out.println("----------");
+           yybegin(YYINITIAL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/dft.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/dft.flex b/datacat/cup_flex/dft.flex
new file mode 100644
index 0000000..5afa5d7
--- /dev/null
+++ b/datacat/cup_flex/dft.flex
@@ -0,0 +1,229 @@
+/* Density Functional Methods (DFT) Keywords
+   Last Update: 6/26/2001 
+   http://www.gaussian.com/00000432.htm
+*/
+
+
+ 
+%%
+
+
+
+%class DFT
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state FLOATVAL
+%state INTVAL
+%state MMMM
+%state NNNN
+%state AU
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/* ____________________
+   Exchange Functionals */
+
+<YYINITIAL>{
+  "HFS" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "XAlpha" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "HFB" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+/* ______________________________________________
+   Exchange Functionals Combined with Correlation */
+
+<YYINITIAL>{
+  "PW91" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "S" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "XA" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MPW" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "G96" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+/* ___________________________________________________________
+   Correlation Functionals:  must be combined with an exchange */
+
+<YYINITIAL>{
+  "VWN" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "LSDA" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "VWN5" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "LYP" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "PL" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "P86" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "PW91" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B96" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+/* __________________
+   Hybrid Functionals */
+
+<YYINITIAL>{
+  "B3LYP" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B3P86" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B3PW91" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B1B96" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "B1LHYP" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "MPW1PW91" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "G961LYP" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "BHandH" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "BHandHLYP" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+/* ____________________________________________________________
+   User-defined, local exchange, non-local exchange corrections */
+
+<YYINITIAL>{
+  "IOp(5/45=" {yybegin(MMMM); 
+	       if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IOp(5/46=" {yybegin(MMMM); 
+	       if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IOp(5/47=" {yybegin(MMMM); 
+	       if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+<MMMM>{
+  {INT} {yybegin(NNNN);
+	 if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+<NNNN>{
+  {INT} {yybegin(YYINITIAL);
+	 if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+/* __________________________________________________
+   Accuracy considerations; convergence and stability */
+
+<YYINITIAL>{
+  "Int=FineGrid" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Int(Grid=" {if (Settings.DEBUG) System.out.println(yytext());
+	    yybegin(INTVAL); 
+  }
+  "SCF=Tight" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "SCF=VShift" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "SCF=QC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Stable=Opt" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  .|\n {}
+}
+
+/* ________________
+   Examples, energy */
+
+<YYINITIAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(AU);
+  }
+}
+
+<AU>{
+  "A.U. after" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+	   yybegin(YYINITIAL);
+  }
+}
+
+<INTVAL>{
+  {INT} {if (Settings.DEBUG) System.out.println(yytext());
+	 yybegin(YYINITIAL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  


[08/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/scripts/bootstrap-datetimepicker.js
----------------------------------------------------------------------
diff --git a/datacat/web/portal/scripts/bootstrap-datetimepicker.js b/datacat/web/portal/scripts/bootstrap-datetimepicker.js
new file mode 100755
index 0000000..d1e4659
--- /dev/null
+++ b/datacat/web/portal/scripts/bootstrap-datetimepicker.js
@@ -0,0 +1,1384 @@
+/*
+ //! version : 3.1.3
+ =========================================================
+ bootstrap-datetimepicker.js
+ https://github.com/Eonasdan/bootstrap-datetimepicker
+ =========================================================
+ The MIT License (MIT)
+
+ Copyright (c) 2014 Jonathan Peterson
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ */
+;(function (root, factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        // AMD is used - Register as an anonymous module.
+        define(['jquery', 'moment'], factory);
+    } else if (typeof exports === 'object') {
+        factory(require('jquery'), require('moment'));
+    }
+    else {
+        // Neither AMD or CommonJS used. Use global variables.
+        if (!jQuery) {
+            throw new Error('bootstrap-datetimepicker requires jQuery to be loaded first');
+        }
+        if (!moment) {
+            throw new Error('bootstrap-datetimepicker requires moment.js to be loaded first');
+        }
+        factory(root.jQuery, moment);
+    }
+}(this, function ($, moment) {
+    'use strict';
+    if (typeof moment === 'undefined') {
+        throw new Error('momentjs is required');
+    }
+
+    var dpgId = 0,
+
+        DateTimePicker = function (element, options) {
+            var defaults = $.fn.datetimepicker.defaults,
+
+                icons = {
+                    time: 'glyphicon glyphicon-time',
+                    date: 'glyphicon glyphicon-calendar',
+                    up: 'glyphicon glyphicon-chevron-up',
+                    down: 'glyphicon glyphicon-chevron-down'
+                },
+
+                picker = this,
+                errored = false,
+                dDate,
+
+                init = function () {
+                    var icon = false, localeData, rInterval;
+                    picker.options = $.extend({}, defaults, options);
+                    picker.options.icons = $.extend({}, icons, picker.options.icons);
+
+                    picker.element = $(element);
+
+                    dataToOptions();
+
+                    if (!(picker.options.pickTime || picker.options.pickDate)) {
+                        throw new Error('Must choose at least one picker');
+                    }
+
+                    picker.id = dpgId++;
+                    moment.locale(picker.options.language);
+                    picker.date = moment();
+                    picker.unset = false;
+                    picker.isInput = picker.element.is('input');
+                    picker.component = false;
+
+                    if (picker.element.hasClass('input-group')) {
+                        if (picker.element.find('.datepickerbutton').size() === 0) {//in case there is more then one 'input-group-addon' Issue #48
+                            picker.component = picker.element.find('[class^="input-group-"]');
+                        }
+                        else {
+                            picker.component = picker.element.find('.datepickerbutton');
+                        }
+                    }
+                    picker.format = picker.options.format;
+
+                    localeData = moment().localeData();
+
+                    if (!picker.format) {
+                        picker.format = (picker.options.pickDate ? localeData.longDateFormat('L') : '');
+                        if (picker.options.pickDate && picker.options.pickTime) {
+                            picker.format += ' ';
+                        }
+                        picker.format += (picker.options.pickTime ? localeData.longDateFormat('LT') : '');
+                        if (picker.options.useSeconds) {
+                            if (localeData.longDateFormat('LT').indexOf(' A') !== -1) {
+                                picker.format = picker.format.split(' A')[0] + ':ss A';
+                            }
+                            else {
+                                picker.format += ':ss';
+                            }
+                        }
+                    }
+                    picker.use24hours = (picker.format.toLowerCase().indexOf('a') < 0 && picker.format.indexOf('h') < 0);
+
+                    if (picker.component) {
+                        icon = picker.component.find('span');
+                    }
+
+                    if (picker.options.pickTime) {
+                        if (icon) {
+                            icon.addClass(picker.options.icons.time);
+                        }
+                    }
+                    if (picker.options.pickDate) {
+                        if (icon) {
+                            icon.removeClass(picker.options.icons.time);
+                            icon.addClass(picker.options.icons.date);
+                        }
+                    }
+
+                    picker.options.widgetParent =
+                        typeof picker.options.widgetParent === 'string' && picker.options.widgetParent ||
+                        picker.element.parents().filter(function () {
+                            return 'scroll' === $(this).css('overflow-y');
+                        }).get(0) ||
+                        'body';
+
+                    picker.widget = $(getTemplate()).appendTo(picker.options.widgetParent);
+
+                    picker.minViewMode = picker.options.minViewMode || 0;
+                    if (typeof picker.minViewMode === 'string') {
+                        switch (picker.minViewMode) {
+                            case 'months':
+                                picker.minViewMode = 1;
+                                break;
+                            case 'years':
+                                picker.minViewMode = 2;
+                                break;
+                            default:
+                                picker.minViewMode = 0;
+                                break;
+                        }
+                    }
+                    picker.viewMode = picker.options.viewMode || 0;
+                    if (typeof picker.viewMode === 'string') {
+                        switch (picker.viewMode) {
+                            case 'months':
+                                picker.viewMode = 1;
+                                break;
+                            case 'years':
+                                picker.viewMode = 2;
+                                break;
+                            default:
+                                picker.viewMode = 0;
+                                break;
+                        }
+                    }
+
+                    picker.viewMode = Math.max(picker.viewMode, picker.minViewMode);
+
+                    picker.options.disabledDates = indexGivenDates(picker.options.disabledDates);
+                    picker.options.enabledDates = indexGivenDates(picker.options.enabledDates);
+
+                    picker.startViewMode = picker.viewMode;
+                    picker.setMinDate(picker.options.minDate);
+                    picker.setMaxDate(picker.options.maxDate);
+                    fillDow();
+                    fillMonths();
+                    fillHours();
+                    fillMinutes();
+                    fillSeconds();
+                    update();
+                    showMode();
+                    if (!getPickerInput().prop('disabled')) {
+                        attachDatePickerEvents();
+                    }
+                    if (picker.options.defaultDate !== '' && getPickerInput().val() === '') {
+                        picker.setValue(picker.options.defaultDate);
+                    }
+                    if (picker.options.minuteStepping !== 1) {
+                        rInterval = picker.options.minuteStepping;
+                        picker.date.minutes((Math.round(picker.date.minutes() / rInterval) * rInterval) % 60).seconds(0);
+                    }
+                },
+
+                getPickerInput = function () {
+                    var input;
+
+                    if (picker.isInput) {
+                        return picker.element;
+                    }
+                    input = picker.element.find('.datepickerinput');
+                    if (input.size() === 0) {
+                        input = picker.element.find('input');
+                    }
+                    else if (!input.is('input')) {
+                        throw new Error('CSS class "datepickerinput" cannot be applied to non input element');
+                    }
+                    return input;
+                },
+
+                dataToOptions = function () {
+                    var eData;
+                    if (picker.element.is('input')) {
+                        eData = picker.element.data();
+                    }
+                    else {
+                        eData = picker.element.find('input').data();
+                    }
+                    if (eData.dateFormat !== undefined) {
+                        picker.options.format = eData.dateFormat;
+                    }
+                    if (eData.datePickdate !== undefined) {
+                        picker.options.pickDate = eData.datePickdate;
+                    }
+                    if (eData.datePicktime !== undefined) {
+                        picker.options.pickTime = eData.datePicktime;
+                    }
+                    if (eData.dateUseminutes !== undefined) {
+                        picker.options.useMinutes = eData.dateUseminutes;
+                    }
+                    if (eData.dateUseseconds !== undefined) {
+                        picker.options.useSeconds = eData.dateUseseconds;
+                    }
+                    if (eData.dateUsecurrent !== undefined) {
+                        picker.options.useCurrent = eData.dateUsecurrent;
+                    }
+                    if (eData.calendarWeeks !== undefined) {
+                        picker.options.calendarWeeks = eData.calendarWeeks;
+                    }
+                    if (eData.dateMinutestepping !== undefined) {
+                        picker.options.minuteStepping = eData.dateMinutestepping;
+                    }
+                    if (eData.dateMindate !== undefined) {
+                        picker.options.minDate = eData.dateMindate;
+                    }
+                    if (eData.dateMaxdate !== undefined) {
+                        picker.options.maxDate = eData.dateMaxdate;
+                    }
+                    if (eData.dateShowtoday !== undefined) {
+                        picker.options.showToday = eData.dateShowtoday;
+                    }
+                    if (eData.dateCollapse !== undefined) {
+                        picker.options.collapse = eData.dateCollapse;
+                    }
+                    if (eData.dateLanguage !== undefined) {
+                        picker.options.language = eData.dateLanguage;
+                    }
+                    if (eData.dateDefaultdate !== undefined) {
+                        picker.options.defaultDate = eData.dateDefaultdate;
+                    }
+                    if (eData.dateDisableddates !== undefined) {
+                        picker.options.disabledDates = eData.dateDisableddates;
+                    }
+                    if (eData.dateEnableddates !== undefined) {
+                        picker.options.enabledDates = eData.dateEnableddates;
+                    }
+                    if (eData.dateIcons !== undefined) {
+                        picker.options.icons = eData.dateIcons;
+                    }
+                    if (eData.dateUsestrict !== undefined) {
+                        picker.options.useStrict = eData.dateUsestrict;
+                    }
+                    if (eData.dateDirection !== undefined) {
+                        picker.options.direction = eData.dateDirection;
+                    }
+                    if (eData.dateSidebyside !== undefined) {
+                        picker.options.sideBySide = eData.dateSidebyside;
+                    }
+                    if (eData.dateDaysofweekdisabled !== undefined) {
+                        picker.options.daysOfWeekDisabled = eData.dateDaysofweekdisabled;
+                    }
+                },
+
+                place = function () {
+                    var position = 'absolute',
+                        offset = picker.component ? picker.component.offset() : picker.element.offset(),
+                        $window = $(window),
+                        placePosition;
+
+                    picker.width = picker.component ? picker.component.outerWidth() : picker.element.outerWidth();
+                    offset.top = offset.top + picker.element.outerHeight();
+
+                    if (picker.options.direction === 'up') {
+                        placePosition = 'top';
+                    } else if (picker.options.direction === 'bottom') {
+                        placePosition = 'bottom';
+                    } else if (picker.options.direction === 'auto') {
+                        if (offset.top + picker.widget.height() > $window.height() + $window.scrollTop() && picker.widget.height() + picker.element.outerHeight() < offset.top) {
+                            placePosition = 'top';
+                        } else {
+                            placePosition = 'bottom';
+                        }
+                    }
+                    if (placePosition === 'top') {
+                        offset.bottom = $window.height() - offset.top + picker.element.outerHeight() + 3;
+                        picker.widget.addClass('top').removeClass('bottom');
+                    } else {
+                        offset.top += 1;
+                        picker.widget.addClass('bottom').removeClass('top');
+                    }
+
+                    if (picker.options.width !== undefined) {
+                        picker.widget.width(picker.options.width);
+                    }
+
+                    if (picker.options.orientation === 'left') {
+                        picker.widget.addClass('left-oriented');
+                        offset.left = offset.left - picker.widget.width() + 20;
+                    }
+
+                    if (isInFixed()) {
+                        position = 'fixed';
+                        offset.top -= $window.scrollTop();
+                        offset.left -= $window.scrollLeft();
+                    }
+
+                    if ($window.width() < offset.left + picker.widget.outerWidth()) {
+                        offset.right = $window.width() - offset.left - picker.width;
+                        offset.left = 'auto';
+                        picker.widget.addClass('pull-right');
+                    } else {
+                        offset.right = 'auto';
+                        picker.widget.removeClass('pull-right');
+                    }
+
+                    if (placePosition === 'top') {
+                        picker.widget.css({
+                            position: position,
+                            bottom: offset.bottom,
+                            top: 'auto',
+                            left: offset.left,
+                            right: offset.right
+                        });
+                    } else {
+                        picker.widget.css({
+                            position: position,
+                            top: offset.top,
+                            bottom: 'auto',
+                            left: offset.left,
+                            right: offset.right
+                        });
+                    }
+                },
+
+                notifyChange = function (oldDate, eventType) {
+                    if (moment(picker.date).isSame(moment(oldDate)) && !errored) {
+                        return;
+                    }
+                    errored = false;
+                    picker.element.trigger({
+                        type: 'dp.change',
+                        date: moment(picker.date),
+                        oldDate: moment(oldDate)
+                    });
+
+                    if (eventType !== 'change') {
+                        picker.element.change();
+                    }
+                },
+
+                notifyError = function (date) {
+                    errored = true;
+                    picker.element.trigger({
+                        type: 'dp.error',
+                        date: moment(date, picker.format, picker.options.useStrict)
+                    });
+                },
+
+                update = function (newDate) {
+                    moment.locale(picker.options.language);
+                    var dateStr = newDate;
+                    if (!dateStr) {
+                        dateStr = getPickerInput().val();
+                        if (dateStr) {
+                            picker.date = moment(dateStr, picker.format, picker.options.useStrict);
+                        }
+                        if (!picker.date) {
+                            picker.date = moment();
+                        }
+                    }
+                    picker.viewDate = moment(picker.date).startOf('month');
+                    fillDate();
+                    fillTime();
+                },
+
+                fillDow = function () {
+                    moment.locale(picker.options.language);
+                    var html = $('<tr>'), weekdaysMin = moment.weekdaysMin(), i;
+                    if (picker.options.calendarWeeks === true) {
+                        html.append('<th class="cw">#</th>');
+                    }
+                    if (moment().localeData()._week.dow === 0) { // starts on Sunday
+                        for (i = 0; i < 7; i++) {
+                            html.append('<th class="dow">' + weekdaysMin[i] + '</th>');
+                        }
+                    } else {
+                        for (i = 1; i < 8; i++) {
+                            if (i === 7) {
+                                html.append('<th class="dow">' + weekdaysMin[0] + '</th>');
+                            } else {
+                                html.append('<th class="dow">' + weekdaysMin[i] + '</th>');
+                            }
+                        }
+                    }
+                    picker.widget.find('.datepicker-days thead').append(html);
+                },
+
+                fillMonths = function () {
+                    moment.locale(picker.options.language);
+                    var html = '', i, monthsShort = moment.monthsShort();
+                    for (i = 0; i < 12; i++) {
+                        html += '<span class="month">' + monthsShort[i] + '</span>';
+                    }
+                    picker.widget.find('.datepicker-months td').append(html);
+                },
+
+                fillDate = function () {
+                    if (!picker.options.pickDate) {
+                        return;
+                    }
+                    moment.locale(picker.options.language);
+                    var year = picker.viewDate.year(),
+                        month = picker.viewDate.month(),
+                        startYear = picker.options.minDate.year(),
+                        startMonth = picker.options.minDate.month(),
+                        endYear = picker.options.maxDate.year(),
+                        endMonth = picker.options.maxDate.month(),
+                        currentDate,
+                        prevMonth, nextMonth, html = [], row, clsName, i, days, yearCont, currentYear, months = moment.months();
+
+                    picker.widget.find('.datepicker-days').find('.disabled').removeClass('disabled');
+                    picker.widget.find('.datepicker-months').find('.disabled').removeClass('disabled');
+                    picker.widget.find('.datepicker-years').find('.disabled').removeClass('disabled');
+
+                    picker.widget.find('.datepicker-days th:eq(1)').text(
+                            months[month] + ' ' + year);
+
+                    prevMonth = moment(picker.viewDate, picker.format, picker.options.useStrict).subtract(1, 'months');
+                    days = prevMonth.daysInMonth();
+                    prevMonth.date(days).startOf('week');
+                    if ((year === startYear && month <= startMonth) || year < startYear) {
+                        picker.widget.find('.datepicker-days th:eq(0)').addClass('disabled');
+                    }
+                    if ((year === endYear && month >= endMonth) || year > endYear) {
+                        picker.widget.find('.datepicker-days th:eq(2)').addClass('disabled');
+                    }
+
+                    nextMonth = moment(prevMonth).add(42, 'd');
+                    while (prevMonth.isBefore(nextMonth)) {
+                        if (prevMonth.weekday() === moment().startOf('week').weekday()) {
+                            row = $('<tr>');
+                            html.push(row);
+                            if (picker.options.calendarWeeks === true) {
+                                row.append('<td class="cw">' + prevMonth.week() + '</td>');
+                            }
+                        }
+                        clsName = '';
+                        if (prevMonth.year() < year || (prevMonth.year() === year && prevMonth.month() < month)) {
+                            clsName += ' old';
+                        } else if (prevMonth.year() > year || (prevMonth.year() === year && prevMonth.month() > month)) {
+                            clsName += ' new';
+                        }
+                        if (prevMonth.isSame(moment({y: picker.date.year(), M: picker.date.month(), d: picker.date.date()}))) {
+                            clsName += ' active';
+                        }
+                        if (isInDisableDates(prevMonth, 'day') || !isInEnableDates(prevMonth)) {
+                            clsName += ' disabled';
+                        }
+                        if (picker.options.showToday === true) {
+                            if (prevMonth.isSame(moment(), 'day')) {
+                                clsName += ' today';
+                            }
+                        }
+                        if (picker.options.daysOfWeekDisabled) {
+                            for (i = 0; i < picker.options.daysOfWeekDisabled.length; i++) {
+                                if (prevMonth.day() === picker.options.daysOfWeekDisabled[i]) {
+                                    clsName += ' disabled';
+                                    break;
+                                }
+                            }
+                        }
+                        row.append('<td class="day' + clsName + '">' + prevMonth.date() + '</td>');
+
+                        currentDate = prevMonth.date();
+                        prevMonth.add(1, 'd');
+
+                        if (currentDate === prevMonth.date()) {
+                            prevMonth.add(1, 'd');
+                        }
+                    }
+                    picker.widget.find('.datepicker-days tbody').empty().append(html);
+                    currentYear = picker.date.year();
+                    months = picker.widget.find('.datepicker-months').find('th:eq(1)').text(year).end().find('span').removeClass('active');
+                    if (currentYear === year) {
+                        months.eq(picker.date.month()).addClass('active');
+                    }
+                    if (year - 1 < startYear) {
+                        picker.widget.find('.datepicker-months th:eq(0)').addClass('disabled');
+                    }
+                    if (year + 1 > endYear) {
+                        picker.widget.find('.datepicker-months th:eq(2)').addClass('disabled');
+                    }
+                    for (i = 0; i < 12; i++) {
+                        if ((year === startYear && startMonth > i) || (year < startYear)) {
+                            $(months[i]).addClass('disabled');
+                        } else if ((year === endYear && endMonth < i) || (year > endYear)) {
+                            $(months[i]).addClass('disabled');
+                        }
+                    }
+
+                    html = '';
+                    year = parseInt(year / 10, 10) * 10;
+                    yearCont = picker.widget.find('.datepicker-years').find(
+                        'th:eq(1)').text(year + '-' + (year + 9)).parents('table').find('td');
+                    picker.widget.find('.datepicker-years').find('th').removeClass('disabled');
+                    if (startYear > year) {
+                        picker.widget.find('.datepicker-years').find('th:eq(0)').addClass('disabled');
+                    }
+                    if (endYear < year + 9) {
+                        picker.widget.find('.datepicker-years').find('th:eq(2)').addClass('disabled');
+                    }
+                    year -= 1;
+                    for (i = -1; i < 11; i++) {
+                        html += '<span class="year' + (i === -1 || i === 10 ? ' old' : '') + (currentYear === year ? ' active' : '') + ((year < startYear || year > endYear) ? ' disabled' : '') + '">' + year + '</span>';
+                        year += 1;
+                    }
+                    yearCont.html(html);
+                },
+
+                fillHours = function () {
+                    moment.locale(picker.options.language);
+                    var table = picker.widget.find('.timepicker .timepicker-hours table'), html = '', current, i, j;
+                    table.parent().hide();
+                    if (picker.use24hours) {
+                        current = 0;
+                        for (i = 0; i < 6; i += 1) {
+                            html += '<tr>';
+                            for (j = 0; j < 4; j += 1) {
+                                html += '<td class="hour">' + padLeft(current.toString()) + '</td>';
+                                current++;
+                            }
+                            html += '</tr>';
+                        }
+                    }
+                    else {
+                        current = 1;
+                        for (i = 0; i < 3; i += 1) {
+                            html += '<tr>';
+                            for (j = 0; j < 4; j += 1) {
+                                html += '<td class="hour">' + padLeft(current.toString()) + '</td>';
+                                current++;
+                            }
+                            html += '</tr>';
+                        }
+                    }
+                    table.html(html);
+                },
+
+                fillMinutes = function () {
+                    var table = picker.widget.find('.timepicker .timepicker-minutes table'), html = '', current = 0, i, j, step = picker.options.minuteStepping;
+                    table.parent().hide();
+                    if (step === 1)  {
+                        step = 5;
+                    }
+                    for (i = 0; i < Math.ceil(60 / step / 4) ; i++) {
+                        html += '<tr>';
+                        for (j = 0; j < 4; j += 1) {
+                            if (current < 60) {
+                                html += '<td class="minute">' + padLeft(current.toString()) + '</td>';
+                                current += step;
+                            } else {
+                                html += '<td></td>';
+                            }
+                        }
+                        html += '</tr>';
+                    }
+                    table.html(html);
+                },
+
+                fillSeconds = function () {
+                    var table = picker.widget.find('.timepicker .timepicker-seconds table'), html = '', current = 0, i, j;
+                    table.parent().hide();
+                    for (i = 0; i < 3; i++) {
+                        html += '<tr>';
+                        for (j = 0; j < 4; j += 1) {
+                            html += '<td class="second">' + padLeft(current.toString()) + '</td>';
+                            current += 5;
+                        }
+                        html += '</tr>';
+                    }
+                    table.html(html);
+                },
+
+                fillTime = function () {
+                    if (!picker.date) {
+                        return;
+                    }
+                    var timeComponents = picker.widget.find('.timepicker span[data-time-component]'),
+                        hour = picker.date.hours(),
+                        period = picker.date.format('A');
+                    if (!picker.use24hours) {
+                        if (hour === 0) {
+                            hour = 12;
+                        } else if (hour !== 12) {
+                            hour = hour % 12;
+                        }
+                        picker.widget.find('.timepicker [data-action=togglePeriod]').text(period);
+                    }
+                    timeComponents.filter('[data-time-component=hours]').text(padLeft(hour));
+                    timeComponents.filter('[data-time-component=minutes]').text(padLeft(picker.date.minutes()));
+                    timeComponents.filter('[data-time-component=seconds]').text(padLeft(picker.date.second()));
+                },
+
+                click = function (e) {
+                    e.stopPropagation();
+                    e.preventDefault();
+                    picker.unset = false;
+                    var target = $(e.target).closest('span, td, th'), month, year, step, day, oldDate = moment(picker.date);
+                    if (target.length === 1) {
+                        if (!target.is('.disabled')) {
+                            switch (target[0].nodeName.toLowerCase()) {
+                                case 'th':
+                                    switch (target[0].className) {
+                                        case 'picker-switch':
+                                            showMode(1);
+                                            break;
+                                        case 'prev':
+                                        case 'next':
+                                            step = dpGlobal.modes[picker.viewMode].navStep;
+                                            if (target[0].className === 'prev') {
+                                                step = step * -1;
+                                            }
+                                            picker.viewDate.add(step, dpGlobal.modes[picker.viewMode].navFnc);
+                                            fillDate();
+                                            break;
+                                    }
+                                    break;
+                                case 'span':
+                                    if (target.is('.month')) {
+                                        month = target.parent().find('span').index(target);
+                                        picker.viewDate.month(month);
+                                    } else {
+                                        year = parseInt(target.text(), 10) || 0;
+                                        picker.viewDate.year(year);
+                                    }
+                                    if (picker.viewMode === picker.minViewMode) {
+                                        picker.date = moment({
+                                            y: picker.viewDate.year(),
+                                            M: picker.viewDate.month(),
+                                            d: picker.viewDate.date(),
+                                            h: picker.date.hours(),
+                                            m: picker.date.minutes(),
+                                            s: picker.date.seconds()
+                                        });
+                                        set();
+                                        notifyChange(oldDate, e.type);
+                                    }
+                                    showMode(-1);
+                                    fillDate();
+                                    break;
+                                case 'td':
+                                    if (target.is('.day')) {
+                                        day = parseInt(target.text(), 10) || 1;
+                                        month = picker.viewDate.month();
+                                        year = picker.viewDate.year();
+                                        if (target.is('.old')) {
+                                            if (month === 0) {
+                                                month = 11;
+                                                year -= 1;
+                                            } else {
+                                                month -= 1;
+                                            }
+                                        } else if (target.is('.new')) {
+                                            if (month === 11) {
+                                                month = 0;
+                                                year += 1;
+                                            } else {
+                                                month += 1;
+                                            }
+                                        }
+                                        picker.date = moment({
+                                                y: year,
+                                                M: month,
+                                                d: day,
+                                                h: picker.date.hours(),
+                                                m: picker.date.minutes(),
+                                                s: picker.date.seconds()
+                                            }
+                                        );
+                                        picker.viewDate = moment({
+                                            y: year, M: month, d: Math.min(28, day)
+                                        });
+                                        fillDate();
+                                        set();
+                                        notifyChange(oldDate, e.type);
+                                    }
+                                    break;
+                            }
+                        }
+                    }
+                },
+
+                actions = {
+                    incrementHours: function () {
+                        checkDate('add', 'hours', 1);
+                    },
+
+                    incrementMinutes: function () {
+                        checkDate('add', 'minutes', picker.options.minuteStepping);
+                    },
+
+                    incrementSeconds: function () {
+                        checkDate('add', 'seconds', 1);
+                    },
+
+                    decrementHours: function () {
+                        checkDate('subtract', 'hours', 1);
+                    },
+
+                    decrementMinutes: function () {
+                        checkDate('subtract', 'minutes', picker.options.minuteStepping);
+                    },
+
+                    decrementSeconds: function () {
+                        checkDate('subtract', 'seconds', 1);
+                    },
+
+                    togglePeriod: function () {
+                        var hour = picker.date.hours();
+                        if (hour >= 12) {
+                            hour -= 12;
+                        } else {
+                            hour += 12;
+                        }
+                        picker.date.hours(hour);
+                    },
+
+                    showPicker: function () {
+                        picker.widget.find('.timepicker > div:not(.timepicker-picker)').hide();
+                        picker.widget.find('.timepicker .timepicker-picker').show();
+                    },
+
+                    showHours: function () {
+                        picker.widget.find('.timepicker .timepicker-picker').hide();
+                        picker.widget.find('.timepicker .timepicker-hours').show();
+                    },
+
+                    showMinutes: function () {
+                        picker.widget.find('.timepicker .timepicker-picker').hide();
+                        picker.widget.find('.timepicker .timepicker-minutes').show();
+                    },
+
+                    showSeconds: function () {
+                        picker.widget.find('.timepicker .timepicker-picker').hide();
+                        picker.widget.find('.timepicker .timepicker-seconds').show();
+                    },
+
+                    selectHour: function (e) {
+                        var hour = parseInt($(e.target).text(), 10);
+                        if (!picker.use24hours) {
+                            if (picker.date.hours() >= 12) {
+                                if (hour !== 12) {
+                                    hour += 12;
+                                }
+                            } else {
+                                if (hour === 12) {
+                                    hour = 0;
+                                }
+                            }
+                        }
+                        picker.date.hours(hour);
+                        actions.showPicker.call(picker);
+                    },
+
+                    selectMinute: function (e) {
+                        picker.date.minutes(parseInt($(e.target).text(), 10));
+                        actions.showPicker.call(picker);
+                    },
+
+                    selectSecond: function (e) {
+                        picker.date.seconds(parseInt($(e.target).text(), 10));
+                        actions.showPicker.call(picker);
+                    }
+                },
+
+                doAction = function (e) {
+                    var oldDate = moment(picker.date),
+                        action = $(e.currentTarget).data('action'),
+                        rv = actions[action].apply(picker, arguments);
+                    stopEvent(e);
+                    if (!picker.date) {
+                        picker.date = moment({y: 1970});
+                    }
+                    set();
+                    fillTime();
+                    notifyChange(oldDate, e.type);
+                    return rv;
+                },
+
+                stopEvent = function (e) {
+                    e.stopPropagation();
+                    e.preventDefault();
+                },
+
+                keydown = function (e) {
+                    if (e.keyCode === 27) { // allow escape to hide picker
+                        picker.hide();
+                    }
+                },
+
+                change = function (e) {
+                    moment.locale(picker.options.language);
+                    var input = $(e.target), oldDate = moment(picker.date), newDate = moment(input.val(), picker.format, picker.options.useStrict);
+                    if (newDate.isValid() && !isInDisableDates(newDate) && isInEnableDates(newDate)) {
+                        update();
+                        picker.setValue(newDate);
+                        notifyChange(oldDate, e.type);
+                        set();
+                    }
+                    else {
+                        picker.viewDate = oldDate;
+                        picker.unset = true;
+                        notifyChange(oldDate, e.type);
+                        notifyError(newDate);
+                    }
+                },
+
+                showMode = function (dir) {
+                    if (dir) {
+                        picker.viewMode = Math.max(picker.minViewMode, Math.min(2, picker.viewMode + dir));
+                    }
+                    picker.widget.find('.datepicker > div').hide().filter('.datepicker-' + dpGlobal.modes[picker.viewMode].clsName).show();
+                },
+
+                attachDatePickerEvents = function () {
+                    var $this, $parent, expanded, closed, collapseData;
+                    picker.widget.on('click', '.datepicker *', $.proxy(click, this)); // this handles date picker clicks
+                    picker.widget.on('click', '[data-action]', $.proxy(doAction, this)); // this handles time picker clicks
+                    picker.widget.on('mousedown', $.proxy(stopEvent, this));
+                    picker.element.on('keydown', $.proxy(keydown, this));
+                    if (picker.options.pickDate && picker.options.pickTime) {
+                        picker.widget.on('click.togglePicker', '.accordion-toggle', function (e) {
+                            e.stopPropagation();
+                            $this = $(this);
+                            $parent = $this.closest('ul');
+                            expanded = $parent.find('.in');
+                            closed = $parent.find('.collapse:not(.in)');
+
+                            if (expanded && expanded.length) {
+                                collapseData = expanded.data('collapse');
+                                if (collapseData && collapseData.transitioning) {
+                                    return;
+                                }
+                                expanded.collapse('hide');
+                                closed.collapse('show');
+                                $this.find('span').toggleClass(picker.options.icons.time + ' ' + picker.options.icons.date);
+                                if (picker.component) {
+                                    picker.component.find('span').toggleClass(picker.options.icons.time + ' ' + picker.options.icons.date);
+                                }
+                            }
+                        });
+                    }
+                    if (picker.isInput) {
+                        picker.element.on({
+                            'click': $.proxy(picker.show, this),
+                            'focus': $.proxy(picker.show, this),
+                            'change': $.proxy(change, this),
+                            'blur': $.proxy(picker.hide, this)
+                        });
+                    } else {
+                        picker.element.on({
+                            'change': $.proxy(change, this)
+                        }, 'input');
+                        if (picker.component) {
+                            picker.component.on('click', $.proxy(picker.show, this));
+                            picker.component.on('mousedown', $.proxy(stopEvent, this));
+                        } else {
+                            picker.element.on('click', $.proxy(picker.show, this));
+                        }
+                    }
+                },
+
+                attachDatePickerGlobalEvents = function () {
+                    $(window).on(
+                            'resize.datetimepicker' + picker.id, $.proxy(place, this));
+                    if (!picker.isInput) {
+                        $(document).on(
+                                'mousedown.datetimepicker' + picker.id, $.proxy(picker.hide, this));
+                    }
+                },
+
+                detachDatePickerEvents = function () {
+                    picker.widget.off('click', '.datepicker *', picker.click);
+                    picker.widget.off('click', '[data-action]');
+                    picker.widget.off('mousedown', picker.stopEvent);
+                    if (picker.options.pickDate && picker.options.pickTime) {
+                        picker.widget.off('click.togglePicker');
+                    }
+                    if (picker.isInput) {
+                        picker.element.off({
+                            'focus': picker.show,
+                            'change': change,
+                            'click': picker.show,
+                            'blur' : picker.hide
+                        });
+                    } else {
+                        picker.element.off({
+                            'change': change
+                        }, 'input');
+                        if (picker.component) {
+                            picker.component.off('click', picker.show);
+                            picker.component.off('mousedown', picker.stopEvent);
+                        } else {
+                            picker.element.off('click', picker.show);
+                        }
+                    }
+                },
+
+                detachDatePickerGlobalEvents = function () {
+                    $(window).off('resize.datetimepicker' + picker.id);
+                    if (!picker.isInput) {
+                        $(document).off('mousedown.datetimepicker' + picker.id);
+                    }
+                },
+
+                isInFixed = function () {
+                    if (picker.element) {
+                        var parents = picker.element.parents(), inFixed = false, i;
+                        for (i = 0; i < parents.length; i++) {
+                            if ($(parents[i]).css('position') === 'fixed') {
+                                inFixed = true;
+                                break;
+                            }
+                        }
+                        return inFixed;
+                    } else {
+                        return false;
+                    }
+                },
+
+                set = function () {
+                    moment.locale(picker.options.language);
+                    var formatted = '';
+                    if (!picker.unset) {
+                        formatted = moment(picker.date).format(picker.format);
+                    }
+                    getPickerInput().val(formatted);
+                    picker.element.data('date', formatted);
+                    if (!picker.options.pickTime) {
+                        picker.hide();
+                    }
+                },
+
+                checkDate = function (direction, unit, amount) {
+                    moment.locale(picker.options.language);
+                    var newDate;
+                    if (direction === 'add') {
+                        newDate = moment(picker.date);
+                        if (newDate.hours() === 23) {
+                            newDate.add(amount, unit);
+                        }
+                        newDate.add(amount, unit);
+                    }
+                    else {
+                        newDate = moment(picker.date).subtract(amount, unit);
+                    }
+                    if (isInDisableDates(moment(newDate.subtract(amount, unit))) || isInDisableDates(newDate)) {
+                        notifyError(newDate.format(picker.format));
+                        return;
+                    }
+
+                    if (direction === 'add') {
+                        picker.date.add(amount, unit);
+                    }
+                    else {
+                        picker.date.subtract(amount, unit);
+                    }
+                    picker.unset = false;
+                },
+
+                isInDisableDates = function (date, timeUnit) {
+                    moment.locale(picker.options.language);
+                    var maxDate = moment(picker.options.maxDate, picker.format, picker.options.useStrict),
+                        minDate = moment(picker.options.minDate, picker.format, picker.options.useStrict);
+
+                    if (timeUnit) {
+                        maxDate = maxDate.endOf(timeUnit);
+                        minDate = minDate.startOf(timeUnit);
+                    }
+
+                    if (date.isAfter(maxDate) || date.isBefore(minDate)) {
+                        return true;
+                    }
+                    if (picker.options.disabledDates === false) {
+                        return false;
+                    }
+                    return picker.options.disabledDates[date.format('YYYY-MM-DD')] === true;
+                },
+                isInEnableDates = function (date) {
+                    moment.locale(picker.options.language);
+                    if (picker.options.enabledDates === false) {
+                        return true;
+                    }
+                    return picker.options.enabledDates[date.format('YYYY-MM-DD')] === true;
+                },
+
+                indexGivenDates = function (givenDatesArray) {
+                    // Store given enabledDates and disabledDates as keys.
+                    // This way we can check their existence in O(1) time instead of looping through whole array.
+                    // (for example: picker.options.enabledDates['2014-02-27'] === true)
+                    var givenDatesIndexed = {}, givenDatesCount = 0, i;
+                    for (i = 0; i < givenDatesArray.length; i++) {
+                        if (moment.isMoment(givenDatesArray[i]) || givenDatesArray[i] instanceof Date) {
+                            dDate = moment(givenDatesArray[i]);
+                        } else {
+                            dDate = moment(givenDatesArray[i], picker.format, picker.options.useStrict);
+                        }
+                        if (dDate.isValid()) {
+                            givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
+                            givenDatesCount++;
+                        }
+                    }
+                    if (givenDatesCount > 0) {
+                        return givenDatesIndexed;
+                    }
+                    return false;
+                },
+
+                padLeft = function (string) {
+                    string = string.toString();
+                    if (string.length >= 2) {
+                        return string;
+                    }
+                    return '0' + string;
+                },
+
+                getTemplate = function () {
+                    var
+                        headTemplate =
+                            '<thead>' +
+                            '<tr>' +
+                            '<th class="prev">&lsaquo;</th><th colspan="' + (picker.options.calendarWeeks ? '6' : '5') + '" class="picker-switch"></th><th class="next">&rsaquo;</th>' +
+                            '</tr>' +
+                            '</thead>',
+                        contTemplate =
+                            '<tbody><tr><td colspan="' + (picker.options.calendarWeeks ? '8' : '7') + '"></td></tr></tbody>',
+                        template = '<div class="datepicker-days">' +
+                            '<table class="table-condensed">' + headTemplate + '<tbody></tbody></table>' +
+                            '</div>' +
+                            '<div class="datepicker-months">' +
+                            '<table class="table-condensed">' + headTemplate + contTemplate + '</table>' +
+                            '</div>' +
+                            '<div class="datepicker-years">' +
+                            '<table class="table-condensed">' + headTemplate + contTemplate + '</table>' +
+                            '</div>',
+                        ret = '';
+                    if (picker.options.pickDate && picker.options.pickTime) {
+                        ret = '<div class="bootstrap-datetimepicker-widget' + (picker.options.sideBySide ? ' timepicker-sbs' : '') + (picker.use24hours ? ' usetwentyfour' : '') + ' dropdown-menu" style="z-index:9999 !important;">';
+                        if (picker.options.sideBySide) {
+                            ret += '<div class="row">' +
+                                '<div class="col-sm-6 datepicker">' + template + '</div>' +
+                                '<div class="col-sm-6 timepicker">' + tpGlobal.getTemplate() + '</div>' +
+                                '</div>';
+                        } else {
+                            ret += '<ul class="list-unstyled">' +
+                                '<li' + (picker.options.collapse ? ' class="collapse in"' : '') + '>' +
+                                '<div class="datepicker">' + template + '</div>' +
+                                '</li>' +
+                                '<li class="picker-switch accordion-toggle"><a class="btn" style="width:100%"><span class="' + picker.options.icons.time + '"></span></a></li>' +
+                                '<li' + (picker.options.collapse ? ' class="collapse"' : '') + '>' +
+                                '<div class="timepicker">' + tpGlobal.getTemplate() + '</div>' +
+                                '</li>' +
+                                '</ul>';
+                        }
+                        ret += '</div>';
+                        return ret;
+                    }
+                    if (picker.options.pickTime) {
+                        return (
+                            '<div class="bootstrap-datetimepicker-widget dropdown-menu">' +
+                            '<div class="timepicker">' + tpGlobal.getTemplate() + '</div>' +
+                            '</div>'
+                            );
+                    }
+                    return (
+                        '<div class="bootstrap-datetimepicker-widget dropdown-menu">' +
+                        '<div class="datepicker">' + template + '</div>' +
+                        '</div>'
+                        );
+                },
+
+                dpGlobal = {
+                    modes: [
+                        {
+                            clsName: 'days',
+                            navFnc: 'month',
+                            navStep: 1
+                        },
+                        {
+                            clsName: 'months',
+                            navFnc: 'year',
+                            navStep: 1
+                        },
+                        {
+                            clsName: 'years',
+                            navFnc: 'year',
+                            navStep: 10
+                        }
+                    ]
+                },
+
+                tpGlobal = {
+                    hourTemplate: '<span data-action="showHours"   data-time-component="hours"   class="timepicker-hour"></span>',
+                    minuteTemplate: '<span data-action="showMinutes" data-time-component="minutes" class="timepicker-minute"></span>',
+                    secondTemplate: '<span data-action="showSeconds"  data-time-component="seconds" class="timepicker-second"></span>'
+                };
+
+            tpGlobal.getTemplate = function () {
+                return (
+                    '<div class="timepicker-picker">' +
+                    '<table class="table-condensed">' +
+                    '<tr>' +
+                    '<td><a href="#" class="btn" data-action="incrementHours"><span class="' + picker.options.icons.up + '"></span></a></td>' +
+                    '<td class="separator"></td>' +
+                    '<td>' + (picker.options.useMinutes ? '<a href="#" class="btn" data-action="incrementMinutes"><span class="' + picker.options.icons.up + '"></span></a>' : '') + '</td>' +
+                    (picker.options.useSeconds ?
+                        '<td class="separator"></td><td><a href="#" class="btn" data-action="incrementSeconds"><span class="' + picker.options.icons.up + '"></span></a></td>' : '') +
+                    (picker.use24hours ? '' : '<td class="separator"></td>') +
+                    '</tr>' +
+                    '<tr>' +
+                    '<td>' + tpGlobal.hourTemplate + '</td> ' +
+                    '<td class="separator">:</td>' +
+                    '<td>' + (picker.options.useMinutes ? tpGlobal.minuteTemplate : '<span class="timepicker-minute">00</span>') + '</td> ' +
+                    (picker.options.useSeconds ?
+                        '<td class="separator">:</td><td>' + tpGlobal.secondTemplate + '</td>' : '') +
+                    (picker.use24hours ? '' : '<td class="separator"></td>' +
+                        '<td><button type="button" class="btn btn-primary" data-action="togglePeriod"></button></td>') +
+                    '</tr>' +
+                    '<tr>' +
+                    '<td><a href="#" class="btn" data-action="decrementHours"><span class="' + picker.options.icons.down + '"></span></a></td>' +
+                    '<td class="separator"></td>' +
+                    '<td>' + (picker.options.useMinutes ? '<a href="#" class="btn" data-action="decrementMinutes"><span class="' + picker.options.icons.down + '"></span></a>' : '') + '</td>' +
+                    (picker.options.useSeconds ?
+                        '<td class="separator"></td><td><a href="#" class="btn" data-action="decrementSeconds"><span class="' + picker.options.icons.down + '"></span></a></td>' : '') +
+                    (picker.use24hours ? '' : '<td class="separator"></td>') +
+                    '</tr>' +
+                    '</table>' +
+                    '</div>' +
+                    '<div class="timepicker-hours" data-action="selectHour">' +
+                    '<table class="table-condensed"></table>' +
+                    '</div>' +
+                    '<div class="timepicker-minutes" data-action="selectMinute">' +
+                    '<table class="table-condensed"></table>' +
+                    '</div>' +
+                    (picker.options.useSeconds ?
+                        '<div class="timepicker-seconds" data-action="selectSecond"><table class="table-condensed"></table></div>' : '')
+                    );
+            };
+
+            picker.destroy = function () {
+                detachDatePickerEvents();
+                detachDatePickerGlobalEvents();
+                picker.widget.remove();
+                picker.element.removeData('DateTimePicker');
+                if (picker.component) {
+                    picker.component.removeData('DateTimePicker');
+                }
+            };
+
+            picker.show = function (e) {
+                if (getPickerInput().prop('disabled')) {
+                    return;
+                }
+                if (picker.options.useCurrent) {
+                    if (getPickerInput().val() === '') {
+                        if (picker.options.minuteStepping !== 1) {
+                            var mDate = moment(),
+                                rInterval = picker.options.minuteStepping;
+                            mDate.minutes((Math.round(mDate.minutes() / rInterval) * rInterval) % 60).seconds(0);
+                            picker.setValue(mDate.format(picker.format));
+                        } else {
+                            picker.setValue(moment().format(picker.format));
+                        }
+                        notifyChange('', e.type);
+                    }
+                }
+                // if this is a click event on the input field and picker is already open don't hide it
+                if (e && e.type === 'click' && picker.isInput && picker.widget.hasClass('picker-open')) {
+                    return;
+                }
+                if (picker.widget.hasClass('picker-open')) {
+                    picker.widget.hide();
+                    picker.widget.removeClass('picker-open');
+                }
+                else {
+                    picker.widget.show();
+                    picker.widget.addClass('picker-open');
+                }
+                picker.height = picker.component ? picker.component.outerHeight() : picker.element.outerHeight();
+                place();
+                picker.element.trigger({
+                    type: 'dp.show',
+                    date: moment(picker.date)
+                });
+                attachDatePickerGlobalEvents();
+                if (e) {
+                    stopEvent(e);
+                }
+            };
+
+            picker.disable = function () {
+                var input = getPickerInput();
+                if (input.prop('disabled')) {
+                    return;
+                }
+                input.prop('disabled', true);
+                detachDatePickerEvents();
+            };
+
+            picker.enable = function () {
+                var input = getPickerInput();
+                if (!input.prop('disabled')) {
+                    return;
+                }
+                input.prop('disabled', false);
+                attachDatePickerEvents();
+            };
+
+            picker.hide = function () {
+                // Ignore event if in the middle of a picker transition
+                var collapse = picker.widget.find('.collapse'), i, collapseData;
+                for (i = 0; i < collapse.length; i++) {
+                    collapseData = collapse.eq(i).data('collapse');
+                    if (collapseData && collapseData.transitioning) {
+                        return;
+                    }
+                }
+                picker.widget.hide();
+                picker.widget.removeClass('picker-open');
+                picker.viewMode = picker.startViewMode;
+                showMode();
+                picker.element.trigger({
+                    type: 'dp.hide',
+                    date: moment(picker.date)
+                });
+                detachDatePickerGlobalEvents();
+            };
+
+            picker.setValue = function (newDate) {
+                moment.locale(picker.options.language);
+                if (!newDate) {
+                    picker.unset = true;
+                    set();
+                } else {
+                    picker.unset = false;
+                }
+                if (!moment.isMoment(newDate)) {
+                    newDate = (newDate instanceof Date) ? moment(newDate) : moment(newDate, picker.format, picker.options.useStrict);
+                } else {
+                    newDate = newDate.locale(picker.options.language);
+                }
+                if (newDate.isValid()) {
+                    picker.date = newDate;
+                    set();
+                    picker.viewDate = moment({y: picker.date.year(), M: picker.date.month()});
+                    fillDate();
+                    fillTime();
+                }
+                else {
+                    notifyError(newDate);
+                }
+            };
+
+            picker.getDate = function () {
+                if (picker.unset) {
+                    return null;
+                }
+                return moment(picker.date);
+            };
+
+            picker.setDate = function (date) {
+                var oldDate = moment(picker.date);
+                if (!date) {
+                    picker.setValue(null);
+                } else {
+                    picker.setValue(date);
+                }
+                notifyChange(oldDate, 'function');
+            };
+
+            picker.setDisabledDates = function (dates) {
+                picker.options.disabledDates = indexGivenDates(dates);
+                if (picker.viewDate) {
+                    update();
+                }
+            };
+
+            picker.setEnabledDates = function (dates) {
+                picker.options.enabledDates = indexGivenDates(dates);
+                if (picker.viewDate) {
+                    update();
+                }
+            };
+
+            picker.setMaxDate = function (date) {
+                if (date === undefined) {
+                    return;
+                }
+                if (moment.isMoment(date) || date instanceof Date) {
+                    picker.options.maxDate = moment(date);
+                } else {
+                    picker.options.maxDate = moment(date, picker.format, picker.options.useStrict);
+                }
+                if (picker.viewDate) {
+                    update();
+                }
+            };
+
+            picker.setMinDate = function (date) {
+                if (date === undefined) {
+                    return;
+                }
+                if (moment.isMoment(date) || date instanceof Date) {
+                    picker.options.minDate = moment(date);
+                } else {
+                    picker.options.minDate = moment(date, picker.format, picker.options.useStrict);
+                }
+                if (picker.viewDate) {
+                    update();
+                }
+            };
+
+            init();
+        };
+
+    $.fn.datetimepicker = function (options) {
+        return this.each(function () {
+            var $this = $(this),
+                data = $this.data('DateTimePicker');
+            if (!data) {
+                $this.data('DateTimePicker', new DateTimePicker(this, options));
+            }
+        });
+    };
+
+    $.fn.datetimepicker.defaults = {
+        format: false,
+        pickDate: true,
+        pickTime: true,
+        useMinutes: true,
+        useSeconds: false,
+        useCurrent: true,
+        calendarWeeks: false,
+        minuteStepping: 1,
+        minDate: moment({y: 1900}),
+        maxDate: moment().add(100, 'y'),
+        showToday: true,
+        collapse: true,
+        language: moment.locale(),
+        defaultDate: '',
+        disabledDates: false,
+        enabledDates: false,
+        icons: {},
+        useStrict: false,
+        direction: 'auto',
+        sideBySide: false,
+        daysOfWeekDisabled: [],
+        widgetParent: false
+    };
+}));


[30/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/finalcoord.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/finalcoord.cup b/datacat/cup_flex/finalcoord.cup
new file mode 100644
index 0000000..12025ec
--- /dev/null
+++ b/datacat/cup_flex/finalcoord.cup
@@ -0,0 +1,129 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp2, inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:Input: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= 
+inp2
+inp3 
+INPUT4
+inp5
+inp6
+inp7
+;
+
+
+inp2 ::= INPUT2:in2
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  center number "+in2);
+ :}
+ ;
+
+
+inp3 ::= INPUT3:in3
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3); 
+ :}
+ ;
+
+inp5 ::= INPUT5:in5
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+ :}
+ ;
+
+inp6 ::= INPUT6:in6
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+ :}
+ ;
+
+inp7 ::= INPUT7:in7
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/finalcoord.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/finalcoord.flex b/datacat/cup_flex/finalcoord.flex
new file mode 100644
index 0000000..a173bab
--- /dev/null
+++ b/datacat/cup_flex/finalcoord.flex
@@ -0,0 +1,151 @@
+import java_cup.runtime.*;
+
+%%
+
+%class FinalCoordLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+FinalCoordCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {FinalCoordCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Stationary point found" {
+	   yybegin(ITER);
+	   return new Symbol(FinalCoordSym.FOUNDITER); 
+  }
+   "Z-Matrix orientation:" {
+           yybegin(ITER);
+           return new Symbol(FinalCoordSym.FOUNDITER);
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+            yybegin(INPUTF);
+            return new Symbol(FinalCoordSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(FinalCoordSym.SCFDONE);}
+
+  "Standard orientation:" {
+             yybegin(IGNOREALL);
+      return new Symbol(FinalCoordSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+  yybegin (INPUT);
+   return new Symbol(FinalCoordSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  yybegin (INPUTA);
+   return new Symbol(FinalCoordSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+  yybegin (ITER);
+   return new Symbol(FinalCoordSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  yybegin (INPUTB);
+   return new Symbol(FinalCoordSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  yybegin (INPUTC);
+   return new Symbol(FinalCoordSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  yybegin (INPUTD);
+   return new Symbol(FinalCoordSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  yybegin (INPUTE);
+   return new Symbol(FinalCoordSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  yybegin (INPUT);
+   return new Symbol(FinalCoordSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/g1.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/g1.cup b/datacat/cup_flex/g1.cup
new file mode 100644
index 0000000..4ff460a
--- /dev/null
+++ b/datacat/cup_flex/g1.cup
@@ -0,0 +1,166 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER1, SCFDONE1, NSearch1, Energ1, MaxGrad1, RmsGrad1;
+terminal           MPStart, NMP, MPEnerg, MPMax, MPRms, MPDONE;
+terminal Integer     ITERATION1, MPITER;
+terminal Float     ENERGY1, MGRAD1, RGRAD1, MPENERGY, MPMGRAD, MPRGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal mp2, mpintro, mppat, mpcycle, mpcycle1, force1, force2;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+           SCFDONE1
+           mp2
+            MPDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER1 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+// Originally:  SCFDONE1 
+;
+
+scfcycle ::= Energ1 ENERGY1:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= NSearch1 ITERATION1:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+grad1
+grad2
+ ;
+
+grad1 ::= MaxGrad1  MGRAD1:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad1  RGRAD1:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;
+
+mp2 ::= mpintro mppat
+{:
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ :}
+;
+
+mpintro ::=
+MPStart
+{:
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ :}
+;
+
+mppat ::= mppat mpcycle1
+{:
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ :}
+|
+mpcycle1
+;
+
+mpcycle1 ::= MPEnerg MPENERGY:mpen
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+ :}
+mpcycle
+;
+
+
+mpcycle ::= NMP MPITER:it
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+ :}
+force1
+force2
+;
+
+force1 ::= MPMax  MPMGRAD:mpmg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+ :}
+;
+ 
+force2 ::= MPRms  MPRGRAD:mprg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/g1.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/g1.flex b/datacat/cup_flex/g1.flex
new file mode 100644
index 0000000..2fde6b4
--- /dev/null
+++ b/datacat/cup_flex/g1.flex
@@ -0,0 +1,218 @@
+import java_cup.runtime.*;
+
+%%
+
+%class G1Lexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state MP2
+%state MPOPT
+%state FLOATMP1
+%state FLOATMP2
+%state FLOATMP3
+%state IGNOREALL
+%state INTMP
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("G1lex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(G1Sym.FOUNDITER1); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(G1Sym.NSearch1);}
+
+  "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(G1Sym.Energ1);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(G1Sym.MaxGrad1);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(G1Sym.RmsGrad1);}
+
+
+  "Optimization completed" {
+if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, THE_END_OF_FILE");
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.ENERGY1, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1lex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.MGRAD1, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.RGRAD1, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(G1Sym.ITERATION1, new Integer(yytext()));
+}
+}
+
+<MP2>{
+  "MP2(Full)/6-31G(d)" {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(G1Sym.MPStart);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: MPStart, THE_END_OF_FILE");
+     yybegin(MPOPT);
+      return new Symbol(G1Sym.MPStart);}
+  }
+
+
+<MPOPT>{
+
+   "Step number" {
+if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(G1Sym.NMP);}
+
+  "EUMP2 = " {
+       if (Settings.DEBUG) System.out.println("G1Flex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(G1Sym.MPEnerg);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(G1Sym.MPMax);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(G1Sym.MPRms);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: MPDONE, THE_END_OF_FILE");
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);}
+
+  .|\n {}
+  }
+
+
+<FLOATMP1>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPENERGY, new Float(yytext()));}
+}
+
+<FLOATMP2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPMGRAD, new Float(yytext()));}
+}
+
+<FLOATMP3>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPRGRAD, new Float(yytext()));}
+}
+
+<INTMP>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(G1Sym.MPITER, new Integer(yytext()));}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gaussian.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gaussian.cup b/datacat/cup_flex/gaussian.cup
new file mode 100644
index 0000000..0455bba
--- /dev/null
+++ b/datacat/cup_flex/gaussian.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP  RUNTYP1
+   {: if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); :}
+
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gaussian.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gaussian.flex b/datacat/cup_flex/gaussian.flex
new file mode 100644
index 0000000..5781d44
--- /dev/null
+++ b/datacat/cup_flex/gaussian.flex
@@ -0,0 +1,267 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GaussianLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "----------------------" {
+    if (Settings.DEBUG) System.out.println("GaussianFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(GaussianSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "opt " {
+  if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP); 
+    }
+
+  "MP2" {  
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+   
+  "MP4" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP4");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+   "RHF" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+
+   "hf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found hf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+ 
+   "rhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+   "uhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+    "G1" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    } 
+
+/*
+ "---------------------------------------" {
+   yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.SCFDONE);
+   } */
+}
+
+
+ 
+<ITER1> {
+  "opt" {
+  if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+  "MP2" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+   "RHF" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "hf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+   "rhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+   "uhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "scf=" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found scf=");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "geom" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found geom");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+"----------------------" {
+   yybegin(IGNOREALL);
+    return new Symbol(GaussianSym.SCFDONE);
+   }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gfinalcoord.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gfinalcoord.cup b/datacat/cup_flex/gfinalcoord.cup
new file mode 100644
index 0000000..f5030fd
--- /dev/null
+++ b/datacat/cup_flex/gfinalcoord.cup
@@ -0,0 +1,113 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+:}
+
+
+
+
+terminal       INPUT1, INPUT2,    FOUNDITER, SCFDONE;
+terminal Float     INPUT3, INPUT4, INPUT5, INPUT6;
+non terminal  startpt, scfintro, scfpat, scfcycle, inp3, inp4, inp5, inp6;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+	
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   INPUT1
+;
+
+scfpat ::= scfpat scfcycle
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INPUT2
+inp3 inp4 inp5 inp6
+;
+
+
+
+
+inp3 ::= 
+INPUT3:e 
+ ;
+
+inp4 ::=
+INPUT4:e4
+ ;
+
+inp5 ::=
+INPUT5:e5
+ ;
+
+inp6 ::=
+INPUT6:e6
+ ;
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gfinalcoord.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gfinalcoord.flex b/datacat/cup_flex/gfinalcoord.flex
new file mode 100644
index 0000000..86f8f45
--- /dev/null
+++ b/datacat/cup_flex/gfinalcoord.flex
@@ -0,0 +1,131 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GFinalCoordLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+GFinalCoordCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {GFinalCoordCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "COORDINATES (BOHR)" {
+	   yybegin(ITER);
+	   return new Symbol(GFinalCoordSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "CHARGE         X                   Y                   Z" {
+            yybegin(INPUT);
+            return new Symbol(GFinalCoordSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(GFinalCoordSym.SCFDONE);}
+
+   "---------------------" {
+             yybegin(IGNOREALL);
+      return new Symbol(GFinalCoordSym.SCFDONE);}
+
+
+  .|\n {}
+
+}
+
+
+<INPUT> {
+   {dec_int_id} {
+  yybegin (INPUTA);
+   return new Symbol(GFinalCoordSym.INPUT2);
+}
+
+  "INTERNUCLEAR DISTANCES"
+   {
+  yybegin (IGNOREALL);
+   return new Symbol(GFinalCoordSym.SCFDONE);
+}
+
+}
+
+
+<INPUTA> {
+   {FLOAT} {
+  yybegin (INPUTB);
+   return new Symbol(GFinalCoordSym.INPUT3, new Float(yytext()));
+}
+}
+
+<INPUTB> {
+   {FLOAT} {
+  yybegin (INPUTC);
+   return new Symbol(GFinalCoordSym.INPUT4, new Float(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  yybegin (INPUTD);
+   return new Symbol(GFinalCoordSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  yybegin (INPUT);
+   return new Symbol(GFinalCoordSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmcscfa.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmcscfa.cup b/datacat/cup_flex/gmcscfa.cup
new file mode 100644
index 0000000..01c2dae
--- /dev/null
+++ b/datacat/cup_flex/gmcscfa.cup
@@ -0,0 +1,131 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+:}
+
+
+
+
+terminal            FOUNDITER, SCFDONE;
+terminal Integer     INT1, INT2, INT3, INTCycle;
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY, FLOAT4;
+non terminal  startpt, scfintro, scfpat, scfcycle, en;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INTCycle:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ :}
+en
+FLOAT1 FLOAT2 FLOAT3 INT1 FLOAT4
+;
+
+
+
+
+en ::= 
+ENERGY:e 
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e); 
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmcscfa.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmcscfa.flex b/datacat/cup_flex/gmcscfa.flex
new file mode 100644
index 0000000..13d36ac
--- /dev/null
+++ b/datacat/cup_flex/gmcscfa.flex
@@ -0,0 +1,150 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GMCSCFaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER8
+%state DASH
+%state INTVALUE
+%state FLOATVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ITER     TOTAL ENERGY        DEL(E)    LAG.ASYMM.  SQCDF  MICIT   DAMP" {
+    if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found START OF");
+	   yybegin(ITER);
+	   return new Symbol(GMCSCFaSym.FOUNDITER); 
+  }
+  .|\n {}
+}
+
+
+<ITER>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+   return new Symbol(GMCSCFaSym.INTCycle, new Integer(yytext()));}
+
+  "-----------------" {
+       if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the dash");
+               yybegin(DASH);}
+
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GMCSCFaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GMCSCFaSym.FLOAT1);
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GMCSCFaSym.FLOAT2);
+}
+}
+
+ 
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float3");
+     yybegin(ITER2);
+      return new Symbol(GMCSCFaSym.FLOAT3);}
+  .|\n {}
+}
+
+
+<ITER2>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER8); 
+      return new Symbol(GMCSCFaSym.INT1, new Integer(yytext()));} 
+}
+
+<ITER8>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float4");
+     yybegin(ITER);
+      return new Symbol(GMCSCFaSym.FLOAT4);}
+  .|\n {}
+}
+
+
+<FLOATVALUE>{
+
+  .|\n {if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found new line");}
+  {INT} {
+   if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float value");
+  yybegin(ITER); }
+  "-----------------" {
+               yybegin(DASH);
+  }
+}
+
+<DASH>{
+ "LAGRANGIAN CONVERGED" {
+  yybegin(IGNOREALL);
+  return new Symbol(GMCSCFaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmp2opt.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmp2opt.flex b/datacat/cup_flex/gmp2opt.flex
new file mode 100644
index 0000000..cbd8ba8
--- /dev/null
+++ b/datacat/cup_flex/gmp2opt.flex
@@ -0,0 +1,133 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GMP2OPTLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("GOPTFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(GOPTSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+  "EUMP2 =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+   "EMP2 =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(GOPTSym.MaxGrad);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(GOPTSym.RmsGrad);}
+
+  "THE_END_OF_FILE" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.ENERGY, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.MGRAD, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.RGRAD, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("GOPTFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(GOPTSym.ITERATION, new Integer(yytext()));
+}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gnumatom.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gnumatom.cup b/datacat/cup_flex/gnumatom.cup
new file mode 100644
index 0000000..4264936
--- /dev/null
+++ b/datacat/cup_flex/gnumatom.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:GNUMatom:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP 
+   {: if (DEBUG) System.out.println("CUP:GNUMatom:  found FOUNDITER "); :}
+
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gnumatom.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gnumatom.flex b/datacat/cup_flex/gnumatom.flex
new file mode 100644
index 0000000..410e21a
--- /dev/null
+++ b/datacat/cup_flex/gnumatom.flex
@@ -0,0 +1,71 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GNumAtomLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "TOTAL NUMBER OF ATOMS                        =" {
+    if (Settings.DEBUG) System.out.println("GNumAtomFlex: Found Gamess Version");
+           yybegin(ITER);
+	   return new Symbol(GNumAtomSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  {dec_int_lit} {
+  if  (Settings.DEBUG) System.out.println("GNumAtomFlex: Found total # of atoms ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(GNumAtomSym.RUNTYP); 
+    } 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gopt.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gopt.cup b/datacat/cup_flex/gopt.cup
new file mode 100644
index 0000000..97341c4
--- /dev/null
+++ b/datacat/cup_flex/gopt.cup
@@ -0,0 +1,120 @@
+package org.gridchem.client;
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE, NSearch, Energ, MaxGrad, RmsGrad;
+terminal Integer     ITERATION;
+terminal Float     ENERGY, MGRAD, RGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= Energ ENERGY:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+|
+cycle 
+;
+
+
+
+
+cycle ::= NSearch ITERATION:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+|
+grad1
+|
+grad2
+ ;
+
+grad1 ::= MaxGrad  MGRAD:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad  RGRAD:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gopt.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gopt.flex b/datacat/cup_flex/gopt.flex
new file mode 100644
index 0000000..adee9aa
--- /dev/null
+++ b/datacat/cup_flex/gopt.flex
@@ -0,0 +1,197 @@
+package org.gridchem.client;
+import java_cup.runtime.*;
+import java.io.*;
+import org.gridchem.client.common.*;
+%%
+
+%class GOPTLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}?+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("GOPTFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(GOPTSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+
+  "NUMERICALLY ESTIMATING GRADIENTS ITERATION"
+  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+  "CCSD(T)=" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+  "SCF Done:  E(CRHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+ "SCF Done:  E(UHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+ "SCF Done:  E(RB+HF-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(RB-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+   
+   
+ "SCF Done:  E(RB+HF-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB-B95) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-B95) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+
+
+
+
+   "( 1)     EIGENVALUE  " {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(GOPTSym.MaxGrad);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(GOPTSym.RmsGrad);}
+
+
+  "THE_END_OF_FILE" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.ENERGY, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.MGRAD, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.RGRAD, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("GOPTFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(GOPTSym.ITERATION, new Integer(yytext()));
+}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gscfa.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gscfa.cup b/datacat/cup_flex/gscfa.cup
new file mode 100644
index 0000000..9d0ed8b
--- /dev/null
+++ b/datacat/cup_flex/gscfa.cup
@@ -0,0 +1,132 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+:}
+
+
+
+
+terminal            FOUNDITER, SCFDONE;
+terminal Integer     INT1, INT2, INT3, INTCycle;
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY;
+non terminal  startpt, scfintro, scfpat, scfcycle, en;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INTCycle:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ :}
+INT1 INT2
+en
+FLOAT1 FLOAT2 FLOAT3
+;
+
+
+
+
+en ::= 
+ENERGY:e 
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e); 
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gscfa.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gscfa.flex b/datacat/cup_flex/gscfa.flex
new file mode 100644
index 0000000..47d9019
--- /dev/null
+++ b/datacat/cup_flex/gscfa.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GSCFaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER3
+%state DASH
+%state INTVALUE
+%state FLOATVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR" {
+    if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+	   yybegin(ITER);
+	   return new Symbol(GSCFaSym.FOUNDITER); 
+  }
+
+ "ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE     ORB. GRAD" {
+    if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+           yybegin(ITER);
+           return new Symbol(GSCFaSym.FOUNDITER);
+  }
+
+  .|\n {}
+}
+
+<ITER>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER2);
+   return new Symbol(GSCFaSym.INTCycle, new Integer(yytext()));}
+
+  "-----------------" {
+       if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the dash");
+               yybegin(DASH);}
+  .|\n {}
+
+}
+
+<ITER2>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER3); 
+      return new Symbol(GSCFaSym.INT1, new Integer(yytext()));} 
+}
+
+<ITER3>{
+  {dec_int_lit} {
+  if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the third integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+    return new Symbol(GSCFaSym.INT2, new Integer(yytext()));} 
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GSCFaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GSCFaSym.FLOAT1); 
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GSCFaSym.FLOAT2);
+}
+}
+
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float3");
+     yybegin(ITER);
+      return new Symbol(GSCFaSym.FLOAT3);} 
+  .|\n {}   
+}
+
+<FLOATVALUE>{
+  .|\n {if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found new line");}
+  {INT} {
+   if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float value");
+  yybegin(ITER); }
+  "-----------------" {
+               yybegin(DASH);
+  }
+}
+
+<DASH>{
+ "DENSITY CONVERGED" {
+  yybegin(IGNOREALL);
+  return new Symbol(GSCFaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gvb.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gvb.cup b/datacat/cup_flex/gvb.cup
new file mode 100644
index 0000000..1f541ad
--- /dev/null
+++ b/datacat/cup_flex/gvb.cup
@@ -0,0 +1,132 @@
+import java_cup.runtime.*; 
+import javax.swing.*; 
+import java.util.*; 
+import java.io.*;  
+ 
+ 
+ 
+/* 
+OUTPUT FORMAT:____________________________________________________________ 
+          -------------------------- 
+                 RHF SCF CALCULATION 
+          -------------------------- 
+  
+     NUCLEAR ENERGY =         6.1221376700 
+     MAXIT =   30     NPUNCH=    2 
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F 
+     DENSITY CONV=  1.00E-05 
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS. 
+  
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR 
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000 
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000 
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000 
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000 
+ 
+TO MONITOR:____________________________________________________________ 
+ iteration, energy 
+ 
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________ 
+ 
+ 
+//add to CUP$SCFaParser$actions 
+public ParseSCF2 parseSCF; 
+ 
+//add to the constructor of CUP$SCFaParser$actions 
+ parseSCF = new ParseSCF2(); 
+ 
+*/ 
+ 
+action code {:  
+  //__________________________________ 
+  public static boolean DEBUG = true; 
+  private static JTable table;                
+  private static final String tableLabel = "SCF Intermediate Results:"; 
+// private static String cycle = "0"; 
+  
+   
+  public static JTable getTable() { 
+    return table; 
+  } 
+ 
+  public static String getTableLabel() { 
+    return tableLabel; 
+  } 
+ 
+/*  public static void main(String[] args) throws IOException { 
+     File temp = new File("temporary"); 
+     boolean append = true; 
+     try{  
+     FileWriter temp1 = new FileWriter(temp, append); 
+     PrintWriter temp2 = new PrintWriter(temp1);} 
+ 
+     catch (FileNotFoundException e)  { 
+          System.out.println("no file, dude!"); 
+       }  */ 
+//   } 
+:} 
+ 
+ 
+ 
+ 
+terminal            FOUNDITER, SCFDONE; 
+terminal Integer     INT1, INT2, INT3, INTCycle; 
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY, FLOAT4; 
+non terminal  startpt, scfintro, scfpat, scfcycle, en; 
+ 
+ 
+ 
+ 
+/* ___________ 
+   The grammer */ 
+ 
+startpt ::= scfintro 
+           scfpat  
+            SCFDONE 
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree ");  
+ 	       table = new JTable(); 
+	 
+//       table = parseSCF.getTable(); 
+ 	     :} 
+             ; 
+ 
+ 
+ 
+ 
+scfintro ::= 
+   FOUNDITER  
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :} 
+; 
+ 
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :} 
+   | 
+   scfcycle 
+; 
+ 
+scfcycle ::= 
+INTCycle:c 
+{: //___________________________________________________________________ 
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c); 
+//  temp2.print(c); 
+//   temp2.print(" ");  
+//  cycle = c; 
+  
+//  parseSCF.putField("iteration "+cycle, cycle); 
+ :}
+INT1 
+en 
+FLOAT1 FLOAT2 FLOAT3  
+; 
+ 
+ 
+ 
+ 
+en ::=  
+ENERGY:e  
+{: //___________________________________________________________________ 
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e);  
+//   temp2.println(e); 
+//  parseSCF.putField("iteration "+cycle, "energy", e); 
+ :} 
+ ; 

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gvb.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gvb.flex b/datacat/cup_flex/gvb.flex
new file mode 100644
index 0000000..d473095
--- /dev/null
+++ b/datacat/cup_flex/gvb.flex
@@ -0,0 +1,145 @@
+import java_cup.runtime.*; 
+ 
+%% 
+ 
+%class GVBLexer 
+%public 
+%unicode 
+%cup  
+%cupdebug  
+%state SCF1 
+%state ITER 
+%state ITER2 
+%state ITER8 
+%state DASH 
+%state INTVALUE 
+%state FLOATVALUE 
+%state ITER4 
+%state ITER5 
+%state ITER6 
+%state ITER7 
+%state IGNOREALL 
+%standalone 
+%8bit 
+ 
+/* ___________________________________________ 
+   Copied verbatim into generated lexer class: 
+*/ 
+%{ 
+  public static boolean DEBUG = false; 
+%} 
+ 
+LineTerminator = \r|\n|\r\n  
+InputCharacter = [^\r\n] 
+WhiteSpace     = {LineTerminator} | [ \t\f]  
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment} 
+TraditionalComment = "/*" [^*] ~"*/" 
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator} 
+DocumentationComment = "/**" {CommentContent} "*"+ "/" 
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */ 
+Identifier = [:jletter:] [:jletterdigit:]* 
+dec_int_lit    = 0 | [1-9][0-9]*  
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]*  
+DIGIT          = [0-9] 
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+ 
+INT            = [+|-]?{DIGIT}+ 
+BOOL           = [T|F] 
+EQ             = "=" 
+STRING         = [A-Z]+ 
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+ 
+ 
+%% 
+ 
+<YYINITIAL>{ 
+  "ITER EX     TOTAL ENERGY       E CHANGE        SQCDF       ORB. GRAD" { 
+    if (Settings.DEBUG) System.out.println("GVBFlex: Found START OF"); 
+	   yybegin(ITER); 
+	   return new Symbol(GVBSym.FOUNDITER);  
+  } 
+  .|\n {} 
+} 
+ 
+ 
+<ITER>{ 
+  {dec_int_lit} { 
+     if (Settings.DEBUG) System.out.println("GVBFlex: Found the first integer in the iteration"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER2); 
+   return new Symbol(GVBSym.INTCycle, new Integer(yytext()));} 
+ 
+  "-----------------" { 
+       if (Settings.DEBUG) System.out.println("GVBFlex: Found the dash"); 
+               yybegin(DASH);} 
+ 
+}
+
+<ITER2>{                                                                                   {dec_int_lit} {                                                                             if (Settings.DEBUG) System.out.println("GVBFlex: Found the second integer in the iteration");                                                                                     if (Settings.DEBUG) System.out.println(yytext());                                        yybegin(ITER4);                                                                           return new Symbol(GVBSym.INT1, new Integer(yytext()));}                            }               
+ 
+<ITER4>{ 
+  {FLOAT} { 
+   if (Settings.DEBUG) System.out.println("GVBFlex: Found the energy"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER5); 
+   return new Symbol(GVBSym.ENERGY, new Float(yytext()));} 
+} 
+ 
+<ITER5>{ 
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GVBFlex: ITER5"); 
+   if (Settings.DEBUG) System.out.println("GVBFlex: Found float1"); 
+   yybegin (ITER6); 
+    return new Symbol(GVBSym.FLOAT1); 
+} 
+} 
+ 
+<ITER6>{ 
+  {FLOAT} { 
+  if  (Settings.DEBUG) System.out.println("GVBFlex: Found float2"); 
+  yybegin (ITER7); 
+   return new Symbol(GVBSym.FLOAT2); 
+} 
+} 
+ 
+  
+<ITER7>{ 
+  {FLOAT} { 
+     if  (Settings.DEBUG) System.out.println("GVBFlex: Found float3"); 
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT3);} 
+  .|\n {} 
+} 
+ 
+ 
+ 
+<ITER8>{ 
+  {FLOAT} { 
+     if  (Settings.DEBUG) System.out.println("GVBFlex: Found float4"); 
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT4);} 
+  .|\n {} 
+} 
+ 
+ 
+<FLOATVALUE>{ 
+ 
+  .|\n {if  (Settings.DEBUG) System.out.println("GVBFlex: Found new line");} 
+  {INT} { 
+   if  (Settings.DEBUG) System.out.println("GVBFlex: Found float value"); 
+  yybegin(ITER); } 
+  "-----------------" { 
+               yybegin(DASH); 
+  } 
+} 
+ 
+<DASH>{ 
+ "DENSITY CONVERGED" { 
+  yybegin(IGNOREALL); 
+  return new Symbol(GVBSym.SCFDONE); 
+  } 
+ .|\n {}  
+} 
+ 
+<IGNOREALL>{ 
+  .|\n {} 
+} 
+ 
+.|\n {} 

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/hf.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/hf.flex b/datacat/cup_flex/hf.flex
new file mode 100644
index 0000000..3851a11
--- /dev/null
+++ b/datacat/cup_flex/hf.flex
@@ -0,0 +1,104 @@
+/* HF Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000445.htm
+*/
+
+
+ 
+%%
+
+
+
+%class HF
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/* __________________
+   Examples, Energies */
+
+<YYINITIAL>{
+  "E(RHF)" {
+            yybegin(FLOATVAL);
+  }
+  "A.U. after" {}
+  "cycles" {}
+  "Convg" {
+           yybegin(FLOATVAL);
+  }
+  "-V/T" {
+          yybegin(FLOATVAL);
+  }
+  "S**2" {
+          yybegin(FLOATVAL);
+  }
+  {INT} {}
+  .|\n {}
+}
+
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/input.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/input.cup b/datacat/cup_flex/input.cup
new file mode 100644
index 0000000..e7571a9
--- /dev/null
+++ b/datacat/cup_flex/input.cup
@@ -0,0 +1,123 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:Input: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= INPUT2
+inp3 
+INPUT4
+inp5
+inp6
+inp7
+;
+
+
+
+
+inp3 ::= INPUT3:in3
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3); 
+ :}
+ ;
+
+inp5 ::= INPUT5:in5
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+ :}
+ ;
+
+inp6 ::= INPUT6:in6
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+ :}
+ ;
+
+inp7 ::= INPUT7:in7
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/input.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/input.flex b/datacat/cup_flex/input.flex
new file mode 100644
index 0000000..f5ec939
--- /dev/null
+++ b/datacat/cup_flex/input.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class InputLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(InputSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Input Orientation");
+            yybegin(INPUTF);
+            return new Symbol(InputSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(InputSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the first dash");
+  yybegin (INPUT);
+   return new Symbol(InputSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer1 in input");
+  yybegin (INPUTA);
+   return new Symbol(InputSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the second dash");
+  yybegin (ITER);
+   return new Symbol(InputSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer2 in input");
+  yybegin (INPUTB);
+   return new Symbol(InputSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer3 in input");
+  yybegin (INPUTC);
+   return new Symbol(InputSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found x coord. in input");
+  yybegin (INPUTD);
+   return new Symbol(InputSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found y coord. in input");
+  yybegin (INPUTE);
+   return new Symbol(InputSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found z coord. in input");
+  yybegin (INPUT);
+   return new Symbol(InputSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/inputm.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/inputm.flex b/datacat/cup_flex/inputm.flex
new file mode 100644
index 0000000..ceb8ff3
--- /dev/null
+++ b/datacat/cup_flex/inputm.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class InputMLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(InputSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Input Orientation");
+            yybegin(INPUTF);
+            return new Symbol(InputSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(InputSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the first dash");
+  yybegin (INPUT);
+   return new Symbol(InputSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer1 in input");
+  yybegin (INPUTA);
+   return new Symbol(InputSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the second dash");
+  yybegin (ITER);
+   return new Symbol(InputSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer2 in input");
+  yybegin (INPUTB);
+   return new Symbol(InputSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer3 in input");
+  yybegin (INPUTC);
+   return new Symbol(InputSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found x coord. in input");
+  yybegin (INPUTD);
+   return new Symbol(InputSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found y coord. in input");
+  yybegin (INPUTE);
+   return new Symbol(InputSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found z coord. in input");
+  yybegin (INPUT);
+   return new Symbol(InputSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/method.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/method.cup b/datacat/cup_flex/method.cup
new file mode 100644
index 0000000..f40705d
--- /dev/null
+++ b/datacat/cup_flex/method.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP 
+   {: if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); :}
+
+;


[18/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChIGenerator.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChIGenerator.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChIGenerator.java
new file mode 100644
index 0000000..145effe
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChIGenerator.java
@@ -0,0 +1,95 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.inchi;
+
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class InChIGenerator {
+
+    private String filePrefix;
+
+    public InChIGenerator(String filePrefix) {
+        this.filePrefix = filePrefix;
+    }
+
+    private BufferedReader runInChI(String molfile) throws IOException {
+        String[] command = {
+                "/bin/sh",
+                "-c",
+                "echo \"" + molfile + "\" | ./inchi-1 -STDIO -AuxNone -NoLabels -Key 2>/dev/null"
+        };
+        Process inchi = Runtime.getRuntime().exec(command);
+        try {
+            inchi.waitFor();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        return new BufferedReader(new InputStreamReader(inchi.getInputStream()));
+    }
+
+    public InChI getInChI() throws IOException {
+        convertGaussian2Mol();
+        String molfile = readFile(GridChemProperties.getInstance().getProperty(
+                Constants.TMP_DIR,"") + "/" + filePrefix + ".mol");
+        BufferedReader input = runInChI(molfile);
+
+        String result = input.readLine();
+        String inchiStr = result == null ? "" : result;
+
+        result = input.readLine();
+        String inchiKey = result == null ? "" : result.substring(9);
+        InChI inChI = new InChI(inchiStr, inchiKey);
+        input.close();
+
+        return inChI;
+    }
+
+    private void convertGaussian2Mol() throws IOException {
+        Process inchi = Runtime.getRuntime().exec("babel -i g09 "
+                + GridChemProperties.getInstance().getProperty(Constants.TMP_DIR,"") + "/" + filePrefix + ".out -o mol "
+                + GridChemProperties.getInstance().getProperty(Constants.TMP_DIR,"") + "/" + filePrefix + ".mol\n");
+        try {
+            inchi.waitFor();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private String readFile(String filename) throws IOException {
+        BufferedReader in = new BufferedReader(new FileReader(filename));
+        String str = "";
+        String molfile = "";
+
+        while ((str = in.readLine()) != null) {
+            molfile = molfile + str + "\n";
+        }
+
+        in.close();
+
+        return molfile;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputLexer.java
new file mode 100644
index 0000000..0fbf3ff
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputLexer.java
@@ -0,0 +1,799 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.input;/* The following code was generated by JFlex 1.4.3 on 9/11/14 6:37 PM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 6:37 PM from the specification file
+ * <tt>input.flex</tt>
+ */
+public class InputLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int INPUTF = 30;
+  public static final int ITER2 = 4;
+  public static final int INPUTE = 28;
+  public static final int INPUTD = 26;
+  public static final int INPUTC = 24;
+  public static final int INPUTB = 22;
+  public static final int INPUTA = 20;
+  public static final int INTVALUE = 8;
+  public static final int INPUT = 18;
+  public static final int IGNOREALL = 16;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 
+     2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  9, 9
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0, 31,  3,  0, 
+     1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0, 27, 25,  4,  0, 24, 29,  0,  0, 30,  0,  5, 28, 
+     0,  0,  0,  0, 23,  0,  0,  0, 20, 21, 22,  0,  0,  0,  0, 26, 
+     0,  0,  8,  0,  0,  9, 13,  0, 19, 17,  0,  0,  0,  7, 18, 12, 
+    16,  0, 10, 14, 15,  6,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\12\0\4\1\1\2\2\1\1\3\1\1\1\4\10\1"+
+    "\17\0\1\5\1\6\1\7\72\0\1\10\47\0\1\11"+
+    "\5\0\1\12\124\0\1\13\1\14";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[237];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\40\0\100\0\140\0\200\0\240\0\300\0\340"+
+    "\0\u0100\0\u0120\0\u0140\0\u0160\0\u0180\0\u01a0\0\u01c0\0\u01c0"+
+    "\0\u01e0\0\u0200\0\u0200\0\u0220\0\u0220\0\u0240\0\u0260\0\u0280"+
+    "\0\u02a0\0\u02c0\0\u02e0\0\u0300\0\u0320\0\u0340\0\u0360\0\u0380"+
+    "\0\u0240\0\u03a0\0\u0280\0\u03c0\0\u02c0\0\u03e0\0\u0400\0\u0420"+
+    "\0\u0440\0\u0460\0\u0480\0\u03a0\0\u03c0\0\u03e0\0\u04a0\0\u04c0"+
+    "\0\u04e0\0\u0500\0\u0520\0\u0540\0\u0560\0\u0580\0\u05a0\0\u05c0"+
+    "\0\u05e0\0\u0600\0\u0620\0\u0640\0\u0660\0\u0680\0\u06a0\0\u06c0"+
+    "\0\u06e0\0\u0700\0\u0720\0\u0740\0\u0760\0\u0780\0\u07a0\0\u07c0"+
+    "\0\u07e0\0\u0800\0\u0820\0\u0840\0\u0860\0\u0880\0\u08a0\0\u08c0"+
+    "\0\u08e0\0\u0900\0\u0920\0\u0940\0\u0960\0\u0980\0\u09a0\0\u09c0"+
+    "\0\u09e0\0\u0a00\0\u0a20\0\u0a40\0\u0a60\0\u0a80\0\u0aa0\0\u0ac0"+
+    "\0\u0ae0\0\u0b00\0\u0b20\0\u0b40\0\u0b60\0\u0b80\0\u0ba0\0\u0bc0"+
+    "\0\u0140\0\u0be0\0\u0c00\0\u0c20\0\u0c40\0\u0c60\0\u0c80\0\u0ca0"+
+    "\0\u0cc0\0\u0ce0\0\u0d00\0\u0d20\0\u0d40\0\u0d60\0\u0d80\0\u0da0"+
+    "\0\u0dc0\0\u0de0\0\u0e00\0\u0e20\0\u0e40\0\u0e60\0\u0e80\0\u0ea0"+
+    "\0\u0ec0\0\u0ee0\0\u0f00\0\u0f20\0\u0f40\0\u0f60\0\u0f80\0\u0fa0"+
+    "\0\u0fc0\0\u0fe0\0\u1000\0\u1020\0\u1040\0\u1060\0\u1080\0\u10a0"+
+    "\0\u0140\0\u10c0\0\u10e0\0\u1100\0\u1120\0\u1140\0\u0140\0\u1160"+
+    "\0\u1180\0\u11a0\0\u11c0\0\u11e0\0\u1200\0\u1220\0\u1240\0\u1260"+
+    "\0\u1280\0\u12a0\0\u12c0\0\u12e0\0\u1300\0\u1320\0\u1340\0\u1360"+
+    "\0\u1380\0\u13a0\0\u13c0\0\u13e0\0\u1400\0\u1420\0\u1440\0\u1460"+
+    "\0\u1480\0\u14a0\0\u14c0\0\u14e0\0\u1500\0\u1520\0\u1540\0\u1560"+
+    "\0\u1580\0\u15a0\0\u15c0\0\u15e0\0\u1600\0\u1620\0\u1640\0\u1660"+
+    "\0\u1680\0\u16a0\0\u16c0\0\u16e0\0\u1700\0\u1720\0\u1740\0\u1760"+
+    "\0\u1780\0\u17a0\0\u17c0\0\u17e0\0\u1800\0\u1820\0\u1840\0\u1860"+
+    "\0\u1880\0\u18a0\0\u18c0\0\u18e0\0\u1900\0\u1920\0\u1940\0\u1960"+
+    "\0\u1980\0\u19a0\0\u19c0\0\u19e0\0\u1a00\0\u1a20\0\u1a40\0\u1a60"+
+    "\0\u1a80\0\u1aa0\0\u1ac0\0\u1ae0\0\u1b00\0\u1b20\0\u1b40\0\u1b60"+
+    "\0\u1b80\0\u1ba0\0\u1bc0\0\u0140\0\u0140";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[237];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\5\13\1\14\56\13\1\15\2\13\1\16\51\13\1\17"+
+    "\1\20\34\13\1\21\1\13\1\22\1\23\34\13\1\23"+
+    "\1\13\1\24\1\25\34\13\1\25\1\13\1\26\1\27"+
+    "\34\13\1\27\1\13\1\30\1\31\34\13\1\31\1\13"+
+    "\1\32\1\33\34\13\1\33\37\13\1\34\46\0\1\35"+
+    "\44\0\1\36\54\0\1\37\10\0\1\17\37\0\1\17"+
+    "\35\0\1\40\1\0\1\22\37\0\1\24\37\0\1\41"+
+    "\1\0\1\42\35\0\1\41\37\0\1\43\1\0\1\44"+
+    "\35\0\1\43\37\0\1\45\1\0\1\46\35\0\1\45"+
+    "\75\0\1\47\7\0\1\50\43\0\1\51\55\0\1\52"+
+    "\45\0\1\53\1\0\1\54\37\0\1\55\37\0\1\56"+
+    "\75\0\1\57\10\0\1\60\42\0\1\61\56\0\1\62"+
+    "\44\0\1\63\37\0\1\64\11\0\1\65\41\0\1\66"+
+    "\55\0\1\67\45\0\1\70\37\0\1\71\12\0\1\72"+
+    "\40\0\1\73\31\0\1\74\71\0\1\75\37\0\1\76"+
+    "\13\0\1\77\37\0\1\100\57\0\1\101\43\0\1\102"+
+    "\37\0\1\103\14\0\1\104\36\0\1\105\56\0\1\106"+
+    "\44\0\1\107\37\0\1\110\15\0\1\111\35\0\1\112"+
+    "\60\0\1\113\42\0\1\114\37\0\1\115\13\0\1\116"+
+    "\37\0\1\117\30\0\1\120\72\0\1\121\37\0\1\122"+
+    "\16\0\1\123\34\0\1\124\56\0\1\125\44\0\1\126"+
+    "\37\0\1\127\17\0\1\130\33\0\1\131\30\0\1\132"+
+    "\72\0\1\133\37\0\1\134\11\0\1\135\53\0\1\136"+
+    "\47\0\1\137\41\0\1\140\37\0\1\141\20\0\1\142"+
+    "\32\0\1\143\62\0\1\144\40\0\1\145\37\0\1\146"+
+    "\16\0\1\147\34\0\1\150\55\0\1\151\45\0\1\152"+
+    "\37\0\1\153\13\0\1\154\37\0\1\155\63\0\1\156"+
+    "\37\0\1\157\21\0\1\160\31\0\1\161\63\0\1\162"+
+    "\37\0\1\163\22\0\1\164\30\0\1\165\63\0\1\166"+
+    "\37\0\1\167\13\0\1\170\37\0\1\171\63\0\1\172"+
+    "\37\0\1\173\17\0\1\174\33\0\1\175\63\0\1\176"+
+    "\37\0\1\177\23\0\1\200\27\0\1\201\63\0\1\202"+
+    "\37\0\1\203\21\0\1\204\31\0\1\205\63\0\1\206"+
+    "\37\0\1\207\16\0\1\210\34\0\1\211\63\0\1\212"+
+    "\37\0\1\213\13\0\1\214\37\0\1\215\63\0\1\216"+
+    "\37\0\1\217\12\0\1\220\53\0\1\221\50\0\1\222"+
+    "\37\0\1\223\6\0\1\224\70\0\1\225\37\0\1\226"+
+    "\22\0\1\227\54\0\1\230\37\0\1\231\37\0\1\232"+
+    "\37\0\1\233\37\0\1\234\37\0\1\235\37\0\1\236"+
+    "\37\0\1\237\37\0\1\240\37\0\1\241\37\0\1\242"+
+    "\37\0\1\243\37\0\1\244\37\0\1\245\37\0\1\246"+
+    "\37\0\1\247\37\0\1\250\37\0\1\251\37\0\1\252"+
+    "\37\0\1\253\37\0\1\254\37\0\1\255\37\0\1\256"+
+    "\37\0\1\257\37\0\1\260\37\0\1\261\37\0\1\262"+
+    "\37\0\1\263\37\0\1\264\37\0\1\265\37\0\1\266"+
+    "\37\0\1\267\37\0\1\270\37\0\1\271\37\0\1\272"+
+    "\37\0\1\273\37\0\1\274\37\0\1\275\37\0\1\276"+
+    "\37\0\1\277\37\0\1\300\37\0\1\301\37\0\1\302"+
+    "\37\0\1\303\37\0\1\304\37\0\1\305\37\0\1\306"+
+    "\37\0\1\307\37\0\1\310\37\0\1\311\37\0\1\312"+
+    "\37\0\1\313\37\0\1\314\37\0\1\315\37\0\1\316"+
+    "\37\0\1\317\37\0\1\320\37\0\1\321\37\0\1\322"+
+    "\37\0\1\323\37\0\1\324\37\0\1\325\37\0\1\326"+
+    "\37\0\1\327\37\0\1\330\37\0\1\331\37\0\1\332"+
+    "\37\0\1\333\37\0\1\334\37\0\1\335\37\0\1\336"+
+    "\37\0\1\337\37\0\1\340\37\0\1\341\37\0\1\342"+
+    "\37\0\1\343\37\0\1\344\37\0\1\345\37\0\1\346"+
+    "\37\0\1\347\37\0\1\350\37\0\1\351\37\0\1\352"+
+    "\37\0\1\353\37\0\1\354\37\0\1\355";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[7136];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\12\0\1\11\21\1\17\0\3\1\72\0\1\11\47\0"+
+    "\1\11\5\0\1\11\124\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[237];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public InputLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public InputLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 6: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found y coord. in input");
+  yybegin (INPUTE);
+   return new Symbol(InputSym.INPUT6, new Float(yytext()));
+          }
+        case 13: break;
+        case 7: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found z coord. in input");
+  yybegin (INPUT);
+   return new Symbol(InputSym.INPUT7, new Float(yytext()));
+          }
+        case 14: break;
+        case 4: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found integer3 in input");
+  yybegin (INPUTC);
+   return new Symbol(InputSym.INPUT4, new Integer(yytext()));
+          }
+        case 15: break;
+        case 11: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found the second dash");
+  yybegin (ITER);
+   return new Symbol(InputSym.DASH2);
+          }
+        case 16: break;
+        case 5: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found x coord. in input");
+  yybegin (INPUTD);
+   return new Symbol(InputSym.INPUT5, new Float(yytext()));
+          }
+        case 17: break;
+        case 12: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found the first dash");
+  yybegin (INPUT);
+   return new Symbol(InputSym.DASH1);
+          }
+        case 18: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("InputFlex: Found Input Orientation");
+            yybegin(INPUTF);
+            return new Symbol(InputSym.INPUT1);
+          }
+        case 19: break;
+        case 8: 
+          { yybegin(IGNOREALL);
+      return new Symbol(InputSym.SCFDONE);
+          }
+        case 20: break;
+        case 3: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found integer2 in input");
+  yybegin (INPUTB);
+   return new Symbol(InputSym.INPUT3, new Integer(yytext()));
+          }
+        case 21: break;
+        case 10: 
+          { if (Settings.DEBUG) System.out.println("InputFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(InputSym.FOUNDITER);
+          }
+        case 22: break;
+        case 1: 
+          { 
+          }
+        case 23: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("InputFlex: Found integer1 in input");
+  yybegin (INPUTA);
+   return new Symbol(InputSym.INPUT2, new Integer(yytext()));
+          }
+        case 24: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(InputSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = InputSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java InputLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        InputLexer scanner = null;
+        try {
+          scanner = new InputLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputParser.java
new file mode 100644
index 0000000..97a583a
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputParser.java
@@ -0,0 +1,385 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.input;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class InputParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public InputParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public InputParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public InputParser(final FileReader fileReader) {
+        super(new InputLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\015\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\006\006" +
+                    "\000\002\016\004\000\002\016\003\000\002\017\010\000" +
+                    "\002\012\003\000\002\013\003\000\002\014\003\000\002" +
+                    "\015\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\031\000\004\005\005\001\002\000\004\004\010\001" +
+                    "\002\000\004\004\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\007\015\001\002\000" +
+                    "\006\004\010\006\013\001\002\000\006\004\ufffd\006\ufffd" +
+                    "\001\002\000\004\002\001\001\002\000\006\004\ufffe\006" +
+                    "\ufffe\001\002\000\004\011\016\001\002\000\004\012\024" +
+                    "\001\002\000\006\010\ufffa\011\ufffa\001\002\000\006\010" +
+                    "\021\011\016\001\002\000\006\004\ufffc\006\ufffc\001\002" +
+                    "\000\006\010\ufffb\011\ufffb\001\002\000\004\013\025\001" +
+                    "\002\000\004\013\ufff8\001\002\000\004\016\026\001\002" +
+                    "\000\004\017\ufff7\001\002\000\004\017\030\001\002\000" +
+                    "\004\020\ufff6\001\002\000\004\020\032\001\002\000\006" +
+                    "\010\ufff5\011\ufff5\001\002\000\006\010\ufff9\011\ufff9\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\031\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\010\006\011\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\006\013\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\006\016\017\017\016\001\001\000\004\012\022\001" +
+                    "\001\000\002\001\001\000\004\017\021\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\004\013\026\001\001\000\002\001\001\000\004" +
+                    "\014\030\001\001\000\002\001\001\000\004\015\032\001" +
+                    "\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    // z_coord, y_coord, x_coord and atomic number
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int zCount=0;
+        int xCount=0;
+        int yCount=0;
+        int atomCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp=singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("Z")){
+                    results.put("InputParser_z_coordinate_"+zCount,dataString);
+                    zCount++;
+                }else if(keyString.equalsIgnoreCase("Y")){
+                    results.put("InputParser_y_coordinate_"+yCount,dataString);
+                    yCount++;
+                }else if(keyString.equalsIgnoreCase("X")){
+                    results.put("InputParser_x_coordinate_"+xCount,dataString);
+                    xCount++;
+                }else if(keyString.equalsIgnoreCase("AtomicNumber")){
+                    results.put("InputParser_atomic_number_"+atomCount,dataString);
+                    atomCount++;
+                }
+            }
+
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final InputParser InputParser;
+
+  /** Constructor */
+  CUP$parser$actions(InputParser InputParser) {
+    this.InputParser = InputParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // inp7 ::= INPUT7 
+            {
+              Object RESULT = null;
+		int in7left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in7right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in7 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+   InputParser.addToResult("Z "+in7);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*inp7*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // inp6 ::= INPUT6 
+            {
+              Object RESULT = null;
+		int in6left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in6right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in6 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+   InputParser.addToResult("Y "+in6);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*inp6*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // inp5 ::= INPUT5 
+            {
+              Object RESULT = null;
+		int in5left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in5right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in5 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+   InputParser.addToResult("X "+in5);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*inp5*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // inp3 ::= INPUT3 
+            {
+              Object RESULT = null;
+		int in3left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in3right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer in3 = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3);
+   InputParser.addToResult("AtomicNumber "+in3);
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*inp3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle2 ::= INPUT2 inp3 INPUT4 inp5 inp6 inp7 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*cycle2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // cycle1 ::= cycle2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*cycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // cycle1 ::= cycle1 cycle2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*cycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // scfcycle ::= INPUT1 DASH1 cycle1 DASH2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:Input: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputSym.java
new file mode 100644
index 0000000..5d52fa3
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/input/InputSym.java
@@ -0,0 +1,46 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.input;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 18:37:51 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class InputSym {
+  /* terminals */
+  public static final int ENERGY = 11;
+  public static final int EOF = 0;
+  public static final int ITERATION = 10;
+  public static final int INPUT7 = 14;
+  public static final int error = 1;
+  public static final int INPUT6 = 13;
+  public static final int INPUT5 = 12;
+  public static final int INPUT4 = 9;
+  public static final int SCFDONE = 4;
+  public static final int INPUT3 = 8;
+  public static final int FOUNDITER = 3;
+  public static final int INPUT2 = 7;
+  public static final int DASH2 = 6;
+  public static final int INPUT1 = 2;
+  public static final int DASH1 = 5;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodLexer.java
new file mode 100644
index 0000000..d9f9d08
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodLexer.java
@@ -0,0 +1,752 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.method;/* The following code was generated by JFlex 1.4.3 on 9/11/14 11:51 PM */
+
+import java_cup.runtime.Symbol;
+import java_cup.sym;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 11:51 PM from the specification file
+ * <tt>method.flex</tt>
+ */
+public class MethodLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 6;
+  public static final int ITER1 = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER = 2;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, 
+     0,  7,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, 
+     0, 20, 10,  9, 21, 19,  0,  6,  0, 22,  0,  0,  0, 24, 15, 23, 
+    18, 12, 13, 11, 16, 14,  0,  0,  0, 17, 25,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3, 
+     4,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\6\1\2\0\1\2\1\3\3\0\1\4\6\0"+
+    "\1\5\33\0\1\6\5\0\1\7\1\10\6\0\1\11";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[66];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\32\0\64\0\116\0\150\0\202\0\234\0\266"+
+    "\0\320\0\352\0\u0104\0\116\0\116\0\u011e\0\u0138\0\u0152"+
+    "\0\116\0\u016c\0\u0186\0\u01a0\0\u01ba\0\u01d4\0\u01ee\0\116"+
+    "\0\u0208\0\u0222\0\u023c\0\u0256\0\u0270\0\u028a\0\u02a4\0\u02be"+
+    "\0\u02d8\0\u02f2\0\u030c\0\u0326\0\u0340\0\u035a\0\u0374\0\u038e"+
+    "\0\u03a8\0\u03c2\0\u03dc\0\u03f6\0\u0410\0\u042a\0\u0444\0\u045e"+
+    "\0\u0478\0\u0492\0\u04ac\0\116\0\u04c6\0\u04e0\0\u04fa\0\u0514"+
+    "\0\u052e\0\116\0\116\0\u0548\0\u0562\0\u057c\0\u0596\0\u05b0"+
+    "\0\u05ca\0\116";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[66];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\2\4\1\5\32\4\1\6\2\4\1\7\2\4\1\10"+
+    "\3\4\1\11\46\4\34\0\1\12\33\0\1\13\34\0"+
+    "\1\14\1\15\33\0\1\16\35\0\1\17\15\0\1\20"+
+    "\34\0\1\21\37\0\1\22\35\0\1\23\14\0\1\24"+
+    "\31\0\1\25\47\0\1\26\13\0\1\27\43\0\1\30"+
+    "\36\0\1\31\12\0\1\32\51\0\1\33\11\0\1\34"+
+    "\30\0\1\35\32\0\1\36\35\0\1\37\14\0\1\40"+
+    "\3\0\1\41\4\0\1\42\44\0\1\43\33\0\1\44"+
+    "\34\0\1\45\11\0\1\46\53\0\1\47\30\0\1\50"+
+    "\26\0\1\51\13\0\1\52\54\0\1\53\21\0\1\54"+
+    "\42\0\1\55\5\0\1\56\55\0\1\57\11\0\1\60"+
+    "\53\0\1\61\3\0\1\62\52\0\1\63\27\0\1\64"+
+    "\36\0\1\65\5\0\1\66\46\0\1\67\43\0\1\70"+
+    "\2\0\1\71\47\0\1\72\34\0\1\73\10\0\1\74"+
+    "\31\0\1\75\31\0\1\76\31\0\1\77\31\0\1\100"+
+    "\31\0\1\101\31\0\1\102\27\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1508];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\5\1\2\0\2\11\3\0\1\11\6\0"+
+    "\1\11\33\0\1\11\5\0\2\11\6\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[66];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MethodLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MethodLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 4: 
+          { System.out.println("MethodFlex: Found opt ");
+   System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 10: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=GRADIENT");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("gradient");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 11: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("optimize");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 12: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(MethodSym.FOUNDITER);
+          }
+        case 13: break;
+        case 2: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 14: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("energy");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 15: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: Found G2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 16: break;
+        case 1: 
+          { 
+          }
+        case 17: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("MethodFlex: Found CBS-Q");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+          }
+        case 18: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(sym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = sym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MethodLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MethodLexer scanner = null;
+        try {
+          scanner = new MethodLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodParser.java
new file mode 100644
index 0000000..4ff27bb
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodParser.java
@@ -0,0 +1,185 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.method;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import java.io.FileReader;
+import java.util.HashMap;
+
+
+public class MethodParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public MethodParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MethodParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MethodParser(final FileReader fileReader) {
+        super(new MethodLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\003\000\002\003\003\000\002\002\004\000\002\004" +
+                    "\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\006\000\004\004\005\001\002\000\004\002\001\001" +
+                    "\002\000\004\006\010\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\002\uffff\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\006\000\006\003\005\004\003\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        return null;
+    }
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+
+  private final MethodParser MethodParser;
+
+  /** Constructor */
+  CUP$parser$actions(MethodParser MethodParser) {
+    this.MethodParser = MethodParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER RUNTYP 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodSym.java
new file mode 100644
index 0000000..b84f358
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/method/MethodSym.java
@@ -0,0 +1,37 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.method;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 23:51:20 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MethodSym {
+  /* terminals */
+  public static final int RUNTYP = 4;
+  public static final int SCFDONE = 3;
+  public static final int error = 1;
+  public static final int FOUNDITER = 2;
+  public static final int RUNTYP1 = 5;
+  public static final int EOF = 0;
+}
+


[28/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/pound.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/pound.flex b/datacat/cup_flex/pound.flex
new file mode 100644
index 0000000..05e1cd7
--- /dev/null
+++ b/datacat/cup_flex/pound.flex
@@ -0,0 +1,1054 @@
+/* Currently handles Gauss98 test inputs test000.com -- test039.com
+ */
+   import java_cup.runtime.*;
+
+
+ 
+%%
+
+
+
+%class Pound
+%public
+%unicode
+%cup
+%cupdebug
+%ignorecase
+
+%state POUND
+%state IGNOREALL
+
+%standalone
+%8bit
+
+%{
+  public static boolean DEBUG = false;
+  LexerParserBroker pp = new LexerParserBroker();
+  private String prefix = "file:" 
+  + System.getProperty("user.dir")
+    + System.getProperty("file.separator");
+%}
+
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+WORD           = [0-9A-Za-z"="".""("")""+""-"_]+
+WORDLIST       = "("   {WORD} ( ","{WORD}+ )*   ")"
+
+
+ 
+%%
+
+
+
+/*
+   =====================================================================
+   Tokens for lexical analysis of pound-headers
+   ===================================================================== 
+*/
+
+<YYINITIAL>{
+  "--link"[0-9]"--" {yybegin(YYINITIAL);
+                     return new Symbol(PoundSym.LINK);
+  }
+  "%"{WORD} {yybegin(YYINITIAL);
+             return new Symbol(PoundSym.PERCENT_SPEC);
+  }
+  "# SP," {if (Settings.DEBUG) System.out.println("JFlex:pound:YYINITIAL: Found # SP,..........");
+           pp.route("route section", yytext(), prefix + "00000471.htm");
+	   yybegin(POUND); 
+           return new Symbol(PoundSym.POUNDLINE);
+  }
+  "# " {if (Settings.DEBUG) System.out.println("JFlex:pound:YYINITIAL: Found #..........");
+	pp.route("route section", yytext(), prefix + "00000414.htm");
+	yybegin(POUND); 
+        return new Symbol(PoundSym.POUNDLINE);
+  }
+  "#N" {if (Settings.DEBUG) System.out.println("JFlex:pound:YYINITIAL: Found #N..........");
+	pp.route("route section", yytext(), prefix + "00000414.htm");
+	yybegin(POUND); 
+        return new Symbol(PoundSym.POUNDLINE);
+  }
+  "#P" {if (Settings.DEBUG) System.out.println("JFlex:pound:YYINITIAL: Found #P..........");
+	pp.route("route section", yytext(), prefix + "00000414.htm");
+	yybegin(POUND); 
+        return new Symbol(PoundSym.POUNDLINE);
+  }
+  "#T" {if (Settings.DEBUG) System.out.println("JFlex:pound:YYINITIAL: Found #T..........");
+	pp.route("route section", yytext(), prefix + "00000414.htm");
+	yybegin(POUND); 
+        return new Symbol(PoundSym.POUNDLINE);
+  }
+}
+
+<POUND>{
+/* ________
+   obsolete
+*/
+"Alter" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"BD-T" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"BeckeHalfandHalf" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Camp-King" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"CCSD-T" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"CubeDensity" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Cube=Divergence" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"GridDensity" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Guess=Restart" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Opt=AddRedundant" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"OptCyc=" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"PlotDensity" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Prop=Grid" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"QCISD-T" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"QCID" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"QCSCF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Save" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"SCFCon" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"SCFCyc" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"SCFDM" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"SCFQC" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.obsolete("obsolete procedure", yytext(), prefix + "00000473.htm");
+  }
+"Trajectory" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                pp.system("trajectory", yytext(), "trajkey.htm");
+  }
+/* _______
+   methods
+*/
+  "HF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "HF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "HF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "HF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "RHF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "restricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "RHF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "restricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "RHF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "restricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "RHF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "restricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "UHF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "unrestricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "UHF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "unrestricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "UHF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "unrestricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "UHF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "unrestricted Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "rohf" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "spin-restricted open-shell Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "rohf"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "spin-restricted open-shell Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "rohf="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "spin-restricted open-shell Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "rohf="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "spin-restricted open-shell Hartree-Fock", yytext(), prefix + "00000445.htm");
+  }
+  "CPHF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "coupled Hartree-Fock", yytext(), prefix + "00000429.htm");
+  }
+  "CPHF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "coupled Hartree-Fock", yytext(), prefix + "00000429.htm");
+  }
+  "CPHF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "coupled Hartree-Fock", yytext(), prefix + "00000429.htm");
+  }
+  "CPHF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("hf", "coupled Hartree-Fock", yytext(), prefix + "00000429.htm");
+  }
+  "BD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("bd", "Brueckner-Doubles", yytext(), prefix + "00000418.htm");
+  }
+  "BD"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("bd", "Brueckner-Doubles", yytext(), prefix + "00000418.htm");
+  }
+  "BD="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("bd", "Brueckner-Doubles", yytext(), prefix + "00000418.htm");
+  }
+  "BD="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("bd", "Brueckner-Doubles", yytext(), prefix + "00000418.htm");
+  }
+  "CBS-"{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("cbs", "complete basis set method", yytext(), prefix + "00000420.htm");
+  }
+  "CBSExtrapolate" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("cbs", "complete basis set extrapolation of MP2", yytext(), prefix + "00000421.htm");
+  }
+  "COMPLEX" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("complex", "complex molecular orbitals", yytext(), prefix + "00000428.htm");
+  }
+  "CCD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCD"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCD="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCD="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCSD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ single/double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCSD"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ single/double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCSD="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ single/double substitution", yytext(), prefix + "00000422.htm");
+  }
+  "CCSD="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ccd", "coupled clusters w/ single/double substitution", yytext(), prefix + "00000422.htm");
+  }
+/* 
+   DFT Methods Combine R or U for Restricted and Unrestricted with Exchange Functionals from 
+     S (SLATER), XA(XALPHA), B88 (Becke88),B1, B3, PW91(Perdew-Wang91), MPW(ModifiedPW), G96(Gill96), PBE(PerdewBurkeErnzerof), O(OPTX[Handy]), TPSS (Tao etal..)  WITH CORRELATION FUNCTIONALS FROM 
+     VWN, VWN5, LYP, PL, P86, PW91, B95, PBE, TPSS, VP86, V5LYP, VSCX, HCTH/[93,407,147] and Hybrids
+
+    B3, B98, B1, B971, B972, PBE1, O3LYP, BHandH, BHandHLYP,  
+
+*/
+  [R|U]?["S"|"XA"|"B88"|"B1"|"B3"|"PW91"|"MPW"|"G96"|"PBE"|"O"|"TPSS"]?["VWN"|"VWN5"|"LYP"|"PL"|"P86"|"PW91"|"B95"|"PBE"|"TPSS"|"VP86"|"V5LYP"|"VSCX"|"HCTH93"|"HCTH147"|"HCTH407"] {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("DFT", " STANDARD COMBINATION METHOD", yytext(), prefix + "00000422.htm");
+  }
+  [R|U]?["B98"|"B971"|"B972"|"PBE1"|"O3LYP"|"BHANDH"|"BHANDHLYP"]  {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("DFT", "HYBRID COMBINATION METHOD", yytext(), prefix + "00000422.htm");
+}
+
+  [R|U]?"CI" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CI"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CI="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CI="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CID" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CID"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CID="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CID="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CIS" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CIS"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CIS="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CIS="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CISD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CISD"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CISD="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"CISD="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "configuration interaction w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD(T)" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations & triples", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD(T)"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations & triples", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD(T)="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations & triples", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD(T)="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations & triples", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  [R|U]?"QCISD="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ci", "quadratic CI w/ single & double excitations", yytext(), prefix + "00000423.htm");
+  }
+  "FMM" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("fmm", "fast multipole method", yytext(), prefix + "fmmkey.htm");
+  }
+  "force" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("force", "energy gradient on nuclei", yytext(), prefix + "00000436.htm");
+  }
+  "FREQ" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("freq", "vibrational frequencies", yytext(), prefix + "00000437.htm");
+  }	
+  "FREQ"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("freq", "vibrational frequencies", yytext(), prefix + "00000437.htm");
+  }	
+  "FREQ="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("freq", "vibrational frequencies", yytext(), prefix + "00000437.htm");
+  }	
+  "FREQ="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("freq", "vibrational frequencies", yytext(), prefix + "00000437.htm");
+  }	
+  "Guess" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("guess", "initial guess for HF wavefunction", yytext(), prefix + "00000443.htm");
+  }
+  "Guess"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("guess", "initial guess for HF wavefunction", yytext(), prefix + "00000443.htm");
+  }
+  "Guess="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("guess", "initial guess for HF wavefunction", yytext(), prefix + "00000443.htm");
+  }
+  "Guess="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("guess", "initial guess for HF wavefunction", yytext(), prefix + "00000443.htm");
+  }
+  "G1" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-1 method", yytext(), prefix + "00000438.htm");
+  }
+  "G1"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-1 method", yytext(), prefix + "00000438.htm");
+  }
+  "G1="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-1 method", yytext(), prefix + "00000438.htm");
+  }
+  "G1="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-1 method", yytext(), prefix + "00000438.htm");
+  }
+  "G2" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 method", yytext(), prefix + "00000438.htm");
+  }
+  "G2"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 method", yytext(), prefix + "00000438.htm");
+  }
+  "G2="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 method", yytext(), prefix + "00000438.htm");
+  }
+  "G2="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 method", yytext(), prefix + "00000438.htm");
+  }
+  "G2MP2" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 w/ MP2 corrections to basis extensions", yytext(), prefix + "00000438.htm");
+  }
+  "G2MP2"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 w/ MP2 corrections to basis extensions", yytext(), prefix + "00000438.htm");
+  }
+  "G2MP2="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 w/ MP2 corrections to basis extensions", yytext(), prefix + "00000438.htm");
+  }
+  "G2MP2="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("g1", "Gaussian-2 w/ MP2 corrections to basis extensions", yytext(), prefix + "00000438.htm");
+  }
+  "GVB" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("gvb", "general valence bond", yytext(), prefix + "00000444.htm");
+  }
+  "GVB"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("gvb", "general valence bond", yytext(), prefix + "00000444.htm");
+  }
+  "GVB="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("gvb", "general valence bond", yytext(), prefix + "00000444.htm");
+  }
+  "GVB="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("gvb", "general valence bond", yytext(), prefix + "00000444.htm");
+  }
+  "INDO" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("indo", "semi-empirical INDO Hamiltonian", yytext(), prefix + "00000446.htm");
+  }
+  "INDO"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("indo", "semi-empirical INDO Hamiltonian", yytext(), prefix + "00000446.htm");
+  }
+  "INDO="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("indo", "semi-empirical INDO Hamiltonian", yytext(), prefix + "00000446.htm");
+  }
+  "INDO="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("indo", "semi-empirical INDO Hamiltonian", yytext(), prefix + "00000446.htm");
+  }
+  "Integral" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("integral", "two-electron integrals & derivatives", yytext(), prefix + "00000447.htm");
+  }
+  "Integral"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("integral", "two-electron integrals & derivatives", yytext(), prefix + "00000447.htm");
+  }
+  "Integral="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("integral", "two-electron integrals & derivatives", yytext(), prefix + "00000447.htm");
+  }
+  "Integral="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("integral", "two-electron integrals & derivatives", yytext(), prefix + "00000447.htm");
+  }
+  "MINDO3" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mindo3", "semi-empirical MINDO3 Hamiltonian", yytext(), prefix + "00000454.htm");
+  }
+  "MINDO3"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mindo3", "semi-empirical MINDO3 Hamiltonian", yytext(), prefix + "00000454.htm");
+  }
+  "MINDO3="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mindo3", "semi-empirical MINDO3 Hamiltonian", yytext(), prefix + "00000454.htm");
+  }
+  "MINDO3="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mindo3", "semi-empirical MINDO3 Hamiltonian", yytext(), prefix + "00000454.htm");
+  }
+  "MNDO" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mndo", "semi-empirical MNDO Hamiltonian", yytext(), prefix + "00000455.htm");
+  }
+  "MNDO"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mndo", "semi-empirical MNDO Hamiltonian", yytext(), prefix + "00000455.htm");
+  }
+  "MNDO="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mndo", "semi-empirical MNDO Hamiltonian", yytext(), prefix + "00000455.htm");
+  }
+  "MNDO="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mndo", "semi-empirical MNDO Hamiltonian", yytext(), prefix + "00000455.htm");
+  }
+  [R|U]?"MP5" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP5"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP5="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP5="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SD)" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SD)"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SD)="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SD)="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(DQ)" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(DQ)"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(DQ)="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(DQ)="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDQ)" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDQ)"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDQ)="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDQ)="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDTQ)" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDTQ)"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDTQ)="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4(SDTQ)="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4SDTQ" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4SDTQ"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4SDTQ="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP4SDTQ="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy w/ substitutions", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP"{INT} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy correction", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP"{INT}{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy correction", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP"{INT}"="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy correction", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"MP"{INT}"="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mp", "HF with Moeller-Plesset correlation energy correction", yytext(), prefix + "00000456.htm");
+  }
+  [R|U]?"OVGF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ovgf", "outer-valence Green function", yytext(), prefix + "00000462.htm");
+  }
+  [R|U]?"OVGF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ovgf", "outer-valence Green function", yytext(), prefix + "00000462.htm");
+  }
+  [R|U]?"OVGF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ovgf", "outer-valence Green function", yytext(), prefix + "00000462.htm");
+  }
+  [R|U]?"OVGF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("ovgf", "outer-valence Green function", yytext(), prefix + "00000462.htm");
+  }
+  "PM3" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pm3", "semi-empirical PM3 Hamiltonian", yytext(), prefix + "00000463.htm");
+  }
+  "PM3MM" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pm3", "semi-empirical PM3 Hamiltonian w/ molecular mechanics", yytext(), prefix + "00000463.htm");
+  }
+  "pop" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "pop"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "pop="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "pop="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "popu" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "popu"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "popu="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "popu="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("pop", "molecular orbital & populations analysis", yytext(), prefix + "00000465.htm");
+  }
+  "Scan" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("scan", "potential energy surface scan", yytext(), prefix + "00000472.htm.htm");
+  }	
+  "Sparse" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("sparse", "sparse matrix storage", yytext(), prefix + "sparsek.htm");
+  }	
+  "STABLE" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("stable", "test stability of Hartree-Fock or density functional", yytext(), prefix + "00000475.htm");
+  }	
+  "STABLE"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("stable", "test stability of Hartree-Fock or density functional", yytext(), prefix + "00000475.htm");
+  }	
+  "STABLE="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("stable", "test stability of Hartree-Fock or density functional", yytext(), prefix + "00000475.htm");
+  }	
+  "STABLE="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("stable", "test stability of Hartree-Fock or density functional", yytext(), prefix + "00000475.htm");
+  }	
+  "Symm" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("symm", "use molecular symmetry", yytext(), prefix + "00000476.htm");
+  }	
+  "TD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("rpa", "time-dependent excited-state with random-phase approx.", yytext(), prefix + "rpak.htm");
+  }	
+  "TestMO" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+            pp.method("testmo", "test molecular orbital coefficients", yytext(), prefix + "00000477.htm");
+  }
+  "Transformation" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                    pp.method("trans", "algorithm for integral transformations", yytext(), prefix + "00000480.htm");
+  }
+  "Transformation"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                              pp.method("trans", "algorithm for integral transformations", yytext(), prefix + "00000480.htm");
+  }
+  "Transformation="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                           pp.method("trans", "algorithm for integral transformations", yytext(), prefix + "00000480.htm");
+  }
+  "Transformation="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                              pp.method("trans", "algorithm for integral transformations", yytext(), prefix + "00000480.htm");
+  }
+  "Zindo" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("zindo", "excited-state w/ ZINDO-1", yytext(), prefix + "zindok.htm");
+  }
+  "Zindo"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("zindo", "excited-state w/ ZINDO-1", yytext(), prefix + "zindok.htm");
+  }
+  "Zindo="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("zindo", "excited-state w/ ZINDO-1", yytext(), prefix + "zindok.htm");
+  }
+  "Zindo="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("zindo", "excited-state w/ ZINDO-1", yytext(), prefix + "zindok.htm");
+  }
+  "AM1" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("am1", "semi-empirical AM1 Hamiltonian", yytext(), prefix + "00000416.htm");
+  }
+  "Amber" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mm", "molecular mechanics w/ Amber force field", yytext(), prefix + "mmmk.htm");
+  }
+  "DREIDING" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mm", "molecular mechanics w/ DREIDING force field", yytext(), prefix + "mmmk.htm");
+  }
+  "UFF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("mm", "molecular mechanics w/ UFF force field", yytext(), prefix + "mmmk.htm");
+  }
+  "/" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  "//" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  "RPA" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("rpa", "time-dependent excited-state with random-phase approx.", yytext(), prefix + "rpak.htm");
+  }
+  "RPA"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("rpa", "time-dependent excited-state with random-phase approx.", yytext(), prefix + "rpak.htm");
+  }
+  "RPA="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("rpa", "time-dependent excited-state with random-phase approx.", yytext(), prefix + "rpak.htm");
+  }
+  "RPA="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.method("rpa", "time-dependent excited-state with random-phase approx.", yytext(), prefix + "rpak.htm");
+  }
+/* _____
+   basis
+*/
+  "ChkBasis" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("read basis set from checkpoint file", yytext(), prefix + "00000425.htm");
+  }
+  "ExtraBasis" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("add additional basis functions", yytext(), prefix + "00000433.htm");
+  }
+  "gen" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("user-specified basis set", yytext(), prefix + "00000439.htm");
+  }	
+  "Massage" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("modify molecule specification after generation", yytext(), prefix + "00000452.htm");
+  }
+  {INT}"-"{INT}"G"["*"]?["*"]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("internally stored Gaussian 98 basis set", yytext(), prefix + "00000485.htm");
+  }	
+  "cc-pV"[DTQ56]"Z" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Dunning's correlation consistent basis sets", yytext(), prefix + "00000485.htm");
+  }	
+  "CEP-"{INT}"G"["*"]?["*"]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Stephens/Basch/Krauss ECP basis", yytext(), prefix + "00000485.htm");
+  }	
+  "D95"[V]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Dunning/Huzinaga double zeta basis", yytext(), prefix + "00000485.htm");
+  }	
+  "Dcc-pV"[DTQ56]"Z" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Dunning's correlation consistent basis sets", yytext(), prefix + "00000485.htm");
+  }	
+  "EPR" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("basis sets of Barone for hyperfine coupling constants", yytext(), prefix + "00000485.htm");
+  }	
+  "LanL2MB" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Los Alamos ECP plus MBS on Na-Bi", yytext(), prefix + "00000485.htm");
+  }	
+  "LanL2DZ" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Los Alamos ECP plus DZ on Na-Bi", yytext(), prefix + "00000485.htm");
+  }	
+  "LP-"{INT}"G"["*"]?["*"]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("LP-*G basis", yytext(), prefix + "00000485.htm");
+  }	
+  "MidiX" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Midi! basis of Truhlar, et al.", yytext(), prefix + "00000485.htm");
+  }	
+  "STO-"{INT}"G"["*"]?["*"]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("internally stored Gaussian 98 basis set", yytext(), prefix + "00000485.htm");
+  }	
+  "SDD:D95"[V]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Stuttgart/Dresden ECP basis", yytext(), prefix + "00000485.htm");
+  }	
+  "SEC" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Goddard/Smedley ECP basis", yytext(), prefix + "00000485.htm");
+  }	
+  "SHC" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("Goddard/Smedley ECP basis", yytext(), prefix + "00000485.htm");
+  }	
+  "SV"[P]? {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("basis of Ahlrichs, et al.", yytext(), prefix + "00000485.htm");
+  }	
+  "TZV" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.basis("basis of Ahlrichs, et al.", yytext(), prefix + "00000485.htm");
+  }	
+/* ___
+   SCF
+*/
+  "scf" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("self-consistent field procedure", yytext(), prefix + "00000473.htm");
+  }
+  "scf"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("self-consistent field procedure", yytext(), prefix + "00000473.htm");
+  }
+  "scf="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("self-consistent field procedure", yytext(), prefix + "00000473.htm");
+  }
+  "scf="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("self-consistent field procedure", yytext(), prefix + "00000473.htm");
+  }
+  "CASSCF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("casscf", yytext(), prefix + "00000419.htm");
+  }
+  "CASSCF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("casscf", yytext(), prefix + "00000419.htm");
+  }
+  "CASSCF="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("casscf", yytext(), prefix + "00000419.htm");
+  }
+  "CASSCF="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.scf("casscf", yytext(), prefix + "00000419.htm");
+  }
+/* ___________________
+   material properties
+*/
+  "AIM" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("molecular properties by theory of atoms in molecules", yytext(), prefix + "00000415.htm");
+  }
+  "AIM"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("molecular properties by theory of atoms in molecules", yytext(), prefix + "00000415.htm");
+  }
+  "AIM="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("molecular properties by theory of atoms in molecules", yytext(), prefix + "00000415.htm");
+  }
+  "AIM="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("molecular properties by theory of atoms in molecules", yytext(), prefix + "00000415.htm");
+  }
+  "Charge" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("background charge distribution", yytext(), prefix + "00000424.htm");
+  }
+  "Charge"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("background charge distribution", yytext(), prefix + "00000424.htm");
+  }
+  "Charge="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("background charge distribution", yytext(), prefix + "00000424.htm");
+  }
+  "Charge="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("background charge distribution", yytext(), prefix + "00000424.htm");
+  }
+  "DFT" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("density functional theory model",  yytext(), prefix + "00000432.htm");
+  }
+  "DFT"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("density functional theory model",  yytext(), prefix + "00000432.htm");
+  }
+  "DFT="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("density functional theory model",  yytext(), prefix + "00000432.htm");
+  }
+  "DFT="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("density functional theory model",  yytext(), prefix + "00000432.htm");
+  }
+  "Field" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("electric multipole or Fermi contact fields", yytext(), prefix + "00000434.htm");
+  }
+  "Field"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("electric multipole or Fermi contact fields", yytext(), prefix + "00000434.htm");
+  }
+  "Field="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("electric multipole or Fermi contact fields", yytext(), prefix + "00000434.htm");
+  }
+  "Field="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("electric multipole or Fermi contact fields", yytext(), prefix + "00000434.htm");
+  }
+  "IRC" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("follow reaction path", yytext(), prefix + "00000449.htm");
+  }
+  "IRC"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("follow reaction path", yytext(), prefix + "00000449.htm");
+  }
+  "IRC="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("follow reaction path", yytext(), prefix + "00000449.htm");
+  }
+  "IRC="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("follow reaction path", yytext(), prefix + "00000449.htm");
+  }
+  "IRCMax" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("IRCMax calculation of Petersson, et al.", yytext(), prefix + "ircmax.htm");
+  }
+  "LSDA" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("Local Spin Density Approximation", yytext(), prefix + "00000450.htm");
+  }
+  "NMR" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("NMR shielding tensors and magnetic susceptibilities by Hartree-Fock", yytext(), prefix + "00000458.htm");
+  }
+  "polar" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("dipole electric field polarizabilities", yytext(), prefix + "00000464.htm");
+  }
+  "polar"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("dipole electric field polarizabilities", yytext(), prefix + "00000464.htm");
+  }
+  "polar="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("dipole electric field polarizabilities", yytext(), prefix + "00000464.htm");
+  }
+  "polar="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("dipole electric field polarizabilities", yytext(), prefix + "00000464.htm");
+  }
+  "Prop" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("electrostatic properties", yytext(), prefix + "00000466.htm");
+  }
+  "Pseudo" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("substitute model potential for core electrons", yytext(), prefix + "00000467.htm");
+  }
+  "SCRF" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("Onsager model for presence of solvent", yytext(), prefix + "00000474.htm");
+  }	
+  "SCRF"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("calculate presence of solvent", yytext(), prefix + "00000474.htm");
+  }	
+  "SCRF"={WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("calculate presence of solvent", yytext(), prefix + "00000474.htm");
+  }	
+  "SCRF"={WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.material("calculate presence of solvent", yytext(), prefix + "00000474.htm");
+  }	
+  "Volume" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+            pp.material("molecular volume", yytext(), prefix + "00000482.htm");
+  }
+/* _____________________
+   geometry optimization
+*/
+  "OPT" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+         pp.geometry("geometry optimization", yytext(), "00000460.htm");
+  }
+  "OPT"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                    pp.geometry("geometry optimization", yytext(), "00000460.htm");
+  }
+  "OPT="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                    pp.geometry("geometry optimization", yytext(), "00000460.htm");
+  }
+  "OPT="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                    pp.geometry("geometry optimization", yytext(), "00000460.htm");
+  }
+/* _______
+   density
+*/
+  "Cube" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("evaluate density over a 3D grid (cube) of points", yytext(), prefix + "00000430.htm");
+  }
+  "Cube"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("evaluate density over a 3D grid of points", yytext(), prefix + "00000430.htm");
+  }
+  "Cube="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("evaluate density over a 3D grid of points", yytext(), prefix + "00000430.htm");
+  }
+  "Cube="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("evaluate density over a 3D grid of points", yytext(), prefix + "00000430.htm");
+  }
+  "density" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("generalized densities based on the Z-Vector", yytext(), prefix + "00000431.htm");
+  }
+  "density"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("generalized densities based on the Z-Vector", yytext(), prefix + "00000431.htm");
+  }
+  "density="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("generalized densities based on the Z-Vector", yytext(), prefix + "00000431.htm");
+  }
+  "density="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.density("generalized densities based on the Z-Vector", yytext(), prefix + "00000431.htm");
+  }
+/* ______
+   system
+*/
+  "archive" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("place results from calculation into site archive", yytext(), prefix + "00000417.htm");
+  }
+  "FormCheck" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("write formatted version of checkpoint file", yytext(), prefix + "00000435.htm");
+  }
+  "FChk" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("write formatted version of checkpoint file", yytext(), prefix + "00000435.htm");
+  }
+  "FCheck" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("write formatted version of checkpoint file", yytext(), prefix + "00000435.htm");
+  }
+  "GFInput" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("format current basis set for general basis set input", yytext(), prefix + "00000441.htm");
+  }
+  "GFPrint" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("print current basis set in tabular form", yytext(), prefix + "00000442.htm");
+  }
+  "iop" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("set internal options", yytext(), prefix + "00000448.htm");
+  }	
+  "iop(" ({INT}"/"{INT}"="{INT}) (","{INT}"/"{INT}"="{INT}",")* ")" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("set internal options", yytext(), prefix + "00000448.htm");
+  }	
+  "MaxDisk" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("disk storage available for scratch data", yytext(), prefix + "00000453.htm");
+  }
+  "MaxDisk"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("disk storage available for scratch data", yytext(), prefix + "00000453.htm");
+  }
+  "MaxDisk="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("disk storage available for scratch data", yytext(), prefix + "00000453.htm");
+  }
+  "MaxDisk="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("disk storage available for scratch data", yytext(), prefix + "00000453.htm");
+  }
+  "Name" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("username stored in archive entry", yytext(), prefix + "00000457.htm");
+  }
+  "Name"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("username stored in archive entry", yytext(), prefix + "00000457.htm");
+  }
+  "Name="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("username stored in archive entry", yytext(), prefix + "00000457.htm");
+  }
+  "Name="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("username stored in archive entry", yytext(), prefix + "00000457.htm");
+  }
+  "Output" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+            pp.system("output unformatted Fortran files", yytext(), "00000461.htm");
+  }
+  "Output"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                      pp.system("output unformatted Fortran files", yytext(), "00000461.htm");
+  }
+  "Output="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                       pp.system("output unformatted Fortran files", yytext(), "00000461.htm");
+  }
+  "Output="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                       pp.system("output unformatted Fortran files", yytext(), "00000461.htm");
+  }
+  "punch" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("output information at various points in calculation", yytext(), prefix + "00000468.htm");
+  }
+  "punch"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("output information at various points in calculation", yytext(), prefix + "00000468.htm");
+  }
+  "punch="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("output information at various points in calculation",  yytext(), prefix + "00000468.htm");
+  }
+  "punch="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("output information at various points in calculation", yytext(), prefix + "00000468.htm");
+  }
+  "ReArchive" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.system("generate archive entry using info. on checkpoint file", yytext(), prefix + "00000470.htm");
+  }	
+  "TrackIO" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+            pp.system("provide statistics of I/O and CPU usage", yytext(), "00000479.htm");
+  }
+/* ___
+   etc
+*/
+  "Geom" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.etc("source of the molecule specification input", yytext(), prefix + "00000440.htm");
+  }
+  "Geom"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.etc("source of the molecule specification input", yytext(), prefix + "00000440.htm");
+  }
+  "Geom="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.etc("source of the molecule specification input", yytext(), prefix + "00000440.htm");
+  }
+  "Geom="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  pp.etc("source of the molecule specification input", yytext(), prefix + "00000440.htm");
+  }
+  "NONSTD" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+            pp.etc("nonstd", yytext(), "00000459.htm");
+  }
+  "OLDCONSTANTS" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                  pp.etc("use values of physical constants from Gaussian 86", yytext(), "00000459.htm");
+  }
+  "TEST" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+          pp.etc("suppress automatic creation of archive entry", yytext(), prefix + "00000477.htm");
+  }
+  "Units" {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                    pp.etc("units used in Z-matrix", yytext(), prefix + "00000481.htm");
+  }
+  "Units"{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                              pp.etc("units used in Z-matrix", yytext(), prefix + "00000481.htm");
+  }
+  "Units="{WORD} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                           pp.etc("units used in Z-matrix", yytext(), prefix + "00000481.htm");
+  }
+  "Units="{WORDLIST} {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+                              pp.etc("units used in Z-matrix", yytext(), prefix + "00000481.htm");
+  }
+  \r|\n|\r\n {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: found EOL");
+	      yybegin(IGNOREALL);
+  } 
+/* 
+                 ___________________________________________
+                 Only reading the first line after the pound! 
+
+*/
+  [ \t\n] {}
+  . {if (Settings.DEBUG) System.out.println("JFlex:pound:POUND: could not analyze input " + yytext());
+  pp.unknown("unknown keyword", yytext());
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  
+			       

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/prepPtplot.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/prepPtplot.flex b/datacat/cup_flex/prepPtplot.flex
new file mode 100644
index 0000000..b112f0f
--- /dev/null
+++ b/datacat/cup_flex/prepPtplot.flex
@@ -0,0 +1,120 @@
+ 
+
+%%
+
+
+%state SCF
+%state ITERLABEL
+%state ITER
+%state TOTALENERGYLABEL
+%state TOTALENERGY
+%state END
+%standalone
+/* 
+   The name of the class JFlex will create will be Lexer.
+   Will write the code to the file Lexer.java. 
+*/ 
+%class prepPtplot
+/* 
+   The current line number can be accessed with the variable yyline 
+   and the current column number with the variable yycolumn. 
+*/ 
+%line 
+%column 
+/* 
+   Will switch to a CUP compatibility mode to interface with a CUP 
+   generated parser. 
+%cup 
+*/ 
+
+
+%8bit
+
+
+%{
+  public static boolean DEBUG = false;
+  String name;
+%}
+
+
+/* A line terminator is a \r (carriage return), \n (line feed), or \r\n. */ 
+LineTerminator = \r|\n|\r\n 
+/* White space is a line terminator, space, tab, or line feed. */ 
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+/* A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+/*  ID declaration  */
+ID=[a-zA-Z][a-zA-Z0-9_]*
+/*  One digit declaration  */
+DIGIT=[0-9]
+/*  Other declarations  */
+BOOL=[T|F]
+INT=[+|-]?{DIGIT}+
+FLOAT=[+|-]?{DIGIT}+"."{DIGIT}*(["E"|"e"]([+|-]?){DIGIT}+)?
+STRING=[A-Z]+
+
+ 
+%%
+
+
+/* here it is */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+<YYINITIAL>"<SCF>" {
+	 System.out.println("<?xml version=\"1.0\" standalone=\"yes\"?>");
+	 System.out.println("<!DOCTYPE plot PUBLIC \"-//UC Berkeley//DTD PlotML 1//EN\"");
+	 System.out.println("    \"http://ptolemy.eecs.berkeley.edu/xml/dtd/PlotML_1.dtd\">");
+	 System.out.println("<plot>");
+	 System.out.println("<!-- Ptolemy plot, version 5.1p2 , PlotML format. -->");
+	 System.out.println("<title>GAMESS TOTALENERGY plot</title>");
+	 System.out.println("<xLabel>iteration</xLabel>");
+	 System.out.println("<yLabel>TOTALENERGY</yLabel>");
+	 System.out.println("<xRange min=\"0.0\" max=\"15.0\"/>");
+	 System.out.println("<yRange min=\"-641.4\" max=\"-639.6\"/>");
+	 System.out.println("<default stems=\"yes\"/>");
+	 System.out.println("<dataset>");
+	 System.out.println("<m x=\"0.0\" y=\"-639.6\"/>");
+	 yybegin(ITERLABEL);
+}
+<ITERLABEL>"<ITER =" {
+	 yybegin(ITER);
+}
+<ITER>{DIGIT}+ {
+	 System.out.print("<p x=\""+yytext()+"\" y=\"");
+	 yybegin(TOTALENERGYLABEL);
+}
+<TOTALENERGYLABEL>"<TOTALENERGY>" {
+	 yybegin(TOTALENERGY);
+}
+<TOTALENERGY>{FLOAT} {
+	 System.out.println(yytext()+"\"/>");
+	 yybegin(ITERLABEL);
+}
+ 
+/* End of iteration listings in parseGamess.xml */
+<ITERLABEL>"</SCF>" {
+	 System.out.println("</dataset>");
+	 System.out.println("</plot>");
+	 yybegin(END);
+}
+
+
+
+<YYINITIAL>{ID}	{}
+<YYINITIAL>{DIGIT}+ {}
+<YYINITIAL>{FLOAT} {}
+<YYINITIAL>"#". {}
+<YYINITIAL>"'"(.|"\'")*"'" {}
+
+
+
+/*  Whitespaces  */
+[ \t\n] {}
+
+
+
+/*  Other cases  */
+. {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/scfa.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/scfa.cup b/datacat/cup_flex/scfa.cup
new file mode 100644
index 0000000..8ef12d7
--- /dev/null
+++ b/datacat/cup_flex/scfa.cup
@@ -0,0 +1,102 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE, NSearch, Energ, MaxGrad, RmsGrad;
+terminal Integer     ITERATION;
+terminal Float     ENERGY, MGRAD, RGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:scfa:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:scfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= NSearch ITERATION:iter
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:scfa: ITERATION  "+iter);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= Energ ENERGY:ener
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:scfa:  ENERGY "+ener); 
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/scfa.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/scfa.flex b/datacat/cup_flex/scfa.flex
new file mode 100644
index 0000000..0d3c83d
--- /dev/null
+++ b/datacat/cup_flex/scfa.flex
@@ -0,0 +1,103 @@
+import java_cup.runtime.*;
+
+%%
+
+%class SCFaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  " shell SCF:" {
+    if (Settings.DEBUG) System.out.println("SCFaFlex: Found Shell SCF");
+	   yybegin(ITER);
+	   return new Symbol(SCFaSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+   "Cycle" {
+   if (Settings.DEBUG) System.out.println("SCFaFlex: Found the cycle number");
+   yybegin(INTVALUE);
+   return new Symbol(SCFaSym.NSearch);}
+
+  " E=" {
+       if (Settings.DEBUG) System.out.println("SCFaFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(SCFaSym.Energ);}
+   "SCF Done:  E(UHF) =" {
+       if (Settings.DEBUG) System.out.println("SCFaFlex: Done");
+               yybegin(IGNOREALL);
+              return new Symbol(SCFaSym.SCFDONE);}
+
+   "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("SCFaFlex: Found the energy");
+               yybegin(IGNOREALL);
+              return new Symbol(SCFaSym.SCFDONE);}
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("SCFaFlex: Found in FLOATVALUE the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(SCFaSym.ENERGY, new Float(yytext()));}
+}
+
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("SCFaFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(SCFaSym.ITERATION, new Integer(yytext()));
+}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/scfb.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/scfb.cup b/datacat/cup_flex/scfb.cup
new file mode 100644
index 0000000..d4f6833
--- /dev/null
+++ b/datacat/cup_flex/scfb.cup
@@ -0,0 +1,115 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+
+
+
+
+/*
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFbParser.java:________________
+
+ //add to CUP$SCFbParser$actions
+ public ParseSCF2 parseSCF;
+
+ //add to the constructor of CUP$SCFbParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true; 
+  private static JTable table;               
+  private static final String tableLabel = "SCF Final Results:";
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+:}
+
+
+
+
+terminal            FOUNDSCF, FOUNDLENX, CYCLE, PASS, IDIAG, ENERGY, DELTAE, DIIS, ATCYCLE, COEFF, TEE, GAP, NK, IS, IE, NO09, NV01, LTEF, GTEF, ERR, RMSDP, MAXDP, COLON, SCFDONE, ERHF, CONVG, S2, MINUSVT, AU, KE, PE, EE, EQUALS, DUMMY, LEAVE;
+terminal String     INT, LENXINT;
+terminal String     FLOAT;
+non terminal Object startpt, scfintro, scfpat, scfcycle, floats, at, en, rms, co, scffinal;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+            scffinal
+            {: if (DEBUG) System.out.println("CUP:scfa:  found scfintro scffinal");
+ 	       table = new JTable();
+	       table = parseSCF.getTable();
+             :}
+            LEAVE
+            {: if (DEBUG) System.out.println("CUP:scfb:  found LEAVE"); 
+             :}
+             ;
+
+
+
+
+scfintro ::=
+FOUNDSCF 
+{: if (DEBUG) System.out.println("CUP:scfb:  found SCF"); :}
+FOUNDLENX LENXINT:i
+{: if (DEBUG) System.out.println("CUP:scfb:  LENX --> "+i); 
+ :}
+;
+
+
+
+
+scffinal ::= 
+SCFDONE
+{: if (DEBUG) System.out.println("CUP:scfb:  scfdone "); :}
+ERHF EQUALS FLOAT:e
+{: //_____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  ERHF "+e); 
+parseSCF.putField("E(RHF)", e);
+ :}
+AU INT:i DUMMY
+{: //___________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  AU "+i); 
+parseSCF.putField("AU", i);
+ :} 
+CONVG EQUALS FLOAT:c
+{: //______________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  CONVG "+c); 
+parseSCF.putField("CONVG", c);
+ :}
+MINUSVT EQUALS FLOAT:m
+{: //________________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  MINUSVT "+m); 
+parseSCF.putField("-V/T", m);
+ :}
+S2 EQUALS FLOAT:s2
+{: //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  S2 "+s2);
+parseSCF.putField("S2", s2);
+ :}
+KE EQUALS FLOAT:ke
+{: //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  KE "+ke); 
+parseSCF.putField("KE", ke);
+ :}
+PE EQUALS FLOAT:pe
+{: //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  PE "+pe); 
+parseSCF.putField("PE", pe);
+ :}
+EE EQUALS FLOAT:ee
+{: //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  EE "+ee); 
+parseSCF.putField("EE", ee);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/scfb.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/scfb.flex b/datacat/cup_flex/scfb.flex
new file mode 100644
index 0000000..1138c97
--- /dev/null
+++ b/datacat/cup_flex/scfb.flex
@@ -0,0 +1,156 @@
+import java_cup.runtime.*;
+
+%%
+
+%class SCFbLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state SCF2
+%state SCF3
+%state EQ3
+%state LENXVALUE
+%state INTVALUE
+%state FLOATVALUE
+%state FLOATVALUE3
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Closed shell SCF:" {
+		       yybegin(SCF1);
+		       return new Symbol(SCFbSym.FOUNDSCF); 
+  }
+  "open shell SCF:" {
+		       yybegin(SCF1);
+		       return new Symbol(SCFbSym.FOUNDSCF); 
+  }
+  .|\n {}
+}
+
+<SCF1>{
+  "LenX=" {
+	   yybegin(LENXVALUE);
+	   return new Symbol(SCFbSym.FOUNDLENX); 
+  }
+  .|\n {}
+}
+
+<LENXVALUE>{
+  {INT} {
+	 yybegin(SCF2);
+	 return new Symbol(SCFbSym.LENXINT, yytext()); 
+  }
+}
+
+<SCF2>{
+  "SCF Done:" {
+	       yybegin(SCF3);
+	       return new Symbol(SCFbSym.SCFDONE); 
+  }
+  .|\n {}
+}
+
+<SCF3>{
+  "E(RHF)" {
+            yybegin(EQ3);
+	    return new Symbol(SCFbSym.ERHF); 
+  }
+  "A.U. after" {return new Symbol(SCFbSym.AU);}
+  "cycles" {return new Symbol(SCFbSym.DUMMY);}
+  "Convg" {
+           yybegin(EQ3);
+           return new Symbol(SCFbSym.CONVG); 
+  }
+  "-V/T" {
+          yybegin(EQ3);
+	  return new Symbol(SCFbSym.MINUSVT); 
+  }
+  "S**2" {
+          yybegin(EQ3);
+	  return new Symbol(SCFbSym.S2); 
+  }
+  "KE" {
+        yybegin(EQ3);
+	return new Symbol(SCFbSym.KE); 
+  }
+  "PE" {
+        yybegin(EQ3);
+	return new Symbol(SCFbSym.PE); 
+  }
+  "EE" {
+	yybegin(EQ3);
+	return new Symbol(SCFbSym.EE); 
+  }
+  "Leave Link" {
+		yybegin(IGNOREALL);
+		return new Symbol(SCFbSym.LEAVE); 
+  }
+  {INT} {return new Symbol(SCFbSym.INT, yytext());}
+  .|\n {}
+}
+
+<INTVALUE>{
+  {INT} {
+	 yybegin(SCF2);
+	 return new Symbol(SCFbSym.INT, yytext()); 
+  }
+}
+
+<FLOATVALUE>{
+  {FLOAT} {
+	   yybegin(SCF2);
+	   return new Symbol(SCFbSym.FLOAT, yytext()); 
+  }
+}
+
+<EQ3>{
+  {EQ} {
+	   yybegin(FLOATVALUE3);
+	   return new Symbol(SCFbSym.EQUALS); 
+  }
+}
+
+<FLOATVALUE3>{
+  {FLOAT} {
+	   yybegin(SCF3);
+	   return new Symbol(SCFbSym.FLOAT, yytext()); 
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/transformation.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/transformation.flex b/datacat/cup_flex/transformation.flex
new file mode 100644
index 0000000..655071f
--- /dev/null
+++ b/datacat/cup_flex/transformation.flex
@@ -0,0 +1,124 @@
+/* Transformation Keyword
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000480.htm
+*/
+ 
+
+
+%%
+
+
+
+/* ___________________________________________________
+   The name of the generated Java class will be lexer. */ 
+
+%class Transformation
+%public
+%unicode
+
+/* _______________________________________________________________
+   Will switch to a CUP compatibility mode to interface with a CUP 
+   generated parser. 
+
+%cup 
+*/ 
+
+/* ________________________________________________________________
+   The current line number can be accessed with the variable yyline 
+   and the current column number with the variable yycolumn. */ 
+
+%line 
+%column 
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class: */
+
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+
+ 
+%%
+
+
+/* _________________________________________
+   Integral Transformation Algorithm Options
+*/
+
+<YYINITIAL>{
+  "Direct" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "InCore" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "FullDirect" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "SemiDirect" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Conventional" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "Old2PDM" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "New2PDM" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+
+/* __________________________
+   Integral Selection Options
+*/
+
+<YYINITIAL>{
+  "Full" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IJAB" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IAJB" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IJKL" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IJKA" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+  "IABC" {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/wavefunction.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/wavefunction.cup b/datacat/cup_flex/wavefunction.cup
new file mode 100644
index 0000000..f40705d
--- /dev/null
+++ b/datacat/cup_flex/wavefunction.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP 
+   {: if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); :}
+
+;


[16/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaParser.java
new file mode 100644
index 0000000..4fffdcb
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaParser.java
@@ -0,0 +1,388 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mopta;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class MOptaParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MOptaParser(final FileReader fileReader) {
+        super(new MOptaLexer(fileReader));
+    }
+
+
+    /**
+     * Production table.
+     */
+    protected static final short _production_table[][] =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\010\000\002\003\005\000\002\002\004\000\002\004" +
+                            "\003\000\002\005\004\000\002\005\003\000\002\010\002" +
+                            "\000\002\006\015\000\002\007\003"});
+    /**
+     * Parse-action table.
+     */
+    protected static final short[][] _action_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\025\000\004\004\005\001\002\000\004\011\012\001" +
+                            "\002\000\004\011\uffff\001\002\000\004\002\007\001\002" +
+                            "\000\004\002\000\001\002\000\006\005\026\011\012\001" +
+                            "\002\000\006\005\ufffd\011\ufffd\001\002\000\004\016\ufffc" +
+                            "\001\002\000\004\016\015\001\002\000\004\013\016\001" +
+                            "\002\000\004\013\ufffa\001\002\000\004\014\017\001\002" +
+                            "\000\004\015\020\001\002\000\004\017\021\001\002\000" +
+                            "\004\020\022\001\002\000\004\021\023\001\002\000\004" +
+                            "\022\024\001\002\000\004\023\025\001\002\000\006\005" +
+                            "\ufffb\011\ufffb\001\002\000\004\002\001\001\002\000\006" +
+                            "\005\ufffe\011\ufffe\001\002"});
+    /**
+     * <code>reduce_goto</code> table.
+     */
+    protected static final short[][] _reduce_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\025\000\006\003\005\004\003\001\001\000\006\005" +
+                            "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                            "\000\002\001\001\000\004\006\026\001\001\000\002\001" +
+                            "\001\000\004\010\012\001\001\000\004\007\013\001\001" +
+                            "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                            "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                            "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                            "\001\000\002\001\001\000\002\001\001"});
+    /**
+     * Instance of action encapsulation class.
+     */
+    protected CUP$parser$actions action_obj;
+    //Each string is of the format
+    //energy and iteraction
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+    /**
+     * Default constructor.
+     */
+    public MOptaParser() {
+        super();
+    }
+
+    /**
+     * Constructor which sets the default scanner.
+     */
+    public MOptaParser(java_cup.runtime.Scanner s) {
+        super(s);
+    }
+
+    /**
+     * Access to production table.
+     */
+    public short[][] production_table() {
+        return _production_table;
+    }
+
+    /**
+     * Access to parse-action table.
+     */
+    public short[][] action_table() {
+        return _action_table;
+    }
+
+    /**
+     * Access to <code>reduce_goto</code> table.
+     */
+    public short[][] reduce_table() {
+        return _reduce_table;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int energyCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString = result.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("ENERGY")){
+                    results.put("MoptaParser_ENERGY_"+energyCount,dataString);
+                    energyCount++;
+                }else if(keyString.equalsIgnoreCase("ITERATION")){
+                    results.put("MoptaParser_ITERATION_"+iterationCount,dataString);
+                    iterationCount++;
+                }
+
+            }
+
+        }
+        return results;
+    }
+
+    /**
+     * Action encapsulation object initializer.
+     */
+    protected void init_actions() {
+        action_obj = new CUP$parser$actions(this);
+    }
+
+    /**
+     * Invoke a user supplied parse action.
+     */
+    public java_cup.runtime.Symbol do_action(
+            int act_num,
+            java_cup.runtime.lr_parser parser,
+            java.util.Stack stack,
+            int top)
+            throws java.lang.Exception {
+    /* call code in generated class */
+        return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+    }
+
+    /**
+     * Indicates start state.
+     */
+    public int start_state() {
+        return 0;
+    }
+
+    /**
+     * Indicates start production.
+     */
+    public int start_production() {
+        return 1;
+    }
+
+    /**
+     * <code>EOF</code> Symbol index.
+     */
+    public int EOF_sym() {
+        return 0;
+    }
+
+    /**
+     * <code>error</code> Symbol index.
+     */
+    public int error_sym() {
+        return 1;
+    }
+
+
+}
+
+/**
+ * Cup generated class to encapsulate user supplied action code.
+ */
+class CUP$parser$actions {
+
+
+    private static final String tableLabel = "SCF Intermediate Results:";
+    //__________________________________
+    public static boolean DEBUG = true;
+    private static JTable table;
+// private static String cycle = "0";
+    private final MOptaParser MOptaParser;
+
+    /**
+     * Constructor
+     */
+    CUP$parser$actions(MOptaParser MOptaParser) {
+        this.MOptaParser = MOptaParser;
+    }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+
+    public static JTable getTable() {
+        return table;
+    }
+
+    public static String getTableLabel() {
+        return tableLabel;
+    }
+
+    /**
+     * Method with the actual generated action code.
+     */
+    public final java_cup.runtime.Symbol CUP$parser$do_action(
+            int CUP$parser$act_num,
+            java_cup.runtime.lr_parser CUP$parser$parser,
+            java.util.Stack CUP$parser$stack,
+            int CUP$parser$top)
+            throws java.lang.Exception {
+      /* Symbol object for return from actions */
+        java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+        switch (CUP$parser$act_num) {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 7: // en ::= ENERGY
+            {
+                Object RESULT = null;
+                int eleft = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int eright = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float e = (Float) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY " + e);
+                MOptaParser.addToResult("ENERGY "+e);
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+
+                CUP$parser$result = new java_cup.runtime.Symbol(5/*en*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 6: // scfcycle ::= INTCycle NT$0 en FLOAT1 FLOAT2 FLOAT3 FLOAT4 FLOAT5 FLOAT6 FLOAT7 FLOAT8
+            {
+                Object RESULT = null;
+                // propagate RESULT from NT$0
+                if (((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 9)).value != null)
+                    RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 9)).value;
+                int cleft = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 10)).left;
+                int cright = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 10)).right;
+                Integer c = (Integer) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 10)).value;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 10)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 5: // NT$0 ::=
+            {
+                Object RESULT = null;
+                int cleft = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int cright = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Integer c = (Integer) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION " + c);
+                MOptaParser.addToResult("ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+
+//  parseSCF.putField("iteration "+cycle, cycle);
+
+                CUP$parser$result = new java_cup.runtime.Symbol(6/*NT$0*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 4: // scfpat ::= scfcycle
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 3: // scfpat ::= scfpat scfcycle
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gscfa: in scfpat");
+                CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 2: // scfintro ::= FOUNDITER
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration");
+                CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 1: // $START ::= startpt EOF
+            {
+                Object RESULT = null;
+                int start_valleft = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left;
+                int start_valright = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).right;
+                Object start_val = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
+                RESULT = start_val;
+                CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+          /* ACCEPT */
+            CUP$parser$parser.done_parsing();
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 0: // startpt ::= scfintro scfpat SCFDONE
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree ");
+                table = new JTable();
+
+//       table = parseSCF.getTable();
+
+                CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /* . . . . . .*/
+            default:
+                throw new Exception(
+                        "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaSym.java
new file mode 100644
index 0000000..664d448
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaSym.java
@@ -0,0 +1,51 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mopta;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Fri Sep 12 00:11:41 IST 2014
+//----------------------------------------------------
+
+/**
+ * CUP generated class containing symbol constants.
+ */
+public class MOptaSym {
+    /* terminals */
+    public static final int FLOAT5 = 14;
+    public static final int FLOAT4 = 13;
+    public static final int FLOAT3 = 11;
+    public static final int FLOAT2 = 10;
+    public static final int FLOAT1 = 9;
+    public static final int INTCycle = 7;
+    public static final int INT3 = 6;
+    public static final int FLOAT = 8;
+    public static final int INT2 = 5;
+    public static final int INT1 = 4;
+    public static final int EOF = 0;
+    public static final int FOUNDITER = 2;
+    public static final int error = 1;
+    public static final int SCFDONE = 3;
+    public static final int ENERGY = 12;
+    public static final int FLOAT8 = 17;
+    public static final int FLOAT7 = 16;
+    public static final int FLOAT6 = 15;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aLexer.java
new file mode 100644
index 0000000..54c0221
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aLexer.java
@@ -0,0 +1,681 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5a;/* The following code was generated by JFlex 1.4.3 on 9/14/14 11:25 AM */
+
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/14/14 11:25 AM from the specification file
+ * <tt>mp2to5a.flex</tt>
+ */
+public class MP2to5aLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 4;
+  public static final int FLOATVAL = 2;
+  public static final int YYINITIAL = 0;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  6,  7,  0,  2,  0,  2,  3,  0, 
+     1,  1,  1,  1, 10, 15,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0, 11,  4,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0, 
+     9, 12,  0, 13, 14, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  4,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\5\1\3\0\1\2\1\0\1\3\3\0\1\4"+
+    "\1\2\5\0\1\5\2\0\1\6\1\0\1\7";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[30];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\21\0\42\0\63\0\104\0\125\0\146\0\167"+
+    "\0\210\0\231\0\146\0\252\0\273\0\63\0\314\0\335"+
+    "\0\356\0\63\0\377\0\377\0\u0110\0\u0121\0\u0132\0\u0143"+
+    "\0\63\0\u0154\0\u0165\0\63\0\u0176\0\63";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[30];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\10\4\1\5\7\4\1\6\1\4\1\7\1\10\2\4"+
+    "\1\10\4\4\1\7\4\4\1\7\22\4\32\0\1\11"+
+    "\17\0\1\12\11\0\1\13\1\0\1\14\6\0\1\13"+
+    "\4\0\1\13\2\0\1\13\10\0\1\13\4\0\1\13"+
+    "\13\0\1\15\4\0\1\16\12\0\1\17\10\0\1\14"+
+    "\2\0\2\20\4\0\1\14\1\20\3\0\1\14\7\0"+
+    "\1\21\31\0\1\22\2\0\1\23\1\24\2\0\1\24"+
+    "\4\0\1\23\4\0\1\23\14\0\1\25\1\0\1\26"+
+    "\4\0\1\23\10\0\1\23\4\0\1\23\15\0\1\27"+
+    "\17\0\1\30\14\0\1\31\25\0\1\32\1\0\1\33"+
+    "\11\0\1\34\25\0\1\35\13\0\1\36\11\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[391];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\4\1\3\0\1\1\1\0\1\11\3\0"+
+    "\1\11\1\1\5\0\1\11\2\0\1\11\1\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[30];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MP2to5aLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MP2to5aLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 4: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5aSym.LIM, yytext());
+          }
+        case 8: break;
+        case 7: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       return new Symbol(MP2to5aSym.VAR, yytext());
+          }
+        case 9: break;
+        case 2: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5aSym.FLOAT, yytext());
+          }
+        case 10: break;
+        case 3: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 return new Symbol(MP2to5aSym.LIM, yytext());
+          }
+        case 11: break;
+        case 5: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     return new Symbol(MP2to5aSym.VAR, yytext());
+          }
+        case 12: break;
+        case 6: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	      return new Symbol(MP2to5aSym.VAR, yytext());
+          }
+        case 13: break;
+        case 1: 
+          { 
+          }
+        case 14: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(MP2to5aSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = MP2to5aSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MP2to5aLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MP2to5aLexer scanner = null;
+        try {
+          scanner = new MP2to5aLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aParser.java
new file mode 100644
index 0000000..1ae4db3
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aParser.java
@@ -0,0 +1,261 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5a;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class MP2to5aParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public MP2to5aParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MP2to5aParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MP2to5aParser(final FileReader fileReader) {
+        super(new MP2to5aLexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\005\000\002\003\004\000\002\002\004\000\002\003" +
+                    "\003\000\002\004\003\000\002\004\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\023\004\024\006\001\002\000\010\002" +
+                    "\ufffe\023\ufffe\024\ufffe\001\002\000\010\002\uffff\023\uffff" +
+                    "\024\uffff\001\002\000\010\002\ufffd\023\ufffd\024\ufffd\001" +
+                    "\002\000\010\002\011\023\004\024\006\001\002\000\010" +
+                    "\002\001\023\001\024\001\001\002\000\004\002\000\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\003\006\004\004\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\004\004\007" +
+                    "\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+
+    //Each string is of the format
+    //mp2SpecificOption
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+       parse();
+       HashMap<String,String> results=new HashMap<String,String>();
+        int count=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString=temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("SpecificOption")){
+                    results.put("MP2to5aParser_MP2_Specific_Option_"+count,dataString);
+                    count++;
+                }
+            }
+
+        }
+        return results;
+    }
+
+
+        /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+  /** User initialization code. */
+  public void user_init() throws java.lang.Exception
+    {
+ if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  entry");
+    }
+
+
+
+    ///public static boolean DEBUG = false;
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+  private final MP2to5aParser MP2to5aParser;
+
+  /** Constructor */
+  CUP$parser$actions(MP2to5aParser MP2to5aParser) {
+    this.MP2to5aParser = MP2to5aParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // element ::= LIM 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  MP2-Specific Option: "+s);
+         MP2to5aParser.addToResult("SpecificOption "+s);
+	  // ParseMP2to5.put("Limitations to MP5: ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // element ::= VAR 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  MP2-Specific Option: "+s);
+                MP2to5aParser.addToResult("SpecificOption "+s);
+	   //ParseMP2to5.put("Variations of MP4: ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // startpt ::= element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= startpt element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aSym.java
new file mode 100644
index 0000000..709154a
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5a/MP2to5aSym.java
@@ -0,0 +1,51 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5a;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Sep 14 11:25:52 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MP2to5aSym {
+  /* terminals */
+  public static final int E4_SDTQ = 8;
+  public static final int MP2OPT = 16;
+  public static final int LIM = 18;
+  public static final int UMP4_SDQ = 11;
+  public static final int UMP4_SDTQ = 12;
+  public static final int E4_DQ = 6;
+  public static final int FCOPT = 13;
+  public static final int UMP4_DQ = 10;
+  public static final int E4_SDQ = 7;
+  public static final int E3 = 5;
+  public static final int E2 = 2;
+  public static final int FLOAT = 19;
+  public static final int EOF = 0;
+  public static final int error = 1;
+  public static final int MP4_T = 4;
+  public static final int FCOPT2 = 14;
+  public static final int ALGOPT = 15;
+  public static final int VAR = 17;
+  public static final int EUMP3 = 9;
+  public static final int EUMP2 = 3;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bLexer.java
new file mode 100644
index 0000000..fa065ff
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bLexer.java
@@ -0,0 +1,687 @@
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5b;/* The following code was generated by JFlex 1.4.3 on 9/14/14 11:52 AM */
+
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/14/14 11:52 AM from the specification file
+ * <tt>mp2to5b.flex</tt>
+ */
+public class MP2to5bLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 4;
+  public static final int FLOATVAL = 2;
+  public static final int YYINITIAL = 0;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  7, 15,  4,  0, 
+     1,  2, 18,  2, 16, 14, 17,  2,  2,  2,  0,  0,  0, 26,  0,  0, 
+     0, 27,  0,  9,  5,  5,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0, 12, 28,  0,  0,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0, 20,  0,  0, 21, 19,  0,  0,  0, 22,  0,  0, 11,  0, 23, 24, 
+     0,  0,  0,  0,  0, 10,  0, 25,  0,  0,  0,  0,  6,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\13\1\1\0\1\2\5\0\1\3\2\0\1\4"+
+    "\1\5\7\0\1\6\3\0\1\7\1\4\4\0\1\10"+
+    "\3\0\1\11\2\0\1\12";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[51];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\35\0\72\0\127\0\164\0\221\0\256\0\313"+
+    "\0\350\0\u0105\0\u0122\0\u013f\0\u015c\0\u0179\0\u0196\0\127"+
+    "\0\u01b3\0\u01d0\0\u01ed\0\u020a\0\u0227\0\127\0\u0244\0\u015c"+
+    "\0\u0261\0\127\0\u027e\0\u029b\0\u02b8\0\u02d5\0\u02f2\0\u030f"+
+    "\0\u032c\0\127\0\u0349\0\u0366\0\u0383\0\127\0\u03a0\0\u03a0"+
+    "\0\u03bd\0\u03da\0\u03f7\0\127\0\u0414\0\u0431\0\u044e\0\127"+
+    "\0\u046b\0\u0488\0\127";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[51];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\1\4\1\5\6\4\1\6\1\7\2\4\1\10\1\11"+
+    "\1\12\1\13\1\4\1\14\14\4\2\15\1\16\2\4"+
+    "\1\16\7\4\1\15\1\16\3\15\47\4\44\0\1\17"+
+    "\36\0\1\20\1\21\55\0\1\22\16\0\1\20\5\0"+
+    "\1\23\37\0\1\24\15\0\1\25\46\0\1\26\22\0"+
+    "\1\27\26\0\2\30\1\0\1\31\11\0\1\30\1\0"+
+    "\3\30\13\0\2\30\13\0\1\30\1\0\3\30\13\0"+
+    "\1\32\46\0\1\33\55\0\1\34\24\0\1\35\37\0"+
+    "\1\36\6\0\1\32\15\0\1\37\37\0\1\40\13\0"+
+    "\2\31\2\0\2\41\7\0\1\31\1\0\3\31\1\41"+
+    "\1\0\1\41\22\0\1\42\55\0\1\43\25\0\1\44"+
+    "\34\0\1\45\27\0\1\46\36\0\1\46\13\0\2\47"+
+    "\1\50\2\0\1\50\7\0\1\47\1\50\3\47\23\0"+
+    "\1\51\40\0\1\52\47\0\1\53\5\0\2\47\13\0"+
+    "\1\47\1\0\3\47\22\0\1\54\52\0\1\55\37\0"+
+    "\1\56\32\0\1\57\37\0\1\60\27\0\1\61\37\0"+
+    "\1\62\35\0\1\63\3\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1189];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\12\1\1\0\1\11\5\0\1\11\2\0"+
+    "\1\1\1\11\7\0\1\11\3\0\1\11\1\1\4\0"+
+    "\1\11\3\0\1\11\2\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[51];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MP2to5bLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MP2to5bLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 4: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5bSym.FLOAT, yytext());
+          }
+        case 11: break;
+        case 8: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5bSym.FCOPT, yytext());
+          }
+        case 12: break;
+        case 10: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5bSym.FCOPT, yytext());
+          }
+        case 13: break;
+        case 9: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     return new Symbol(MP2to5bSym.FCOPT, yytext());
+          }
+        case 14: break;
+        case 5: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 return new Symbol(MP2to5bSym.FCOPT2, yytext());
+          }
+        case 15: break;
+        case 7: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5bSym.FCOPT2, yytext());
+          }
+        case 16: break;
+        case 6: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5bSym.FCOPT, yytext());
+          }
+        case 17: break;
+        case 3: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	return new Symbol(MP2to5bSym.FCOPT2, yytext());
+          }
+        case 18: break;
+        case 2: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	return new Symbol(MP2to5bSym.FCOPT, yytext());
+          }
+        case 19: break;
+        case 1: 
+          { 
+          }
+        case 20: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(MP2to5bSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = MP2to5bSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MP2to5bLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MP2to5bLexer scanner = null;
+        try {
+          scanner = new MP2to5bLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bParser.java
new file mode 100644
index 0000000..ba61f5f
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bParser.java
@@ -0,0 +1,263 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5b;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class MP2to5bParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public MP2to5bParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MP2to5bParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MP2to5bParser(final FileReader fileReader) {
+        super(new MP2to5bLexer(fileReader));
+    }
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\005\000\002\003\004\000\002\002\004\000\002\003" +
+                    "\003\000\002\004\003\000\002\004\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\017\004\020\005\001\002\000\010\002" +
+                    "\ufffe\017\ufffe\020\ufffe\001\002\000\010\002\ufffd\017\ufffd" +
+                    "\020\ufffd\001\002\000\010\002\uffff\017\uffff\020\uffff\001" +
+                    "\002\000\010\002\011\017\004\020\005\001\002\000\010" +
+                    "\002\001\017\001\020\001\001\002\000\004\002\000\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\003\006\004\005\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\004\004\007" +
+                    "\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //mp2SpecificOption
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String, String> results = new HashMap<String,String>();
+        int j=0;
+        for (int i=0; i<result.size();i++){
+            String resultString= result.get(i);
+            String[] temp=resultString.split(" ");
+            if(temp.length<3){
+                continue;
+            }
+            String element=temp[2]+" "+temp[3]+" "+temp[4];
+            if (element.equalsIgnoreCase("Frozen Core Option:")){
+                j++;
+                String tempString= "MP2to5b_Frozen Core Option_" + j;
+                results.put(tempString,temp[6]);
+            }else{
+                continue;
+            }
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+  /** User initialization code. */
+  public void user_init() throws java.lang.Exception
+    {
+ if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  entry");
+    }
+
+
+
+    ///public static boolean DEBUG = false;
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+  private final MP2to5bParser MP2to5bParser;
+
+  /** Constructor */
+  CUP$parser$actions(MP2to5bParser MP2to5bParser) {
+    this.MP2to5bParser = MP2to5bParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // element ::= FCOPT2 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  Frozen Core Option:  "+s);
+         MP2to5bParser.addToResult("CUP:mp2to5b:  Frozen Core Option:  "+s);
+               	//   ParseMP2to5.put("Frozen Core Option?  (Check raw output)  ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // element ::= FCOPT 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  Frozen Core Option:  "+s);
+         MP2to5bParser.addToResult("CUP:mp2to5b:  Frozen Core Option:  "+s);
+
+	//   ParseMP2to5.put("Frozen Core Option:  ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // startpt ::= element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= startpt element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bSym.java
new file mode 100644
index 0000000..69f1e51
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5b/MP2to5bSym.java
@@ -0,0 +1,51 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5b;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Sep 14 11:52:08 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MP2to5bSym {
+  /* terminals */
+  public static final int E4_SDTQ = 8;
+  public static final int MP2OPT = 16;
+  public static final int LIM = 18;
+  public static final int UMP4_SDQ = 11;
+  public static final int UMP4_SDTQ = 12;
+  public static final int E4_DQ = 6;
+  public static final int FCOPT = 13;
+  public static final int UMP4_DQ = 10;
+  public static final int E4_SDQ = 7;
+  public static final int E3 = 5;
+  public static final int E2 = 2;
+  public static final int FLOAT = 19;
+  public static final int EOF = 0;
+  public static final int error = 1;
+  public static final int MP4_T = 4;
+  public static final int FCOPT2 = 14;
+  public static final int ALGOPT = 15;
+  public static final int VAR = 17;
+  public static final int EUMP3 = 9;
+  public static final int EUMP2 = 3;
+}
+


[12/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/B3PW91/B3PW91GridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/B3PW91/B3PW91GridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/B3PW91/B3PW91GridChemParserTest.java
new file mode 100644
index 0000000..28a76aa
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/B3PW91/B3PW91GridChemParserTest.java
@@ -0,0 +1,62 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.B3PW91;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.B3PW91.B3PW91Parser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.util.Map;
+
+
+public class B3PW91GridChemParserTest extends AbstractGridChemParserTest {
+
+    private Logger logger = Logger.getLogger(B3PW91GridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testB3PW91Parser() {
+        boolean exception = false;
+        try {
+            B3PW91Parser p = new B3PW91Parser(new FileReader(TEST_OUTPUT));
+            p.parse();
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/CbsQ/CbsQGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/CbsQ/CbsQGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/CbsQ/CbsQGridChemParserTest.java
new file mode 100644
index 0000000..c898ad3
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/CbsQ/CbsQGridChemParserTest.java
@@ -0,0 +1,59 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.CbsQ;
+
+import junit.framework.Assert;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.apache.airavata.datacat.parsers.gridchem.cbsQ.CbsQParser;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.util.HashMap;
+
+public class CbsQGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(CbsQGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testCbsQParser() {
+        boolean exception = false;
+        try {
+            CbsQParser p= new CbsQParser(new FileReader(TEST_OUTPUT));
+            HashMap<String,String> map=p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(map.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/G1/G1GridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/G1/G1GridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/G1/G1GridChemParserTest.java
new file mode 100644
index 0000000..6b47962
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/G1/G1GridChemParserTest.java
@@ -0,0 +1,58 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.G1;
+
+import junit.framework.Assert;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.apache.airavata.datacat.parsers.gridchem.g1.G1Parser;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class G1GridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(G1GridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testG1Parser() {
+        boolean exception = false;
+        try {
+            G1Parser p = new G1Parser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/GridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/GridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/GridChemParserTest.java
new file mode 100644
index 0000000..83bdac4
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/GridChemParserTest.java
@@ -0,0 +1,61 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.models.OutputMonitorMessageType;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemParser;
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GridChemParserTest {
+    private Logger log = Logger.getLogger(GridChemParserTest.class);
+    private String SAMPLE_DATA;
+
+    private OutputMonitorMessage outputMonitorMessage;
+    private GridChemParser parser;
+
+    @Before
+    public void setup() {
+        //configuring the data root
+        SAMPLE_DATA = GridChemProperties.getInstance().getProperty(Constants.SAMPLE_OUTPUT, "");
+
+        parser = new GridChemParser();
+        outputMonitorMessage = new OutputMonitorMessage();
+
+        //creating a dummy file monitor message
+        outputMonitorMessage.setExperimentName("2H2OOHNCmin.com.out");
+        outputMonitorMessage.setOutputPath(SAMPLE_DATA);
+        outputMonitorMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_CREATED);
+        log.info("File Monitor message initialized ...");
+    }
+
+    @Test
+    public void testGCParserSingleOutput() {
+        OutputMetadataDTO metadataDTO = parser.parse(outputMonitorMessage);
+        Assert.assertNotNull(metadataDTO);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5a/MP2to5aGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5a/MP2to5aGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5a/MP2to5aGridChemParserTest.java
new file mode 100644
index 0000000..9471235
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5a/MP2to5aGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.MP2to5a;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5a.MP2to5aParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+
+public class MP2to5aGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(MP2to5aGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMP2to5aParser() {
+        boolean exception = false;
+        try {
+            MP2to5aParser p = new MP2to5aParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5b/MP2to5bGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5b/MP2to5bGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5b/MP2to5bGridChemParserTest.java
new file mode 100644
index 0000000..8e7c028
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5b/MP2to5bGridChemParserTest.java
@@ -0,0 +1,58 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.MP2to5b;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5b.MP2to5bParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class MP2to5bGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(MP2to5bGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMP2to5bParser() {
+        boolean exception = false;
+        try {
+            MP2to5bParser p = new MP2to5bParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..." + e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+    }

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5c/MP2to5cGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5c/MP2to5cGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5c/MP2to5cGridChemParserTest.java
new file mode 100644
index 0000000..297a5e3
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/MP2to5c/MP2to5cGridChemParserTest.java
@@ -0,0 +1,58 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.MP2to5c;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5c.MP2to5cParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class MP2to5cGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(MP2to5cGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMP2to5cParser() {
+        boolean exception = false;
+        try {
+            MP2to5cParser p = new MP2to5cParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/ParserParameterizedTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/ParserParameterizedTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/ParserParameterizedTest.java
new file mode 100644
index 0000000..352ecc5
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/ParserParameterizedTest.java
@@ -0,0 +1,461 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.B3PW91.B3PW91Parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+import org.apache.airavata.datacat.parsers.gridchem.cbsQ.CbsQParser;
+import org.apache.airavata.datacat.parsers.gridchem.finalcoord.FinalCoordParser;
+import org.apache.airavata.datacat.parsers.gridchem.g1.G1Parser;
+import org.apache.airavata.datacat.parsers.gridchem.gaussian.GaussianParser;
+import org.apache.airavata.datacat.parsers.gridchem.gfinalcoord.GFinalCoordParser;
+import org.apache.airavata.datacat.parsers.gridchem.gmcscfa.GmcscfaParser;
+import org.apache.airavata.datacat.parsers.gridchem.gnumatom.GNumAtomParser;
+import org.apache.airavata.datacat.parsers.gridchem.gopt.GoptParser;
+import org.apache.airavata.datacat.parsers.gridchem.gscfa.GscfaParser;
+import org.apache.airavata.datacat.parsers.gridchem.gvb.GVBParser;
+import org.apache.airavata.datacat.parsers.gridchem.input.InputParser;
+import org.apache.airavata.datacat.parsers.gridchem.method.MethodParser;
+import org.apache.airavata.datacat.parsers.gridchem.mfinalcoord.MFinalCoordParser;
+import org.apache.airavata.datacat.parsers.gridchem.mopta.MOptaParser;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5a.MP2to5aParser;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5b.MP2to5bParser;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5c.MP2to5cParser;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5d.MP2to5dParser;
+import org.apache.airavata.datacat.parsers.gridchem.scfa.SCFaParser;
+import org.apache.airavata.datacat.parsers.gridchem.scfb.SCFbParser;
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.log4j.Logger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+
+@RunWith(Parameterized.class)
+public class ParserParameterizedTest {
+    private Logger log = Logger.getLogger(ParserParameterizedTest.class);
+
+    private String filename;
+    private boolean expected;
+    private GridChemQueueParser parser;
+    private String OUTPUT_FILE_PATH;
+
+
+    @Parameters
+    public static Collection<Object[]> data() {
+        return Arrays.asList(new Object[][]{
+                {"2H2OOHNCmin.com.out", true},
+                {"2H2OOHNCtsb.com.out", true},
+                {"2H2OOHNCtsc.com.out", true},
+                {"2H2OOHNCtsd.com.out", true},
+                {"2H2OOHNCtse.com.out", true},
+                {"2H2OOHNCtsf.com.out", true},
+                {"A1MBBTSNTd.com.out",true},
+                {"A1MBBTSNTe.com.out",true},
+                {"AcArgTS1.com.out",true},
+                {"AcArgTS1a.com.out",true},
+                {"AcArgTS1mi.com.out",true},
+                {"AcArgTS2.com.out",true},
+                {"AcArTS1mia.com.out",true},
+                {"acetbvTS1.com.out",true},
+                {"acetbvTS1a.com.out",true},
+                {"acet_bvTSa.com.out",true},
+                {"acetbvTSHM.com.out",true},
+                {"acetbvTSHM1.com.out",true},
+                {"acetHGS.com.out",true},
+                {"acetHTS1.com.out",true},
+                {"acetHTS1IR.com.out",true},
+                {"acetHTS1IRR.com.out",true},
+                {"acetHTS2.com.out",true},
+                {"acettetTS.com.out",true},
+                {"acettetTSa.com.out",true},
+                {"acettetTSM.com.out",true},
+                {"acettetTSM1.com.out",true},
+                {"acetTS1Ha.com.out",true},
+                {"acetTSaIRCF.com.out",true},
+                {"AchextetB.com.out",true},
+                {"AcOHOHTS.com.out",true},
+                {"AcOHOHTS1.com.out",true},
+                {"AcPhCHtetB.com.out",true},
+                {"ActethexA.com.out",true},
+                {"ActetPhA.com.out",true},
+                {"BalvTSIRCF.com.out",true},
+                {"BalvTSIRCR.com.out",true},
+                {"CH3oohGS.com.out",true},
+                {"CH3oohtet.com.out",true},
+                {"CH3oohTS1.com.out",true},
+                {"CH3oohTS1a.com.out",true},
+                {"CH4_311.com.out",true},
+                {"cycAGS1.com.out",true},
+                {"cycATS1.com.out",true},
+                {"cycAGS1.com.out",true},
+                {"cycBTS1.com.out",true},
+                {"FL_acOHts4.com.out",true},
+                {"FLarcyctsF.com.out",true},
+                {"FLox31_311.com.out",true},
+                {"H2O_OHNaCl.com.out",true},
+                {"H2OOHNaClts.com.out",true},
+                {"H2OOHNCltsa.com.out",true},
+                {"H2OOHNCltsb.com.out",true},
+                {"H2OOHNCltsc.com.out",true},
+                {"H2O_OHrad.com.out",true},
+                {"H2O_OHradN.com.out",true},
+                {"H2OOHradNts.com.out",true},
+                {"H2O_OHradts.com.out",true},
+                {"H3O_ONaCl.com.out",true},
+                {"IQOOGSMeOH.com.out",true},
+                {"IQOOGSMeOHa.com.out",true},
+                {"IQOOGSMeOHb.com.out",true},
+                {"IQOOH.com.out",true},
+                {"IQOOHBcIRCF.com.out",true},
+                {"IQOOHBcIRCR.com.out",true},
+                {"IQOOHBGIRCF.com.out",true},
+                {"IQOOHBGIRCR.com.out",true},
+                {"IQOOHimts.com.out",true},
+                {"IQOOHimtsa.com.out",true},
+                {"IQOOHimtsb.com.out",true},
+                {"IQOOHIRCF.com.out",true},
+                {"IQOOHIRCF6.com.out",true},
+                {"IQOOHIRCFa.com.out",true},
+                {"IQOOHIRCFre.com.out",true},
+                {"IQOOHIRCR.com.out",true},
+                {"IQOOHIRCR6.com.out",true},
+                {"IQOOHNHCOOH.com.out",true},
+                {"IQOOHNHIRCF.com.out",true},
+                {"IQOOHNHIRCR.com.out",true},
+                {"IQOOHNmin.com.out",true},
+                {"IQOOHNmin90.com.out",true},
+                {"IQOOHNminUF.com.out",true},
+                {"IQOOHNts.com.out",true}
+        });
+    }
+
+    public ParserParameterizedTest(String filename, boolean expected) {
+        OUTPUT_FILE_PATH = GridChemProperties.getInstance().getProperty(Constants.SAMPLE_OUTPUT, "");
+        this.filename = OUTPUT_FILE_PATH +"/"+ filename+"/"+filename;
+        this.expected = expected;
+
+
+    }
+
+    @Test
+    public void testGOPTParser() {
+        try {
+            parser = new GoptParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+
+           log.info("Parse successful in GoptParser"+filename);
+
+        } catch (FileNotFoundException e) {
+          //  log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+          //  log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+    @Test
+    public void testB3PW91() {
+        try {
+            parser = new B3PW91Parser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in B3PW91"+filename);
+        } catch (FileNotFoundException e) {
+          //  log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+          //  log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+    @Test
+    public void testCbsqParser() {
+        try {
+            parser = new CbsQParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Cbsq "+filename);
+        } catch (FileNotFoundException e) {
+           // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+           // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testFinalCoordParser() {
+        try {
+            parser = new FinalCoordParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in FinalCoord " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testG1Parser() {
+        try {
+            parser = new G1Parser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in G1 " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGaussianParser() {
+        try {
+            parser = new GaussianParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Gaussian " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGFinalCoord() {
+        try {
+            parser = new GFinalCoordParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in GfinalCoord Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGmcsfaParser() {
+        try {
+            parser = new GmcscfaParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Gmcsfa Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGvbParser() {
+        try {
+            parser = new GVBParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Gvb Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGscfaParser() {
+        try {
+            parser = new GscfaParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Gscfa Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGnumatomParser() {
+        try {
+            parser = new GNumAtomParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in GnumAtom Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testInputParser() {
+        try {
+            parser = new InputParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Input Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testMethodParser() {
+        try {
+            parser = new MethodParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in MethodParser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void testMFinalCoordParser() {
+        try {
+            parser = new MFinalCoordParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in MFinalCoord Parser " + filename);
+        } catch (FileNotFoundException e) {
+            // log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            // log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestMoptaParser() {
+        try {
+            parser = new MOptaParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Mopta Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestMp2to5aParser() {
+        try {
+            parser = new MP2to5aParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Mp2to5a Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+
+    @Test
+    public void TestMp2to5bParser() {
+        try {
+            parser = new MP2to5bParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Mp2to5b Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestMp2to5cParser() {
+        try {
+            parser = new MP2to5cParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Mp2to5c Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestMp2to5dParser() {
+        try {
+            parser = new MP2to5dParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Mp2to5d Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestScfaParser() {
+        try {
+            parser = new SCFaParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Scfa Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+
+    @Test
+    public void TestScfbParser() {
+        try {
+            parser = new SCFbParser(new FileReader(this.filename));
+            HashMap<String, String> parsedData = parser.getParsedData();
+            Assert.assertEquals(expected, parsedData != null);
+            log.info("Parse successful in Scfb Parser " + filename);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFound in ..." + e.getMessage());
+        } catch (Exception e) {
+            log.error("Error occurred in parsing " + filename + " : " + e.getMessage());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParserGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParserGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParserGridChemParserTest.java
new file mode 100644
index 0000000..0903401
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParserGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.finalcoord;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.finalcoord.FinalCoordParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class FinalCoordParserGridChemParserTest extends AbstractGridChemParserTest {
+
+    private Logger logger = Logger.getLogger(FinalCoordParserGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testFinalCoordParser() {
+        boolean exception = false;
+        try {
+            FinalCoordParser p = new FinalCoordParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gFinalCoord/GFinalCoordGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gFinalCoord/GFinalCoordGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gFinalCoord/GFinalCoordGridChemParserTest.java
new file mode 100644
index 0000000..f85dbaf
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gFinalCoord/GFinalCoordGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gFinalCoord;
+
+import junit.framework.Assert;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.apache.airavata.datacat.parsers.gridchem.gfinalcoord.GFinalCoordParser;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+
+public class GFinalCoordGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GFinalCoordGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testFinalCoordParser() {
+        boolean exception = false;
+        try {
+            GFinalCoordParser p = new GFinalCoordParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gaussian/GaussianParserGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gaussian/GaussianParserGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gaussian/GaussianParserGridChemParserTest.java
new file mode 100644
index 0000000..543e58a
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gaussian/GaussianParserGridChemParserTest.java
@@ -0,0 +1,57 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gaussian;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.gaussian.GaussianParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class GaussianParserGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GaussianParserGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGoptParser() {
+        boolean exception = false;
+        try {
+            GaussianParser p = new GaussianParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaGridChemParserTest.java
new file mode 100644
index 0000000..06e0314
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gmcscfa;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.gmcscfa.GmcscfaParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+
+public class GMCSCFaGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GMCSCFaGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGmcsfaParser() {
+        boolean exception = false;
+        try {
+            GmcscfaParser p = new GmcscfaParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gopt/GoptGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gopt/GoptGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gopt/GoptGridChemParserTest.java
new file mode 100644
index 0000000..da2d5e4
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gopt/GoptGridChemParserTest.java
@@ -0,0 +1,58 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gopt;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.gopt.GoptParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class GoptGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GoptGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGoptParser() {
+        boolean exception = false;
+        try {
+            GoptParser p = new GoptParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gscfa/GscfaGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gscfa/GscfaGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gscfa/GscfaGridChemParserTest.java
new file mode 100644
index 0000000..f5e5cab
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gscfa/GscfaGridChemParserTest.java
@@ -0,0 +1,59 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gscfa;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.gscfa.GscfaParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class GscfaGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GscfaGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGVBParser() {
+        boolean exception = false;
+        try {
+            GscfaParser p = new GscfaParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+    }
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gvb/GVBGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gvb/GVBGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gvb/GVBGridChemParserTest.java
new file mode 100644
index 0000000..1a8bac2
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/gvb/GVBGridChemParserTest.java
@@ -0,0 +1,59 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.gvb;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.gvb.GVBParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class GVBGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(GVBGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGVBParser() {
+        boolean exception = false;
+        try {
+            GVBParser p = new GVBParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+    }
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/inchi/InChIGeneratorGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/inchi/InChIGeneratorGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/inchi/InChIGeneratorGridChemParserTest.java
new file mode 100644
index 0000000..cc9fb8a
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/inchi/InChIGeneratorGridChemParserTest.java
@@ -0,0 +1,68 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.inchi;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChI;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChIGenerator;
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.commons.io.FileUtils;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.UUID;
+
+public class InChIGeneratorGridChemParserTest extends AbstractGridChemParserTest {
+
+    private Logger logger = Logger.getLogger(InChIGeneratorGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testGetInChI() throws Exception {
+        try {
+            String uniqueID = UUID.randomUUID().toString();
+            File source = new File(TEST_OUTPUT);
+
+            File dest = new File(GridChemProperties.getInstance().getProperty(
+                    Constants.TMP_DIR,"") + "/" + uniqueID + ".out");
+            FileUtils.copyFile(source, dest);
+
+            InChIGenerator inChIGenerator = new InChIGenerator(uniqueID);
+            InChI inChI = inChIGenerator.getInChI();
+
+            logger.info("TEST MESSAGE");
+            logger.info(inChI.getInchi() + " inchi key: " + inChI.getInchiKey());
+            Assert.assertNotNull(inChI.getInchi());
+            Assert.assertNotNull(inChI.getInchiKey());
+        } catch (IOException ignore) {
+            ignore.printStackTrace();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/input/InputGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/input/InputGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/input/InputGridChemParserTest.java
new file mode 100644
index 0000000..dd0c10e
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/input/InputGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.input;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.input.InputParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class InputGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(InputGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testInputParser() {
+        boolean exception = false;
+        try {
+            InputParser p = new InputParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParserGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParserGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParserGridChemParserTest.java
new file mode 100644
index 0000000..f136f1a
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParserGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.mfinalcoord;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mfinalcoord.MFinalCoordParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class MFinalCoordParserGridChemParserTest extends AbstractGridChemParserTest {
+
+    private Logger logger = Logger.getLogger(MFinalCoordParserGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMFinalCoordParser() {
+        boolean exception = false;
+        try {
+            MFinalCoordParser p = new MFinalCoordParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mopta/MOptaGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mopta/MOptaGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mopta/MOptaGridChemParserTest.java
new file mode 100644
index 0000000..2063b74
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mopta/MOptaGridChemParserTest.java
@@ -0,0 +1,58 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.mopta;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mopta.MOptaParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class MOptaGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(MOptaGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMoptaParser() {
+        boolean exception = false;
+        try {
+            MOptaParser p = new MOptaParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..." + e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mp2to5d/Mp2to5dGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mp2to5d/Mp2to5dGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mp2to5d/Mp2to5dGridChemParserTest.java
new file mode 100644
index 0000000..d1bbf0d
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/mp2to5d/Mp2to5dGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.mp2to5d;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.mp2to5d.MP2to5dParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+
+public class Mp2to5dGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(Mp2to5dGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testMP2to5dParser() {
+        boolean exception = false;
+        try {
+            MP2to5dParser p = new MP2to5dParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            Assert.assertNotNull(results);
+            logger.info("======= Printing the results==================");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfa/SCFaGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfa/SCFaGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfa/SCFaGridChemParserTest.java
new file mode 100644
index 0000000..0182e19
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfa/SCFaGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.scfa;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.scfa.SCFaParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+public class SCFaGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(SCFaGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testScfaParser() {
+        boolean exception = false;
+        try {
+            SCFaParser p = new SCFaParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfb/SCFbGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfb/SCFbGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfb/SCFbGridChemParserTest.java
new file mode 100644
index 0000000..13bab6b
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/scfb/SCFbGridChemParserTest.java
@@ -0,0 +1,60 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem.scfb;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.parsers.gridchem.scfb.SCFbParser;
+import org.apache.log4j.Logger;
+import org.apche.airavata.datacat.parsers.gridchem.AbstractGridChemParserTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+
+
+public class SCFbGridChemParserTest extends AbstractGridChemParserTest {
+    private Logger logger = Logger.getLogger(SCFbGridChemParserTest.class);
+
+
+    @Before
+    public void setUp() {
+        super.setUp();
+    }
+
+    @Test
+    public void testScfbParser() {
+        boolean exception = false;
+        try {
+            SCFbParser p = new SCFbParser(new java.io.FileReader(TEST_OUTPUT));
+            Map<String, String> results = p.getParsedData();
+            logger.info("======= Printing the results ==========");
+            logger.info(results.toString());
+        } catch (FileNotFoundException e) {
+            logger.error("File Not Found Exception ..."+e.getMessage());
+            exception = true;
+        } catch (Exception e) {
+            logger.error("Parse Exception ..." + e.getMessage());
+            exception = true;
+        }
+        Assert.assertFalse(exception);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/pom.xml b/datacat/pom.xml
new file mode 100644
index 0000000..e3ab6ae
--- /dev/null
+++ b/datacat/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.airavata.datacat</groupId>
+    <artifactId>datacat</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+
+    <modules>
+        <module>agent</module>
+        <module>server</module>
+        <module>models</module>
+        <module>regexParser</module>
+        <module>integration-tests</module>
+        <module>parsers</module>
+    </modules>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                    <optimize>true</optimize>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${junit.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>${log4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>${sl4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <repositories>
+        <repository>
+            <id>codehaus</id>
+            <url>http://repository.codehaus.org/org/codehaus</url>
+        </repository>
+        <repository>
+            <id>wso2-nexus</id>
+            <name>WSO2 internal Repository</name>
+            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </releases>
+        </repository>
+    </repositories>
+
+    <properties>
+        <jdk.version>1.7</jdk.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <junit.version>4.10</junit.version>
+        <java.version>1.7</java.version>
+        <sl4j.version>1.6.1</sl4j.version>
+        <log4j.version>1.2.16</log4j.version>
+        <guava.version>17.0</guava.version>
+        <dropwizard.version>0.7.1</dropwizard.version>
+        <java-cup.version>10k</java-cup.version>
+        <solrj.version>4.9.0</solrj.version>
+        <apache-commons.version>1.3.2</apache-commons.version>
+        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+        <springframework.version>4.0.0.RELEASE</springframework.version>
+        <skipTests>false</skipTests>
+        <jackson.version>1.8.5</jackson.version>
+        <carbon.version>4.0.0</carbon.version>
+        <axis2.version>1.6.1.wso2v10</axis2.version>
+        <thrift.version>0.9.1</thrift.version>
+        <rabbitmq.version>3.4.1</rabbitmq.version>
+        <curator.version>2.7.0</curator.version>
+        <httpclient.version>4.3.1</httpclient.version>
+        <httpcore.version>4.3</httpcore.version>
+        <gson.version>2.3</gson.version>
+    </properties>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/query.json
----------------------------------------------------------------------
diff --git a/datacat/query.json b/datacat/query.json
new file mode 100644
index 0000000..d594428
--- /dev/null
+++ b/datacat/query.json
@@ -0,0 +1,40 @@
+{
+    "username": "sudhakar",
+
+    "userGroups": ["sudhakar"],
+
+    "queryStringSet": false,
+
+    /*A Solr query*/
+    "queryString": "*:*",
+
+    "startRow": 0,
+
+    "numberOfRows": 25,
+
+    "primaryQueryParameterList": [
+        {
+            "primaryQueryType": "EQUALS",
+            "firstParameter": "InChI=1S/C5H9O4.C2H8N3/c1-4(6)8-9-5(2,3)7;1-5-2(3)4/h1-3H3;5H,3-4H2,1H3",
+            "secondParameter": null,
+            "field": "InChi_s"
+        },
+        {
+            "primaryQueryType": "SUBSTRING",
+            "firstParameter": "C5H9O4",
+            "secondParameter": null,
+            "field": "InChi_s"
+        },
+        {
+            "primaryQueryType": "RANGE",
+            "firstParameter": "*",
+            "secondParameter": "2015-09-08T00:43:54Z",
+            "field": "createdDate"
+        },
+        {
+            "primaryQueryType": "PHRASE",
+            "firstParameter": "InChI=1S/C5H9O4.C2H8N3/c1-4(6)8-9-5(2,3)7;1-5-2(3)4/h1-3H3;5H,3-4H2,1H3",
+            "secondParameter": null,
+            "field": "InChi_s"
+        }
+    ]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/regexParser/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/regexParser/pom.xml b/datacat/regexParser/pom.xml
new file mode 100644
index 0000000..a0a145f
--- /dev/null
+++ b/datacat/regexParser/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>RegexParser</artifactId>
+<build>
+    <plugins>
+    <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+            <source>${jdk.version}</source>
+            <target>${jdk.version}</target>
+            <compilerArgument>-Xlint:unchecked</compilerArgument>
+            <optimize>true</optimize>
+            <encoding>UTF-8</encoding>
+        </configuration>
+    </plugin>
+    <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+            <archive>
+                <manifest>
+                    <addClasspath>true</addClasspath>
+                </manifest>
+            </archive>
+        </configuration>
+    </plugin>
+    </plugins>
+</build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>parsers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>models</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file


[10/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/bin/datacat-server.sh
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/bin/datacat-server.sh b/datacat/server/src/main/resources/bin/datacat-server.sh
new file mode 100644
index 0000000..9cf6994
--- /dev/null
+++ b/datacat/server/src/main/resources/bin/datacat-server.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. `dirname $0`/setenv.sh
+cd $DATACAT_SERVER_HOME
+
+IS_DAEMON_MODE=false
+DATACAT_SERVER_COMMAND=""
+STOP=false
+FORCE=false
+
+for var in "$@"
+do
+    case $var in
+	start)
+	    IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    STOP=true
+	    DATACAT_SERVER_COMMAND="$
+	    DATACAT_SERVER_COMMAND $var"
+            shift
+        ;;
+        -h)
+            echo "Usage: datacat-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop               Stop server."
+	    echo "  -h                 Display this help and exit"
+	        shift
+            exit 0
+        ;;
+	*)
+	    DATACAT_SERVER_COMMAND="$DATACAT_SERVER_COMMAND $var"
+            shift
+    esac
+done
+
+if $STOP;
+then
+	for f in `find . -name "*-start_*"`; do
+		IFS='_' read -a f_split <<< "$f"
+		echo "Found process file : $f"
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+	    echo "Starting Solr Server in daemon mode..."
+	    cd "$DATACAT_SERVER_HOME"/solr-server
+		nohup $JAVA_HOME/bin/java  -jar start.jar > solr-server.out & echo $! > "solr-start_$!"
+        cd ..
+		echo "Starting DataCat server in daemon mode..."
+		cd "$DATACAT_SERVER_HOME"/lib
+		nohup $JAVA_HOME/bin/java -jar "$DATACAT_SERVER_HOME"/lib/server-1.0-SNAPSHOT.jar > ../datacat-server.out & echo $! > "../server-start_$!"
+		cd ..
+	else
+	    cd "$DATACAT_SERVER_HOME"/solr-server
+		nohup $JAVA_HOME/bin/java  -jar start.jar > solr-server.out & echo $! > "solr-start_$!"
+        cd ..
+        cd "$DATACAT_SERVER_HOME"/lib
+		$JAVA_HOME/bin/java -jar "$DATACAT_SERVER_HOME"/lib/server-1.0-SNAPSHOT.jar & echo $! > "server-start_$!"
+		cd ..
+	fi
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/bin/setenv.sh b/datacat/server/src/main/resources/bin/setenv.sh
new file mode 100644
index 0000000..09ba303
--- /dev/null
+++ b/datacat/server/src/main/resources/bin/setenv.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Get standard environment variables
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running datacat-server scripts."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+PRGDIR=`dirname "$PRG"`
+
+# Only set DATACAT_SERVER_HOME if not already set
+[ -z "$DATACAT_SERVER_HOME" ] && DATACAT_SERVER_HOME=`cd "$PRGDIR/.." ; pwd`
+
+DATACAT_SERVER_CLASSPATH=""
+
+
+
+for f in "DATACAT_SERVER_HOME"/lib/*.jar
+do
+  DATACAT_SERVER_CLASSPATH="$DATACAT_SERVER_CLASSPATH":$f
+done
+
+DATACAT_SERVER_CLASSPATH="$DATACAT_SERVER_CLASSPATH":"$DATACAT_SERVER_HOME"/conf/log4j.properties
+
+export DATACAT_SERVER_HOME
+export DATACAT_SERVER_CLASSPATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/conf/server.properties
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/conf/server.properties b/datacat/server/src/main/resources/conf/server.properties
new file mode 100644
index 0000000..4de2872
--- /dev/null
+++ b/datacat/server/src/main/resources/conf/server.properties
@@ -0,0 +1,34 @@
+DATACAT_URI=https://192.168.0.2:8887/
+
+PUBLISHER_URI=https://192.168.0.2:8888/
+
+USERSTORE_URI=https://localhost:8889/
+
+SOLR_METADATA_URL=http://localhost:8983/solr/metadata
+
+SOLR_ACL_URL=http://localhost:8983/solr/acl
+
+SOLR_USERNAME=datacat
+
+SOLR_PASSWORD=datacat
+
+IS_URL=https://localhost:9443
+
+IS_USERNAME=admin
+
+IS_PASSWORD=admin
+
+#When empty server adds a randomly generated GUID
+METADATA_PRIMARY_INDEX=
+
+FILE_METADATA_FIELDS=InChi,InChiKey,GoptEnergy
+
+KEYSTORE_FILE=keystore.jks
+
+KEYSTORE_PWD=wso2carbon
+
+TRUSTSTORE_FILE=client-truststore.jks
+
+TRUSTSTORE_PWD=wso2carbon
+
+ZK_HOST=localhost
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/log4j.properties b/datacat/server/src/main/resources/log4j.properties
new file mode 100644
index 0000000..9e0e04d
--- /dev/null
+++ b/datacat/server/src/main/resources/log4j.properties
@@ -0,0 +1,16 @@
+#CONSOLE AND FILE LOGGING
+#CONSOLE LOGGING
+log4j.rootLogger=INFO, CONSOLE
+log4j.logger.console=WARN, CONSOLE
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.CONSOLE.Threshold=DEBUG
+
+#FILE LOGGING
+log4j.logger.file=ALL, DAILYROLLINGFILEAPPENDER
+log4j.appender.DAILYROLLINGFILEAPPENDER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DAILYROLLINGFILEAPPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.DAILYROLLINGFILEAPPENDER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.DAILYROLLINGFILEAPPENDER.File=/tmp/datacat-agent.log
+log4j.appender.DAILYROLLINGFILEAPPENDER.Threshold=ALL
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/security/client-truststore.jks
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/security/client-truststore.jks b/datacat/server/src/main/resources/security/client-truststore.jks
new file mode 100644
index 0000000..be441f3
Binary files /dev/null and b/datacat/server/src/main/resources/security/client-truststore.jks differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/resources/security/keystore.jks
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/resources/security/keystore.jks b/datacat/server/src/main/resources/security/keystore.jks
new file mode 100644
index 0000000..7942c53
Binary files /dev/null and b/datacat/server/src/main/resources/security/keystore.jks differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrIndexerTest.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrIndexerTest.java b/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrIndexerTest.java
new file mode 100644
index 0000000..faa6bd6
--- /dev/null
+++ b/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrIndexerTest.java
@@ -0,0 +1,62 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db;
+
+import junit.framework.TestCase;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.server.db.solr.SolrIndexer;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SolrIndexerTest extends TestCase {
+
+    private SolrIndexer indexer;
+
+    private OutputMetadataDTO outputMetadataDTO;
+
+    public void setUp() throws Exception {
+        super.setUp();
+        indexer = new SolrIndexer();
+
+        //populating a dummy fileMetaDataDTO
+        outputMetadataDTO = new OutputMetadataDTO();
+        Map<String, String> customMetaData = new HashMap<String, String>();
+        customMetaData.put("id", "InChI=1S/H2O.HO/h1H2;1LMLKF4HXB");
+        customMetaData.put("InChi_s", "InChI=1S/H2O.HO/h1H2;LMLKF4HXB");
+
+        outputMetadataDTO.setOutputPath("/Users/swithana/data_root/gaussian_sample_23");
+        outputMetadataDTO.setApplicationName("gaussian 9");
+        outputMetadataDTO.setHost("localhost");
+        outputMetadataDTO.setCreatedDate("2014-10-25T19:41:04Z");
+        outputMetadataDTO.setOwnerId("sudhakar");
+        outputMetadataDTO.setCustomMetaData(customMetaData);
+
+    }
+
+    @Test
+    public void testAddData() throws IOException, SolrServerException {
+        indexer.addMetadata(outputMetadataDTO);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrQuerierTest.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrQuerierTest.java b/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrQuerierTest.java
new file mode 100644
index 0000000..a7b9afa
--- /dev/null
+++ b/datacat/server/src/test/java/org/apache/airavata/datacat/server/db/SolrQuerierTest.java
@@ -0,0 +1,177 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.airavata.datacat.models.MetadataFields;
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+import org.apache.airavata.datacat.models.PrimaryQueryType;
+import org.apache.airavata.datacat.server.db.solr.SolrQuerier;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.*;
+
+public class SolrQuerierTest extends TestCase {
+
+    private SolrQuerier solrQuerier;
+    private List<PrimaryQueryParameter> primaryQueryParameters;
+    private PrimaryQueryParameter parameter;
+    private ArrayList<LinkedHashMap<String, Object>> result;
+    private final String USERNAME = "test";
+    private String[] groups;
+
+    public void setUp() throws Exception {
+        super.setUp();
+        groups  = new String[]{"group_1", "group_2", "sudhakar"};
+        solrQuerier = new SolrQuerier();
+
+    }
+
+    @Test
+    public void testSubstringSearch() throws IOException, SolrServerException {
+        List<PrimaryQueryParameter> primaryQueryParameters;
+        PrimaryQueryParameter parameter;
+        ArrayList<LinkedHashMap<String, Object>> result;
+        String primaryKey = ServerProperties.getInstance().getProperty(Constants.METADATA_PRIMARY_INDEX,"InChi_s");
+        String username = "test";
+        String[] groups  = new String[]{"group_1", "group_2", "sudhakar"};
+
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("C5H9O4");
+        parameter.setPrimaryQueryType(PrimaryQueryType.SUBSTRING);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 5);
+        Assert.assertTrue(result.size() >= 1);
+    }
+
+    @Test
+    public void testRangeSearch() throws IOException, SolrServerException {
+        //range search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(MetadataFields.CREATED_DATE);
+        parameter.setFirstParameter("*");
+        parameter.setSecondParameter("2014-10-25T19:41:04Z");
+        parameter.setPrimaryQueryType(PrimaryQueryType.RANGE);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, USERNAME, groups, 0, 1);
+        Assert.assertTrue(result.size() >= 1);
+
+    }
+
+    @Test
+    public void testGetResults() throws Exception {
+        List<PrimaryQueryParameter> primaryQueryParameters;
+        PrimaryQueryParameter parameter;
+        ArrayList<LinkedHashMap<String, Object>> result;
+
+        String username = "test";
+        String[] groups  = new String[]{"group_1", "group_2", "sudhakar"};
+
+        String primaryKey = ServerProperties.getInstance().getProperty(Constants.METADATA_PRIMARY_INDEX,"InChi_s");
+
+        //Field value search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("InChI=1S/C5H9O4.C2H8N3/c1-4(6)8-9-5(2,3)7;1-5-2(3)4/h1-3H3;5H,3-4H2,1H3");
+        parameter.setPrimaryQueryType(PrimaryQueryType.EQUALS);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 1);
+        Assert.assertTrue(result.size() >= 1);
+
+        //Sub string search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("C5H9O4");
+        parameter.setPrimaryQueryType(PrimaryQueryType.SUBSTRING);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 5);
+        Assert.assertTrue(result.size() >= 1);
+
+        //wildcard search
+        //primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        //parameter = new PrimaryQueryParameter();
+        //parameter.setField(MetadataFields.INCHI);
+        //parameter.setFirstParameter("C5H*O4");
+        //parameter.setPrimaryQueryType(PrimaryQueryType.WILDCARD);
+        //primaryQueryParameters.add(parameter);
+        //result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups);
+        //Assert.assertTrue(result.size() >= 1);
+
+        //phrase search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("InChI=1S/C5H9O4.C2H8N3/c1-4(6)8-9-5(2,3)7;1-5-2(3)4/h1-3H3;5H,3-4H2,1H3");
+        parameter.setPrimaryQueryType(PrimaryQueryType.PHRASE);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 2);
+        Assert.assertTrue(result.size() >= 1);
+
+        //range search
+        //Todo The range search is not working properly
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(MetadataFields.CREATED_DATE);
+        parameter.setFirstParameter("*");
+        parameter.setSecondParameter("2015-09-08T00:43:54Z");
+        parameter.setPrimaryQueryType(PrimaryQueryType.RANGE);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 1);
+        //Assert.assertTrue(result.size() >= 1);
+
+        //field value AND substring AND range
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("InChI*");
+        parameter.setPrimaryQueryType(PrimaryQueryType.WILDCARD);
+        primaryQueryParameters.add(parameter);
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("C");
+        parameter.setPrimaryQueryType(PrimaryQueryType.SUBSTRING);
+        primaryQueryParameters.add(parameter);
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(MetadataFields.CREATED_DATE);
+        parameter.setFirstParameter("*");
+        parameter.setSecondParameter("2015-09-08T00:43:54Z");
+        parameter.setPrimaryQueryType(PrimaryQueryType.RANGE);
+        primaryQueryParameters.add(parameter);
+        //parameter = new PrimaryQueryParameter();
+        //parameter.setField(MetadataFields.INCHI);
+        //parameter.setFirstParameter("InChI=1S/C5H9O4.C2H8N3/c1-4(6)8-9-5(2,3)7;1-5-2(3)4/h1-3H3;5H,3-4H2,1H3");
+        //parameter.setPrimaryQueryType(PrimaryQueryType.PHRASE);
+        //primaryQueryParameters.add(parameter);
+
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 0, 2);
+        //Assert.assertTrue(result.size() >= 1);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/dataStoreService.php
----------------------------------------------------------------------
diff --git a/datacat/web/portal/dataStoreService.php b/datacat/web/portal/dataStoreService.php
new file mode 100755
index 0000000..e30a83b
--- /dev/null
+++ b/datacat/web/portal/dataStoreService.php
@@ -0,0 +1,181 @@
+<?php
+
+session_start();
+
+$call = $_POST['call'];
+if(isset($_POST['data'])){
+    $data = $_POST['data'];
+}
+
+function getResults($data)
+{
+    if($_SESSION['loggedIn'] == "Y"){                                                   // append username ang groups of user to a query parameter array
+        $data['username'] = $_SESSION['username'];
+        $data['userGroups'] = $_SESSION['userGroups'];
+    }
+
+    $url = 'http://localhost:8887/datacat/getResults';
+    $jsonData = json_encode($data);
+
+    $options = array(
+        'http' => array(
+            'method'  => 'POST',
+            'content' => $jsonData,
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );                                      // get the resulting data products for a given query
+    $result = file_get_contents( $url, false, $context );
+
+    return $result  ;
+}
+
+function getMetadataFieldList()
+{
+    $url = 'http://localhost:8887/datacat/getMetadataFieldList';
+
+    $options = array(
+        'http' => array(
+            'method'  => 'GET',
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );
+    $result = file_get_contents( $url, false, $context );                               // get the full list of searchable/indexed fields
+
+    return $result;
+}
+
+function getAclList($data)
+{
+    $url = 'http://localhost:8887/datacat/getAclList?id=' . urlencode($data['id']);
+
+    $options = array(
+        'http' => array(
+            'method'  => 'GET',
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );
+    $result = file_get_contents( $url, false, $context );                               // get the ACL list of a data product given its id
+
+    return $result  ;
+}
+
+function updateAclList($data)
+{
+
+    $url = 'http://localhost:8887/datacat/updateAclList';
+    $jsonData = json_encode($data);
+
+    $options = array(
+        'http' => array(
+            'method'  => 'POST',
+            'content' => $jsonData,
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );
+    $result = file_get_contents( $url, false, $context );                               // update ACL list of a data product
+
+    return $result  ;
+}
+
+function getAllUserGroups()
+{
+    $url = 'http://localhost:8889/userstore/getGroupsList';
+
+    $options = array(
+        'http' => array(
+            'method'  => 'GET',
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );
+    $result = file_get_contents( $url, false, $context );                               // get the full list of user groups for sharing data products
+
+    return $result  ;
+}
+
+function checkLogin()                                                                   // from frontend javascript, check user logged in and get username
+{
+    if ($_SESSION['loggedIn'] == "Y") {
+        return $_SESSION['username'];
+    } else {
+        return "%%false%%";
+    }
+}
+
+function login($data)
+{
+    $url = 'http://localhost:8889/userstore/authenticate?username=' . urlencode($data['username']) . '&password=' . urlencode($data['password']);
+
+    $options = array(
+        'http' => array(
+            'method'  => 'GET',
+            'header'=>  "Content-Type: application/json\r\n" .
+                "Accept: application/json\r\n"
+        )
+    );
+
+    $context  = stream_context_create( $options );
+    $auth = file_get_contents( $url, false, $context );                                 // authenticate user
+
+    if ($auth == 'true') {
+
+        $url = 'http://localhost:8889/userstore/getGroupsOfUser?username=' . urlencode($data['username']);
+
+        $options = array(
+            'http' => array(
+                'method'  => 'GET',
+                'header'=>  "Content-Type: application/json\r\n" .
+                    "Accept: application/json\r\n"
+            )
+        );
+
+        $context  = stream_context_create( $options );
+        $userGroups = file_get_contents( $url, false, $context );                       // if authenticated, get users list of access groups
+
+        $_SESSION['loggedIn'] = "Y";                                                    // login user
+
+        $_SESSION['username'] = $data['username'];
+        $_SESSION['userGroups'] =  json_decode( $userGroups );
+    }
+
+    return $auth;
+}
+
+function logout()                                                                       // destroy session and logout
+{
+    session_destroy();
+    return true;
+}
+
+
+if ($call == 'getResults') {                                                            // adaptor to run corresponding functions
+    print_r(getResults($data));
+} else if ($call == 'getMetadataFieldList') {
+    print_r(getMetadataFieldList());
+} else if ($call == 'getAclList') {
+    print_r(getAclList($data));
+} else if ($call == 'login') {
+    print_r(login($data));
+} else if ($call == 'logout') {
+    print_r(logout());
+} else if ($call == 'checkLogin') {
+    print_r(checkLogin());
+} else if ($call == 'getAllUserGroups') {
+    print_r(getAllUserGroups());
+} else if ($call == 'updateAclList') {
+    print_r(updateAclList($data));
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/favicon.ico
----------------------------------------------------------------------
diff --git a/datacat/web/portal/favicon.ico b/datacat/web/portal/favicon.ico
new file mode 100755
index 0000000..1a10f78
Binary files /dev/null and b/datacat/web/portal/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/fonts/glyphicons-halflings-regular.eot
----------------------------------------------------------------------
diff --git a/datacat/web/portal/fonts/glyphicons-halflings-regular.eot b/datacat/web/portal/fonts/glyphicons-halflings-regular.eot
new file mode 100755
index 0000000..4a4ca86
Binary files /dev/null and b/datacat/web/portal/fonts/glyphicons-halflings-regular.eot differ


[27/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/wavefunction.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/wavefunction.flex b/datacat/cup_flex/wavefunction.flex
new file mode 100644
index 0000000..57fbce7
--- /dev/null
+++ b/datacat/cup_flex/wavefunction.flex
@@ -0,0 +1,217 @@
+package org.gridchem.client;
+import java_cup.runtime.*;
+import java.io.*;
+import org.gridchem.client.common.*;
+import org.gridchem.client.util.*;
+
+
+
+%%
+
+%class WavefunctionLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "----------------------" {
+    if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(WavefunctionSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "geom" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP); 
+    } 
+
+  "casscf" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+
+  "B3LYP" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+"B1B95" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+"B3PW91" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+
+    "RHF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    } 
+
+
+    "ccsd" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "SCFTYP=MCSCF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found SCFTYP=MCSCF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print("mcscf");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "SCFTYP=GVB" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found SCFTYP=GVB");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print("gvb");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "MP2" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "rhf" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "HF-SCF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found HF-SCF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream(Env.getApplicationDataDir() +Settings.fileSeparator + "runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+}
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/wavefunction1.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/wavefunction1.flex b/datacat/cup_flex/wavefunction1.flex
new file mode 100644
index 0000000..d630469
--- /dev/null
+++ b/datacat/cup_flex/wavefunction1.flex
@@ -0,0 +1,187 @@
+import java_cup.runtime.*;
+import java.io.*;
+
+%%
+
+%class Wavefunction1Lexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "************" {
+    if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(WavefunctionSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "geom" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP); 
+    } 
+
+  "casscf" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+
+  "b3lyp" {
+  if  (Settings.DEBUG) System.out.println("WavefunctionFlex: Found geom ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "RHF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    } 
+
+
+    "SCF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "SCFTYP=MCSCF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found SCFTYP=MCSCF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print("mcscf");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "SCFTYP=GVB" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found SCFTYP=GVB");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print("gvb");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "MP2" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "rhf" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+    "HF-SCF" {
+   if (Settings.DEBUG) System.out.println("WavefunctionFlex: Found HF-SCF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(WavefunctionSym.RUNTYP);
+    }
+
+}
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/whichProgram.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/whichProgram.cup b/datacat/cup_flex/whichProgram.cup
new file mode 100644
index 0000000..a15676d
--- /dev/null
+++ b/datacat/cup_flex/whichProgram.cup
@@ -0,0 +1,116 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE, NSearch, Energ, MaxGrad, RmsGrad;
+terminal Integer     ITERATION;
+terminal Float     ENERGY, MGRAD, RGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= Energ ENERGY:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= NSearch ITERATION:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+grad1
+grad2
+ ;
+
+grad1 ::= MaxGrad  MGRAD:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad  RGRAD:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/whichProgram.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/whichProgram.flex b/datacat/cup_flex/whichProgram.flex
new file mode 100644
index 0000000..a78764e
--- /dev/null
+++ b/datacat/cup_flex/whichProgram.flex
@@ -0,0 +1,78 @@
+
+
+ 
+%%
+
+
+
+%class WhichProgram
+%public
+%unicode
+/*
+%cup
+%cupdebug
+%ignorecase
+*/
+
+%state GETREVISION
+%state GETVERSION
+%state IGNOREALL
+
+%standalone
+%8bit
+
+%{
+  public static boolean DEBUG = false;
+  public static String format;
+%}
+
+WORD           = [A-Za-z]+
+INT            = [+|-]?[0-9]+
+REVISIONNUM    = [A-Za-z0-9"."]+
+
+
+ 
+%%
+
+
+
+/* ___________
+   Description */
+
+<YYINITIAL>{
+  "Gaussian 03," {if (Settings.DEBUG) System.out.println(yytext());
+		  WhichProgram.format = "Gauss03";
+  }
+  "GAMESS VERSION =" {if (Settings.DEBUG) System.out.println(yytext());
+		      WhichProgram.format = "GAMESS";
+		      yybegin(GETVERSION);
+  }
+
+  "PROGRAM SYSTEM MOLPRO" {System.out.println(yytext());
+                  WhichProgram.format = "Molpro";
+                      yybegin(IGNOREALL);
+  }
+
+
+	       
+  .|\n {}
+}
+
+<GETREVISION>{
+  {REVISIONNUM} {if (Settings.DEBUG) System.out.println(yytext());
+		 yybegin(IGNOREALL);
+  }
+}
+
+<GETVERSION>{
+  [0-9]{4} {if (Settings.DEBUG) System.out.println(yytext());
+            yybegin(IGNOREALL);
+  }
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/inchi-1
----------------------------------------------------------------------
diff --git a/datacat/inchi-1 b/datacat/inchi-1
new file mode 100755
index 0000000..fa054fe
Binary files /dev/null and b/datacat/inchi-1 differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/integration-tests/pom.xml b/datacat/integration-tests/pom.xml
new file mode 100644
index 0000000..2e7b595
--- /dev/null
+++ b/datacat/integration-tests/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>integration-tests</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>agent</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/integration-tests/src/test/java/org/apache/airavata/datacat/integration/IntegrationTest.java
----------------------------------------------------------------------
diff --git a/datacat/integration-tests/src/test/java/org/apache/airavata/datacat/integration/IntegrationTest.java b/datacat/integration-tests/src/test/java/org/apache/airavata/datacat/integration/IntegrationTest.java
new file mode 100644
index 0000000..0ac901b
--- /dev/null
+++ b/datacat/integration-tests/src/test/java/org/apache/airavata/datacat/integration/IntegrationTest.java
@@ -0,0 +1,154 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.integration;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.airavata.datacat.agent.dispatcher.DispatcherService;
+import org.apache.airavata.datacat.agent.monitor.IMonitor;
+import org.apache.airavata.datacat.agent.monitor.impl.LocalFileSystemMonitor;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+import org.apache.airavata.datacat.models.PrimaryQueryType;
+import org.apache.airavata.datacat.server.db.solr.SolrClientFactory;
+import org.apache.airavata.datacat.server.db.solr.SolrQuerier;
+import org.apache.airavata.datacat.server.services.DataCatService;
+import org.apache.airavata.datacat.server.services.PublisherService;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+
+import javax.ws.rs.core.UriBuilder;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+public class IntegrationTest extends TestCase {
+
+    public void testSimpleIntegration() throws IOException, ClassNotFoundException, InterruptedException, SolrServerException {
+        //deleting file snapshot file
+        File file = new File("snapshot.ser");
+        file.delete();
+        System.out.println("snapshot.ser file deleted.");
+
+        //Deleting Solr index files
+        SolrServer metadataClient = new SolrClientFactory().createSolrMetadataClient();
+        metadataClient.deleteByQuery("*:*");
+        metadataClient.commit();
+        SolrServer aclClient = new SolrClientFactory().createSolrAclClient();
+        aclClient.deleteByQuery("*:*");
+        aclClient.commit();
+        System.out.println("Deleted existing data in Solr");
+
+        //starting DataCat server
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    URI datacatUri = UriBuilder.fromUri(
+                            ServerProperties.getInstance().getProperty(Constants.DATACAT_URI, "")).build();
+                    ResourceConfig datacatConfig = new ResourceConfig(DataCatService.class);
+                    HttpServer datacatServer = GrizzlyHttpServerFactory.createHttpServer(datacatUri, datacatConfig);
+
+                    datacatServer.start();
+
+                    URI publisherUri = UriBuilder.fromUri(
+                            ServerProperties.getInstance().getProperty(Constants.PUBLISHER_URI, "")).build();
+                    ResourceConfig publisherConfig = new ResourceConfig(PublisherService.class);
+                    HttpServer publisherServer = GrizzlyHttpServerFactory.createHttpServer(publisherUri, publisherConfig);
+
+                    publisherServer.start();
+                } catch (Exception ex) {
+                    ex.printStackTrace();
+                    Assert.assertTrue(false);
+                }
+            }
+        }).start();
+
+
+        //starting DataCat agent
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    //waiting for some time to get the data indexed
+                    Thread.sleep(1000 * 15); // waits for 15 seconds
+                    AgentProperties properties = AgentProperties.getInstance();
+                    IMonitor iMonitor = new LocalFileSystemMonitor();
+                    DispatcherService dispatcherService = DispatcherService.getInstance();
+                    dispatcherService.startDispatcher();
+                    iMonitor.startMonitor(Paths.get(properties.getProperty(
+                                    org.apache.airavata.datacat.agent.util.Constants.DATA_ROOT, ""))
+                    );
+
+                } catch (Exception ex) {
+                    ex.printStackTrace();
+                    Assert.assertTrue(false);
+                }
+            }
+        }).start();
+
+
+        //Testing the Query API
+        //waiting for some time to get the data indexed
+        Thread.sleep(1000 * 300); // waits for 30 seconds
+
+        //FIXME Ideally this querying should be done via the REST API
+        //Querying using the DataCat API
+        List<PrimaryQueryParameter> primaryQueryParameters;
+        PrimaryQueryParameter parameter;
+        ArrayList<LinkedHashMap<String, Object>> result;
+        SolrQuerier solrQuerier = new SolrQuerier();
+
+        String username = "test";
+        String[] groups = new String[]{"group_1", "group_2", "sudhakar"};
+
+        String primaryKey = ServerProperties.getInstance().getProperty(Constants.METADATA_PRIMARY_INDEX, "InChi");
+
+        //Field value search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("InChI=1S/C14H14N4O3/c1-7-5-9-10(6-8(7)2)18(3-4-19)12-11(15-9)13(20)17-14(21)16-12/h5-6,19H,3-4H2,1-2H3,(H,17,20,21)");
+        parameter.setPrimaryQueryType(PrimaryQueryType.EQUALS);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 1, 2);
+        Assert.assertTrue(result.size() >= 1);
+
+        //Sub string search
+        primaryQueryParameters = new ArrayList<PrimaryQueryParameter>();
+        parameter = new PrimaryQueryParameter();
+        parameter.setField(primaryKey);
+        parameter.setFirstParameter("C14H14N4");
+        parameter.setPrimaryQueryType(PrimaryQueryType.SUBSTRING);
+        primaryQueryParameters.add(parameter);
+        result = solrQuerier.getResultsFromParameters(primaryQueryParameters, username, groups, 1, 5);
+        Assert.assertTrue(result.size() >= 1);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/laravel-pga/vendor/apache/thrift
----------------------------------------------------------------------
diff --git a/datacat/laravel-pga/vendor/apache/thrift b/datacat/laravel-pga/vendor/apache/thrift
new file mode 160000
index 0000000..e758837
--- /dev/null
+++ b/datacat/laravel-pga/vendor/apache/thrift
@@ -0,0 +1 @@
+Subproject commit e758837339c16726b7c3198e9646466fc25519f3

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/models/pom.xml b/datacat/models/pom.xml
new file mode 100644
index 0000000..e843c43
--- /dev/null
+++ b/datacat/models/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>models</artifactId>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>${maven-compiler-plugin.version}</version>
+                    <configuration>
+                        <source>${java.version}</source>
+                        <target>${java.version}</target>
+                        <compilerArgument>-Xlint:unchecked</compilerArgument>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencies>
+        <!-- RabbitMQ dependencies - For the message-Broker -->
+        <dependency>
+            <groupId>com.rabbitmq</groupId>
+            <artifactId>amqp-client</artifactId>
+            <version>${rabbitmq.version}</version>
+        </dependency>
+
+        <!-- Thrift dependency -->
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclDTO.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclDTO.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclDTO.java
new file mode 100644
index 0000000..c86aebc
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclDTO.java
@@ -0,0 +1,53 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public class AclDTO {
+    private String id;
+
+    private String[] acl;
+
+    private String _version_;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String[] getAcl() {
+        return acl;
+    }
+
+    public void setAcl(String[] acl) {
+        this.acl = acl;
+    }
+
+    public String get_version_() {
+        return _version_;
+    }
+
+    public void set_version_(String _version_) {
+        this._version_ = _version_;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclFields.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclFields.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclFields.java
new file mode 100644
index 0000000..a428f31
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/AclFields.java
@@ -0,0 +1,27 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public class AclFields {
+
+    public static final String ID = "id";
+    public static final String ACL = "acl";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputCreatedEvent.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputCreatedEvent.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputCreatedEvent.java
new file mode 100644
index 0000000..92b9ab1
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputCreatedEvent.java
@@ -0,0 +1,981 @@
+/**
+ * Autogenerated by Thrift Compiler (1.0.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.datacat.models.Messaging;
+
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+import org.apache.thrift.scheme.TupleScheme;
+
+import javax.annotation.Generated;
+import java.util.*;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2015-2-3")
+public class ExperimentOutputCreatedEvent implements org.apache.thrift.TBase<ExperimentOutputCreatedEvent, ExperimentOutputCreatedEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentOutputCreatedEvent> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentOutputCreatedEvent");
+
+  private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField EXPERIMENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentName", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField OUTPUT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("outputPath", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField GATEWAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayName", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationName", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)7);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ExperimentOutputCreatedEventStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ExperimentOutputCreatedEventTupleSchemeFactory());
+  }
+
+  public String experimentId; // required
+  public String experimentName; // required
+  public String outputPath; // required
+  public String ownerId; // required
+  public String gatewayName; // required
+  public String applicationName; // required
+  public String host; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    EXPERIMENT_ID((short)1, "experimentId"),
+    EXPERIMENT_NAME((short)2, "experimentName"),
+    OUTPUT_PATH((short)3, "outputPath"),
+    OWNER_ID((short)4, "ownerId"),
+    GATEWAY_NAME((short)5, "gatewayName"),
+    APPLICATION_NAME((short)6, "applicationName"),
+    HOST((short)7, "host");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // EXPERIMENT_ID
+          return EXPERIMENT_ID;
+        case 2: // EXPERIMENT_NAME
+          return EXPERIMENT_NAME;
+        case 3: // OUTPUT_PATH
+          return OUTPUT_PATH;
+        case 4: // OWNER_ID
+          return OWNER_ID;
+        case 5: // GATEWAY_NAME
+          return GATEWAY_NAME;
+        case 6: // APPLICATION_NAME
+          return APPLICATION_NAME;
+        case 7: // HOST
+          return HOST;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.EXPERIMENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("experimentName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OUTPUT_PATH, new org.apache.thrift.meta_data.FieldMetaData("outputPath", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GATEWAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("applicationName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentOutputCreatedEvent.class, metaDataMap);
+  }
+
+  public ExperimentOutputCreatedEvent() {
+  }
+
+  public ExperimentOutputCreatedEvent(
+          String experimentId,
+          String experimentName,
+          String outputPath,
+          String ownerId,
+          String gatewayName,
+          String applicationName,
+          String host)
+  {
+    this();
+    this.experimentId = experimentId;
+    this.experimentName = experimentName;
+    this.outputPath = outputPath;
+    this.ownerId = ownerId;
+    this.gatewayName = gatewayName;
+    this.applicationName = applicationName;
+    this.host = host;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ExperimentOutputCreatedEvent(ExperimentOutputCreatedEvent other) {
+    if (other.isSetExperimentId()) {
+      this.experimentId = other.experimentId;
+    }
+    if (other.isSetExperimentName()) {
+      this.experimentName = other.experimentName;
+    }
+    if (other.isSetOutputPath()) {
+      this.outputPath = other.outputPath;
+    }
+    if (other.isSetOwnerId()) {
+      this.ownerId = other.ownerId;
+    }
+    if (other.isSetGatewayName()) {
+      this.gatewayName = other.gatewayName;
+    }
+    if (other.isSetApplicationName()) {
+      this.applicationName = other.applicationName;
+    }
+    if (other.isSetHost()) {
+      this.host = other.host;
+    }
+  }
+
+  public ExperimentOutputCreatedEvent deepCopy() {
+    return new ExperimentOutputCreatedEvent(this);
+  }
+
+  @Override
+  public void clear() {
+    this.experimentId = null;
+    this.experimentName = null;
+    this.outputPath = null;
+    this.ownerId = null;
+    this.gatewayName = null;
+    this.applicationName = null;
+    this.host = null;
+  }
+
+  public String getExperimentId() {
+    return this.experimentId;
+  }
+
+  public ExperimentOutputCreatedEvent setExperimentId(String experimentId) {
+    this.experimentId = experimentId;
+    return this;
+  }
+
+  public void unsetExperimentId() {
+    this.experimentId = null;
+  }
+
+  /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+  public boolean isSetExperimentId() {
+    return this.experimentId != null;
+  }
+
+  public void setExperimentIdIsSet(boolean value) {
+    if (!value) {
+      this.experimentId = null;
+    }
+  }
+
+  public String getExperimentName() {
+    return this.experimentName;
+  }
+
+  public ExperimentOutputCreatedEvent setExperimentName(String experimentName) {
+    this.experimentName = experimentName;
+    return this;
+  }
+
+  public void unsetExperimentName() {
+    this.experimentName = null;
+  }
+
+  /** Returns true if field experimentName is set (has been assigned a value) and false otherwise */
+  public boolean isSetExperimentName() {
+    return this.experimentName != null;
+  }
+
+  public void setExperimentNameIsSet(boolean value) {
+    if (!value) {
+      this.experimentName = null;
+    }
+  }
+
+  public String getOutputPath() {
+    return this.outputPath;
+  }
+
+  public ExperimentOutputCreatedEvent setOutputPath(String outputPath) {
+    this.outputPath = outputPath;
+    return this;
+  }
+
+  public void unsetOutputPath() {
+    this.outputPath = null;
+  }
+
+  /** Returns true if field outputPath is set (has been assigned a value) and false otherwise */
+  public boolean isSetOutputPath() {
+    return this.outputPath != null;
+  }
+
+  public void setOutputPathIsSet(boolean value) {
+    if (!value) {
+      this.outputPath = null;
+    }
+  }
+
+  public String getOwnerId() {
+    return this.ownerId;
+  }
+
+  public ExperimentOutputCreatedEvent setOwnerId(String ownerId) {
+    this.ownerId = ownerId;
+    return this;
+  }
+
+  public void unsetOwnerId() {
+    this.ownerId = null;
+  }
+
+  /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+  public boolean isSetOwnerId() {
+    return this.ownerId != null;
+  }
+
+  public void setOwnerIdIsSet(boolean value) {
+    if (!value) {
+      this.ownerId = null;
+    }
+  }
+
+  public String getGatewayName() {
+    return this.gatewayName;
+  }
+
+  public ExperimentOutputCreatedEvent setGatewayName(String gatewayName) {
+    this.gatewayName = gatewayName;
+    return this;
+  }
+
+  public void unsetGatewayName() {
+    this.gatewayName = null;
+  }
+
+  /** Returns true if field gatewayName is set (has been assigned a value) and false otherwise */
+  public boolean isSetGatewayName() {
+    return this.gatewayName != null;
+  }
+
+  public void setGatewayNameIsSet(boolean value) {
+    if (!value) {
+      this.gatewayName = null;
+    }
+  }
+
+  public String getApplicationName() {
+    return this.applicationName;
+  }
+
+  public ExperimentOutputCreatedEvent setApplicationName(String applicationName) {
+    this.applicationName = applicationName;
+    return this;
+  }
+
+  public void unsetApplicationName() {
+    this.applicationName = null;
+  }
+
+  /** Returns true if field applicationName is set (has been assigned a value) and false otherwise */
+  public boolean isSetApplicationName() {
+    return this.applicationName != null;
+  }
+
+  public void setApplicationNameIsSet(boolean value) {
+    if (!value) {
+      this.applicationName = null;
+    }
+  }
+
+  public String getHost() {
+    return this.host;
+  }
+
+  public ExperimentOutputCreatedEvent setHost(String host) {
+    this.host = host;
+    return this;
+  }
+
+  public void unsetHost() {
+    this.host = null;
+  }
+
+  /** Returns true if field host is set (has been assigned a value) and false otherwise */
+  public boolean isSetHost() {
+    return this.host != null;
+  }
+
+  public void setHostIsSet(boolean value) {
+    if (!value) {
+      this.host = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EXPERIMENT_ID:
+      if (value == null) {
+        unsetExperimentId();
+      } else {
+        setExperimentId((String)value);
+      }
+      break;
+
+    case EXPERIMENT_NAME:
+      if (value == null) {
+        unsetExperimentName();
+      } else {
+        setExperimentName((String)value);
+      }
+      break;
+
+    case OUTPUT_PATH:
+      if (value == null) {
+        unsetOutputPath();
+      } else {
+        setOutputPath((String)value);
+      }
+      break;
+
+    case OWNER_ID:
+      if (value == null) {
+        unsetOwnerId();
+      } else {
+        setOwnerId((String)value);
+      }
+      break;
+
+    case GATEWAY_NAME:
+      if (value == null) {
+        unsetGatewayName();
+      } else {
+        setGatewayName((String)value);
+      }
+      break;
+
+    case APPLICATION_NAME:
+      if (value == null) {
+        unsetApplicationName();
+      } else {
+        setApplicationName((String)value);
+      }
+      break;
+
+    case HOST:
+      if (value == null) {
+        unsetHost();
+      } else {
+        setHost((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EXPERIMENT_ID:
+      return getExperimentId();
+
+    case EXPERIMENT_NAME:
+      return getExperimentName();
+
+    case OUTPUT_PATH:
+      return getOutputPath();
+
+    case OWNER_ID:
+      return getOwnerId();
+
+    case GATEWAY_NAME:
+      return getGatewayName();
+
+    case APPLICATION_NAME:
+      return getApplicationName();
+
+    case HOST:
+      return getHost();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case EXPERIMENT_ID:
+      return isSetExperimentId();
+    case EXPERIMENT_NAME:
+      return isSetExperimentName();
+    case OUTPUT_PATH:
+      return isSetOutputPath();
+    case OWNER_ID:
+      return isSetOwnerId();
+    case GATEWAY_NAME:
+      return isSetGatewayName();
+    case APPLICATION_NAME:
+      return isSetApplicationName();
+    case HOST:
+      return isSetHost();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ExperimentOutputCreatedEvent)
+      return this.equals((ExperimentOutputCreatedEvent)that);
+    return false;
+  }
+
+  public boolean equals(ExperimentOutputCreatedEvent that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_experimentId = true && this.isSetExperimentId();
+    boolean that_present_experimentId = true && that.isSetExperimentId();
+    if (this_present_experimentId || that_present_experimentId) {
+      if (!(this_present_experimentId && that_present_experimentId))
+        return false;
+      if (!this.experimentId.equals(that.experimentId))
+        return false;
+    }
+
+    boolean this_present_experimentName = true && this.isSetExperimentName();
+    boolean that_present_experimentName = true && that.isSetExperimentName();
+    if (this_present_experimentName || that_present_experimentName) {
+      if (!(this_present_experimentName && that_present_experimentName))
+        return false;
+      if (!this.experimentName.equals(that.experimentName))
+        return false;
+    }
+
+    boolean this_present_outputPath = true && this.isSetOutputPath();
+    boolean that_present_outputPath = true && that.isSetOutputPath();
+    if (this_present_outputPath || that_present_outputPath) {
+      if (!(this_present_outputPath && that_present_outputPath))
+        return false;
+      if (!this.outputPath.equals(that.outputPath))
+        return false;
+    }
+
+    boolean this_present_ownerId = true && this.isSetOwnerId();
+    boolean that_present_ownerId = true && that.isSetOwnerId();
+    if (this_present_ownerId || that_present_ownerId) {
+      if (!(this_present_ownerId && that_present_ownerId))
+        return false;
+      if (!this.ownerId.equals(that.ownerId))
+        return false;
+    }
+
+    boolean this_present_gatewayName = true && this.isSetGatewayName();
+    boolean that_present_gatewayName = true && that.isSetGatewayName();
+    if (this_present_gatewayName || that_present_gatewayName) {
+      if (!(this_present_gatewayName && that_present_gatewayName))
+        return false;
+      if (!this.gatewayName.equals(that.gatewayName))
+        return false;
+    }
+
+    boolean this_present_applicationName = true && this.isSetApplicationName();
+    boolean that_present_applicationName = true && that.isSetApplicationName();
+    if (this_present_applicationName || that_present_applicationName) {
+      if (!(this_present_applicationName && that_present_applicationName))
+        return false;
+      if (!this.applicationName.equals(that.applicationName))
+        return false;
+    }
+
+    boolean this_present_host = true && this.isSetHost();
+    boolean that_present_host = true && that.isSetHost();
+    if (this_present_host || that_present_host) {
+      if (!(this_present_host && that_present_host))
+        return false;
+      if (!this.host.equals(that.host))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_experimentId = true && (isSetExperimentId());
+    list.add(present_experimentId);
+    if (present_experimentId)
+      list.add(experimentId);
+
+    boolean present_experimentName = true && (isSetExperimentName());
+    list.add(present_experimentName);
+    if (present_experimentName)
+      list.add(experimentName);
+
+    boolean present_outputPath = true && (isSetOutputPath());
+    list.add(present_outputPath);
+    if (present_outputPath)
+      list.add(outputPath);
+
+    boolean present_ownerId = true && (isSetOwnerId());
+    list.add(present_ownerId);
+    if (present_ownerId)
+      list.add(ownerId);
+
+    boolean present_gatewayName = true && (isSetGatewayName());
+    list.add(present_gatewayName);
+    if (present_gatewayName)
+      list.add(gatewayName);
+
+    boolean present_applicationName = true && (isSetApplicationName());
+    list.add(present_applicationName);
+    if (present_applicationName)
+      list.add(applicationName);
+
+    boolean present_host = true && (isSetHost());
+    list.add(present_host);
+    if (present_host)
+      list.add(host);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(ExperimentOutputCreatedEvent other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExperimentId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetExperimentName()).compareTo(other.isSetExperimentName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExperimentName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentName, other.experimentName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOutputPath()).compareTo(other.isSetOutputPath());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOutputPath()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputPath, other.outputPath);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOwnerId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGatewayName()).compareTo(other.isSetGatewayName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayName, other.gatewayName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetApplicationName()).compareTo(other.isSetApplicationName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetApplicationName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationName, other.applicationName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetHost()).compareTo(other.isSetHost());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetHost()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ExperimentOutputCreatedEvent(");
+    boolean first = true;
+
+    sb.append("experimentId:");
+    if (this.experimentId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.experimentId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("experimentName:");
+    if (this.experimentName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.experimentName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("outputPath:");
+    if (this.outputPath == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.outputPath);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("ownerId:");
+    if (this.ownerId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.ownerId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("gatewayName:");
+    if (this.gatewayName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.gatewayName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("applicationName:");
+    if (this.applicationName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.applicationName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("host:");
+    if (this.host == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.host);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    if (experimentId == null) {
+      throw new TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
+    }
+    if (experimentName == null) {
+      throw new TProtocolException("Required field 'experimentName' was not present! Struct: " + toString());
+    }
+    if (outputPath == null) {
+      throw new TProtocolException("Required field 'outputPath' was not present! Struct: " + toString());
+    }
+    if (ownerId == null) {
+      throw new TProtocolException("Required field 'ownerId' was not present! Struct: " + toString());
+    }
+    if (gatewayName == null) {
+      throw new TProtocolException("Required field 'gatewayName' was not present! Struct: " + toString());
+    }
+    if (applicationName == null) {
+      throw new TProtocolException("Required field 'applicationName' was not present! Struct: " + toString());
+    }
+    if (host == null) {
+      throw new TProtocolException("Required field 'host' was not present! Struct: " + toString());
+    }
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class ExperimentOutputCreatedEventStandardSchemeFactory implements SchemeFactory {
+    public ExperimentOutputCreatedEventStandardScheme getScheme() {
+      return new ExperimentOutputCreatedEventStandardScheme();
+    }
+  }
+
+  private static class ExperimentOutputCreatedEventStandardScheme extends StandardScheme<ExperimentOutputCreatedEvent> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentOutputCreatedEvent struct) throws TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // EXPERIMENT_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.experimentId = iprot.readString();
+              struct.setExperimentIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // EXPERIMENT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.experimentName = iprot.readString();
+              struct.setExperimentNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // OUTPUT_PATH
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.outputPath = iprot.readString();
+              struct.setOutputPathIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // OWNER_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.ownerId = iprot.readString();
+              struct.setOwnerIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // GATEWAY_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayName = iprot.readString();
+              struct.setGatewayNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // APPLICATION_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.applicationName = iprot.readString();
+              struct.setApplicationNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // HOST
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.host = iprot.readString();
+              struct.setHostIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentOutputCreatedEvent struct) throws TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.experimentId != null) {
+        oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+        oprot.writeString(struct.experimentId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.experimentName != null) {
+        oprot.writeFieldBegin(EXPERIMENT_NAME_FIELD_DESC);
+        oprot.writeString(struct.experimentName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.outputPath != null) {
+        oprot.writeFieldBegin(OUTPUT_PATH_FIELD_DESC);
+        oprot.writeString(struct.outputPath);
+        oprot.writeFieldEnd();
+      }
+      if (struct.ownerId != null) {
+        oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+        oprot.writeString(struct.ownerId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.gatewayName != null) {
+        oprot.writeFieldBegin(GATEWAY_NAME_FIELD_DESC);
+        oprot.writeString(struct.gatewayName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.applicationName != null) {
+        oprot.writeFieldBegin(APPLICATION_NAME_FIELD_DESC);
+        oprot.writeString(struct.applicationName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.host != null) {
+        oprot.writeFieldBegin(HOST_FIELD_DESC);
+        oprot.writeString(struct.host);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ExperimentOutputCreatedEventTupleSchemeFactory implements SchemeFactory {
+    public ExperimentOutputCreatedEventTupleScheme getScheme() {
+      return new ExperimentOutputCreatedEventTupleScheme();
+    }
+  }
+
+  private static class ExperimentOutputCreatedEventTupleScheme extends TupleScheme<ExperimentOutputCreatedEvent> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentOutputCreatedEvent struct) throws TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.experimentId);
+      oprot.writeString(struct.experimentName);
+      oprot.writeString(struct.outputPath);
+      oprot.writeString(struct.ownerId);
+      oprot.writeString(struct.gatewayName);
+      oprot.writeString(struct.applicationName);
+      oprot.writeString(struct.host);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentOutputCreatedEvent struct) throws TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.experimentId = iprot.readString();
+      struct.setExperimentIdIsSet(true);
+      struct.experimentName = iprot.readString();
+      struct.setExperimentNameIsSet(true);
+      struct.outputPath = iprot.readString();
+      struct.setOutputPathIsSet(true);
+      struct.ownerId = iprot.readString();
+      struct.setOwnerIdIsSet(true);
+      struct.gatewayName = iprot.readString();
+      struct.setGatewayNameIsSet(true);
+      struct.applicationName = iprot.readString();
+      struct.setApplicationNameIsSet(true);
+      struct.host = iprot.readString();
+      struct.setHostIsSet(true);
+    }
+  }
+
+}
+


[23/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordLexer.java
new file mode 100644
index 0000000..c4849eb
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordLexer.java
@@ -0,0 +1,799 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.finalcoord;/* The following code was generated by JFlex 1.4.3 on 8/3/14 9:30 PM */
+
+import java_cup.runtime.Symbol;
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 8/3/14 9:30 PM from the specification file
+ * <tt>finalcoord.flex</tt>
+ */
+public class FinalCoordLexer implements java_cup.runtime.Scanner {
+
+    /**
+     * This character denotes the end of file
+     */
+    public static final int YYEOF = -1;
+    /**
+     * lexical states
+     */
+    public static final int INPUTF = 30;
+    public static final int ITER2 = 4;
+    public static final int INPUTE = 28;
+    public static final int INPUTD = 26;
+    public static final int INPUTC = 24;
+    public static final int INPUTB = 22;
+    public static final int INPUTA = 20;
+    public static final int INTVALUE = 8;
+    public static final int INPUT = 18;
+    public static final int IGNOREALL = 16;
+    public static final int ITER = 2;
+    public static final int YYINITIAL = 0;
+    /**
+     * the current lexical state
+     */
+    private int zzLexicalState = YYINITIAL;
+    public static final int FLOAT2 = 14;
+    public static final int FLOAT1 = 12;
+    public static final int FLOATVALUE = 10;
+    public static final int ITER3 = 6;
+    /**
+     * initial size of the lookahead buffer
+     */
+    private static final int ZZ_BUFFERSIZE = 16384;
+    /**
+     * this buffer contains the current text to be matched and is
+     * the source of the yytext() string
+     */
+    private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+    /**
+     * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+     * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+     * at the beginning of a line
+     * l is of the form l = 2*k, k a non negative integer
+     */
+    private static final int ZZ_LEXSTATE[] = {
+            0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+            2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9
+    };
+    /**
+     * Translates characters to character classes
+     */
+    private static final char[] ZZ_CMAP = {
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 19, 3, 0,
+            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 31, 28, 4, 0, 27, 33, 0, 0, 34, 20, 30, 32,
+            0, 0, 0, 5, 26, 0, 0, 0, 24, 25, 18, 0, 0, 0, 0, 29,
+            0, 7, 0, 0, 17, 22, 15, 0, 0, 8, 0, 0, 0, 0, 10, 9,
+            14, 0, 11, 0, 6, 16, 0, 0, 21, 12, 0, 0, 2, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
+    /**
+     * Translates DFA states to action switch labels.
+     */
+    private static final int[] ZZ_ACTION = zzUnpackAction();
+    private static final String ZZ_ACTION_PACKED_0 =
+            "\12\0\6\1\1\2\2\1\1\3\1\1\1\4\10\1" +
+                    "\23\0\1\5\1\6\1\7\122\0\1\10\41\0\1\11" +
+                    "\3\0\1\12\11\0\1\13\130\0\1\14\1\15";
+    /**
+     * Translates a state to a row index in the transition table
+     */
+    private static final int[] ZZ_ROWMAP = zzUnpackRowMap();
+
+    private static final String ZZ_ROWMAP_PACKED_0 =
+            "\0\0\0\43\0\106\0\151\0\214\0\257\0\322\0\365" +
+                    "\0\u0118\0\u013b\0\u015e\0\u0181\0\u01a4\0\u01c7\0\u01ea\0\u020d" +
+                    "\0\u0230\0\u0230\0\u0253\0\u0276\0\u0276\0\u0299\0\u0299\0\u02bc" +
+                    "\0\u02df\0\u0302\0\u0325\0\u0348\0\u036b\0\u038e\0\u03b1\0\u03d4" +
+                    "\0\u03f7\0\u041a\0\u043d\0\u0460\0\u02bc\0\u0483\0\u0302\0\u04a6" +
+                    "\0\u0348\0\u04c9\0\u04ec\0\u050f\0\u0532\0\u0555\0\u0578\0\u059b" +
+                    "\0\u05be\0\u0483\0\u04a6\0\u04c9\0\u05e1\0\u0604\0\u0627\0\u064a" +
+                    "\0\u066d\0\u0690\0\u06b3\0\u06d6\0\u06f9\0\u071c\0\u073f\0\u0762" +
+                    "\0\u0785\0\u07a8\0\u07cb\0\u07ee\0\u0811\0\u0834\0\u0857\0\u087a" +
+                    "\0\u089d\0\u08c0\0\u08e3\0\u0906\0\u0929\0\u094c\0\u096f\0\u0992" +
+                    "\0\u09b5\0\u09d8\0\u09fb\0\u0a1e\0\u0a41\0\u0a64\0\u0a87\0\u0aaa" +
+                    "\0\u0acd\0\u0af0\0\u0b13\0\u0b36\0\u0b59\0\u0b7c\0\u0b9f\0\u0bc2" +
+                    "\0\u0be5\0\u0c08\0\u0c2b\0\u0c4e\0\u0c71\0\u0c94\0\u0cb7\0\u0cda" +
+                    "\0\u0cfd\0\u0d20\0\u0d43\0\u0d66\0\u0d89\0\u0dac\0\u0dcf\0\u0df2" +
+                    "\0\u0e15\0\u0e38\0\u0e5b\0\u0e7e\0\u0ea1\0\u0ec4\0\u0ee7\0\u0f0a" +
+                    "\0\u0f2d\0\u0f50\0\u0f73\0\u0f96\0\u0fb9\0\u0fdc\0\u0fff\0\u1022" +
+                    "\0\u1045\0\u1068\0\u108b\0\u10ae\0\u10d1\0\u10f4\0\u015e\0\u1117" +
+                    "\0\u113a\0\u115d\0\u1180\0\u11a3\0\u11c6\0\u11e9\0\u120c\0\u122f" +
+                    "\0\u1252\0\u1275\0\u1298\0\u12bb\0\u12de\0\u1301\0\u1324\0\u1347" +
+                    "\0\u136a\0\u138d\0\u13b0\0\u13d3\0\u13f6\0\u1419\0\u143c\0\u145f" +
+                    "\0\u1482\0\u14a5\0\u14c8\0\u14eb\0\u150e\0\u1531\0\u1554\0\u1577" +
+                    "\0\u015e\0\u159a\0\u15bd\0\u15e0\0\u015e\0\u1603\0\u1626\0\u1649" +
+                    "\0\u166c\0\u168f\0\u16b2\0\u16d5\0\u16f8\0\u171b\0\u015e\0\u173e" +
+                    "\0\u1761\0\u1784\0\u17a7\0\u17ca\0\u17ed\0\u1810\0\u1833\0\u1856" +
+                    "\0\u1879\0\u189c\0\u18bf\0\u18e2\0\u1905\0\u1928\0\u194b\0\u196e" +
+                    "\0\u1991\0\u19b4\0\u19d7\0\u19fa\0\u1a1d\0\u1a40\0\u1a63\0\u1a86" +
+                    "\0\u1aa9\0\u1acc\0\u1aef\0\u1b12\0\u1b35\0\u1b58\0\u1b7b\0\u1b9e" +
+                    "\0\u1bc1\0\u1be4\0\u1c07\0\u1c2a\0\u1c4d\0\u1c70\0\u1c93\0\u1cb6" +
+                    "\0\u1cd9\0\u1cfc\0\u1d1f\0\u1d42\0\u1d65\0\u1d88\0\u1dab\0\u1dce" +
+                    "\0\u1df1\0\u1e14\0\u1e37\0\u1e5a\0\u1e7d\0\u1ea0\0\u1ec3\0\u1ee6" +
+                    "\0\u1f09\0\u1f2c\0\u1f4f\0\u1f72\0\u1f95\0\u1fb8\0\u1fdb\0\u1ffe" +
+                    "\0\u2021\0\u2044\0\u2067\0\u208a\0\u20ad\0\u20d0\0\u20f3\0\u2116" +
+                    "\0\u2139\0\u215c\0\u217f\0\u21a2\0\u21c5\0\u21e8\0\u220b\0\u222e" +
+                    "\0\u2251\0\u2274\0\u2297\0\u22ba\0\u22dd\0\u2300\0\u2323\0\u015e" +
+                    "\0\u015e";
+    /**
+     * The transition table of the DFA
+     */
+    private static final int[] ZZ_TRANS = zzUnpackTrans();
+    private static final String ZZ_TRANS_PACKED_0 =
+            "\5\13\1\14\14\13\1\15\25\13\1\16\22\13\1\17" +
+                    "\1\13\1\20\54\13\1\21\1\22\20\13\1\23\20\13" +
+                    "\1\24\1\25\20\13\1\25\20\13\1\26\1\27\20\13" +
+                    "\1\27\20\13\1\30\1\31\20\13\1\31\20\13\1\32" +
+                    "\1\33\20\13\1\33\20\13\1\34\1\35\20\13\1\35" +
+                    "\42\13\1\36\17\13\51\0\1\37\57\0\1\40\25\0" +
+                    "\1\41\51\0\1\42\60\0\1\43\10\0\1\21\42\0" +
+                    "\1\21\21\0\1\44\20\0\1\24\42\0\1\26\42\0" +
+                    "\1\45\1\0\1\46\40\0\1\45\42\0\1\47\1\0" +
+                    "\1\50\40\0\1\47\42\0\1\51\1\0\1\52\40\0" +
+                    "\1\51\64\0\1\53\26\0\1\54\57\0\1\55\25\0" +
+                    "\1\56\50\0\1\57\61\0\1\60\31\0\1\61\20\0" +
+                    "\1\62\42\0\1\63\42\0\1\64\64\0\1\65\25\0" +
+                    "\1\66\43\0\1\67\45\0\1\70\45\0\1\71\62\0" +
+                    "\1\72\30\0\1\73\42\0\1\74\27\0\1\75\40\0" +
+                    "\1\76\55\0\1\77\36\0\1\100\61\0\1\101\31\0" +
+                    "\1\102\42\0\1\103\30\0\1\104\44\0\1\105\36\0" +
+                    "\1\106\50\0\1\107\63\0\1\110\27\0\1\111\42\0" +
+                    "\1\112\31\0\1\113\40\0\1\114\45\0\1\115\44\0" +
+                    "\1\116\64\0\1\117\26\0\1\120\42\0\1\121\26\0" +
+                    "\1\122\60\0\1\123\36\0\1\124\36\0\1\125\62\0" +
+                    "\1\126\30\0\1\127\42\0\1\130\32\0\1\131\44\0" +
+                    "\1\132\42\0\1\133\42\0\1\134\65\0\1\135\25\0" +
+                    "\1\136\42\0\1\137\33\0\1\140\37\0\1\141\42\0" +
+                    "\1\142\46\0\1\143\31\0\1\144\61\0\1\145\42\0" +
+                    "\1\146\34\0\1\147\40\0\1\150\42\0\1\151\44\0" +
+                    "\1\152\62\0\1\153\30\0\1\154\42\0\1\155\35\0" +
+                    "\1\156\34\0\1\157\42\0\1\160\47\0\1\161\31\0" +
+                    "\1\162\61\0\1\163\42\0\1\164\30\0\1\165\57\0" +
+                    "\1\166\42\0\1\167\45\0\1\170\52\0\1\171\24\0" +
+                    "\1\172\42\0\1\173\27\0\1\174\44\0\1\175\42\0" +
+                    "\1\176\45\0\1\177\67\0\1\200\23\0\1\201\42\0" +
+                    "\1\202\31\0\1\203\36\0\1\204\42\0\1\205\51\0" +
+                    "\1\206\61\0\1\207\31\0\1\210\42\0\1\211\25\0" +
+                    "\1\212\43\0\1\213\42\0\1\214\50\0\1\215\50\0" +
+                    "\1\216\42\0\1\217\34\0\1\220\33\0\1\221\42\0" +
+                    "\1\222\51\0\1\223\50\0\1\224\42\0\1\225\36\0" +
+                    "\1\226\33\0\1\227\42\0\1\230\47\0\1\231\50\0" +
+                    "\1\232\42\0\1\233\30\0\1\234\42\0\1\235\42\0" +
+                    "\1\236\46\0\1\237\50\0\1\240\42\0\1\241\37\0" +
+                    "\1\242\34\0\1\243\42\0\1\244\45\0\1\245\50\0" +
+                    "\1\246\42\0\1\247\31\0\1\250\57\0\1\251\42\0" +
+                    "\1\207\30\0\1\252\50\0\1\253\42\0\1\254\40\0" +
+                    "\1\255\36\0\1\256\50\0\1\257\42\0\1\260\34\0" +
+                    "\1\261\50\0\1\262\42\0\1\263\34\0\1\264\50\0" +
+                    "\1\265\42\0\1\266\41\0\1\267\43\0\1\270\42\0" +
+                    "\1\271\42\0\1\272\42\0\1\273\42\0\1\274\42\0" +
+                    "\1\275\42\0\1\276\42\0\1\277\42\0\1\300\42\0" +
+                    "\1\301\42\0\1\302\42\0\1\303\42\0\1\304\42\0" +
+                    "\1\305\42\0\1\306\42\0\1\307\42\0\1\310\42\0" +
+                    "\1\311\42\0\1\312\42\0\1\313\42\0\1\314\42\0" +
+                    "\1\315\42\0\1\316\42\0\1\317\42\0\1\320\42\0" +
+                    "\1\321\42\0\1\322\42\0\1\323\42\0\1\324\42\0" +
+                    "\1\325\42\0\1\326\42\0\1\327\42\0\1\330\42\0" +
+                    "\1\331\42\0\1\332\42\0\1\333\42\0\1\334\42\0" +
+                    "\1\335\42\0\1\336\42\0\1\337\42\0\1\340\42\0" +
+                    "\1\341\42\0\1\342\42\0\1\343\42\0\1\344\42\0" +
+                    "\1\345\42\0\1\346\42\0\1\347\42\0\1\350\42\0" +
+                    "\1\351\42\0\1\352\42\0\1\353\42\0\1\354\42\0" +
+                    "\1\355\42\0\1\356\42\0\1\357\42\0\1\360\42\0" +
+                    "\1\361\42\0\1\362\42\0\1\363\42\0\1\364\42\0" +
+                    "\1\365\42\0\1\366\42\0\1\367\42\0\1\370\42\0" +
+                    "\1\371\42\0\1\372\42\0\1\373\42\0\1\374\42\0" +
+                    "\1\375\42\0\1\376\42\0\1\377\42\0\1\u0100\42\0" +
+                    "\1\u0101\42\0\1\u0102\42\0\1\u0103\42\0\1\u0104\42\0" +
+                    "\1\u0105\42\0\1\u0106\42\0\1\u0107\42\0\1\u0108\42\0" +
+                    "\1\u0109\42\0\1\u010a\42\0\1\u010b\42\0\1\u010c\42\0" +
+                    "\1\u010d\42\0\1\u010e\42\0\1\u010f\42\0\1\u0110\42\0" +
+                    "\1\u0111\17\0";
+    /* error codes */
+    private static final int ZZ_UNKNOWN_ERROR = 0;
+    private static final int ZZ_NO_MATCH = 1;
+    private static final int ZZ_PUSHBACK_2BIG = 2;
+    /* error messages for the codes above */
+    private static final String ZZ_ERROR_MSG[] = {
+            "Unkown internal scanner error",
+            "Error: could not match input",
+            "Error: pushback value was too large"
+    };
+    /**
+     * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+     */
+    private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute();
+    private static final String ZZ_ATTRIBUTE_PACKED_0 =
+            "\12\0\1\11\23\1\23\0\3\1\122\0\1\11\41\0" +
+                    "\1\11\3\0\1\11\11\0\1\11\130\0\2\11";
+    /* user code: */
+    public static boolean DEBUG = false;
+    /**
+     * the input device
+     */
+    private java.io.Reader zzReader;
+    /**
+     * the current state of the DFA
+     */
+    private int zzState;
+    /**
+     * the textposition at the last accepting state
+     */
+    private int zzMarkedPos;
+    /**
+     * the current text position in the buffer
+     */
+    private int zzCurrentPos;
+    /**
+     * startRead marks the beginning of the yytext() string in the buffer
+     */
+    private int zzStartRead;
+    /**
+     * endRead marks the last character in the buffer, that has been read
+     * from input
+     */
+    private int zzEndRead;
+    /**
+     * number of newlines encountered up to the start of the matched text
+     */
+    private int yyline;
+    /**
+     * the number of characters up to the start of the matched text
+     */
+    private int yychar;
+    /**
+     * the number of characters from the last newline up to the start of the
+     * matched text
+     */
+    private int yycolumn;
+    /**
+     * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+     */
+    private boolean zzAtBOL = true;
+    /**
+     * zzAtEOF == true <=> the scanner is at the EOF
+     */
+    private boolean zzAtEOF;
+    /**
+     * denotes if the user-EOF-code has already been executed
+     */
+    private boolean zzEOFDone;
+
+    /**
+     * Creates a new scanner
+     * There is also a java.io.InputStream version of this constructor.
+     *
+     * @param in the java.io.Reader to read input from.
+     */
+    public FinalCoordLexer(java.io.Reader in) {
+        this.zzReader = in;
+    }
+
+    /**
+     * Creates a new scanner.
+     * There is also java.io.Reader version of this constructor.
+     *
+     * @param in the java.io.Inputstream to read input from.
+     */
+    public FinalCoordLexer(java.io.InputStream in) {
+        this(new java.io.InputStreamReader(in));
+    }
+
+    private static int[] zzUnpackAction() {
+        int[] result = new int[273];
+        int offset = 0;
+        offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackAction(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackRowMap() {
+        int[] result = new int[273];
+        int offset = 0;
+        offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackRowMap(String packed, int offset, int[] result) {
+        int i = 0;  /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int high = packed.charAt(i++) << 16;
+            result[j++] = high | packed.charAt(i++);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackTrans() {
+        int[] result = new int[9030];
+        int offset = 0;
+        offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackTrans(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            value--;
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackAttribute() {
+        int[] result = new int[273];
+        int offset = 0;
+        offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackAttribute(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    /**
+     * Runs the scanner on input files.
+     * <p/>
+     * This is a standalone scanner, it will print any unmatched
+     * text to System.out unchanged.
+     *
+     * @param argv the command line, contains the filenames to run
+     *             the scanner on.
+     */
+    public static void main(String argv[]) {
+        if (argv.length == 0) {
+            System.out.println("Usage : java FinalCoordLexer <inputfile>");
+        } else {
+            for (int i = 0; i < argv.length; i++) {
+                FinalCoordLexer scanner = null;
+                try {
+                    scanner = new FinalCoordLexer(new java.io.FileReader(argv[i]));
+                    while (!scanner.zzAtEOF) scanner.next_token();
+                } catch (java.io.FileNotFoundException e) {
+                    System.out.println("File not found : \"" + argv[i] + "\"");
+                } catch (java.io.IOException e) {
+                    System.out.println("IO error scanning file \"" + argv[i] + "\"");
+                    System.out.println(e);
+                } catch (Exception e) {
+                    System.out.println("Unexpected exception:");
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+    /**
+     * Refills the input buffer.
+     *
+     * @return <code>false</code>, iff there was new input.
+     * @throws java.io.IOException if any I/O-Error occurs
+     */
+    private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+        if (zzStartRead > 0) {
+            System.arraycopy(zzBuffer, zzStartRead,
+                    zzBuffer, 0,
+                    zzEndRead - zzStartRead);
+
+      /* translate stored positions */
+            zzEndRead -= zzStartRead;
+            zzCurrentPos -= zzStartRead;
+            zzMarkedPos -= zzStartRead;
+            zzStartRead = 0;
+        }
+
+    /* is the buffer big enough? */
+        if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+            char newBuffer[] = new char[zzCurrentPos * 2];
+            System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+            zzBuffer = newBuffer;
+        }
+
+    /* finally: fill the buffer with new input */
+        int numRead = zzReader.read(zzBuffer, zzEndRead,
+                zzBuffer.length - zzEndRead);
+
+        if (numRead > 0) {
+            zzEndRead += numRead;
+            return false;
+        }
+        // unlikely but not impossible: read 0 characters, but not at end of stream
+        if (numRead == 0) {
+            int c = zzReader.read();
+            if (c == -1) {
+                return true;
+            } else {
+                zzBuffer[zzEndRead++] = (char) c;
+                return false;
+            }
+        }
+
+        // numRead < 0
+        return true;
+    }
+
+    /**
+     * Closes the input stream.
+     */
+    public final void yyclose() throws java.io.IOException {
+        zzAtEOF = true;            /* indicate end of file */
+        zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+        if (zzReader != null)
+            zzReader.close();
+    }
+
+    /**
+     * Resets the scanner to read from a new input stream.
+     * Does not close the old reader.
+     * <p/>
+     * All internal variables are reset, the old input stream
+     * <b>cannot</b> be reused (internal buffer is discarded and lost).
+     * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+     *
+     * @param reader the new input stream
+     */
+    public final void yyreset(java.io.Reader reader) {
+        zzReader = reader;
+        zzAtBOL = true;
+        zzAtEOF = false;
+        zzEOFDone = false;
+        zzEndRead = zzStartRead = 0;
+        zzCurrentPos = zzMarkedPos = 0;
+        yyline = yychar = yycolumn = 0;
+        zzLexicalState = YYINITIAL;
+    }
+
+    /**
+     * Returns the current lexical state.
+     */
+    public final int yystate() {
+        return zzLexicalState;
+    }
+
+    /**
+     * Enters a new lexical state
+     *
+     * @param newState the new lexical state
+     */
+    public final void yybegin(int newState) {
+        zzLexicalState = newState;
+    }
+
+    /**
+     * Returns the text matched by the current regular expression.
+     */
+    public final String yytext() {
+        return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
+    }
+
+    /**
+     * Returns the character at position <tt>pos</tt> from the
+     * matched text.
+     * <p/>
+     * It is equivalent to yytext().charAt(pos), but faster
+     *
+     * @param pos the position of the character to fetch.
+     *            A value from 0 to yylength()-1.
+     * @return the character at position pos
+     */
+    public final char yycharat(int pos) {
+        return zzBuffer[zzStartRead + pos];
+    }
+
+    /**
+     * Returns the length of the matched text region.
+     */
+    public final int yylength() {
+        return zzMarkedPos - zzStartRead;
+    }
+
+    /**
+     * Reports an error that occured while scanning.
+     * <p/>
+     * In a wellformed scanner (no or only correct usage of
+     * yypushback(int) and a match-all fallback rule) this method
+     * will only be called with things that "Can't Possibly Happen".
+     * If this method is called, something is seriously wrong
+     * (e.g. a JFlex bug producing a faulty scanner etc.).
+     * <p/>
+     * Usual syntax/scanner level error handling should be done
+     * in error fallback rules.
+     *
+     * @param errorCode the code of the errormessage to display
+     */
+    private void zzScanError(int errorCode) {
+        String message;
+        try {
+            message = ZZ_ERROR_MSG[errorCode];
+        } catch (ArrayIndexOutOfBoundsException e) {
+            message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+        }
+
+        throw new Error(message);
+    }
+
+    /**
+     * Pushes the specified amount of characters back into the input stream.
+     * <p/>
+     * They will be read again by then next call of the scanning method
+     *
+     * @param number the number of characters to be read again.
+     *               This number must not be greater than yylength()!
+     */
+    public void yypushback(int number) {
+        if (number > yylength())
+            zzScanError(ZZ_PUSHBACK_2BIG);
+
+        zzMarkedPos -= number;
+    }
+
+    /**
+     * Contains user EOF-code, which will be executed exactly once,
+     * when the end of file is reached
+     */
+    private void zzDoEOF() throws java.io.IOException {
+        if (!zzEOFDone) {
+            zzEOFDone = true;
+            yyclose();
+        }
+    }
+
+    /**
+     * Resumes scanning until the next regular expression is matched,
+     * the end of input is encountered or an I/O-Error occurs.
+     *
+     * @return the next token
+     * @throws java.io.IOException if any I/O-Error occurs
+     */
+    public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+        int zzInput;
+        int zzAction;
+
+        // cached fields:
+        int zzCurrentPosL;
+        int zzMarkedPosL;
+        int zzEndReadL = zzEndRead;
+        char[] zzBufferL = zzBuffer;
+        char[] zzCMapL = ZZ_CMAP;
+
+        int[] zzTransL = ZZ_TRANS;
+        int[] zzRowMapL = ZZ_ROWMAP;
+        int[] zzAttrL = ZZ_ATTRIBUTE;
+
+        while (true) {
+            zzMarkedPosL = zzMarkedPos;
+
+            zzAction = -1;
+
+            zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+            zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+            zzForAction:
+            {
+                while (true) {
+
+                    if (zzCurrentPosL < zzEndReadL)
+                        zzInput = zzBufferL[zzCurrentPosL++];
+                    else if (zzAtEOF) {
+                        zzInput = YYEOF;
+                        break zzForAction;
+                    } else {
+                        // store back cached positions
+                        zzCurrentPos = zzCurrentPosL;
+                        zzMarkedPos = zzMarkedPosL;
+                        boolean eof = zzRefill();
+                        // get translated positions and possibly new buffer
+                        zzCurrentPosL = zzCurrentPos;
+                        zzMarkedPosL = zzMarkedPos;
+                        zzBufferL = zzBuffer;
+                        zzEndReadL = zzEndRead;
+                        if (eof) {
+                            zzInput = YYEOF;
+                            break zzForAction;
+                        } else {
+                            zzInput = zzBufferL[zzCurrentPosL++];
+                        }
+                    }
+                    int zzNext = zzTransL[zzRowMapL[zzState] + zzCMapL[zzInput]];
+                    if (zzNext == -1) break zzForAction;
+                    zzState = zzNext;
+
+                    int zzAttributes = zzAttrL[zzState];
+                    if ((zzAttributes & 1) == 1) {
+                        zzAction = zzState;
+                        zzMarkedPosL = zzCurrentPosL;
+                        if ((zzAttributes & 8) == 8) break zzForAction;
+                    }
+
+                }
+            }
+
+            // store back cached position
+            zzMarkedPos = zzMarkedPosL;
+
+            switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+                case 5: {
+                    yybegin(INPUTD);
+                    return new Symbol(FinalCoordSym.INPUT5, new Float(yytext()));
+                }
+                case 14:
+                    break;
+                case 7: {
+                    yybegin(INPUT);
+                    return new Symbol(FinalCoordSym.INPUT7, new Float(yytext()));
+                }
+                case 15:
+                    break;
+                case 3: {
+                    yybegin(INPUTB);
+                    return new Symbol(FinalCoordSym.INPUT3, new Integer(yytext()));
+                }
+                case 16:
+                    break;
+                case 8: {
+                    yybegin(IGNOREALL);
+                    return new Symbol(FinalCoordSym.SCFDONE);
+                }
+                case 17:
+                    break;
+                case 11: {
+                    yybegin(INPUTF);
+                    return new Symbol(FinalCoordSym.INPUT1);
+                }
+                case 18:
+                    break;
+                case 2: {
+                    yybegin(INPUTA);
+                    return new Symbol(FinalCoordSym.INPUT2, new Integer(yytext()));
+                }
+                case 19:
+                    break;
+                case 12: {
+                    yybegin(ITER);
+                    return new Symbol(FinalCoordSym.DASH2);
+                }
+                case 20:
+                    break;
+                case 9: {
+                    yybegin(ITER);
+                    return new Symbol(FinalCoordSym.FOUNDITER);
+                }
+                case 21:
+                    break;
+                case 10: {
+                    yybegin(ITER);
+                    return new Symbol(FinalCoordSym.FOUNDITER);
+                }
+                case 22:
+                    break;
+                case 6: {
+                    yybegin(INPUTE);
+                    return new Symbol(FinalCoordSym.INPUT6, new Float(yytext()));
+                }
+                case 23:
+                    break;
+                case 4: {
+                    yybegin(INPUTC);
+                    return new Symbol(FinalCoordSym.INPUT4, new Integer(yytext()));
+                }
+                case 24:
+                    break;
+                case 13: {
+                    yybegin(INPUT);
+                    return new Symbol(FinalCoordSym.DASH1);
+                }
+                case 25:
+                    break;
+                case 1: {
+                }
+                case 26:
+                    break;
+                default:
+                    if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+                        zzAtEOF = true;
+                        zzDoEOF();
+                        {
+                            return new java_cup.runtime.Symbol(FinalCoordSym.EOF);
+                        }
+                    } else {
+                        zzScanError(ZZ_NO_MATCH);
+                    }
+            }
+        }
+    }
+
+    /**
+     * Converts an int token code into the name of the
+     * token by reflection on the cup symbol class/interface sym
+     * <p/>
+     * This code was contributed by Karl Meissner <me...@yahoo.com>
+     */
+    private String getTokenName(int token) {
+        try {
+            java.lang.reflect.Field[] classFields = FinalCoordSym.class.getFields();
+            for (int i = 0; i < classFields.length; i++) {
+                if (classFields[i].getInt(null) == token) {
+                    return classFields[i].getName();
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace(System.err);
+        }
+
+        return "UNKNOWN TOKEN";
+    }
+
+    /**
+     * Same as next_token but also prints the token to standard out
+     * for debugging.
+     * <p/>
+     * This code was contributed by Karl Meissner <me...@yahoo.com>
+     */
+    public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+        java_cup.runtime.Symbol s = next_token();
+        System.out.println(" --" + yytext() + "--" + getTokenName(s.sym) + "--");
+        return s;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParser.java
new file mode 100644
index 0000000..24e3cde
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordParser.java
@@ -0,0 +1,466 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.finalcoord;
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Stack;
+
+
+public class FinalCoordParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public FinalCoordParser(final FileReader fileReader) {
+        super(new FinalCoordLexer(fileReader));
+    }
+
+
+
+
+    /**
+     * Production table.
+     */
+    protected static final short _production_table[][] =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\016\000\002\003\005\000\002\002\004\000\002\004" +
+                            "\003\000\002\005\004\000\002\005\003\000\002\006\006" +
+                            "\000\002\017\004\000\002\017\003\000\002\020\010\000" +
+                            "\002\012\003\000\002\013\003\000\002\014\003\000\002" +
+                            "\015\003\000\002\016\003"});
+    /**
+     * Parse-action table.
+     */
+    protected static final short[][] _action_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\032\000\004\005\005\001\002\000\004\004\010\001" +
+                            "\002\000\004\004\uffff\001\002\000\004\002\007\001\002" +
+                            "\000\004\002\000\001\002\000\004\007\015\001\002\000" +
+                            "\006\004\010\006\013\001\002\000\006\004\ufffd\006\ufffd" +
+                            "\001\002\000\004\002\001\001\002\000\006\004\ufffe\006" +
+                            "\ufffe\001\002\000\004\011\016\001\002\000\004\012\ufff8" +
+                            "\001\002\000\004\012\025\001\002\000\006\010\ufffa\011" +
+                            "\ufffa\001\002\000\006\010\022\011\016\001\002\000\006" +
+                            "\004\ufffc\006\ufffc\001\002\000\006\010\ufffb\011\ufffb\001" +
+                            "\002\000\004\013\026\001\002\000\004\013\ufff7\001\002" +
+                            "\000\004\016\027\001\002\000\004\017\ufff6\001\002\000" +
+                            "\004\017\031\001\002\000\004\020\ufff5\001\002\000\004" +
+                            "\020\033\001\002\000\006\010\ufff4\011\ufff4\001\002\000" +
+                            "\006\010\ufff9\011\ufff9\001\002"});
+    /**
+     * <code>reduce_goto</code> table.
+     */
+    protected static final short[][] _reduce_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\032\000\006\003\005\004\003\001\001\000\006\005" +
+                            "\010\006\011\001\001\000\002\001\001\000\002\001\001" +
+                            "\000\002\001\001\000\002\001\001\000\004\006\013\001" +
+                            "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                            "\000\010\012\016\017\020\020\017\001\001\000\002\001" +
+                            "\001\000\004\013\023\001\001\000\002\001\001\000\006" +
+                            "\012\016\020\022\001\001\000\002\001\001\000\002\001" +
+                            "\001\000\002\001\001\000\002\001\001\000\004\014\027" +
+                            "\001\001\000\002\001\001\000\004\015\031\001\001\000" +
+                            "\002\001\001\000\004\016\033\001\001\000\002\001\001" +
+                            "\000\002\001\001"});
+    /**
+     * Instance of action encapsulation class.
+     */
+    protected CUP$parser$actions action_obj;
+    //Each string is of the format
+    //center# atomic# x_coord y_coord z_coord
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+    /**
+     * Default constructor.
+     */
+    public FinalCoordParser() {
+        super();
+    }
+
+    /**
+     * Constructor which sets the default scanner.
+     */
+    public FinalCoordParser(java_cup.runtime.Scanner s) {
+        super(s);
+    }
+
+    /**
+     * Access to production table.
+     */
+
+    @Override
+    public short[][] production_table() {
+        return _production_table;
+    }
+
+    /**
+     * Access to parse-action table.
+     */
+    @Override
+    public short[][] action_table() {
+        return _action_table;
+    }
+
+
+
+    /**
+     * Access to <code>reduce_goto</code> table.
+     */
+
+    @Override
+    public short[][] reduce_table() {
+        return _reduce_table;
+    }
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int zCount=0;
+        int xCount=0;
+        int yCount=0;
+        int center=0;
+        int atom=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp=singleString.split(" ");
+            if(temp.length>1){
+                String keyElement=temp[0];
+                String dataElement=temp[1];
+                if(keyElement.equals("Z")){
+                    results.put("FinalCoordParser_Z_coord_"+zCount,dataElement);
+                    zCount++;
+                }else if(keyElement.equals("Y")){
+                    results.put("FinalCoordParser_Y_coord_"+yCount,dataElement);
+                    yCount++;
+                }else if(keyElement.equals("X")) {
+                    results.put("FinalCoordParser_X_coord_" + xCount, dataElement);
+                    xCount++;
+                }else if(keyElement.equals("Atom")) {
+                    results.put("FinalCoordParser_AtomicNumber_" + atom, dataElement);
+                    atom++;
+                }else if(keyElement.equals("center")) {
+                    results.put("FinalCoordParser_CenterNumber_" + center, dataElement);
+                    center++;
+                }
+            }
+
+
+        }
+
+        return results;
+    }
+
+
+
+
+    /**
+     * Action encapsulation object initializer.
+     */
+    protected void init_actions() {
+        action_obj = new CUP$parser$actions(this);
+    }
+
+    /**
+     * Invoke a user supplied parse action.
+     */
+    public java_cup.runtime.Symbol do_action(
+            int act_num,
+            java_cup.runtime.lr_parser parser,
+            Stack stack,
+            int top)
+            throws Exception {
+    /* call code in generated class */
+        return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+    }
+
+    /**
+     * Indicates start state.
+     */
+    public int start_state() {
+        return 0;
+    }
+
+    /**
+     * Indicates start production.
+     */
+    public int start_production() {
+        return 1;
+    }
+
+    /**
+     * <code>EOF</code> Symbol index.
+     */
+    public int EOF_sym() {
+        return 0;
+    }
+
+    /**
+     * <code>error</code> Symbol index.
+     */
+    public int error_sym() {
+        return 1;
+    }
+
+
+}
+
+/**
+ * Cup generated class to encapsulate user supplied action code.
+ */
+class CUP$parser$actions {
+
+
+    private static final String tableLabel = "SCF Intermediate Results:";
+    //__________________________________
+    public static boolean DEBUG = false;
+    private static JTable table;
+    // private static String cycle = "0";
+    private final FinalCoordParser FinalCoordParser;
+
+    /**
+     * Constructor
+     */
+    CUP$parser$actions(FinalCoordParser FinalCoordParser) {
+        this.FinalCoordParser = FinalCoordParser;
+    }
+
+//   }
+
+    public static JTable getTable() {
+        return table;
+    }
+
+    public static String getTableLabel() {
+        return tableLabel;
+    }
+
+    /**
+     * Method with the actual generated action code.
+     */
+    public final java_cup.runtime.Symbol CUP$parser$do_action(
+            int CUP$parser$act_num,
+            java_cup.runtime.lr_parser CUP$parser$parser,
+            Stack CUP$parser$stack,
+            int CUP$parser$top)
+            throws Exception {
+      /* Symbol object for return from actions */
+        java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+        switch (CUP$parser$act_num) {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 13: // inp7 ::= INPUT7
+            {
+                Object RESULT = null;
+                int in7left = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int in7right = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float in7 = (Float) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:Input:  z coordinate " + in7);
+                FinalCoordParser.setTempStr(FinalCoordParser.getTempStr() + "," + in7);
+                FinalCoordParser.getResult().add(FinalCoordParser.getTempStr());
+                FinalCoordParser.setTempStr("");
+                FinalCoordParser.addToResult("Z "+in7);
+                CUP$parser$result = new java_cup.runtime.Symbol(12/*inp7*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 12: // inp6 ::= INPUT6
+            {
+                Object RESULT = null;
+                int in6left = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int in6right = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float in6 = (Float) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:Input:  y coordinate " + in6);
+                FinalCoordParser.setTempStr(FinalCoordParser.getTempStr() + "," + in6);
+                FinalCoordParser.addToResult("Y "+in6);
+                CUP$parser$result = new java_cup.runtime.Symbol(11/*inp6*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 11: // inp5 ::= INPUT5
+            {
+                Object RESULT = null;
+                int in5left = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int in5right = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float in5 = (Float) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:Input:  x coordinate " + in5);
+                FinalCoordParser.setTempStr(FinalCoordParser.getTempStr() + "," + in5);
+                FinalCoordParser.addToResult("X "+in5);
+                CUP$parser$result = new java_cup.runtime.Symbol(10/*inp5*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 10: // inp3 ::= INPUT3
+            {
+                Object RESULT = null;
+                int in3left = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int in3right = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Integer in3 = (Integer) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:Input:  atomic number " + in3);
+                FinalCoordParser.setTempStr(FinalCoordParser.getTempStr() + "," + in3);
+                FinalCoordParser.addToResult("Atom "+in3);
+                CUP$parser$result = new java_cup.runtime.Symbol(9/*inp3*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 9: // inp2 ::= INPUT2
+            {
+                Object RESULT = null;
+                int in2left = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int in2right = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Integer in2 = (Integer) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:Input:  center number " + in2);
+                FinalCoordParser.addToResult("center "+in2);
+                FinalCoordParser.setTempStr(FinalCoordParser.getTempStr() + in2);
+                CUP$parser$result = new java_cup.runtime.Symbol(8/*inp2*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 8: // cycle2 ::= inp2 inp3 INPUT4 inp5 inp6 inp7
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(14/*cycle2*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 5)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 7: // cycle1 ::= cycle2
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(13/*cycle1*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 6: // cycle1 ::= cycle1 cycle2
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(13/*cycle1*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 5: // scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 3)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 4: // scfpat ::= scfcycle
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 3: // scfpat ::= scfpat scfcycle
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:Input: in scfpat");
+                CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 2: // scfintro ::= FOUNDITER
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration");
+                CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 1: // $START ::= startpt EOF
+            {
+                Object RESULT = null;
+                int start_valleft = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left;
+                int start_valright = ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).right;
+                Object start_val = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
+                RESULT = start_val;
+                CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+          /* ACCEPT */
+            CUP$parser$parser.done_parsing();
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 0: // startpt ::= scfintro scfpat SCFDONE
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)).left, ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /* . . . . . .*/
+            default:
+                throw new Exception(
+                        "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordSym.java
new file mode 100644
index 0000000..e30a7ab
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/finalcoord/FinalCoordSym.java
@@ -0,0 +1,48 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.finalcoord;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Aug 03 21:31:23 IST 2014
+//----------------------------------------------------
+
+/**
+ * CUP generated class containing symbol constants.
+ */
+public class FinalCoordSym {
+    /* terminals */
+    public static final int ENERGY = 11;
+    public static final int EOF = 0;
+    public static final int ITERATION = 10;
+    public static final int INPUT7 = 14;
+    public static final int error = 1;
+    public static final int INPUT6 = 13;
+    public static final int INPUT5 = 12;
+    public static final int INPUT4 = 9;
+    public static final int SCFDONE = 4;
+    public static final int INPUT3 = 8;
+    public static final int FOUNDITER = 3;
+    public static final int INPUT2 = 7;
+    public static final int DASH2 = 6;
+    public static final int INPUT1 = 2;
+    public static final int DASH1 = 5;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Lexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Lexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Lexer.java
new file mode 100644
index 0000000..2c7d9e5
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Lexer.java
@@ -0,0 +1,913 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.g1;/* The following code was generated by JFlex 1.4.3 on 9/10/14 8:33 AM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/10/14 8:33 AM from the specification file
+ * <tt>g1.flex</tt>
+ */
+public class G1Lexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int FLOATMP3 = 24;
+  public static final int ITER2 = 4;
+  public static final int FLOATMP2 = 22;
+  public static final int FLOATMP1 = 20;
+  public static final int MPOPT = 18;
+  public static final int INTMP = 28;
+  public static final int INTVALUE = 8;
+  public static final int IGNOREALL = 26;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int MP2 = 16;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10, 11, 11,  2,  2, 12, 12
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    14,  0,  0,  0,  0,  0,  0,  0, 29,  7,  0,  3,  0, 46,  4,  1, 
+     2, 48, 44, 47,  2,  2, 45,  2,  2,  2, 27,  0,  0,  6,  0,  0, 
+     0,  0,  0, 24, 26, 28, 25, 49, 31, 41,  0,  0, 42, 32,  8, 36, 
+    43,  0, 30, 23,  5, 50,  0,  0,  0,  0,  0,  0,  0,  0,  0, 40, 
+     0, 33, 11, 35, 39, 12, 16,  0, 22, 20,  0,  0, 38, 10, 21, 15, 
+    19,  0, 13, 17, 18,  9,  0,  0, 34,  0, 37,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\15\0\7\1\1\2\25\1\1\3\1\1\42\0\1\4"+
+    "\1\5\1\6\10\0\1\7\1\10\1\11\107\0\1\12"+
+    "\41\0\1\13\7\0\1\14\22\0\1\15\1\16\4\0"+
+    "\1\17\1\20\12\0\1\21\2\0\1\22\1\0\1\23"+
+    "\16\0\1\24\2\0\1\25\11\0\1\26\1\27\4\0"+
+    "\1\30";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[282];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\63\0\146\0\231\0\314\0\377\0\u0132\0\u0165"+
+    "\0\u0198\0\u01cb\0\u01fe\0\u0231\0\u0264\0\u0297\0\u02ca\0\u02fd"+
+    "\0\u0330\0\u0363\0\u0396\0\u03c9\0\u03fc\0\u03fc\0\u042f\0\u0462"+
+    "\0\u0495\0\u04c8\0\u04fb\0\u052e\0\u0561\0\u0594\0\u05c7\0\u05fa"+
+    "\0\u062d\0\u0660\0\u0693\0\u06c6\0\u06f9\0\u072c\0\u075f\0\u0792"+
+    "\0\u07c5\0\u07f8\0\u082b\0\u082b\0\u085e\0\u0891\0\u08c4\0\u08f7"+
+    "\0\u092a\0\u095d\0\u0990\0\u042f\0\u09c3\0\u0495\0\u09f6\0\u04fb"+
+    "\0\u0a29\0\u0a5c\0\u0a8f\0\u0ac2\0\u0af5\0\u0b28\0\u0b5b\0\u0b8e"+
+    "\0\u0bc1\0\u06f9\0\u0bf4\0\u075f\0\u0c27\0\u07c5\0\u0c5a\0\u0c8d"+
+    "\0\u0cc0\0\u0cf3\0\u0d26\0\u0d59\0\u0d8c\0\u0dbf\0\u09c3\0\u09f6"+
+    "\0\u0a29\0\u0df2\0\u0e25\0\u0e58\0\u0e8b\0\u0ebe\0\u0ef1\0\u0f24"+
+    "\0\u0f57\0\u0bf4\0\u0c27\0\u0c5a\0\u0f8a\0\u0fbd\0\u0ff0\0\u1023"+
+    "\0\u1056\0\u1089\0\u10bc\0\u10ef\0\u1122\0\u1155\0\u1188\0\u11bb"+
+    "\0\u11ee\0\u1221\0\u1254\0\u1287\0\u12ba\0\u12ed\0\u1320\0\u1353"+
+    "\0\u1386\0\u13b9\0\u13ec\0\u141f\0\u1452\0\u1485\0\u14b8\0\u14eb"+
+    "\0\u151e\0\u1551\0\u1584\0\u15b7\0\u15ea\0\u161d\0\u1650\0\u1683"+
+    "\0\u16b6\0\u16e9\0\u171c\0\u174f\0\u1782\0\u17b5\0\u17e8\0\u181b"+
+    "\0\u184e\0\u1881\0\u18b4\0\u18e7\0\u191a\0\u194d\0\u1980\0\u19b3"+
+    "\0\u19e6\0\u1a19\0\u1a4c\0\u1a7f\0\u1ab2\0\u1ae5\0\u1b18\0\u1b4b"+
+    "\0\u1b7e\0\u1bb1\0\u1be4\0\u1c17\0\u1c4a\0\u1c7d\0\u1cb0\0\u1ce3"+
+    "\0\u1d16\0\u1d49\0\u1d7c\0\u0297\0\u1daf\0\u1de2\0\u1e15\0\u1e48"+
+    "\0\u1e7b\0\u1eae\0\u1ee1\0\u1f14\0\u1f47\0\u1f7a\0\u1fad\0\u1fe0"+
+    "\0\u2013\0\u2046\0\u2079\0\u20ac\0\u20df\0\u2112\0\u2145\0\u2178"+
+    "\0\u21ab\0\u21de\0\u2211\0\u2244\0\u2277\0\u22aa\0\u22dd\0\u2310"+
+    "\0\u2343\0\u2376\0\u23a9\0\u23dc\0\u240f\0\u0297\0\u2442\0\u2475"+
+    "\0\u24a8\0\u24db\0\u250e\0\u2541\0\u2574\0\u0297\0\u25a7\0\u25da"+
+    "\0\u260d\0\u2640\0\u2673\0\u26a6\0\u26d9\0\u270c\0\u273f\0\u2772"+
+    "\0\u27a5\0\u27d8\0\u280b\0\u283e\0\u2871\0\u28a4\0\u28d7\0\u290a"+
+    "\0\u0297\0\u0297\0\u293d\0\u2970\0\u29a3\0\u29d6\0\u0297\0\u0297"+
+    "\0\u2a09\0\u2a3c\0\u2a6f\0\u2aa2\0\u2ad5\0\u2b08\0\u2b3b\0\u2b6e"+
+    "\0\u2ba1\0\u2bd4\0\u0297\0\u2c07\0\u2c3a\0\u0297\0\u2c6d\0\u0297"+
+    "\0\u2ca0\0\u2cd3\0\u2d06\0\u2d39\0\u2d6c\0\u2d9f\0\u2dd2\0\u2e05"+
+    "\0\u2e38\0\u2e6b\0\u2e9e\0\u2ed1\0\u2f04\0\u2f37\0\u0297\0\u2f6a"+
+    "\0\u2f9d\0\u0297\0\u2fd0\0\u3003\0\u3036\0\u3069\0\u309c\0\u30cf"+
+    "\0\u3102\0\u3135\0\u3168\0\u0297\0\u0297\0\u319b\0\u31ce\0\u3201"+
+    "\0\u3234\0\u0297";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[282];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\10\16\1\17\57\16\1\20\21\16\1\21\6\16\1\22"+
+    "\1\16\1\23\3\16\1\24\103\16\1\25\1\26\50\16"+
+    "\2\25\1\26\2\25\4\16\1\27\1\30\50\16\2\27"+
+    "\1\30\2\27\4\16\1\31\1\32\50\16\2\31\1\32"+
+    "\2\31\4\16\1\33\1\34\50\16\2\33\1\34\2\33"+
+    "\7\16\1\35\32\16\1\36\27\16\1\37\21\16\1\40"+
+    "\4\16\1\41\1\16\1\42\1\16\1\43\3\16\1\44"+
+    "\20\16\1\45\1\46\50\16\2\45\1\46\2\45\4\16"+
+    "\1\47\1\50\50\16\2\47\1\50\2\47\4\16\1\51"+
+    "\1\52\50\16\2\51\1\52\2\51\4\16\1\53\1\54"+
+    "\50\16\2\53\1\54\2\53\2\16\74\0\1\55\110\0"+
+    "\1\56\45\0\1\57\5\0\1\60\72\0\1\61\63\0"+
+    "\1\62\44\0\1\63\41\0\1\25\51\0\2\25\1\0"+
+    "\2\25\4\0\1\64\1\0\1\65\47\0\2\64\1\0"+
+    "\2\64\4\0\1\64\51\0\2\64\1\0\2\64\4\0"+
+    "\1\66\1\0\1\67\47\0\2\66\1\0\2\66\4\0"+
+    "\1\66\51\0\2\66\1\0\2\66\4\0\1\70\1\0"+
+    "\1\71\47\0\2\70\1\0\2\70\4\0\1\70\51\0"+
+    "\2\70\1\0\2\70\41\0\1\72\76\0\1\73\46\0"+
+    "\1\74\45\0\1\75\122\0\1\76\40\0\1\77\63\0"+
+    "\1\100\44\0\1\101\41\0\1\102\1\0\1\103\47\0"+
+    "\2\102\1\0\2\102\4\0\1\102\51\0\2\102\1\0"+
+    "\2\102\4\0\1\104\1\0\1\105\47\0\2\104\1\0"+
+    "\2\104\4\0\1\104\51\0\2\104\1\0\2\104\4\0"+
+    "\1\106\1\0\1\107\47\0\2\106\1\0\2\106\4\0"+
+    "\1\106\51\0\2\106\1\0\2\106\4\0\1\53\51\0"+
+    "\2\53\1\0\2\53\14\0\1\110\104\0\1\111\42\0"+
+    "\1\112\77\0\1\113\60\0\1\114\75\0\1\115\42\0"+
+    "\1\116\42\0\1\117\51\0\2\117\1\0\2\117\4\0"+
+    "\1\120\51\0\2\120\1\0\2\120\4\0\1\121\51\0"+
+    "\2\121\1\0\2\121\36\0\1\122\102\0\1\123\42\0"+
+    "\1\124\42\0\1\125\106\0\1\126\51\0\1\127\75\0"+
+    "\1\130\42\0\1\131\42\0\1\132\51\0\2\132\1\0"+
+    "\2\132\4\0\1\133\51\0\2\133\1\0\2\133\4\0"+
+    "\1\134\51\0\2\134\1\0\2\134\15\0\1\135\117\0"+
+    "\1\136\35\0\1\137\55\0\1\140\62\0\1\141\70\0"+
+    "\1\142\62\0\1\143\106\0\1\144\47\0\1\145\75\0"+
+    "\1\146\35\0\1\147\112\0\1\150\25\0\1\151\70\0"+
+    "\1\152\62\0\1\153\52\0\1\154\102\0\1\155\44\0"+
+    "\1\156\76\0\1\157\46\0\1\160\56\0\1\161\62\0"+
+    "\1\162\104\0\1\163\57\0\1\164\65\0\1\165\44\0"+
+    "\1\166\120\0\1\167\24\0\1\170\56\0\1\171\62\0"+
+    "\1\172\65\0\1\173\55\0\1\174\77\0\1\175\54\0"+
+    "\1\176\61\0\1\177\55\0\1\200\75\0\1\201\46\0"+
+    "\1\202\63\0\1\203\61\0\1\204\77\0\1\205\53\0"+
+    "\1\206\62\0\1\207\55\0\1\210\75\0\1\211\54\0"+
+    "\1\212\76\0\1\213\41\0\1\214\76\0\1\215\53\0"+
+    "\1\216\56\0\1\217\115\0\1\220\47\0\1\221\76\0"+
+    "\1\222\46\0\1\223\41\0\1\224\57\0\1\225\72\0"+
+    "\1\226\56\0\1\227\115\0\1\230\34\0\1\231\113\0"+
+    "\1\232\24\0\1\233\64\0\1\234\64\0\1\235\62\0"+
+    "\1\236\105\0\1\237\71\0\1\240\60\0\1\241\64\0"+
+    "\1\242\24\0\1\243\66\0\1\244\62\0\1\245\62\0"+
+    "\1\246\105\0\1\247\41\0\1\250\106\0\1\251\31\0"+
+    "\1\252\102\0\1\253\60\0\1\254\62\0\1\255\53\0"+
+    "\1\256\104\0\1\257\25\0\1\260\117\0\1\261\31\0"+
+    "\1\262\100\0\1\263\62\0\1\264\53\0\1\265\56\0"+
+    "\1\266\75\0\1\267\45\0\1\270\64\0\1\271\63\0"+
+    "\1\272\62\0\1\273\67\0\1\274\67\0\1\275\32\0"+
+    "\1\276\112\0\1\277\45\0\1\300\65\0\1\301\62\0"+
+    "\1\302\67\0\1\303\57\0\1\304\111\0\1\305\27\0"+
+    "\1\306\63\0\1\307\61\0\1\310\62\0\1\311\64\0"+
+    "\1\312\113\0\1\313\67\0\1\314\55\0\1\315\27\0"+
+    "\1\316\62\0\1\317\62\0\1\320\64\0\1\321\65\0"+
+    "\1\322\71\0\1\323\65\0\1\324\71\0\1\325\62\0"+
+    "\1\326\44\0\1\327\66\0\1\330\107\0\1\331\35\0"+
+    "\1\332\74\0\1\333\62\0\1\334\44\0\1\335\51\0"+
+    "\1\336\117\0\1\337\46\0\1\340\41\0\1\341\62\0"+
+    "\1\342\64\0\1\343\115\0\1\344\70\0\1\345\54\0"+
+    "\1\346\25\0\1\347\62\0\1\350\64\0\1\351\67\0"+
+    "\1\352\111\0\1\353\46\0\1\354\67\0\1\355\71\0"+
+    "\1\356\70\0\1\357\54\0\1\360\53\0\1\361\40\0"+
+    "\1\362\75\0\1\363\65\0\1\364\42\0\1\365\77\0"+
+    "\1\366\107\0\1\367\35\0\1\370\45\0\1\371\61\0"+
+    "\1\372\75\0\1\373\43\0\1\374\105\0\1\375\37\0"+
+    "\1\376\74\0\1\377\45\0\1\u0100\76\0\1\u0101\106\0"+
+    "\1\u0102\36\0\1\u0103\64\0\1\u0104\53\0\1\u0105\112\0"+
+    "\1\u0106\23\0\1\u0107\121\0\1\u0108\32\0\1\u0109\52\0"+
+    "\1\u010a\70\0\1\u010b\62\0\1\u010c\70\0\1\u010d\62\0"+
+    "\1\u010e\62\0\1\u010f\66\0\1\u0110\50\0\1\u0111\62\0"+
+    "\1\u0112\72\0\1\u0113\105\0\1\u0114\62\0\1\u0115\34\0"+
+    "\1\u0116\57\0\1\u0117\61\0\1\u0118\56\0\1\u0119\76\0"+
+    "\1\u011a\35\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[12903];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\15\0\1\11\36\1\42\0\3\1\10\0\3\1\107\0"+
+    "\1\11\41\0\1\11\7\0\1\11\22\0\2\11\4\0"+
+    "\2\11\12\0\1\11\2\0\1\11\1\0\1\11\16\0"+
+    "\1\11\2\0\1\11\11\0\2\11\4\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[282];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public G1Lexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public G1Lexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 23: 
+          { yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);
+          }
+        case 25: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.ENERGY1, new Float(yytext()));
+          }
+        case 26: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(G1Sym.ITERATION1, new Integer(yytext()));
+          }
+        case 27: break;
+        case 22: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);
+          }
+        case 28: break;
+        case 17: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, THE_END_OF_FILE");
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);
+          }
+        case 29: break;
+        case 12: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(G1Sym.NMP);
+          }
+        case 30: break;
+        case 24: 
+          { if (Settings.DEBUG) System.out.println("G1lex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(G1Sym.FOUNDITER1);
+          }
+        case 31: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(G1Sym.NSearch1);
+          }
+        case 32: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPRGRAD, new Float(yytext()));
+          }
+        case 33: break;
+        case 3: 
+          { if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(G1Sym.MPITER, new Integer(yytext()));
+          }
+        case 34: break;
+        case 21: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(G1Sym.Energ1);
+          }
+        case 35: break;
+        case 19: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: MPDONE, THE_END_OF_FILE");
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);
+          }
+        case 36: break;
+        case 10: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(G1Sym.MPEnerg);
+          }
+        case 37: break;
+        case 20: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(G1Sym.MPStart);
+          }
+        case 38: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPMGRAD, new Float(yytext()));
+          }
+        case 39: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(G1Sym.MaxGrad1);
+          }
+        case 40: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("G1lex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.MGRAD1, new Float(yytext()));
+          }
+        case 41: break;
+        case 15: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(G1Sym.MPRms);
+          }
+        case 42: break;
+        case 16: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(G1Sym.MPMax);
+          }
+        case 43: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPENERGY, new Float(yytext()));
+          }
+        case 44: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.RGRAD1, new Float(yytext()));
+          }
+        case 45: break;
+        case 13: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(G1Sym.RmsGrad1);
+          }
+        case 46: break;
+        case 18: 
+          { if (Settings.DEBUG) System.out.println("G1Flex: MPStart, THE_END_OF_FILE");
+     yybegin(MPOPT);
+      return new Symbol(G1Sym.MPStart);
+          }
+        case 47: break;
+        case 1: 
+          { 
+          }
+        case 48: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(G1Sym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = G1Sym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java G1Lexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        G1Lexer scanner = null;
+        try {
+          scanner = new G1Lexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}


[07/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/datacat/web/portal/scripts/bootstrap.js b/datacat/web/portal/scripts/bootstrap.js
new file mode 100755
index 0000000..53da1c7
--- /dev/null
+++ b/datacat/web/portal/scripts/bootstrap.js
@@ -0,0 +1,2114 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.2.0
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+  // ============================================================
+
+  function transitionEnd() {
+    var el = document.createElement('bootstrap')
+
+    var transEndEventNames = {
+      WebkitTransition : 'webkitTransitionEnd',
+      MozTransition    : 'transitionend',
+      OTransition      : 'oTransitionEnd otransitionend',
+      transition       : 'transitionend'
+    }
+
+    for (var name in transEndEventNames) {
+      if (el.style[name] !== undefined) {
+        return { end: transEndEventNames[name] }
+      }
+    }
+
+    return false // explicit for ie8 (  ._.)
+  }
+
+  // http://blog.alexmaccaw.com/css-transitions
+  $.fn.emulateTransitionEnd = function (duration) {
+    var called = false
+    var $el = this
+    $(this).one('bsTransitionEnd', function () { called = true })
+    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+    setTimeout(callback, duration)
+    return this
+  }
+
+  $(function () {
+    $.support.transition = transitionEnd()
+
+    if (!$.support.transition) return
+
+    $.event.special.bsTransitionEnd = {
+      bindType: $.support.transition.end,
+      delegateType: $.support.transition.end,
+      handle: function (e) {
+        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+      }
+    }
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.2.0
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // ALERT CLASS DEFINITION
+  // ======================
+
+  var dismiss = '[data-dismiss="alert"]'
+  var Alert   = function (el) {
+    $(el).on('click', dismiss, this.close)
+  }
+
+  Alert.VERSION = '3.2.0'
+
+  Alert.prototype.close = function (e) {
+    var $this    = $(this)
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    var $parent = $(selector)
+
+    if (e) e.preventDefault()
+
+    if (!$parent.length) {
+      $parent = $this.hasClass('alert') ? $this : $this.parent()
+    }
+
+    $parent.trigger(e = $.Event('close.bs.alert'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      // detach from parent, fire event then clean up data
+      $parent.detach().trigger('closed.bs.alert').remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent
+        .one('bsTransitionEnd', removeElement)
+        .emulateTransitionEnd(150) :
+      removeElement()
+  }
+
+
+  // ALERT PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.alert')
+
+      if (!data) $this.data('bs.alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  var old = $.fn.alert
+
+  $.fn.alert             = Plugin
+  $.fn.alert.Constructor = Alert
+
+
+  // ALERT NO CONFLICT
+  // =================
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+  // ALERT DATA-API
+  // ==============
+
+  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.2.0
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // BUTTON PUBLIC CLASS DEFINITION
+  // ==============================
+
+  var Button = function (element, options) {
+    this.$element  = $(element)
+    this.options   = $.extend({}, Button.DEFAULTS, options)
+    this.isLoading = false
+  }
+
+  Button.VERSION  = '3.2.0'
+
+  Button.DEFAULTS = {
+    loadingText: 'loading...'
+  }
+
+  Button.prototype.setState = function (state) {
+    var d    = 'disabled'
+    var $el  = this.$element
+    var val  = $el.is('input') ? 'val' : 'html'
+    var data = $el.data()
+
+    state = state + 'Text'
+
+    if (data.resetText == null) $el.data('resetText', $el[val]())
+
+    $el[val](data[state] == null ? this.options[state] : data[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout($.proxy(function () {
+      if (state == 'loadingText') {
+        this.isLoading = true
+        $el.addClass(d).attr(d, d)
+      } else if (this.isLoading) {
+        this.isLoading = false
+        $el.removeClass(d).removeAttr(d)
+      }
+    }, this), 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var changed = true
+    var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+    if ($parent.length) {
+      var $input = this.$element.find('input')
+      if ($input.prop('type') == 'radio') {
+        if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+        else $parent.find('.active').removeClass('active')
+      }
+      if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+    }
+
+    if (changed) this.$element.toggleClass('active')
+  }
+
+
+  // BUTTON PLUGIN DEFINITION
+  // ========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.button')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  var old = $.fn.button
+
+  $.fn.button             = Plugin
+  $.fn.button.Constructor = Button
+
+
+  // BUTTON NO CONFLICT
+  // ==================
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+  // BUTTON DATA-API
+  // ===============
+
+  $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+    var $btn = $(e.target)
+    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+    Plugin.call($btn, 'toggle')
+    e.preventDefault()
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.2.0
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // CAROUSEL CLASS DEFINITION
+  // =========================
+
+  var Carousel = function (element, options) {
+    this.$element    = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
+    this.$indicators = this.$element.find('.carousel-indicators')
+    this.options     = options
+    this.paused      =
+    this.sliding     =
+    this.interval    =
+    this.$active     =
+    this.$items      = null
+
+    this.options.pause == 'hover' && this.$element
+      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+  }
+
+  Carousel.VERSION  = '3.2.0'
+
+  Carousel.DEFAULTS = {
+    interval: 5000,
+    pause: 'hover',
+    wrap: true
+  }
+
+  Carousel.prototype.keydown = function (e) {
+    switch (e.which) {
+      case 37: this.prev(); break
+      case 39: this.next(); break
+      default: return
+    }
+
+    e.preventDefault()
+  }
+
+  Carousel.prototype.cycle = function (e) {
+    e || (this.paused = false)
+
+    this.interval && clearInterval(this.interval)
+
+    this.options.interval
+      && !this.paused
+      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+    return this
+  }
+
+  Carousel.prototype.getItemIndex = function (item) {
+    this.$items = item.parent().children('.item')
+    return this.$items.index(item || this.$active)
+  }
+
+  Carousel.prototype.to = function (pos) {
+    var that        = this
+    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+    if (pos > (this.$items.length - 1) || pos < 0) return
+
+    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+    if (activeIndex == pos) return this.pause().cycle()
+
+    return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+  }
+
+  Carousel.prototype.pause = function (e) {
+    e || (this.paused = true)
+
+    if (this.$element.find('.next, .prev').length && $.support.transition) {
+      this.$element.trigger($.support.transition.end)
+      this.cycle(true)
+    }
+
+    this.interval = clearInterval(this.interval)
+
+    return this
+  }
+
+  Carousel.prototype.next = function () {
+    if (this.sliding) return
+    return this.slide('next')
+  }
+
+  Carousel.prototype.prev = function () {
+    if (this.sliding) return
+    return this.slide('prev')
+  }
+
+  Carousel.prototype.slide = function (type, next) {
+    var $active   = this.$element.find('.item.active')
+    var $next     = next || $active[type]()
+    var isCycling = this.interval
+    var direction = type == 'next' ? 'left' : 'right'
+    var fallback  = type == 'next' ? 'first' : 'last'
+    var that      = this
+
+    if (!$next.length) {
+      if (!this.options.wrap) return
+      $next = this.$element.find('.item')[fallback]()
+    }
+
+    if ($next.hasClass('active')) return (this.sliding = false)
+
+    var relatedTarget = $next[0]
+    var slideEvent = $.Event('slide.bs.carousel', {
+      relatedTarget: relatedTarget,
+      direction: direction
+    })
+    this.$element.trigger(slideEvent)
+    if (slideEvent.isDefaultPrevented()) return
+
+    this.sliding = true
+
+    isCycling && this.pause()
+
+    if (this.$indicators.length) {
+      this.$indicators.find('.active').removeClass('active')
+      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+      $nextIndicator && $nextIndicator.addClass('active')
+    }
+
+    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+    if ($.support.transition && this.$element.hasClass('slide')) {
+      $next.addClass(type)
+      $next[0].offsetWidth // force reflow
+      $active.addClass(direction)
+      $next.addClass(direction)
+      $active
+        .one('bsTransitionEnd', function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () {
+            that.$element.trigger(slidEvent)
+          }, 0)
+        })
+        .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
+    } else {
+      $active.removeClass('active')
+      $next.addClass('active')
+      this.sliding = false
+      this.$element.trigger(slidEvent)
+    }
+
+    isCycling && this.cycle()
+
+    return this
+  }
+
+
+  // CAROUSEL PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.carousel')
+      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+      var action  = typeof option == 'string' ? option : options.slide
+
+      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.pause().cycle()
+    })
+  }
+
+  var old = $.fn.carousel
+
+  $.fn.carousel             = Plugin
+  $.fn.carousel.Constructor = Carousel
+
+
+  // CAROUSEL NO CONFLICT
+  // ====================
+
+  $.fn.carousel.noConflict = function () {
+    $.fn.carousel = old
+    return this
+  }
+
+
+  // CAROUSEL DATA-API
+  // =================
+
+  $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+    var href
+    var $this   = $(this)
+    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+    if (!$target.hasClass('carousel')) return
+    var options = $.extend({}, $target.data(), $this.data())
+    var slideIndex = $this.attr('data-slide-to')
+    if (slideIndex) options.interval = false
+
+    Plugin.call($target, options)
+
+    if (slideIndex) {
+      $target.data('bs.carousel').to(slideIndex)
+    }
+
+    e.preventDefault()
+  })
+
+  $(window).on('load', function () {
+    $('[data-ride="carousel"]').each(function () {
+      var $carousel = $(this)
+      Plugin.call($carousel, $carousel.data())
+    })
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.2.0
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // COLLAPSE PUBLIC CLASS DEFINITION
+  // ================================
+
+  var Collapse = function (element, options) {
+    this.$element      = $(element)
+    this.options       = $.extend({}, Collapse.DEFAULTS, options)
+    this.transitioning = null
+
+    if (this.options.parent) this.$parent = $(this.options.parent)
+    if (this.options.toggle) this.toggle()
+  }
+
+  Collapse.VERSION  = '3.2.0'
+
+  Collapse.DEFAULTS = {
+    toggle: true
+  }
+
+  Collapse.prototype.dimension = function () {
+    var hasWidth = this.$element.hasClass('width')
+    return hasWidth ? 'width' : 'height'
+  }
+
+  Collapse.prototype.show = function () {
+    if (this.transitioning || this.$element.hasClass('in')) return
+
+    var startEvent = $.Event('show.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    var actives = this.$parent && this.$parent.find('> .panel > .in')
+
+    if (actives && actives.length) {
+      var hasData = actives.data('bs.collapse')
+      if (hasData && hasData.transitioning) return
+      Plugin.call(actives, 'hide')
+      hasData || actives.data('bs.collapse', null)
+    }
+
+    var dimension = this.dimension()
+
+    this.$element
+      .removeClass('collapse')
+      .addClass('collapsing')[dimension](0)
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.$element
+        .removeClass('collapsing')
+        .addClass('collapse in')[dimension]('')
+      this.transitioning = 0
+      this.$element
+        .trigger('shown.bs.collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+    this.$element
+      .one('bsTransitionEnd', $.proxy(complete, this))
+      .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
+  }
+
+  Collapse.prototype.hide = function () {
+    if (this.transitioning || !this.$element.hasClass('in')) return
+
+    var startEvent = $.Event('hide.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    var dimension = this.dimension()
+
+    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+    this.$element
+      .addClass('collapsing')
+      .removeClass('collapse')
+      .removeClass('in')
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.transitioning = 0
+      this.$element
+        .trigger('hidden.bs.collapse')
+        .removeClass('collapsing')
+        .addClass('collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    this.$element
+      [dimension](0)
+      .one('bsTransitionEnd', $.proxy(complete, this))
+      .emulateTransitionEnd(350)
+  }
+
+  Collapse.prototype.toggle = function () {
+    this[this.$element.hasClass('in') ? 'hide' : 'show']()
+  }
+
+
+  // COLLAPSE PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.collapse')
+      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data && options.toggle && option == 'show') option = !option
+      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.collapse
+
+  $.fn.collapse             = Plugin
+  $.fn.collapse.Constructor = Collapse
+
+
+  // COLLAPSE NO CONFLICT
+  // ====================
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+  // COLLAPSE DATA-API
+  // =================
+
+  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+    var href
+    var $this   = $(this)
+    var target  = $this.attr('data-target')
+        || e.preventDefault()
+        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+    var $target = $(target)
+    var data    = $target.data('bs.collapse')
+    var option  = data ? 'toggle' : $this.data()
+    var parent  = $this.attr('data-parent')
+    var $parent = parent && $(parent)
+
+    if (!data || !data.transitioning) {
+      if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
+      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+    }
+
+    Plugin.call($target, option)
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.2.0
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // DROPDOWN CLASS DEFINITION
+  // =========================
+
+  var backdrop = '.dropdown-backdrop'
+  var toggle   = '[data-toggle="dropdown"]'
+  var Dropdown = function (element) {
+    $(element).on('click.bs.dropdown', this.toggle)
+  }
+
+  Dropdown.VERSION = '3.2.0'
+
+  Dropdown.prototype.toggle = function (e) {
+    var $this = $(this)
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    clearMenus()
+
+    if (!isActive) {
+      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+        // if mobile we use a backdrop because click events don't delegate
+        $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+      }
+
+      var relatedTarget = { relatedTarget: this }
+      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+      if (e.isDefaultPrevented()) return
+
+      $this.trigger('focus')
+
+      $parent
+        .toggleClass('open')
+        .trigger('shown.bs.dropdown', relatedTarget)
+    }
+
+    return false
+  }
+
+  Dropdown.prototype.keydown = function (e) {
+    if (!/(38|40|27)/.test(e.keyCode)) return
+
+    var $this = $(this)
+
+    e.preventDefault()
+    e.stopPropagation()
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    if (!isActive || (isActive && e.keyCode == 27)) {
+      if (e.which == 27) $parent.find(toggle).trigger('focus')
+      return $this.trigger('click')
+    }
+
+    var desc = ' li:not(.divider):visible a'
+    var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
+
+    if (!$items.length) return
+
+    var index = $items.index($items.filter(':focus'))
+
+    if (e.keyCode == 38 && index > 0)                 index--                        // up
+    if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+    if (!~index)                                      index = 0
+
+    $items.eq(index).trigger('focus')
+  }
+
+  function clearMenus(e) {
+    if (e && e.which === 3) return
+    $(backdrop).remove()
+    $(toggle).each(function () {
+      var $parent = getParent($(this))
+      var relatedTarget = { relatedTarget: this }
+      if (!$parent.hasClass('open')) return
+      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+      if (e.isDefaultPrevented()) return
+      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+    })
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    var $parent = selector && $(selector)
+
+    return $parent && $parent.length ? $parent : $this.parent()
+  }
+
+
+  // DROPDOWN PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.dropdown')
+
+      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown             = Plugin
+  $.fn.dropdown.Constructor = Dropdown
+
+
+  // DROPDOWN NO CONFLICT
+  // ====================
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  // APPLY TO STANDARD DROPDOWN ELEMENTS
+  // ===================================
+
+  $(document)
+    .on('click.bs.dropdown.data-api', clearMenus)
+    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+    .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.2.0
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // MODAL CLASS DEFINITION
+  // ======================
+
+  var Modal = function (element, options) {
+    this.options        = options
+    this.$body          = $(document.body)
+    this.$element       = $(element)
+    this.$backdrop      =
+    this.isShown        = null
+    this.scrollbarWidth = 0
+
+    if (this.options.remote) {
+      this.$element
+        .find('.modal-content')
+        .load(this.options.remote, $.proxy(function () {
+          this.$element.trigger('loaded.bs.modal')
+        }, this))
+    }
+  }
+
+  Modal.VERSION  = '3.2.0'
+
+  Modal.DEFAULTS = {
+    backdrop: true,
+    keyboard: true,
+    show: true
+  }
+
+  Modal.prototype.toggle = function (_relatedTarget) {
+    return this.isShown ? this.hide() : this.show(_relatedTarget)
+  }
+
+  Modal.prototype.show = function (_relatedTarget) {
+    var that = this
+    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+    this.$element.trigger(e)
+
+    if (this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = true
+
+    this.checkScrollbar()
+    this.$body.addClass('modal-open')
+
+    this.setScrollbar()
+    this.escape()
+
+    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+    this.backdrop(function () {
+      var transition = $.support.transition && that.$element.hasClass('fade')
+
+      if (!that.$element.parent().length) {
+        that.$element.appendTo(that.$body) // don't move modals dom position
+      }
+
+      that.$element
+        .show()
+        .scrollTop(0)
+
+      if (transition) {
+        that.$element[0].offsetWidth // force reflow
+      }
+
+      that.$element
+        .addClass('in')
+        .attr('aria-hidden', false)
+
+      that.enforceFocus()
+
+      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+      transition ?
+        that.$element.find('.modal-dialog') // wait for modal to slide in
+          .one('bsTransitionEnd', function () {
+            that.$element.trigger('focus').trigger(e)
+          })
+          .emulateTransitionEnd(300) :
+        that.$element.trigger('focus').trigger(e)
+    })
+  }
+
+  Modal.prototype.hide = function (e) {
+    if (e) e.preventDefault()
+
+    e = $.Event('hide.bs.modal')
+
+    this.$element.trigger(e)
+
+    if (!this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = false
+
+    this.$body.removeClass('modal-open')
+
+    this.resetScrollbar()
+    this.escape()
+
+    $(document).off('focusin.bs.modal')
+
+    this.$element
+      .removeClass('in')
+      .attr('aria-hidden', true)
+      .off('click.dismiss.bs.modal')
+
+    $.support.transition && this.$element.hasClass('fade') ?
+      this.$element
+        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+        .emulateTransitionEnd(300) :
+      this.hideModal()
+  }
+
+  Modal.prototype.enforceFocus = function () {
+    $(document)
+      .off('focusin.bs.modal') // guard against infinite focus loop
+      .on('focusin.bs.modal', $.proxy(function (e) {
+        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+          this.$element.trigger('focus')
+        }
+      }, this))
+  }
+
+  Modal.prototype.escape = function () {
+    if (this.isShown && this.options.keyboard) {
+      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+        e.which == 27 && this.hide()
+      }, this))
+    } else if (!this.isShown) {
+      this.$element.off('keyup.dismiss.bs.modal')
+    }
+  }
+
+  Modal.prototype.hideModal = function () {
+    var that = this
+    this.$element.hide()
+    this.backdrop(function () {
+      that.$element.trigger('hidden.bs.modal')
+    })
+  }
+
+  Modal.prototype.removeBackdrop = function () {
+    this.$backdrop && this.$backdrop.remove()
+    this.$backdrop = null
+  }
+
+  Modal.prototype.backdrop = function (callback) {
+    var that = this
+    var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+    if (this.isShown && this.options.backdrop) {
+      var doAnimate = $.support.transition && animate
+
+      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+        .appendTo(this.$body)
+
+      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+        if (e.target !== e.currentTarget) return
+        this.options.backdrop == 'static'
+          ? this.$element[0].focus.call(this.$element[0])
+          : this.hide.call(this)
+      }, this))
+
+      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+      this.$backdrop.addClass('in')
+
+      if (!callback) return
+
+      doAnimate ?
+        this.$backdrop
+          .one('bsTransitionEnd', callback)
+          .emulateTransitionEnd(150) :
+        callback()
+
+    } else if (!this.isShown && this.$backdrop) {
+      this.$backdrop.removeClass('in')
+
+      var callbackRemove = function () {
+        that.removeBackdrop()
+        callback && callback()
+      }
+      $.support.transition && this.$element.hasClass('fade') ?
+        this.$backdrop
+          .one('bsTransitionEnd', callbackRemove)
+          .emulateTransitionEnd(150) :
+        callbackRemove()
+
+    } else if (callback) {
+      callback()
+    }
+  }
+
+  Modal.prototype.checkScrollbar = function () {
+    if (document.body.clientWidth >= window.innerWidth) return
+    this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
+  }
+
+  Modal.prototype.setScrollbar = function () {
+    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+    if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+  }
+
+  Modal.prototype.resetScrollbar = function () {
+    this.$body.css('padding-right', '')
+  }
+
+  Modal.prototype.measureScrollbar = function () { // thx walsh
+    var scrollDiv = document.createElement('div')
+    scrollDiv.className = 'modal-scrollbar-measure'
+    this.$body.append(scrollDiv)
+    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+    this.$body[0].removeChild(scrollDiv)
+    return scrollbarWidth
+  }
+
+
+  // MODAL PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option, _relatedTarget) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.modal')
+      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option](_relatedTarget)
+      else if (options.show) data.show(_relatedTarget)
+    })
+  }
+
+  var old = $.fn.modal
+
+  $.fn.modal             = Plugin
+  $.fn.modal.Constructor = Modal
+
+
+  // MODAL NO CONFLICT
+  // =================
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+  // MODAL DATA-API
+  // ==============
+
+  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this   = $(this)
+    var href    = $this.attr('href')
+    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+    if ($this.is('a')) e.preventDefault()
+
+    $target.one('show.bs.modal', function (showEvent) {
+      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+      $target.one('hidden.bs.modal', function () {
+        $this.is(':visible') && $this.trigger('focus')
+      })
+    })
+    Plugin.call($target, option, this)
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.2.0
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // TOOLTIP PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Tooltip = function (element, options) {
+    this.type       =
+    this.options    =
+    this.enabled    =
+    this.timeout    =
+    this.hoverState =
+    this.$element   = null
+
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.VERSION  = '3.2.0'
+
+  Tooltip.DEFAULTS = {
+    animation: true,
+    placement: 'top',
+    selector: false,
+    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
+    trigger: 'hover focus',
+    title: '',
+    delay: 0,
+    html: false,
+    container: false,
+    viewport: {
+      selector: 'body',
+      padding: 0
+    }
+  }
+
+  Tooltip.prototype.init = function (type, element, options) {
+    this.enabled   = true
+    this.type      = type
+    this.$element  = $(element)
+    this.options   = this.getOptions(options)
+    this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
+
+    var triggers = this.options.trigger.split(' ')
+
+    for (var i = triggers.length; i--;) {
+      var trigger = triggers[i]
+
+      if (trigger == 'click') {
+        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+      } else if (trigger != 'manual') {
+        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
+        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+      }
+    }
+
+    this.options.selector ?
+      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+      this.fixTitle()
+  }
+
+  Tooltip.prototype.getDefaults = function () {
+    return Tooltip.DEFAULTS
+  }
+
+  Tooltip.prototype.getOptions = function (options) {
+    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+    if (options.delay && typeof options.delay == 'number') {
+      options.delay = {
+        show: options.delay,
+        hide: options.delay
+      }
+    }
+
+    return options
+  }
+
+  Tooltip.prototype.getDelegateOptions = function () {
+    var options  = {}
+    var defaults = this.getDefaults()
+
+    this._options && $.each(this._options, function (key, value) {
+      if (defaults[key] != value) options[key] = value
+    })
+
+    return options
+  }
+
+  Tooltip.prototype.enter = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget).data('bs.' + this.type)
+
+    if (!self) {
+      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+      $(obj.currentTarget).data('bs.' + this.type, self)
+    }
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'in'
+
+    if (!self.options.delay || !self.options.delay.show) return self.show()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'in') self.show()
+    }, self.options.delay.show)
+  }
+
+  Tooltip.prototype.leave = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget).data('bs.' + this.type)
+
+    if (!self) {
+      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+      $(obj.currentTarget).data('bs.' + this.type, self)
+    }
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'out'
+
+    if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'out') self.hide()
+    }, self.options.delay.hide)
+  }
+
+  Tooltip.prototype.show = function () {
+    var e = $.Event('show.bs.' + this.type)
+
+    if (this.hasContent() && this.enabled) {
+      this.$element.trigger(e)
+
+      var inDom = $.contains(document.documentElement, this.$element[0])
+      if (e.isDefaultPrevented() || !inDom) return
+      var that = this
+
+      var $tip = this.tip()
+
+      var tipId = this.getUID(this.type)
+
+      this.setContent()
+      $tip.attr('id', tipId)
+      this.$element.attr('aria-describedby', tipId)
+
+      if (this.options.animation) $tip.addClass('fade')
+
+      var placement = typeof this.options.placement == 'function' ?
+        this.options.placement.call(this, $tip[0], this.$element[0]) :
+        this.options.placement
+
+      var autoToken = /\s?auto?\s?/i
+      var autoPlace = autoToken.test(placement)
+      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+      $tip
+        .detach()
+        .css({ top: 0, left: 0, display: 'block' })
+        .addClass(placement)
+        .data('bs.' + this.type, this)
+
+      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+      var pos          = this.getPosition()
+      var actualWidth  = $tip[0].offsetWidth
+      var actualHeight = $tip[0].offsetHeight
+
+      if (autoPlace) {
+        var orgPlacement = placement
+        var $parent      = this.$element.parent()
+        var parentDim    = this.getPosition($parent)
+
+        placement = placement == 'bottom' && pos.top   + pos.height       + actualHeight - parentDim.scroll > parentDim.height ? 'top'    :
+                    placement == 'top'    && pos.top   - parentDim.scroll - actualHeight < 0                                   ? 'bottom' :
+                    placement == 'right'  && pos.right + actualWidth      > parentDim.width                                    ? 'left'   :
+                    placement == 'left'   && pos.left  - actualWidth      < parentDim.left                                     ? 'right'  :
+                    placement
+
+        $tip
+          .removeClass(orgPlacement)
+          .addClass(placement)
+      }
+
+      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+      this.applyPlacement(calculatedOffset, placement)
+
+      var complete = function () {
+        that.$element.trigger('shown.bs.' + that.type)
+        that.hoverState = null
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+        $tip
+          .one('bsTransitionEnd', complete)
+          .emulateTransitionEnd(150) :
+        complete()
+    }
+  }
+
+  Tooltip.prototype.applyPlacement = function (offset, placement) {
+    var $tip   = this.tip()
+    var width  = $tip[0].offsetWidth
+    var height = $tip[0].offsetHeight
+
+    // manually read margins because getBoundingClientRect includes difference
+    var marginTop = parseInt($tip.css('margin-top'), 10)
+    var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+    // we must check for NaN for ie 8/9
+    if (isNaN(marginTop))  marginTop  = 0
+    if (isNaN(marginLeft)) marginLeft = 0
+
+    offset.top  = offset.top  + marginTop
+    offset.left = offset.left + marginLeft
+
+    // $.fn.offset doesn't round pixel values
+    // so we use setOffset directly with our own function B-0
+    $.offset.setOffset($tip[0], $.extend({
+      using: function (props) {
+        $tip.css({
+          top: Math.round(props.top),
+          left: Math.round(props.left)
+        })
+      }
+    }, offset), 0)
+
+    $tip.addClass('in')
+
+    // check to see if placing tip in new offset caused the tip to resize itself
+    var actualWidth  = $tip[0].offsetWidth
+    var actualHeight = $tip[0].offsetHeight
+
+    if (placement == 'top' && actualHeight != height) {
+      offset.top = offset.top + height - actualHeight
+    }
+
+    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+    if (delta.left) offset.left += delta.left
+    else offset.top += delta.top
+
+    var arrowDelta          = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+    var arrowPosition       = delta.left ? 'left'        : 'top'
+    var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
+
+    $tip.offset(offset)
+    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
+  }
+
+  Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
+    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
+  }
+
+  Tooltip.prototype.setContent = function () {
+    var $tip  = this.tip()
+    var title = this.getTitle()
+
+    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+    $tip.removeClass('fade in top bottom left right')
+  }
+
+  Tooltip.prototype.hide = function () {
+    var that = this
+    var $tip = this.tip()
+    var e    = $.Event('hide.bs.' + this.type)
+
+    this.$element.removeAttr('aria-describedby')
+
+    function complete() {
+      if (that.hoverState != 'in') $tip.detach()
+      that.$element.trigger('hidden.bs.' + that.type)
+    }
+
+    this.$element.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    $tip.removeClass('in')
+
+    $.support.transition && this.$tip.hasClass('fade') ?
+      $tip
+        .one('bsTransitionEnd', complete)
+        .emulateTransitionEnd(150) :
+      complete()
+
+    this.hoverState = null
+
+    return this
+  }
+
+  Tooltip.prototype.fixTitle = function () {
+    var $e = this.$element
+    if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
+      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+    }
+  }
+
+  Tooltip.prototype.hasContent = function () {
+    return this.getTitle()
+  }
+
+  Tooltip.prototype.getPosition = function ($element) {
+    $element   = $element || this.$element
+    var el     = $element[0]
+    var isBody = el.tagName == 'BODY'
+    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
+      scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
+      width:  isBody ? $(window).width()  : $element.outerWidth(),
+      height: isBody ? $(window).height() : $element.outerHeight()
+    }, isBody ? { top: 0, left: 0 } : $element.offset())
+  }
+
+  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
+           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
+           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
+
+  }
+
+  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+    var delta = { top: 0, left: 0 }
+    if (!this.$viewport) return delta
+
+    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+    var viewportDimensions = this.getPosition(this.$viewport)
+
+    if (/right|left/.test(placement)) {
+      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
+      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+      if (topEdgeOffset < viewportDimensions.top) { // top overflow
+        delta.top = viewportDimensions.top - topEdgeOffset
+      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+      }
+    } else {
+      var leftEdgeOffset  = pos.left - viewportPadding
+      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+        delta.left = viewportDimensions.left - leftEdgeOffset
+      } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
+        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+      }
+    }
+
+    return delta
+  }
+
+  Tooltip.prototype.getTitle = function () {
+    var title
+    var $e = this.$element
+    var o  = this.options
+
+    title = $e.attr('data-original-title')
+      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+    return title
+  }
+
+  Tooltip.prototype.getUID = function (prefix) {
+    do prefix += ~~(Math.random() * 1000000)
+    while (document.getElementById(prefix))
+    return prefix
+  }
+
+  Tooltip.prototype.tip = function () {
+    return (this.$tip = this.$tip || $(this.options.template))
+  }
+
+  Tooltip.prototype.arrow = function () {
+    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+  }
+
+  Tooltip.prototype.validate = function () {
+    if (!this.$element[0].parentNode) {
+      this.hide()
+      this.$element = null
+      this.options  = null
+    }
+  }
+
+  Tooltip.prototype.enable = function () {
+    this.enabled = true
+  }
+
+  Tooltip.prototype.disable = function () {
+    this.enabled = false
+  }
+
+  Tooltip.prototype.toggleEnabled = function () {
+    this.enabled = !this.enabled
+  }
+
+  Tooltip.prototype.toggle = function (e) {
+    var self = this
+    if (e) {
+      self = $(e.currentTarget).data('bs.' + this.type)
+      if (!self) {
+        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+        $(e.currentTarget).data('bs.' + this.type, self)
+      }
+    }
+
+    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+  }
+
+  Tooltip.prototype.destroy = function () {
+    clearTimeout(this.timeout)
+    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
+  }
+
+
+  // TOOLTIP PLUGIN DEFINITION
+  // =========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.tooltip')
+      var options = typeof option == 'object' && option
+
+      if (!data && option == 'destroy') return
+      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip             = Plugin
+  $.fn.tooltip.Constructor = Tooltip
+
+
+  // TOOLTIP NO CONFLICT
+  // ===================
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.2.0
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // POPOVER PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+  Popover.VERSION  = '3.2.0'
+
+  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+    placement: 'right',
+    trigger: 'click',
+    content: '',
+    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+  // NOTE: POPOVER EXTENDS tooltip.js
+  // ================================
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+  Popover.prototype.constructor = Popover
+
+  Popover.prototype.getDefaults = function () {
+    return Popover.DEFAULTS
+  }
+
+  Popover.prototype.setContent = function () {
+    var $tip    = this.tip()
+    var title   = this.getTitle()
+    var content = this.getContent()
+
+    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+    $tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
+      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+    ](content)
+
+    $tip.removeClass('fade top bottom left right in')
+
+    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+    // this manually by checking the contents.
+    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+  }
+
+  Popover.prototype.hasContent = function () {
+    return this.getTitle() || this.getContent()
+  }
+
+  Popover.prototype.getContent = function () {
+    var $e = this.$element
+    var o  = this.options
+
+    return $e.attr('data-content')
+      || (typeof o.content == 'function' ?
+            o.content.call($e[0]) :
+            o.content)
+  }
+
+  Popover.prototype.arrow = function () {
+    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+  }
+
+  Popover.prototype.tip = function () {
+    if (!this.$tip) this.$tip = $(this.options.template)
+    return this.$tip
+  }
+
+
+  // POPOVER PLUGIN DEFINITION
+  // =========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.popover')
+      var options = typeof option == 'object' && option
+
+      if (!data && option == 'destroy') return
+      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.popover
+
+  $.fn.popover             = Plugin
+  $.fn.popover.Constructor = Popover
+
+
+  // POPOVER NO CONFLICT
+  // ===================
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.2.0
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // SCROLLSPY CLASS DEFINITION
+  // ==========================
+
+  function ScrollSpy(element, options) {
+    var process  = $.proxy(this.process, this)
+
+    this.$body          = $('body')
+    this.$scrollElement = $(element).is('body') ? $(window) : $(element)
+    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
+    this.selector       = (this.options.target || '') + ' .nav li > a'
+    this.offsets        = []
+    this.targets        = []
+    this.activeTarget   = null
+    this.scrollHeight   = 0
+
+    this.$scrollElement.on('scroll.bs.scrollspy', process)
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.VERSION  = '3.2.0'
+
+  ScrollSpy.DEFAULTS = {
+    offset: 10
+  }
+
+  ScrollSpy.prototype.getScrollHeight = function () {
+    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+  }
+
+  ScrollSpy.prototype.refresh = function () {
+    var offsetMethod = 'offset'
+    var offsetBase   = 0
+
+    if (!$.isWindow(this.$scrollElement[0])) {
+      offsetMethod = 'position'
+      offsetBase   = this.$scrollElement.scrollTop()
+    }
+
+    this.offsets = []
+    this.targets = []
+    this.scrollHeight = this.getScrollHeight()
+
+    var self     = this
+
+    this.$body
+      .find(this.selector)
+      .map(function () {
+        var $el   = $(this)
+        var href  = $el.data('target') || $el.attr('href')
+        var $href = /^#./.test(href) && $(href)
+
+        return ($href
+          && $href.length
+          && $href.is(':visible')
+          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+      })
+      .sort(function (a, b) { return a[0] - b[0] })
+      .each(function () {
+        self.offsets.push(this[0])
+        self.targets.push(this[1])
+      })
+  }
+
+  ScrollSpy.prototype.process = function () {
+    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
+    var scrollHeight = this.getScrollHeight()
+    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
+    var offsets      = this.offsets
+    var targets      = this.targets
+    var activeTarget = this.activeTarget
+    var i
+
+    if (this.scrollHeight != scrollHeight) {
+      this.refresh()
+    }
+
+    if (scrollTop >= maxScroll) {
+      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+    }
+
+    if (activeTarget && scrollTop <= offsets[0]) {
+      return activeTarget != (i = targets[0]) && this.activate(i)
+    }
+
+    for (i = offsets.length; i--;) {
+      activeTarget != targets[i]
+        && scrollTop >= offsets[i]
+        && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+        && this.activate(targets[i])
+    }
+  }
+
+  ScrollSpy.prototype.activate = function (target) {
+    this.activeTarget = target
+
+    $(this.selector)
+      .parentsUntil(this.options.target, '.active')
+      .removeClass('active')
+
+    var selector = this.selector +
+        '[data-target="' + target + '"],' +
+        this.selector + '[href="' + target + '"]'
+
+    var active = $(selector)
+      .parents('li')
+      .addClass('active')
+
+    if (active.parent('.dropdown-menu').length) {
+      active = active
+        .closest('li.dropdown')
+        .addClass('active')
+    }
+
+    active.trigger('activate.bs.scrollspy')
+  }
+
+
+  // SCROLLSPY PLUGIN DEFINITION
+  // ===========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.scrollspy')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.scrollspy
+
+  $.fn.scrollspy             = Plugin
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+
+  // SCROLLSPY NO CONFLICT
+  // =====================
+
+  $.fn.scrollspy.noConflict = function () {
+    $.fn.scrollspy = old
+    return this
+  }
+
+
+  // SCROLLSPY DATA-API
+  // ==================
+
+  $(window).on('load.bs.scrollspy.data-api', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      Plugin.call($spy, $spy.data())
+    })
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.2.0
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // TAB CLASS DEFINITION
+  // ====================
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.VERSION = '3.2.0'
+
+  Tab.prototype.show = function () {
+    var $this    = this.element
+    var $ul      = $this.closest('ul:not(.dropdown-menu)')
+    var selector = $this.data('target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    if ($this.parent('li').hasClass('active')) return
+
+    var previous = $ul.find('.active:last a')[0]
+    var e        = $.Event('show.bs.tab', {
+      relatedTarget: previous
+    })
+
+    $this.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    var $target = $(selector)
+
+    this.activate($this.closest('li'), $ul)
+    this.activate($target, $target.parent(), function () {
+      $this.trigger({
+        type: 'shown.bs.tab',
+        relatedTarget: previous
+      })
+    })
+  }
+
+  Tab.prototype.activate = function (element, container, callback) {
+    var $active    = container.find('> .active')
+    var transition = callback
+      && $.support.transition
+      && $active.hasClass('fade')
+
+    function next() {
+      $active
+        .removeClass('active')
+        .find('> .dropdown-menu > .active')
+        .removeClass('active')
+
+      element.addClass('active')
+
+      if (transition) {
+        element[0].offsetWidth // reflow for transition
+        element.addClass('in')
+      } else {
+        element.removeClass('fade')
+      }
+
+      if (element.parent('.dropdown-menu')) {
+        element.closest('li.dropdown').addClass('active')
+      }
+
+      callback && callback()
+    }
+
+    transition ?
+      $active
+        .one('bsTransitionEnd', next)
+        .emulateTransitionEnd(150) :
+      next()
+
+    $active.removeClass('in')
+  }
+
+
+  // TAB PLUGIN DEFINITION
+  // =====================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.tab')
+
+      if (!data) $this.data('bs.tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.tab
+
+  $.fn.tab             = Plugin
+  $.fn.tab.Constructor = Tab
+
+
+  // TAB NO CONFLICT
+  // ===============
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+  // TAB DATA-API
+  // ============
+
+  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    Plugin.call($(this), 'show')
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.2.0
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // AFFIX CLASS DEFINITION
+  // ======================
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, Affix.DEFAULTS, options)
+
+    this.$target = $(this.options.target)
+      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
+
+    this.$element     = $(element)
+    this.affixed      =
+    this.unpin        =
+    this.pinnedOffset = null
+
+    this.checkPosition()
+  }
+
+  Affix.VERSION  = '3.2.0'
+
+  Affix.RESET    = 'affix affix-top affix-bottom'
+
+  Affix.DEFAULTS = {
+    offset: 0,
+    target: window
+  }
+
+  Affix.prototype.getPinnedOffset = function () {
+    if (this.pinnedOffset) return this.pinnedOffset
+    this.$element.removeClass(Affix.RESET).addClass('affix')
+    var scrollTop = this.$target.scrollTop()
+    var position  = this.$element.offset()
+    return (this.pinnedOffset = position.top - scrollTop)
+  }
+
+  Affix.prototype.checkPositionWithEventLoop = function () {
+    setTimeout($.proxy(this.checkPosition, this), 1)
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var scrollHeight = $(document).height()
+    var scrollTop    = this.$target.scrollTop()
+    var position     = this.$element.offset()
+    var offset       = this.options.offset
+    var offsetTop    = offset.top
+    var offsetBottom = offset.bottom
+
+    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+    var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
+                offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
+                offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
+
+    if (this.affixed === affix) return
+    if (this.unpin != null) this.$element.css('top', '')
+
+    var affixType = 'affix' + (affix ? '-' + affix : '')
+    var e         = $.Event(affixType + '.bs.affix')
+
+    this.$element.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    this.affixed = affix
+    this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+    this.$element
+      .removeClass(Affix.RESET)
+      .addClass(affixType)
+      .trigger($.Event(affixType.replace('affix', 'affixed')))
+
+    if (affix == 'bottom') {
+      this.$element.offset({
+        top: scrollHeight - this.$element.height() - offsetBottom
+      })
+    }
+  }
+
+
+  // AFFIX PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.affix')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.affix
+
+  $.fn.affix             = Plugin
+  $.fn.affix.Constructor = Affix
+
+
+  // AFFIX NO CONFLICT
+  // =================
+
+  $.fn.affix.noConflict = function () {
+    $.fn.affix = old
+    return this
+  }
+
+
+  // AFFIX DATA-API
+  // ==============
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+      var data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      if (data.offsetBottom) data.offset.bottom = data.offsetBottom
+      if (data.offsetTop)    data.offset.top    = data.offsetTop
+
+      Plugin.call($spy, data)
+    })
+  })
+
+}(jQuery);


[25/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Lexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Lexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Lexer.java
new file mode 100644
index 0000000..e62dd46
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Lexer.java
@@ -0,0 +1,886 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.B3PW91;/* The following code was generated by JFlex 1.4.3 on 9/7/14 9:49 PM */
+
+import java_cup.runtime.Symbol;
+import java_cup.sym;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.IOException;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/7/14 9:49 PM from the specification file
+ * <tt>B3PW91.flex</tt>
+ */
+public class B3PW91Lexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int FLOATMP3 = 24;
+  public static final int ITER2 = 4;
+  public static final int FLOATMP2 = 22;
+  public static final int FLOATMP1 = 20;
+  public static final int MPOPT = 18;
+  public static final int INTMP = 28;
+  public static final int INTVALUE = 8;
+  public static final int IGNOREALL = 26;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int MP2 = 16;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10, 11, 11,  2,  2, 12, 12
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    14,  0,  0,  0,  0,  0,  0, 50, 29,  7,  0, 32,  0,  3,  4,  1, 
+     2, 37, 46, 48,  2,  2, 47,  2,  2, 36, 27,  0,  0,  6,  0,  0, 
+     0,  0, 31, 24, 26, 28, 25, 49, 33,  0,  0,  0,  0, 38,  8, 42, 
+    34,  0, 30, 23,  0, 51,  0, 35,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0, 39, 11, 41, 45, 12, 16,  0, 22, 20,  0,  0, 44, 10, 21, 15, 
+    19,  0, 13, 17, 18,  9,  0,  0, 40,  0, 43,  0,  5,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\15\0\6\1\1\2\23\1\1\3\1\1\36\0\1\4"+
+    "\1\5\1\6\6\0\1\7\1\10\1\11\70\0\1\12"+
+    "\32\0\1\13\5\0\1\14\16\0\1\15\1\16\2\0"+
+    "\1\17\1\20\53\0\1\21\1\22\1\23\7\0\1\24"+
+    "\1\25";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[248];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\64\0\150\0\234\0\320\0\u0104\0\u0138\0\u016c"+
+    "\0\u01a0\0\u01d4\0\u0208\0\u023c\0\u0270\0\u02a4\0\u02d8\0\u030c"+
+    "\0\u0340\0\u0374\0\u03a8\0\u03dc\0\u03dc\0\u0410\0\u0444\0\u0478"+
+    "\0\u04ac\0\u04e0\0\u0514\0\u0548\0\u057c\0\u05b0\0\u05e4\0\u0618"+
+    "\0\u064c\0\u0680\0\u06b4\0\u06e8\0\u071c\0\u0750\0\u0784\0\u07b8"+
+    "\0\u07b8\0\u07ec\0\u0820\0\u0854\0\u0888\0\u08bc\0\u08f0\0\u0410"+
+    "\0\u0924\0\u0478\0\u0958\0\u04e0\0\u098c\0\u09c0\0\u09f4\0\u0a28"+
+    "\0\u0a5c\0\u0a90\0\u0ac4\0\u0680\0\u0af8\0\u06e8\0\u0b2c\0\u0750"+
+    "\0\u0b60\0\u0b94\0\u0bc8\0\u0bfc\0\u0c30\0\u0c64\0\u0c98\0\u0924"+
+    "\0\u0958\0\u098c\0\u0ccc\0\u0d00\0\u0d34\0\u0d68\0\u0d9c\0\u0dd0"+
+    "\0\u0af8\0\u0b2c\0\u0b60\0\u0e04\0\u0e38\0\u0e6c\0\u0ea0\0\u0ed4"+
+    "\0\u0f08\0\u0f3c\0\u0f70\0\u0fa4\0\u0fd8\0\u100c\0\u1040\0\u1074"+
+    "\0\u10a8\0\u10dc\0\u1110\0\u1144\0\u1178\0\u11ac\0\u11e0\0\u1214"+
+    "\0\u1248\0\u127c\0\u12b0\0\u12e4\0\u1318\0\u134c\0\u1380\0\u13b4"+
+    "\0\u13e8\0\u141c\0\u1450\0\u1484\0\u14b8\0\u14ec\0\u1520\0\u1554"+
+    "\0\u1588\0\u15bc\0\u15f0\0\u1624\0\u1658\0\u168c\0\u16c0\0\u16f4"+
+    "\0\u1728\0\u175c\0\u1790\0\u17c4\0\u17f8\0\u182c\0\u1860\0\u1894"+
+    "\0\u18c8\0\u18fc\0\u1930\0\u02a4\0\u1964\0\u1998\0\u19cc\0\u1a00"+
+    "\0\u1a34\0\u1a68\0\u1a9c\0\u1ad0\0\u1b04\0\u1b38\0\u1b6c\0\u1ba0"+
+    "\0\u1bd4\0\u1c08\0\u1c3c\0\u1c70\0\u1ca4\0\u1cd8\0\u1d0c\0\u1d40"+
+    "\0\u1d74\0\u1da8\0\u1ddc\0\u1e10\0\u1e44\0\u1e78\0\u02a4\0\u1eac"+
+    "\0\u1ee0\0\u1f14\0\u1f48\0\u1f7c\0\u02a4\0\u1fb0\0\u1fe4\0\u2018"+
+    "\0\u204c\0\u2080\0\u20b4\0\u20e8\0\u211c\0\u2150\0\u2184\0\u21b8"+
+    "\0\u21ec\0\u2220\0\u2254\0\u02a4\0\u02a4\0\u2288\0\u22bc\0\u02a4"+
+    "\0\u02a4\0\u22f0\0\u2324\0\u2358\0\u238c\0\u23c0\0\u23f4\0\u2428"+
+    "\0\u245c\0\u2490\0\u24c4\0\u24f8\0\u252c\0\u2560\0\u2594\0\u25c8"+
+    "\0\u25fc\0\u2630\0\u2664\0\u2698\0\u26cc\0\u2700\0\u2734\0\u2768"+
+    "\0\u279c\0\u27d0\0\u2804\0\u2838\0\u286c\0\u28a0\0\u28d4\0\u2908"+
+    "\0\u293c\0\u2970\0\u29a4\0\u29d8\0\u2a0c\0\u2a40\0\u2a74\0\u2aa8"+
+    "\0\u2adc\0\u2b10\0\u2b44\0\u2b78\0\u02a4\0\u02a4\0\u02a4\0\u2bac"+
+    "\0\u2be0\0\u2c14\0\u2c48\0\u2c7c\0\u2cb0\0\u2ce4\0\u02a4\0\u02a4";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[248];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\10\16\1\17\102\16\1\20\6\16\1\21\7\16\1\22"+
+    "\3\16\1\23\77\16\1\24\1\25\1\16\1\25\32\16"+
+    "\1\25\3\16\2\24\10\16\3\24\5\16\1\26\1\27"+
+    "\1\16\1\27\32\16\1\27\3\16\2\26\10\16\3\26"+
+    "\5\16\1\30\1\31\1\16\1\31\32\16\1\31\3\16"+
+    "\2\30\10\16\3\30\5\16\1\32\1\33\1\16\1\33"+
+    "\32\16\1\33\3\16\2\32\10\16\3\32\51\16\1\34"+
+    "\44\16\1\35\4\16\1\36\1\16\1\37\7\16\1\40"+
+    "\3\16\1\41\13\16\1\42\1\43\1\16\1\43\32\16"+
+    "\1\43\3\16\2\42\10\16\3\42\5\16\1\44\1\45"+
+    "\1\16\1\45\32\16\1\45\3\16\2\44\10\16\3\44"+
+    "\5\16\1\46\1\47\1\16\1\47\32\16\1\47\3\16"+
+    "\2\46\10\16\3\46\5\16\1\50\1\51\1\16\1\51"+
+    "\32\16\1\51\3\16\2\50\10\16\3\50\3\16\75\0"+
+    "\1\52\74\0\1\53\5\0\1\54\101\0\1\55\64\0"+
+    "\1\56\37\0\1\57\42\0\1\24\41\0\2\24\10\0"+
+    "\3\24\5\0\1\60\1\0\1\61\37\0\2\60\10\0"+
+    "\3\60\5\0\1\60\41\0\2\60\10\0\3\60\5\0"+
+    "\1\62\1\0\1\63\37\0\2\62\10\0\3\62\5\0"+
+    "\1\62\41\0\2\62\10\0\3\62\5\0\1\64\1\0"+
+    "\1\65\37\0\2\64\10\0\3\64\5\0\1\64\41\0"+
+    "\2\64\10\0\3\64\45\0\1\66\43\0\1\67\124\0"+
+    "\1\70\46\0\1\71\64\0\1\72\37\0\1\73\42\0"+
+    "\1\74\1\0\1\75\37\0\2\74\10\0\3\74\5\0"+
+    "\1\74\41\0\2\74\10\0\3\74\5\0\1\76\1\0"+
+    "\1\77\37\0\2\76\10\0\3\76\5\0\1\76\41\0"+
+    "\2\76\10\0\3\76\5\0\1\100\1\0\1\101\37\0"+
+    "\2\100\10\0\3\100\5\0\1\100\41\0\2\100\10\0"+
+    "\3\100\5\0\1\50\41\0\2\50\10\0\3\50\15\0"+
+    "\1\102\65\0\1\103\100\0\1\104\61\0\1\105\104\0"+
+    "\1\106\35\0\1\107\43\0\1\110\41\0\2\110\10\0"+
+    "\3\110\5\0\1\111\41\0\2\111\10\0\3\111\5\0"+
+    "\1\112\41\0\2\112\10\0\3\112\61\0\1\113\21\0"+
+    "\1\114\115\0\1\115\44\0\1\116\104\0\1\117\35\0"+
+    "\1\120\43\0\1\121\41\0\2\121\10\0\3\121\5\0"+
+    "\1\122\41\0\2\122\10\0\3\122\5\0\1\123\41\0"+
+    "\2\123\10\0\3\123\16\0\1\124\73\0\1\125\56\0"+
+    "\1\126\63\0\1\127\71\0\1\130\63\0\1\131\40\0"+
+    "\1\132\105\0\1\133\102\0\1\134\37\0\1\135\71\0"+
+    "\1\136\63\0\1\137\53\0\1\140\65\0\1\141\77\0"+
+    "\1\142\47\0\1\143\57\0\1\144\63\0\1\145\130\0"+
+    "\1\146\22\0\1\147\123\0\1\150\23\0\1\151\57\0"+
+    "\1\152\63\0\1\153\66\0\1\154\73\0\1\155\55\0"+
+    "\1\156\62\0\1\157\56\0\1\160\76\0\1\161\42\0"+
+    "\1\162\105\0\1\163\54\0\1\164\63\0\1\165\56\0"+
+    "\1\166\76\0\1\167\55\0\1\170\56\0\1\171\77\0"+
+    "\1\172\54\0\1\173\57\0\1\174\124\0\1\175\70\0"+
+    "\1\176\14\0\1\177\60\0\1\200\73\0\1\201\57\0"+
+    "\1\202\124\0\1\203\27\0\1\204\56\0\1\205\65\0"+
+    "\1\206\65\0\1\207\63\0\1\210\114\0\1\211\61\0"+
+    "\1\212\30\0\1\213\67\0\1\214\63\0\1\215\63\0"+
+    "\1\216\114\0\1\217\34\0\1\220\56\0\1\221\103\0"+
+    "\1\222\61\0\1\223\63\0\1\224\54\0\1\225\122\0"+
+    "\1\226\15\0\1\227\101\0\1\230\63\0\1\231\54\0"+
+    "\1\232\57\0\1\233\61\0\1\234\65\0\1\235\64\0"+
+    "\1\236\63\0\1\237\70\0\1\240\74\0\1\241\42\0"+
+    "\1\242\66\0\1\243\63\0\1\244\70\0\1\245\60\0"+
+    "\1\246\57\0\1\247\64\0\1\250\62\0\1\251\63\0"+
+    "\1\252\65\0\1\253\121\0\1\254\23\0\1\255\63\0"+
+    "\1\256\63\0\1\257\65\0\1\260\66\0\1\261\75\0"+
+    "\1\262\100\0\1\263\63\0\1\264\37\0\1\265\120\0"+
+    "\1\266\52\0\1\267\63\0\1\270\37\0\1\271\52\0"+
+    "\1\272\104\0\1\273\42\0\1\274\63\0\1\275\65\0"+
+    "\1\276\54\0\1\277\70\0\1\300\63\0\1\301\65\0"+
+    "\1\302\70\0\1\303\76\0\1\304\76\0\1\305\30\0"+
+    "\1\306\116\0\1\307\33\0\1\310\101\0\1\311\43\0"+
+    "\1\312\116\0\1\313\30\0\1\314\62\0\1\315\105\0"+
+    "\1\316\35\0\1\317\74\0\1\320\52\0\1\321\75\0"+
+    "\1\322\100\0\1\323\45\0\1\324\62\0\1\325\64\0"+
+    "\1\326\65\0\1\327\67\0\1\330\106\0\1\331\15\0"+
+    "\1\332\131\0\1\333\25\0\1\334\50\0\1\335\74\0"+
+    "\1\336\105\0\1\337\41\0\1\340\71\0\1\341\103\0"+
+    "\1\342\43\0\1\343\71\0\1\344\55\0\1\345\67\0"+
+    "\1\346\100\0\1\347\34\0\1\350\100\0\1\351\46\0"+
+    "\1\352\73\0\1\353\103\0\1\354\74\0\1\355\36\0"+
+    "\1\356\110\0\1\357\27\0\1\360\107\0\1\361\34\0"+
+    "\1\362\54\0\1\363\71\0\1\364\64\0\1\365\56\0"+
+    "\1\366\60\0\1\367\102\0\1\370\36\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[11544];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\15\0\1\11\33\1\36\0\3\1\6\0\3\1\70\0"+
+    "\1\11\32\0\1\11\5\0\1\11\16\0\2\11\2\0"+
+    "\2\11\53\0\3\11\7\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[248];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public B3PW91Lexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public B3PW91Lexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public Symbol next_token() throws IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3PW91Sym.MPENERGY, new Float(yytext()));
+          }
+        case 22: break;
+        case 16: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(B3PW91Sym.MPMax);
+          }
+        case 23: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(B3PW91Sym.NSearch1);
+          }
+        case 24: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3PW91Sym.ENERGY1, new Float(yytext()));
+          }
+        case 25: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3PW91Sym.RGRAD1, new Float(yytext()));
+          }
+        case 26: break;
+        case 17: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(B3PW91Sym.SCFDONE1);
+          }
+        case 27: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("B3PW91Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(B3PW91Sym.ITERATION1, new Integer(yytext()));
+          }
+        case 28: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3PW91Sym.MPMGRAD, new Float(yytext()));
+          }
+        case 29: break;
+        case 19: 
+          { yybegin(IGNOREALL);
+      return new Symbol(B3PW91Sym.MPDONE);
+          }
+        case 30: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(B3PW91Sym.MPRGRAD, new Float(yytext()));
+          }
+        case 31: break;
+        case 13: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(B3PW91Sym.RmsGrad1);
+          }
+        case 32: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(B3PW91Sym.MGRAD1, new Float(yytext()));
+          }
+        case 33: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(B3PW91Sym.MaxGrad1);
+          }
+        case 34: break;
+        case 10: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(B3PW91Sym.MPEnerg);
+          }
+        case 35: break;
+        case 21: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(B3PW91Sym.FOUNDITER1);
+          }
+        case 36: break;
+        case 12: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(B3PW91Sym.NMP);
+          }
+        case 37: break;
+        case 20: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(B3PW91Sym.Energ1);
+          }
+        case 38: break;
+        case 18: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(B3PW91Sym.MPStart);
+          }
+        case 39: break;
+        case 15: 
+          { if (Settings.DEBUG) System.out.println("B3PW91Flex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(B3PW91Sym.MPRms);
+          }
+        case 40: break;
+        case 3: 
+          { if  (Settings.DEBUG) System.out.println("B3PW91Flex: MP2 Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(B3PW91Sym.MPITER, new Integer(yytext()));
+          }
+        case 41: break;
+        case 1: 
+          { 
+          }
+        case 42: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new Symbol(B3PW91Sym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = sym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java B3PW91Lexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        B3PW91Lexer scanner = null;
+        try {
+          scanner = new B3PW91Lexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Parser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Parser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Parser.java
new file mode 100644
index 0000000..cf3f2a1
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Parser.java
@@ -0,0 +1,544 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.B3PW91;
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class B3PW91Parser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public B3PW91Parser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public B3PW91Parser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public B3PW91Parser(final FileReader fileReader) {
+        super(new B3PW91Lexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\025\000\002\003\007\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\021\002" +
+                    "\000\002\006\006\000\002\022\002\000\002\007\007\000" +
+                    "\002\010\004\000\002\011\004\000\002\012\004\000\002" +
+                    "\013\003\000\002\014\004\000\002\014\003\000\002\023" +
+                    "\002\000\002\016\006\000\002\024\002\000\002\015\007" +
+                    "\000\002\017\004\000\002\020\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\004\004\005\001\002\000\004\007\012\001" +
+                    "\002\000\004\007\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\027\007\012\001" +
+                    "\002\000\006\005\ufffd\007\ufffd\001\002\000\004\022\013" +
+                    "\001\002\000\004\006\ufffc\001\002\000\004\006\016\001" +
+                    "\002\000\006\005\ufffb\007\ufffb\001\002\000\004\020\017" +
+                    "\001\002\000\004\010\ufffa\001\002\000\004\010\022\001" +
+                    "\002\000\004\011\024\001\002\000\004\023\023\001\002" +
+                    "\000\004\011\ufff8\001\002\000\004\024\026\001\002\000" +
+                    "\006\005\ufff9\007\ufff9\001\002\000\006\005\ufff7\007\ufff7" +
+                    "\001\002\000\004\012\031\001\002\000\006\005\ufffe\007" +
+                    "\ufffe\001\002\000\004\014\ufff5\001\002\000\004\017\054" +
+                    "\001\002\000\004\014\035\001\002\000\006\014\035\017" +
+                    "\ufff6\001\002\000\004\025\037\001\002\000\006\014\ufff3" +
+                    "\017\ufff3\001\002\000\004\013\ufff2\001\002\000\004\013" +
+                    "\041\001\002\000\004\021\043\001\002\000\006\014\ufff1" +
+                    "\017\ufff1\001\002\000\004\015\ufff0\001\002\000\004\015" +
+                    "\046\001\002\000\004\016\051\001\002\000\004\026\047" +
+                    "\001\002\000\004\016\uffee\001\002\000\006\014\uffef\017" +
+                    "\uffef\001\002\000\004\027\052\001\002\000\006\014\uffed" +
+                    "\017\uffed\001\002\000\006\014\ufff4\017\ufff4\001\002\000" +
+                    "\004\002\001\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\027\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\021\013\001\001\000\004" +
+                    "\007\014\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\004\022\017\001\001\000\004\010\020\001\001\000\004" +
+                    "\011\024\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\006" +
+                    "\012\031\013\032\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\006\014\033\016\035\001\001" +
+                    "\000\004\016\052\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\004\023\037\001\001\000\004\015\041\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\024\043\001" +
+                    "\001\000\004\017\044\001\001\000\004\020\047\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //rmsForce, maximum force, iteration and energy
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        HashMap<String,String> resultsMap= new HashMap<String,String>();
+        parse();
+        int mpRMSForceCount=0;
+        int mpMaximumForce=0;
+        int mpIteration=0;
+        int energyCount=0;
+        int rmsForceCount=0;
+        int maximumForceCount=0;
+        int iterationCount=0;
+        for (int i=0; i<resultsMap.size();i++){
+            String singleString= resultsMap.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString= temp[1];
+                if(keyString.equalsIgnoreCase("MPRMSForce")){
+                    resultsMap.put("B3PW91Parser_MP_RMS_Force_"+mpRMSForceCount,dataString);
+                    mpRMSForceCount++;
+                }else if(keyString.equalsIgnoreCase("MPMaximumForce")){
+                    resultsMap.put("B3PW91Parser_MP_Maximum_Force_"+mpMaximumForce,dataString);
+                    mpMaximumForce++;
+                }else if(keyString.equalsIgnoreCase("MPITERATION")){
+                    resultsMap.put("B3PW91Parser_MP_ITERATION_"+mpIteration,dataString);
+                    mpIteration++;
+                }else if(keyString.equalsIgnoreCase("ENERGY")){
+                    resultsMap.put("B3PW91Parser_ENERGY_"+energyCount,dataString);
+                    energyCount++;
+                }else if (keyString.equalsIgnoreCase("RMSForce")){
+                    resultsMap.put("B3PW91Parser_RMS_Force_"+rmsForceCount,dataString);
+                    rmsForceCount++;
+                }else if (keyString.equalsIgnoreCase("MaximumForce")){
+                    resultsMap.put("B3PW91Parser_Maximum_Force_"+maximumForceCount,dataString);
+                    maximumForceCount++;
+                }else if (keyString.equalsIgnoreCase("ITERATION")){
+                    resultsMap.put("B3PW91Parser_ITERATION_"+iterationCount,dataString);
+                    iterationCount++;
+                }
+            }
+        }
+        return null;
+    }
+
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final B3PW91Parser parser;
+
+  /** Constructor */
+  CUP$parser$actions(B3PW91Parser parser) {
+    this.parser = parser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 20: // force2 ::= MPRms MPRGRAD 
+            {
+              Object RESULT = null;
+		int mprgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mprgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mprg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+   parser.addToResult("MPRMSForce "+mprg);
+
+
+
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(14/*force2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 19: // force1 ::= MPMax MPMGRAD 
+            {
+              Object RESULT = null;
+		int mpmgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpmgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpmg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+   parser.addToResult("MPMaximumForce "+mpmg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*force1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 18: // mpcycle ::= NMP MPITER NT$3 force1 force2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$3
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*mpcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 17: // NT$3 ::= 
+            {
+              Object RESULT = null;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+   parser.addToResult("MPITERATION "+it);
+
+
+
+              CUP$parser$result = new java_cup.runtime.Symbol(18/*NT$3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 16: // mpcycle1 ::= MPEnerg MPENERGY NT$2 mpcycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$2
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*mpcycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 15: // NT$2 ::= 
+            {
+              Object RESULT = null;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+   parser.addToResult("ENERGY "+mpen);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(17/*NT$2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 14: // mppat ::= mpcycle1 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // mppat ::= mppat mpcycle1 
+            {
+              Object RESULT = null;
+		
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // mpintro ::= MPStart 
+            {
+              Object RESULT = null;
+		
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*mpintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // mp2 ::= mpintro mppat 
+            {
+              Object RESULT = null;
+		
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*mp2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // grad2 ::= RmsGrad1 RGRAD1 
+            {
+              Object RESULT = null;
+		int rgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int rgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float rg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+   parser.addToResult("RMSForce "+rg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(7/*grad2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // grad1 ::= MaxGrad1 MGRAD1 
+            {
+              Object RESULT = null;
+		int mgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+   parser.addToResult("MaximumForce "+mg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*grad1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle ::= NSearch1 ITERATION1 NT$1 grad1 grad2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$1
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*cycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // NT$1 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c);
+   parser.addToResult("ITERATION "+c);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(16/*NT$1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= Energ1 ENERGY1 NT$0 cycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+   parser.addToResult("ENERGY "+e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(15/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER1 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE1 mp2 MPDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Sym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Sym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Sym.java
new file mode 100644
index 0000000..b146ce2
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/B3PW91/B3PW91Sym.java
@@ -0,0 +1,53 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.B3PW91;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Sep 07 21:49:39 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class B3PW91Sym {
+  /* terminals */
+  public static final int ENERGY1 = 16;
+  public static final int MPMGRAD = 20;
+  public static final int MGRAD1 = 17;
+  public static final int MaxGrad1 = 6;
+  public static final int NSearch1 = 4;
+  public static final int MPRGRAD = 21;
+  public static final int MPRms = 12;
+  public static final int RmsGrad1 = 7;
+  public static final int MPMax = 11;
+  public static final int MPDONE = 13;
+  public static final int EOF = 0;
+  public static final int MPENERGY = 19;
+  public static final int ITERATION1 = 14;
+  public static final int NMP = 9;
+  public static final int MPEnerg = 10;
+  public static final int error = 1;
+  public static final int MPITER = 15;
+  public static final int MPStart = 8;
+  public static final int FOUNDITER1 = 2;
+  public static final int Energ1 = 5;
+  public static final int SCFDONE1 = 3;
+  public static final int RGRAD1 = 18;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemDemoParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemDemoParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemDemoParser.java
new file mode 100644
index 0000000..a92846d
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemDemoParser.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.datacat.parsers.gridchem;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.parsers.DefaultParser;
+import org.apache.airavata.datacat.parsers.IParser;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChI;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChIGenerator;
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.UUID;
+
+public class GridChemDemoParser extends DefaultParser implements IParser{
+    private final static Logger logger = LoggerFactory.getLogger(GridChemDemoParser.class);
+
+    @Override
+    public OutputMetadataDTO parse(OutputMonitorMessage outputMonitorMessage) {
+        OutputMetadataDTO outputMetadataDTO = super.parse(outputMonitorMessage);
+        HashMap<String, String> customMetadata = new HashMap<>();
+
+        String[] outPutFiles = (new File(outputMonitorMessage.getOutputPath())).list(new FilenameFilter() {
+            public boolean accept(File dir, String filename) {
+                return filename.endsWith(".out");
+            }
+        });
+        if (outPutFiles != null && outPutFiles.length > 0) {
+            String outFilePath = outputMonitorMessage.getOutputPath() + File.separator + outPutFiles[0];
+            String uniqueID = UUID.randomUUID().toString();
+            File source = new File(outFilePath);
+            File dest = new File(GridChemProperties.getInstance().getProperty(
+                    Constants.TMP_DIR, "") + "/" + uniqueID + ".out");
+            try {
+                FileUtils.copyFile(source, dest);
+                try {
+                    InChIGenerator inChIGenerator = new InChIGenerator(uniqueID);
+                    InChI inChI = inChIGenerator.getInChI();
+                    customMetadata.put("inChi", inChI.getInchi());
+                    customMetadata.put("inChiKey", inChI.getInchiKey());
+                } catch (Exception ex) {
+                    logger.error(
+                            "Parser Failure in " + outputMetadataDTO.getOutputPath() + "/" + outputMetadataDTO.getExperimentName()
+                                    + " in InChi Generators"
+                    );
+                }
+            } catch (IOException ex) {
+                logger.error("Cannot copy temp file to the tmp directory");
+            }
+        }
+        outputMetadataDTO.setCustomMetaData(customMetadata);
+
+        return outputMetadataDTO;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemParser.java
new file mode 100644
index 0000000..8307407
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemParser.java
@@ -0,0 +1,173 @@
+
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.parsers.IParser;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChI;
+import org.apache.airavata.datacat.parsers.gridchem.inchi.InChIGenerator;
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.commons.io.FileUtils;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class GridChemParser implements IParser {
+
+    private final Logger logger = LogManager.getLogger(GridChemParser.class);
+    private String[] gridChemQueueParserses;
+
+    public GridChemParser() {
+    }
+
+    public OutputMetadataDTO parse(OutputMonitorMessage outputMonitorMessage) {
+        gridChemQueueParserses = GridChemProperties.getInstance().getParserSequence();
+        logger.info("Loaded the GridChem Parser Sequence ...");
+
+        logger.info("Started passing new file monitor message...");
+
+        OutputMetadataDTO outputMetadataDTO = new OutputMetadataDTO();
+
+        //For Solr requirement date is in the format of yyyy-MM-ddTHH:mm:ssZ
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date now = new Date();
+        String date = dateFormat.format(now).split(" ")[0] + "T" + dateFormat.format(now).split(" ")[1] + "Z";
+
+        //setting the basic file meta-data
+        outputMetadataDTO.setCreatedDate(date);
+        outputMetadataDTO.setHost(computingResourceName());
+        outputMetadataDTO.setExperimentName(outputMonitorMessage.getExperimentName());
+        outputMetadataDTO.setExperimentId(outputMonitorMessage.getExperimentID());
+        outputMetadataDTO.setOutputPath(outputMonitorMessage.getOutputPath());
+        outputMetadataDTO.setApplicationName(applicationName());
+        outputMetadataDTO.setOwnerId(getOwnerId());
+
+        String[] outPutFiles = (new File(outputMonitorMessage.getOutputPath())).list(new FilenameFilter() {
+            public boolean accept(File dir, String filename) {
+                return filename.endsWith(".out");
+            }
+        });
+
+        Map<String, String> results = new HashMap<String, String>();
+
+        if (outPutFiles != null && outPutFiles.length > 0) {
+
+            // have a copy of the file in a temp location
+            //FIXME: is this really necessary?
+            String outFilePath = outputMonitorMessage.getOutputPath() + File.separator + outPutFiles[0];
+            String uniqueID = UUID.randomUUID().toString();
+            File source = new File(outFilePath);
+            File dest = new File(GridChemProperties.getInstance().getProperty(
+                    Constants.TMP_DIR, "") + "/" + uniqueID + ".out");
+            try{
+                FileUtils.copyFile(source, dest);
+                try {
+
+                    InChIGenerator inChIGenerator = new InChIGenerator(uniqueID);
+                    InChI inChI = inChIGenerator.getInChI();
+                    results.put("InChi", inChI.getInchi());
+                    results.put("InChiKey", inChI.getInchiKey());
+
+                    //running the parser queue serially
+                    Map<String, String> parserResult;
+                    for (int j = 0; j < gridChemQueueParserses.length; j++) {
+                        try {
+                            long time = System.currentTimeMillis();
+                            //copying the file to the memory
+                            //FIXME make this file shared rather than re-reading it.
+                            FileReader fileReader = new FileReader(dest);
+                            parserResult = loadAndParse(gridChemQueueParserses[j], fileReader);
+                            results.putAll(parserResult);
+                        } catch (Exception ex) {
+                            logger.error(
+                                    "Parser Failure in " + outputMetadataDTO.getOutputPath() + "/" + outputMetadataDTO.getOutputPath()
+                                            + " in " + gridChemQueueParserses[j]
+                            );
+                        }
+                    }
+                } catch (Exception ex) {
+                    logger.error(
+                            "Parser Failure in " + outputMetadataDTO.getOutputPath() + "/" + outputMetadataDTO.getExperimentName()
+                                    + " in InChi Generators"
+                    );
+                }
+            }catch (IOException ex){
+                logger.error("Cannot copy temp file to the tmp directory");
+            }
+            //adding the custom parsed data to the fileMetaDataObject
+            outputMetadataDTO.setCustomMetaData(results);
+            return outputMetadataDTO;
+        }
+        logger.info("No output file corresponding to the file monitor message location");
+        return null;
+    }
+
+    private HashMap<String, String> loadAndParse(String classname, final FileReader reader) throws Exception {
+        ClassLoader classLoader = ClassLoader.getSystemClassLoader();
+        Class parser = null;
+        try {
+            //todo: handle unparsed documents and log and ignore
+            parser = classLoader.loadClass(classname);
+            Constructor parserConstructor = parser.getConstructor(FileReader.class);
+            GridChemQueueParser queueParser = (GridChemQueueParser) parserConstructor.newInstance(reader);
+            HashMap<String, String> parsedData = queueParser.getParsedData();
+            return parsedData;
+        } catch (ClassNotFoundException e) {
+            logger.error("Could not load the class ..." + e.getMessage());
+        } catch (NoSuchMethodException e) {
+            logger.error("Could not load the constructor ... " + e.getMessage());
+        } catch (InvocationTargetException e) {
+            logger.error("Could not load the Class ... " + e.getMessage());
+        } catch (InstantiationException e) {
+            logger.error("Could not load the Class ... " + e.getMessage());
+        } catch (IllegalAccessException e) {
+            logger.error("Could not load the Class ... " + e.getMessage());
+        }
+        return null;
+    }
+
+    public String computingResourceName() {
+        return GridChemProperties.getInstance().getProperty(Constants.ARCHIVING_NODE, "");
+    }
+
+    public String applicationName() {
+        return GridChemProperties.getInstance().getProperty(Constants.APPLICATION_NAME, "");
+    }
+
+    public String getOwnerId() {
+        return GridChemProperties.getInstance().getProperty(Constants.USERNAME, "");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemQueueParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemQueueParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemQueueParser.java
new file mode 100644
index 0000000..75974c7
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/GridChemQueueParser.java
@@ -0,0 +1,30 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem;
+
+import java.util.HashMap;
+
+// Interface for individual parsers of the cup flex files
+public interface GridChemQueueParser {
+    //parses the data using a file reader and returns a hash map of outputs
+    public HashMap<String, String> getParsedData() throws Exception;
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/Settings.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/Settings.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/Settings.java
new file mode 100644
index 0000000..00b357f
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/Settings.java
@@ -0,0 +1,26 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem;
+
+
+public class Settings {
+    public static final boolean DEBUG = true;
+}


[19/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaLexer.java
new file mode 100644
index 0000000..02a4ced
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaLexer.java
@@ -0,0 +1,790 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gscfa;/* The following code was generated by JFlex 1.4.3 on 9/11/14 6:08 PM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 6:08 PM from the specification file
+ * <tt>gscfa.flex</tt>
+ */
+public class GSCFaLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int ITER2 = 6;
+  public static final int DASH = 10;
+  public static final int INTVALUE = 12;
+  public static final int SCF1 = 2;
+  public static final int IGNOREALL = 24;
+  public static final int ITER = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER7 = 22;
+  public static final int ITER6 = 20;
+  public static final int ITER5 = 18;
+  public static final int FLOATVALUE = 14;
+  public static final int ITER4 = 16;
+  public static final int ITER3 = 8;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  1,  1,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10,  1, 1
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0, 23,  4,  0, 
+     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  0,  0,  0,  0,  0, 
+     0, 14, 22, 19, 11,  7,  0, 17, 20,  5,  0,  0, 15, 12, 16, 13, 
+     0,  0,  8, 21,  6,  0, 24,  0, 10, 18,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\13\0\2\1\2\2\1\1\2\3\2\4\1\1\3\5"+
+    "\10\1\3\0\1\6\15\0\1\7\1\10\1\11\1\12"+
+    "\65\0\1\13\1\14\1\15\77\0\1\16\1\17";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[174];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\31\0\62\0\113\0\144\0\175\0\226\0\257"+
+    "\0\310\0\341\0\372\0\u0113\0\u012c\0\u0113\0\u0145\0\u015e"+
+    "\0\u0113\0\u0177\0\u0113\0\u0190\0\u01a9\0\u0113\0\u01c2\0\u01db"+
+    "\0\u01f4\0\u020d\0\u0226\0\u023f\0\u0258\0\u0271\0\u028a\0\u02a3"+
+    "\0\u02bc\0\u02d5\0\u02ee\0\u01c2\0\u0307\0\u01f4\0\u0320\0\u0226"+
+    "\0\u0339\0\u0258\0\u0352\0\u028a\0\u036b\0\u0384\0\u039d\0\u03b6"+
+    "\0\u03cf\0\u0320\0\u0339\0\u0352\0\u036b\0\u03e8\0\u0401\0\u041a"+
+    "\0\u0433\0\u044c\0\u0465\0\u047e\0\u0497\0\u04b0\0\u04c9\0\u04e2"+
+    "\0\u04fb\0\u0514\0\u052d\0\u0546\0\u055f\0\u0578\0\u0591\0\u05aa"+
+    "\0\u05c3\0\u05dc\0\u05f5\0\u060e\0\u0627\0\u0640\0\u0659\0\u0672"+
+    "\0\u068b\0\u06a4\0\u06bd\0\u06d6\0\u06ef\0\u0708\0\u0721\0\u073a"+
+    "\0\u0753\0\u076c\0\u0785\0\u079e\0\u07b7\0\u07d0\0\u07e9\0\u0802"+
+    "\0\u081b\0\u0834\0\u084d\0\u0866\0\u087f\0\u0898\0\u08b1\0\u08ca"+
+    "\0\u08e3\0\u08fc\0\u0113\0\u0113\0\u0113\0\u0915\0\u092e\0\u0947"+
+    "\0\u0960\0\u0979\0\u0992\0\u09ab\0\u09c4\0\u09dd\0\u09f6\0\u0a0f"+
+    "\0\u0a28\0\u0a41\0\u0a5a\0\u0a73\0\u0a8c\0\u0aa5\0\u0abe\0\u0ad7"+
+    "\0\u0af0\0\u0b09\0\u0b22\0\u0b3b\0\u0b54\0\u0b6d\0\u0b86\0\u0b9f"+
+    "\0\u0bb8\0\u0bd1\0\u0bea\0\u0c03\0\u0c1c\0\u0c35\0\u0c4e\0\u0c67"+
+    "\0\u0c80\0\u0c99\0\u0cb2\0\u0ccb\0\u0ce4\0\u0cfd\0\u0d16\0\u0d2f"+
+    "\0\u0d48\0\u0d61\0\u0d7a\0\u0d93\0\u0dac\0\u0dc5\0\u0dde\0\u0df7"+
+    "\0\u0e10\0\u0e29\0\u0e42\0\u0e5b\0\u0e74\0\u0e8d\0\u0ea6\0\u0ebf"+
+    "\0\u0ed8\0\u0ef1\0\u0f0a\0\u0f23\0\u0113\0\u0113";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[174];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\5\14\1\15\55\14\1\16\1\17\24\14\1\20\2\14"+
+    "\1\21\1\22\27\14\1\23\1\24\41\14\1\25\15\14"+
+    "\1\26\3\27\23\26\1\30\1\26\1\14\2\31\1\32"+
+    "\23\14\1\32\2\14\2\33\1\34\23\14\1\34\2\14"+
+    "\2\35\1\36\23\14\1\36\2\14\2\37\1\40\23\14"+
+    "\1\40\1\14\37\0\1\41\23\0\2\17\55\0\1\42"+
+    "\2\0\2\22\27\0\2\24\35\0\1\43\22\0\2\44"+
+    "\27\0\2\44\24\0\1\45\2\0\2\46\1\0\1\47"+
+    "\25\0\2\46\27\0\2\50\1\0\1\51\25\0\2\50"+
+    "\27\0\2\52\1\0\1\53\25\0\2\52\27\0\2\54"+
+    "\1\0\1\55\25\0\2\54\35\0\1\56\50\0\1\57"+
+    "\21\0\1\60\37\0\1\61\2\0\2\62\27\0\2\63"+
+    "\27\0\2\64\27\0\2\65\36\0\1\66\47\0\1\67"+
+    "\26\0\1\70\32\0\1\71\12\0\1\72\46\0\1\73"+
+    "\6\0\1\74\52\0\1\75\10\0\1\76\50\0\1\77"+
+    "\7\0\1\100\51\0\1\101\13\0\1\102\45\0\1\103"+
+    "\23\0\1\104\35\0\1\105\12\0\1\106\46\0\1\107"+
+    "\12\0\1\110\46\0\1\111\14\0\1\112\44\0\1\113"+
+    "\24\0\1\114\34\0\1\115\10\0\1\116\50\0\1\117"+
+    "\16\0\1\120\42\0\1\121\15\0\1\122\43\0\1\123"+
+    "\21\0\1\124\37\0\1\125\12\0\1\126\46\0\1\127"+
+    "\31\0\1\130\27\0\1\131\12\0\1\132\46\0\1\133"+
+    "\10\0\1\134\50\0\1\135\12\0\1\136\46\0\1\137"+
+    "\11\0\1\140\47\0\1\141\12\0\1\142\46\0\1\143"+
+    "\22\0\1\144\36\0\1\145\7\0\1\146\51\0\1\147"+
+    "\10\0\1\150\50\0\1\151\16\0\1\152\42\0\1\153"+
+    "\14\0\1\154\44\0\1\155\7\0\1\156\40\0\1\157"+
+    "\31\0\1\160\22\0\1\161\26\0\1\162\41\0\1\163"+
+    "\17\0\1\164\31\0\1\165\41\0\1\166\31\0\1\167"+
+    "\17\0\1\170\30\0\1\171\30\0\1\172\30\0\1\173"+
+    "\30\0\1\174\30\0\1\175\30\0\1\176\26\0\1\177"+
+    "\32\0\1\200\42\0\1\201\31\0\1\202\22\0\1\203"+
+    "\32\0\1\204\31\0\1\205\16\0\1\206\32\0\1\207"+
+    "\30\0\1\210\32\0\1\211\24\0\1\212\41\0\1\213"+
+    "\35\0\1\214\10\0\1\215\31\0\1\216\44\0\1\217"+
+    "\17\0\1\220\42\0\1\221\31\0\1\222\22\0\1\223"+
+    "\32\0\1\224\31\0\1\225\16\0\1\226\32\0\1\227"+
+    "\30\0\1\230\30\0\1\231\30\0\1\232\30\0\1\233"+
+    "\1\0\1\234\32\0\1\235\20\0\1\236\33\0\1\237"+
+    "\25\0\1\240\51\0\1\241\27\0\1\242\7\0\1\243"+
+    "\35\0\1\244\30\0\1\245\26\0\1\246\42\0\1\247"+
+    "\17\0\1\250\30\0\1\251\30\0\1\252\36\0\1\253"+
+    "\27\0\1\254\26\0\1\255\25\0\1\256\20\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[3900];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\13\0\1\11\1\1\1\11\2\1\1\11\1\1\1\11"+
+    "\2\1\1\11\12\1\3\0\1\1\15\0\4\1\65\0"+
+    "\3\11\77\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[174];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GSCFaLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GSCFaLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the dash");
+               yybegin(DASH);
+          }
+        case 16: break;
+        case 13: 
+          { yybegin(DASH);
+          }
+        case 17: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the third integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+    return new Symbol(GSCFaSym.INT2, new Integer(yytext()));
+          }
+        case 18: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER3); 
+      return new Symbol(GSCFaSym.INT1, new Integer(yytext()));
+          }
+        case 19: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+           yybegin(ITER);
+           return new Symbol(GSCFaSym.FOUNDITER);
+          }
+        case 20: break;
+        case 2: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER2);
+   return new Symbol(GSCFaSym.INTCycle, new Integer(yytext()));
+          }
+        case 21: break;
+        case 9: 
+          { if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GSCFaSym.FLOAT2);
+          }
+        case 22: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GSCFaSym.ENERGY, new Float(yytext()));
+          }
+        case 23: break;
+        case 5: 
+          { if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found new line");
+          }
+        case 24: break;
+        case 12: 
+          { yybegin(IGNOREALL);
+  return new Symbol(GSCFaSym.SCFDONE);
+          }
+        case 25: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GSCFaSym.FLOAT1);
+          }
+        case 26: break;
+        case 6: 
+          { if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float value");
+  yybegin(ITER);
+          }
+        case 27: break;
+        case 15: 
+          { if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+	   yybegin(ITER);
+	   return new Symbol(GSCFaSym.FOUNDITER);
+          }
+        case 28: break;
+        case 10: 
+          { if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float3");
+     yybegin(ITER);
+      return new Symbol(GSCFaSym.FLOAT3);
+          }
+        case 29: break;
+        case 1: 
+          { 
+          }
+        case 30: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GSCFaSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GSCFaSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GSCFaLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GSCFaLexer scanner = null;
+        try {
+          scanner = new GSCFaLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaSym.java
new file mode 100644
index 0000000..9ae3a32
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GSCFaSym.java
@@ -0,0 +1,44 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gscfa;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 18:08:50 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GSCFaSym {
+  /* terminals */
+  public static final int INTCycle = 7;
+  public static final int ENERGY = 12;
+  public static final int EOF = 0;
+  public static final int INT3 = 6;
+  public static final int INT2 = 5;
+  public static final int INT1 = 4;
+  public static final int error = 1;
+  public static final int FLOAT3 = 11;
+  public static final int FLOAT2 = 10;
+  public static final int SCFDONE = 3;
+  public static final int FLOAT1 = 9;
+  public static final int FOUNDITER = 2;
+  public static final int FLOAT = 8;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GscfaParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GscfaParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GscfaParser.java
new file mode 100644
index 0000000..900a0cd
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gscfa/GscfaParser.java
@@ -0,0 +1,336 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gscfa;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class GscfaParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public GscfaParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GscfaParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GscfaParser(final FileReader fileReader) {
+        super(new GSCFaLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\010\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\010\002" +
+                    "\000\002\006\012\000\002\007\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\022\000\004\004\005\001\002\000\004\011\012\001" +
+                    "\002\000\004\011\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\023\011\012\001" +
+                    "\002\000\006\005\ufffd\011\ufffd\001\002\000\004\006\ufffc" +
+                    "\001\002\000\004\006\014\001\002\000\004\007\015\001" +
+                    "\002\000\004\016\017\001\002\000\004\013\020\001\002" +
+                    "\000\004\013\ufffa\001\002\000\004\014\021\001\002\000" +
+                    "\004\015\022\001\002\000\006\005\ufffb\011\ufffb\001\002" +
+                    "\000\004\002\001\001\002\000\006\005\ufffe\011\ufffe\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\022\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\023\001\001\000\002\001" +
+                    "\001\000\004\010\012\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\004\007\015\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //energy and iteraction
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+     @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int energyCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp=singleString.split(" ");
+            if(temp.length>1){
+                String keyString=temp[0];
+                String dataString=temp[1];
+                if(keyString.equals("ENERGY")){
+                    results.put("GscfaParser_ENERGY_"+energyCount,dataString);
+                    energyCount++;
+                }else if(keyString.equals("ITERATION")){
+                    results.put("GscfaParser_ITERATION_"+iterationCount,dataString);
+                    iterationCount++;
+                }
+            }
+        }
+        return results;
+    }
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+
+  private final GscfaParser GscfaParser;
+
+  /** Constructor */
+  CUP$parser$actions(GscfaParser GscfaParser) {
+    this.GscfaParser = GscfaParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // en ::= ENERGY 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e);
+   GscfaParser.addToResult("ENERGY "+e);
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*en*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= INTCycle NT$0 INT1 INT2 en FLOAT1 FLOAT2 FLOAT3 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+   GscfaParser.addToResult("ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBLexer.java
new file mode 100644
index 0000000..eaa2a0c
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBLexer.java
@@ -0,0 +1,777 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gvb;/* The following code was generated by JFlex 1.4.3 on 9/11/14 6:26 PM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 6:26 PM from the specification file
+ * <tt>gvb.flex</tt>
+ */
+public class GVBLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int ITER2 = 6;
+  public static final int DASH = 10;
+  public static final int INTVALUE = 12;
+  public static final int SCF1 = 2;
+  public static final int IGNOREALL = 24;
+  public static final int ITER = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER8 = 8;
+  public static final int ITER7 = 22;
+  public static final int ITER6 = 20;
+  public static final int ITER5 = 18;
+  public static final int FLOATVALUE = 14;
+  public static final int ITER4 = 16;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  1,  1,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10,  1, 1
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0, 24,  4,  0, 
+     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  0,  0,  0,  0,  0, 
+     0, 13, 23, 18, 22,  8,  5, 16, 19,  6,  0,  0, 14,  0, 15, 12, 
+     0, 21,  9, 20,  7,  0, 25,  0, 11, 17,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\13\0\2\1\2\2\1\1\2\3\3\1\3\4\10\1"+
+    "\5\0\1\5\13\0\1\6\2\0\1\7\1\10\1\11"+
+    "\1\12\65\0\1\13\1\14\1\15\62\0\1\16";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[163];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\32\0\64\0\116\0\150\0\202\0\234\0\266"+
+    "\0\320\0\352\0\u0104\0\u011e\0\u0138\0\u011e\0\u0152\0\u016c"+
+    "\0\u011e\0\u0186\0\u01a0\0\u01ba\0\u01d4\0\u011e\0\u01ee\0\u0208"+
+    "\0\u0222\0\u023c\0\u0256\0\u0270\0\u028a\0\u02a4\0\u02be\0\u02d8"+
+    "\0\u02f2\0\u030c\0\u01a0\0\u0326\0\u0340\0\u01ee\0\u035a\0\u0222"+
+    "\0\u0374\0\u0256\0\u038e\0\u028a\0\u03a8\0\u02be\0\u03c2\0\u03dc"+
+    "\0\u03f6\0\u0326\0\u0410\0\u042a\0\u0374\0\u038e\0\u03a8\0\u03c2"+
+    "\0\u0444\0\u045e\0\u0478\0\u0492\0\u04ac\0\u04c6\0\u04e0\0\u04fa"+
+    "\0\u0514\0\u052e\0\u0548\0\u0562\0\u057c\0\u0596\0\u05b0\0\u05ca"+
+    "\0\u05e4\0\u05fe\0\u0618\0\u0632\0\u064c\0\u0666\0\u0680\0\u069a"+
+    "\0\u06b4\0\u06ce\0\u06e8\0\u0702\0\u071c\0\u0736\0\u0750\0\u076a"+
+    "\0\u0784\0\u079e\0\u07b8\0\u07d2\0\u07ec\0\u0806\0\u0820\0\u083a"+
+    "\0\u0854\0\u086e\0\u0888\0\u08a2\0\u08bc\0\u08d6\0\u08f0\0\u090a"+
+    "\0\u0924\0\u093e\0\u0958\0\u0972\0\u098c\0\u011e\0\u011e\0\u011e"+
+    "\0\u09a6\0\u09c0\0\u09da\0\u09f4\0\u0a0e\0\u0a28\0\u0a42\0\u0a5c"+
+    "\0\u0a76\0\u0a90\0\u0aaa\0\u0ac4\0\u0ade\0\u0af8\0\u0b12\0\u0b2c"+
+    "\0\u0b46\0\u0b60\0\u0b7a\0\u0b94\0\u0bae\0\u0bc8\0\u0be2\0\u0bfc"+
+    "\0\u0c16\0\u0c30\0\u0c4a\0\u0c64\0\u0c7e\0\u0c98\0\u0cb2\0\u0ccc"+
+    "\0\u0ce6\0\u0d00\0\u0d1a\0\u0d34\0\u0d4e\0\u0d68\0\u0d82\0\u0d9c"+
+    "\0\u0db6\0\u0dd0\0\u0dea\0\u0e04\0\u0e1e\0\u0e38\0\u0e52\0\u0e6c"+
+    "\0\u0e86\0\u0ea0\0\u011e";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[163];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\6\14\1\15\56\14\1\16\1\17\25\14\1\20\2\14"+
+    "\1\21\1\22\30\14\2\23\1\24\24\14\1\24\27\14"+
+    "\1\25\3\14\1\26\3\27\24\26\1\30\1\26\1\14"+
+    "\2\31\1\32\24\14\1\32\2\14\2\33\1\34\24\14"+
+    "\1\34\2\14\2\35\1\36\24\14\1\36\2\14\2\37"+
+    "\1\40\24\14\1\40\1\14\41\0\1\41\23\0\2\17"+
+    "\57\0\1\42\2\0\2\22\30\0\2\43\1\0\1\44"+
+    "\26\0\2\43\37\0\1\45\22\0\2\46\30\0\2\46"+
+    "\25\0\1\47\2\0\2\50\1\0\1\51\26\0\2\50"+
+    "\30\0\2\52\1\0\1\53\26\0\2\52\30\0\2\54"+
+    "\1\0\1\55\26\0\2\54\30\0\2\56\1\0\1\57"+
+    "\26\0\2\56\37\0\1\60\51\0\1\61\2\0\2\62"+
+    "\46\0\1\63\42\0\1\64\2\0\2\65\30\0\2\66"+
+    "\30\0\2\67\30\0\2\70\40\0\1\71\50\0\1\72"+
+    "\25\0\1\73\35\0\1\74\13\0\1\75\47\0\1\76"+
+    "\7\0\1\77\53\0\1\100\11\0\1\101\51\0\1\102"+
+    "\10\0\1\103\52\0\1\104\14\0\1\105\46\0\1\106"+
+    "\22\0\1\107\40\0\1\110\13\0\1\111\47\0\1\112"+
+    "\13\0\1\113\47\0\1\114\13\0\1\115\47\0\1\116"+
+    "\23\0\1\117\37\0\1\120\13\0\1\121\47\0\1\122"+
+    "\15\0\1\123\45\0\1\124\13\0\1\125\47\0\1\126"+
+    "\20\0\1\127\42\0\1\130\13\0\1\131\47\0\1\132"+
+    "\32\0\1\133\30\0\1\134\10\0\1\135\52\0\1\136"+
+    "\11\0\1\137\51\0\1\140\15\0\1\141\45\0\1\142"+
+    "\12\0\1\143\50\0\1\144\10\0\1\145\52\0\1\146"+
+    "\21\0\1\147\41\0\1\150\16\0\1\151\44\0\1\152"+
+    "\11\0\1\153\51\0\1\154\17\0\1\155\43\0\1\156"+
+    "\27\0\1\157\33\0\1\160\13\0\1\161\27\0\1\162"+
+    "\40\0\1\163\22\0\1\164\32\0\1\165\40\0\1\166"+
+    "\32\0\1\167\22\0\1\170\31\0\1\171\31\0\1\172"+
+    "\31\0\1\173\31\0\1\174\31\0\1\175\31\0\1\176"+
+    "\27\0\1\177\33\0\1\200\41\0\1\201\32\0\1\202"+
+    "\23\0\1\203\33\0\1\204\32\0\1\205\21\0\1\206"+
+    "\33\0\1\207\31\0\1\210\31\0\1\211\31\0\1\212"+
+    "\31\0\1\213\31\0\1\214\31\0\1\215\31\0\1\216"+
+    "\43\0\1\217\32\0\1\220\26\0\1\221\35\0\1\222"+
+    "\10\0\1\223\36\0\1\224\31\0\1\225\31\0\1\226"+
+    "\31\0\1\227\31\0\1\230\31\0\1\231\31\0\1\232"+
+    "\33\0\1\233\26\0\1\234\47\0\1\235\6\0\1\236"+
+    "\37\0\1\237\37\0\1\240\22\0\1\241\35\0\1\242"+
+    "\42\0\1\243\3\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[3770];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\13\0\1\11\1\1\1\11\2\1\1\11\4\1\1\11"+
+    "\12\1\5\0\1\1\13\0\1\1\2\0\4\1\65\0"+
+    "\3\11\62\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[163];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false; 
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GVBLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GVBLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 10: 
+          { if  (Settings.DEBUG) System.out.println("GVBFlex: Found float3");
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT3);
+          }
+        case 15: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: Found the dash"); 
+               yybegin(DASH);
+          }
+        case 16: break;
+        case 13: 
+          { yybegin(DASH);
+          }
+        case 17: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: Found START OF"); 
+	   yybegin(ITER); 
+	   return new Symbol(GVBSym.FOUNDITER);
+          }
+        case 18: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: Found the energy"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER5); 
+   return new Symbol(GVBSym.ENERGY, new Float(yytext()));
+          }
+        case 19: break;
+        case 6: 
+          { if  (Settings.DEBUG) System.out.println("GVBFlex: Found float4"); 
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT4);
+          }
+        case 20: break;
+        case 12: 
+          { yybegin(IGNOREALL); 
+  return new Symbol(GVBSym.SCFDONE);
+          }
+        case 21: break;
+        case 9: 
+          { if  (Settings.DEBUG) System.out.println("GVBFlex: Found float2"); 
+  yybegin (ITER7); 
+   return new Symbol(GVBSym.FLOAT2);
+          }
+        case 22: break;
+        case 2: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: Found the first integer in the iteration"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER2); 
+   return new Symbol(GVBSym.INTCycle, new Integer(yytext()));
+          }
+        case 23: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: ITER5"); 
+   if (Settings.DEBUG) System.out.println("GVBFlex: Found float1"); 
+   yybegin (ITER6); 
+    return new Symbol(GVBSym.FLOAT1);
+          }
+        case 24: break;
+        case 5: 
+          { if  (Settings.DEBUG) System.out.println("GVBFlex: Found float value"); 
+  yybegin(ITER);
+          }
+        case 25: break;
+        case 4: 
+          { if  (Settings.DEBUG) System.out.println("GVBFlex: Found new line");
+          }
+        case 26: break;
+        case 1: 
+          { 
+          }
+        case 27: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GVBFlex: Found the second integer in the iteration");                                                                                     if (Settings.DEBUG) System.out.println(yytext());                                        yybegin(ITER4);                                                                           return new Symbol(GVBSym.INT1, new Integer(yytext()));
+          }
+        case 28: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GVBSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GVBSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GVBLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GVBLexer scanner = null;
+        try {
+          scanner = new GVBLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBParser.java
new file mode 100644
index 0000000..507da25
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBParser.java
@@ -0,0 +1,335 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gvb;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class GVBParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public GVBParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GVBParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GVBParser(final FileReader fileReader) {
+        super(new GVBLexer(fileReader));
+    }
+  /** Production table. */
+  protected static final short[][] _production_table =
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\010\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\010\002" +
+                    "\000\002\006\011\000\002\007\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\021\000\004\004\005\001\002\000\004\011\012\001" +
+                    "\002\000\004\011\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\022\011\012\001" +
+                    "\002\000\006\005\ufffd\011\ufffd\001\002\000\004\006\ufffc" +
+                    "\001\002\000\004\006\014\001\002\000\004\016\016\001" +
+                    "\002\000\004\013\017\001\002\000\004\013\ufffa\001\002" +
+                    "\000\004\014\020\001\002\000\004\015\021\001\002\000" +
+                    "\006\005\ufffb\011\ufffb\001\002\000\004\002\001\001\002" +
+                    "\000\006\005\ufffe\011\ufffe\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\021\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\022\001\001\000\002\001" +
+                    "\001\000\004\010\012\001\001\000\002\001\001\000\004" +
+                    "\007\014\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //energy and iteraction
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int energyCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp=singleString.split(" ");
+            if(temp.length>1){
+                String keyString=temp[0];
+                String dataString=temp[1];
+                if(keyString.equals("ENERGY")){
+                    results.put("GVBParser_ENERGY_"+energyCount,dataString);
+                    energyCount++;
+                }else if(keyString.equals("ITERATION")){
+                    results.put("GVBParser_ITERATION_"+iterationCount,dataString);
+                    iterationCount++;
+                }
+            }
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+  
+  //__________________________________ 
+  public static boolean DEBUG = true; 
+  private static JTable table;                
+  private static final String tableLabel = "SCF Intermediate Results:"; 
+// private static String cycle = "0"; 
+  
+   
+  public static JTable getTable() { 
+    return table; 
+  } 
+ 
+  public static String getTableLabel() { 
+    return tableLabel; 
+  } 
+ 
+/*  public static void main(String[] args) throws IOException { 
+     File temp = new File("temporary"); 
+     boolean append = true; 
+     try{  
+     FileWriter temp1 = new FileWriter(temp, append); 
+     PrintWriter temp2 = new PrintWriter(temp1);} 
+ 
+     catch (FileNotFoundException e)  { 
+          System.out.println("no file, dude!"); 
+       }  */ 
+//   } 
+
+  private final GVBParser GVBParser;
+
+  /** Constructor */
+  CUP$parser$actions(GVBParser GVBParser) {
+    this.GVBParser = GVBParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // en ::= ENERGY 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e);
+   GVBParser.addToResult("ENERGY "+e);
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*en*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= INTCycle NT$0 INT1 en FLOAT1 FLOAT2 FLOAT3 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________ 
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+  GVBParser.addToResult("ITERATION "+c);
+//  temp2.print(c); 
+//   temp2.print(" ");  
+//  cycle = c; 
+  
+//  parseSCF.putField("iteration "+cycle, cycle); 
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree ");  
+ 	       table = new JTable(); 
+	 
+//       table = parseSCF.getTable(); 
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBSym.java
new file mode 100644
index 0000000..b398de2
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gvb/GVBSym.java
@@ -0,0 +1,45 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gvb;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 18:26:09 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GVBSym {
+  /* terminals */
+  public static final int INTCycle = 7;
+  public static final int ENERGY = 12;
+  public static final int EOF = 0;
+  public static final int INT3 = 6;
+  public static final int INT2 = 5;
+  public static final int INT1 = 4;
+  public static final int error = 1;
+  public static final int FLOAT4 = 13;
+  public static final int FLOAT3 = 11;
+  public static final int FLOAT2 = 10;
+  public static final int SCFDONE = 3;
+  public static final int FLOAT1 = 9;
+  public static final int FOUNDITER = 2;
+  public static final int FLOAT = 8;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChI.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChI.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChI.java
new file mode 100644
index 0000000..9c2dd80
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/inchi/InChI.java
@@ -0,0 +1,47 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.inchi;
+
+public class InChI {
+    private String inchi;
+    private String inchiKey;
+
+    public InChI(String inchi, String inchiKey) {
+        this.inchi = inchi;
+        this.inchiKey = inchiKey;
+    }
+
+    public String getInchiKey() {
+        return inchiKey;
+    }
+
+    public void setInchiKey(String inchiKey) {
+        this.inchiKey = inchiKey;
+    }
+
+    public String getInchi() {
+        return inchi;
+    }
+
+    public void setInchi(String inchi) {
+        this.inchi = inchi;
+    }
+}


[20/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomLexer.java
new file mode 100644
index 0000000..005cfc3
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomLexer.java
@@ -0,0 +1,672 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gnumatom;/* The following code was generated by JFlex 1.4.3 on 9/11/14 5:20 PM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 5:20 PM from the specification file
+ * <tt>gnumatom.flex</tt>
+ */
+public class GNumAtomLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 6;
+  public static final int ITER1 = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER = 2;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  0,  0,  4,  0,  0, 
+     0,  7, 13,  0,  0, 14,  3,  0,  0,  0,  0,  0,  8, 12, 10,  6, 
+     0,  0, 15, 16,  5, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\2\1\2\2\54\0\1\3";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[52];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\21\0\42\0\63\0\104\0\63\0\125\0\146"+
+    "\0\167\0\210\0\231\0\252\0\273\0\314\0\335\0\356"+
+    "\0\377\0\u0110\0\u0121\0\u0132\0\u0143\0\u0154\0\u0165\0\u0176"+
+    "\0\u0187\0\u0198\0\u01a9\0\u01ba\0\u01cb\0\u01dc\0\u01ed\0\u01fe"+
+    "\0\u020f\0\u0220\0\u0231\0\u0242\0\u0253\0\u0264\0\u0275\0\u0286"+
+    "\0\u0297\0\u02a8\0\u02b9\0\u02ca\0\u02db\0\u02ec\0\u02fd\0\u030e"+
+    "\0\u031f\0\u0330\0\u0341\0\63";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[52];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\5\4\1\5\14\4\1\6\1\7\37\4\27\0\1\10"+
+    "\13\0\2\7\23\0\1\11\22\0\1\12\21\0\1\13"+
+    "\21\0\1\14\21\0\1\15\21\0\1\16\21\0\1\17"+
+    "\21\0\1\20\21\0\1\21\21\0\1\22\12\0\1\23"+
+    "\15\0\1\24\15\0\1\25\26\0\1\26\16\0\1\27"+
+    "\16\0\1\30\21\0\1\31\26\0\1\32\24\0\1\33"+
+    "\11\0\1\34\20\0\1\35\20\0\1\36\20\0\1\37"+
+    "\20\0\1\40\20\0\1\41\20\0\1\42\20\0\1\43"+
+    "\20\0\1\44\20\0\1\45\20\0\1\46\20\0\1\47"+
+    "\20\0\1\50\20\0\1\51\20\0\1\52\20\0\1\53"+
+    "\20\0\1\54\20\0\1\55\20\0\1\56\20\0\1\57"+
+    "\20\0\1\60\20\0\1\61\20\0\1\62\20\0\1\63"+
+    "\13\0\1\64\14\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[850];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\1\1\1\11\1\1\54\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[52];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GNumAtomLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GNumAtomLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("GNumAtomFlex: Found total # of atoms ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(GNumAtomSym.RUNTYP);
+          }
+        case 4: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GNumAtomFlex: Found Gamess Version");
+           yybegin(ITER);
+	   return new Symbol(GNumAtomSym.FOUNDITER);
+          }
+        case 5: break;
+        case 1: 
+          { 
+          }
+        case 6: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GNumAtomSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GNumAtomSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GNumAtomLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GNumAtomLexer scanner = null;
+        try {
+          scanner = new GNumAtomLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomParser.java
new file mode 100644
index 0000000..1bc1766
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomParser.java
@@ -0,0 +1,190 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gnumatom;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import java.io.FileReader;
+import java.util.HashMap;
+
+
+public class GNumAtomParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public GNumAtomParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GNumAtomParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GNumAtomParser(final FileReader fileReader) {
+        super(new GNumAtomLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\003\000\002\003\003\000\002\002\004\000\002\004" +
+                    "\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\006\000\004\004\005\001\002\000\004\002\001\001" +
+                    "\002\000\004\006\010\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\002\uffff\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\006\000\006\003\005\004\003\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        return null;
+    }
+
+
+
+    /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+
+  private final GNumAtomParser GNumAtomParser;
+
+  /** Constructor */
+  CUP$parser$actions(GNumAtomParser GNumAtomParser) {
+    this.GNumAtomParser = GNumAtomParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER RUNTYP 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:GNUMatom:  found FOUNDITER "); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:GNUMatom:  end of parse tree "); 
+	
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomSym.java
new file mode 100644
index 0000000..6398808
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gnumatom/GNumAtomSym.java
@@ -0,0 +1,37 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gnumatom;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 17:20:46 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GNumAtomSym {
+  /* terminals */
+  public static final int RUNTYP = 4;
+  public static final int SCFDONE = 3;
+  public static final int error = 1;
+  public static final int FOUNDITER = 2;
+  public static final int RUNTYP1 = 5;
+  public static final int EOF = 0;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTLexer.java
new file mode 100644
index 0000000..017b6bb
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTLexer.java
@@ -0,0 +1,797 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gopt;/* The following code was generated by JFlex 1.4.3 on 9/11/14 5:41 PM */
+
+
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/11/14 5:41 PM from the specification file
+ * <tt>gopt.flex</tt>
+ */
+public class GOPTLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int ITER2 = 4;
+  public static final int INTVALUE = 8;
+  public static final int IGNOREALL = 16;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6, 
+     2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    14,  0,  0,  0,  0,  0,  0,  0, 37,  7,  0, 41,  0,  2,  3,  0, 
+     1, 45,  1,  1,  1, 46,  1,  1,  1, 44, 38,  0,  0,  6,  0,  0, 
+     0, 30, 40, 29, 35, 26,  4, 34, 39, 28,  0,  0, 31, 25,  8, 36, 
+    42,  0, 27, 23, 33, 24, 47, 43,  0, 32,  0,  0,  0,  0,  0, 51, 
+     0, 48, 11, 50, 54, 12, 16,  0, 22, 20,  0,  0, 53, 10, 21, 15, 
+    19,  0, 13, 17, 18,  9,  0,  0, 49,  0, 52,  0,  5,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\7\0\12\1\1\2\7\1\14\0\1\3\2\0\1\4"+
+    "\2\0\1\5\70\0\1\6\27\0\1\7\21\0\1\10"+
+    "\1\11\21\0\1\12\66\0\1\13\17\0";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[232];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\67\0\156\0\245\0\334\0\u0113\0\u014a\0\u0181"+
+    "\0\u01b8\0\u01ef\0\u0226\0\u025d\0\u0294\0\u02cb\0\u0302\0\u0339"+
+    "\0\u0370\0\u03a7\0\u03a7\0\u03de\0\u0415\0\u044c\0\u0483\0\u04ba"+
+    "\0\u04f1\0\u0528\0\u055f\0\u0596\0\u05cd\0\u0604\0\u063b\0\u0672"+
+    "\0\u06a9\0\u06e0\0\u0717\0\u03de\0\u0415\0\u0415\0\u044c\0\u0483"+
+    "\0\u0483\0\u04ba\0\u04f1\0\u04f1\0\u074e\0\u0785\0\u07bc\0\u07f3"+
+    "\0\u082a\0\u0861\0\u0898\0\u08cf\0\u0906\0\u093d\0\u0974\0\u09ab"+
+    "\0\u09e2\0\u0a19\0\u0a50\0\u0a87\0\u0abe\0\u0af5\0\u0b2c\0\u0b63"+
+    "\0\u0b9a\0\u0bd1\0\u0c08\0\u0c3f\0\u0c76\0\u0cad\0\u0ce4\0\u0d1b"+
+    "\0\u0d52\0\u0d89\0\u0dc0\0\u0df7\0\u0e2e\0\u0e65\0\u0e9c\0\u0ed3"+
+    "\0\u0f0a\0\u0f41\0\u0f78\0\u0faf\0\u0fe6\0\u101d\0\u1054\0\u108b"+
+    "\0\u10c2\0\u10f9\0\u1130\0\u1167\0\u119e\0\u11d5\0\u120c\0\u1243"+
+    "\0\u127a\0\u12b1\0\u12e8\0\u131f\0\u0181\0\u1356\0\u138d\0\u13c4"+
+    "\0\u13fb\0\u1432\0\u1469\0\u14a0\0\u14d7\0\u150e\0\u1545\0\u157c"+
+    "\0\u15b3\0\u15ea\0\u1621\0\u1658\0\u168f\0\u16c6\0\u16fd\0\u1734"+
+    "\0\u176b\0\u17a2\0\u17d9\0\u1810\0\u0181\0\u1847\0\u187e\0\u18b5"+
+    "\0\u18ec\0\u1923\0\u195a\0\u1991\0\u19c8\0\u19ff\0\u1a36\0\u1a6d"+
+    "\0\u1aa4\0\u1adb\0\u1b12\0\u1b49\0\u1b80\0\u1bb7\0\u0181\0\u0181"+
+    "\0\u1bee\0\u1c25\0\u1c5c\0\u1c93\0\u1cca\0\u1d01\0\u1d38\0\u1d6f"+
+    "\0\u1da6\0\u1ddd\0\u1e14\0\u1e4b\0\u1e82\0\u1eb9\0\u1ef0\0\u1f27"+
+    "\0\u1f5e\0\u0181\0\u1f95\0\u1fcc\0\u2003\0\u203a\0\u2071\0\u20a8"+
+    "\0\u20df\0\u2116\0\u214d\0\u2184\0\u21bb\0\u21f2\0\u2229\0\u2260"+
+    "\0\u2297\0\u22ce\0\u2305\0\u233c\0\u2373\0\u23aa\0\u23e1\0\u2418"+
+    "\0\u244f\0\u2486\0\u24bd\0\u24f4\0\u252b\0\u2562\0\u2599\0\u25d0"+
+    "\0\u2607\0\u263e\0\u2675\0\u26ac\0\u26e3\0\u271a\0\u2751\0\u2788"+
+    "\0\u27bf\0\u27f6\0\u282d\0\u2864\0\u289b\0\u28d2\0\u2909\0\u2940"+
+    "\0\u2977\0\u29ae\0\u29e5\0\u2a1c\0\u2a53\0\u2a8a\0\u2ac1\0\u2af8"+
+    "\0\u0181\0\u2b2f\0\u2b66\0\u2b9d\0\u2bd4\0\u2c0b\0\u2c42\0\u2c79"+
+    "\0\u2cb0\0\u2ce7\0\u2d1e\0\u2d55\0\u2d8c\0\u2dc3\0\u2dfa\0\u2e31";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[232];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\10\10\1\11\66\10\1\12\16\10\1\13\1\10\1\14"+
+    "\1\10\1\15\1\10\1\16\3\10\1\17\2\10\1\20"+
+    "\1\21\111\10\1\22\1\23\2\10\1\23\43\10\1\23"+
+    "\2\10\3\22\11\10\2\24\1\25\1\10\1\24\43\10"+
+    "\1\24\2\10\3\24\11\10\2\26\1\27\1\10\1\26"+
+    "\43\10\1\26\2\10\3\26\11\10\2\30\1\31\1\10"+
+    "\1\30\43\10\1\30\2\10\3\30\10\10\100\0\1\32"+
+    "\105\0\1\33\60\0\1\34\12\0\1\35\111\0\1\36"+
+    "\37\0\1\37\72\0\1\40\100\0\1\41\42\0\1\42"+
+    "\61\0\1\43\51\0\1\22\52\0\3\22\11\0\1\44"+
+    "\1\0\1\45\50\0\3\44\11\0\1\46\52\0\3\46"+
+    "\11\0\1\47\1\0\1\50\50\0\3\47\11\0\1\51"+
+    "\52\0\3\51\11\0\1\52\1\0\1\53\50\0\3\52"+
+    "\11\0\1\54\52\0\3\54\22\0\1\55\105\0\1\56"+
+    "\51\0\1\57\56\0\1\60\143\0\1\61\34\0\1\62"+
+    "\66\0\1\63\71\0\1\64\56\0\1\65\121\0\1\66"+
+    "\24\0\1\67\105\0\1\70\57\0\1\71\61\0\1\72"+
+    "\74\0\1\73\60\0\1\74\113\0\1\75\106\0\1\76"+
+    "\27\0\1\77\51\0\1\100\73\0\1\101\105\0\1\102"+
+    "\51\0\1\103\113\0\1\104\35\0\1\105\72\0\1\106"+
+    "\115\0\1\107\53\0\1\110\46\0\1\111\72\0\1\112"+
+    "\65\0\1\113\105\0\1\114\57\0\1\115\60\0\1\116"+
+    "\60\0\1\117\73\0\1\120\111\0\1\121\35\0\1\122"+
+    "\102\0\1\123\60\0\1\124\66\0\1\125\105\0\1\126"+
+    "\42\0\1\127\102\0\1\130\53\0\1\131\72\0\1\132"+
+    "\57\0\1\133\122\0\1\134\107\0\1\135\20\0\1\136"+
+    "\67\0\1\137\105\0\1\140\42\0\1\141\70\0\1\142"+
+    "\70\0\1\143\66\0\1\144\56\0\1\145\143\0\1\146"+
+    "\63\0\1\147\24\0\1\150\70\0\1\151\105\0\1\152"+
+    "\42\0\1\153\121\0\1\154\24\0\1\155\66\0\1\156"+
+    "\126\0\1\157\44\0\1\160\62\0\1\161\66\0\1\162"+
+    "\107\0\1\163\43\0\1\164\70\0\1\165\67\0\1\166"+
+    "\66\0\1\167\53\0\1\170\106\0\1\171\74\0\1\172"+
+    "\55\0\1\173\105\0\1\174\43\0\1\175\67\0\1\176"+
+    "\65\0\1\177\66\0\1\200\134\0\1\201\22\0\1\202"+
+    "\103\0\1\203\54\0\1\204\62\0\1\205\102\0\1\206"+
+    "\116\0\1\207\66\0\1\210\10\0\1\211\107\0\1\212"+
+    "\103\0\1\213\40\0\1\214\104\0\1\215\101\0\1\216"+
+    "\35\0\1\217\66\0\1\220\106\0\1\221\50\0\1\222"+
+    "\102\0\1\223\57\0\1\224\72\0\1\225\67\0\1\226"+
+    "\2\0\1\227\1\0\1\230\70\0\1\231\111\0\1\232"+
+    "\14\0\1\233\77\0\1\234\106\0\1\235\74\0\1\236"+
+    "\1\237\65\0\1\236\1\240\51\0\1\241\65\0\1\242"+
+    "\53\0\1\243\126\0\1\244\25\0\1\245\104\0\1\246"+
+    "\36\0\1\247\64\0\1\250\46\0\1\251\17\0\1\252"+
+    "\46\0\1\253\64\0\1\236\31\0\1\254\112\0\1\255"+
+    "\54\0\1\256\73\0\1\257\44\0\1\260\116\0\1\261"+
+    "\10\0\1\262\65\0\1\263\71\0\1\264\63\0\1\265"+
+    "\42\0\1\266\102\0\1\267\54\0\1\270\77\0\1\271"+
+    "\46\0\1\133\110\0\1\272\102\0\1\273\16\0\1\274"+
+    "\135\0\1\275\17\0\1\276\147\0\1\277\31\0\1\300"+
+    "\54\0\1\301\111\0\1\302\77\0\1\247\72\0\1\247"+
+    "\12\0\1\303\140\0\1\304\14\0\1\305\100\0\1\306"+
+    "\104\0\1\307\56\0\1\310\100\0\1\311\71\0\1\261"+
+    "\10\0\1\262\1\0\1\264\71\0\1\247\50\0\1\261"+
+    "\12\0\1\264\36\0\1\312\62\0\1\313\76\0\1\314"+
+    "\50\0\1\315\72\0\1\316\70\0\1\145\74\0\1\317"+
+    "\104\0\1\320\112\0\1\242\21\0\1\321\63\0\1\322"+
+    "\66\0\1\323\112\0\1\324\41\0\1\325\104\0\1\326"+
+    "\44\0\1\327\113\0\1\330\55\0\1\331\104\0\1\332"+
+    "\57\0\1\333\64\0\1\334\44\0\1\335\117\0\1\336"+
+    "\54\0\1\337\55\0\1\340\104\0\1\341\73\0\1\342"+
+    "\57\0\1\343\67\0\1\344\71\0\1\345\71\0\1\346"+
+    "\61\0\1\347\76\0\1\350\32\0\1\175\56\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[11880];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\7\0\1\11\21\1\14\0\1\1\2\0\1\1\2\0"+
+    "\1\1\70\0\1\11\27\0\1\11\21\0\2\11\21\0"+
+    "\1\11\66\0\1\11\17\0";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[232];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GOPTLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GOPTLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 10: 
+          { yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);
+          }
+        case 12: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.RGRAD, new Float(yytext()));
+          }
+        case 13: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.ENERGY, new Float(yytext()));
+          }
+        case 14: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.MGRAD, new Float(yytext()));
+          }
+        case 15: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(GOPTSym.FOUNDITER);
+          }
+        case 16: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(GOPTSym.MaxGrad);
+          }
+        case 17: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);
+          }
+        case 18: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(GOPTSym.RmsGrad);
+          }
+        case 19: break;
+        case 1: 
+          { 
+          }
+        case 20: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("GOPTFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(GOPTSym.ITERATION, new Integer(yytext()));
+          }
+        case 21: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);
+          }
+        case 22: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GOPTSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GOPTSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GOPTLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GOPTLexer scanner = null;
+        try {
+          scanner = new GOPTLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTSym.java
new file mode 100644
index 0000000..dee1a84
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GOPTSym.java
@@ -0,0 +1,45 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gopt;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Thu Sep 11 17:41:57 IST 2014
+//----------------------------------------------------
+
+
+
+/** CUP generated class containing symbol constants. */
+public class GOPTSym {
+  /* terminals */
+  public static final int MGRAD = 10;
+  public static final int RmsGrad = 7;
+  public static final int Energ = 5;
+  public static final int MaxGrad = 6;
+  public static final int ENERGY = 9;
+  public static final int EOF = 0;
+  public static final int ITERATION = 8;
+  public static final int NSearch = 4;
+  public static final int RGRAD = 11;
+  public static final int error = 1;
+  public static final int SCFDONE = 3;
+  public static final int FOUNDITER = 2;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GoptParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GoptParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GoptParser.java
new file mode 100644
index 0000000..e443385
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gopt/GoptParser.java
@@ -0,0 +1,435 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gopt;
+
+
+import java_cup.runtime.Symbol;
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.*;
+
+
+public class GoptParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+    /**
+     * Default constructor.
+     */
+    public GoptParser() {
+        super();
+    }
+
+    /**
+     * Constructor which sets the default scanner.
+     */
+    public GoptParser(java_cup.runtime.Scanner s) {
+        super(s);
+    }
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GoptParser(final FileReader fileReader) {
+        super(new GOPTLexer(fileReader));
+    }
+
+
+    /**
+     * Production table.
+     */
+    protected static final short _production_table[][] =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\014\000\002\003\005\000\002\002\004\000\002\004" +
+                            "\003\000\002\005\004\000\002\005\003\000\002\006\004" +
+                            "\000\002\006\003\000\002\007\004\000\002\007\003\000" +
+                            "\002\007\003\000\002\010\004\000\002\011\004"});
+
+    /**
+     * Access to production table.
+     */
+    public short[][] production_table() {
+        return _production_table;
+    }
+
+    /**
+     * Parse-action table.
+     */
+    protected static final short[][] _action_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\024\000\004\004\005\001\002\000\012\006\016\007" +
+                            "\011\010\012\011\010\001\002\000\012\006\uffff\007\uffff" +
+                            "\010\uffff\011\uffff\001\002\000\004\002\007\001\002\000" +
+                            "\004\002\000\001\002\000\004\015\026\001\002\000\004" +
+                            "\013\025\001\002\000\004\014\024\001\002\000\014\005" +
+                            "\ufffb\006\ufffb\007\ufffb\010\ufffb\011\ufffb\001\002\000\014" +
+                            "\005\ufff8\006\ufff8\007\ufff8\010\ufff8\011\ufff8\001\002\000" +
+                            "\014\005\ufff9\006\ufff9\007\ufff9\010\ufff9\011\ufff9\001\002" +
+                            "\000\004\012\023\001\002\000\014\005\022\006\016\007" +
+                            "\011\010\012\011\010\001\002\000\014\005\ufffd\006\ufffd" +
+                            "\007\ufffd\010\ufffd\011\ufffd\001\002\000\014\005\ufffe\006" +
+                            "\ufffe\007\ufffe\010\ufffe\011\ufffe\001\002\000\004\002\001" +
+                            "\001\002\000\014\005\ufffa\006\ufffa\007\ufffa\010\ufffa\011" +
+                            "\ufffa\001\002\000\014\005\ufff7\006\ufff7\007\ufff7\010\ufff7" +
+                            "\011\ufff7\001\002\000\014\005\ufffc\006\ufffc\007\ufffc\010" +
+                            "\ufffc\011\ufffc\001\002\000\014\005\ufff6\006\ufff6\007\ufff6" +
+                            "\010\ufff6\011\ufff6\001\002"});
+
+    /**
+     * Access to parse-action table.
+     */
+    public short[][] action_table() {
+        return _action_table;
+    }
+
+    /**
+     * <code>reduce_goto</code> table.
+     */
+    protected static final short[][] _reduce_table =
+            lr_parser.unpackFromStrings(new String[]{
+                    "\000\024\000\006\003\005\004\003\001\001\000\014\005" +
+                            "\016\006\017\007\012\010\014\011\013\001\001\000\002" +
+                            "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                            "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                            "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                            "\012\006\020\007\012\010\014\011\013\001\001\000\002" +
+                            "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                            "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                            ""});
+
+    /**
+     * Access to <code>reduce_goto</code> table.
+     */
+    public short[][] reduce_table() {
+        return _reduce_table;
+    }
+
+    /**
+     * Instance of action encapsulation class.
+     */
+    protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //rmsForce, maximum force, iteration and energy
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        int result_size = result.size();
+        int iteration = 0;
+        String tempString = "";
+        HashMap<String, String> results = new HashMap<String, String>();
+        for (int i = 0; i < result_size; i++) {
+            String singleResultString = result.get(i);
+            String[] strs = result.get(i).split(" ");
+            String secondElement = strs[2];
+            if (strs.length < 2)
+                continue;
+            if (secondElement.equals("ENERGY")){
+                results.put("GoptEnergy", strs[3]);
+            }else if (secondElement.equals("ITERATION")) {
+                results.put("Iteration_" + iteration+"_x", tempString);
+                iteration++;
+                tempString = "";
+            } else if (strs[2] != null)
+                tempString = tempString + "_" + singleResultString;
+            else {
+                continue;
+            }
+
+
+        }
+        return results;
+    }
+
+
+    /**
+     * Action encapsulation object initializer.
+     */
+    protected void init_actions() {
+        action_obj = new CUP$parser$actions(this);
+    }
+
+    /**
+     * Invoke a user supplied parse action.
+     */
+    public java_cup.runtime.Symbol do_action(
+            int act_num,
+            java_cup.runtime.lr_parser parser,
+            java.util.Stack stack,
+            int top)
+            throws java.lang.Exception {
+    /* call code in generated class */
+        return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+    }
+
+    /**
+     * Indicates start state.
+     */
+    public int start_state() {
+        return 0;
+    }
+
+    /**
+     * Indicates start production.
+     */
+    public int start_production() {
+        return 1;
+    }
+
+    /**
+     * <code>EOF</code> Symbol index.
+     */
+    public int EOF_sym() {
+        return 0;
+    }
+
+    /**
+     * <code>error</code> Symbol index.
+     */
+    public int error_sym() {
+        return 1;
+    }
+
+}
+
+/**
+ * Cup generated class to encapsulate user supplied action code.
+ */
+class CUP$parser$actions {
+
+
+    //__________________________________
+    public static boolean DEBUG = false;
+    private static JTable table;
+    private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+
+    public static JTable getTable() {
+        return table;
+    }
+
+    public static String getTableLabel() {
+        return tableLabel;
+    }
+
+//   }
+
+    private final GoptParser GoptParser;
+
+    /**
+     * Constructor
+     */
+    CUP$parser$actions(GoptParser GoptParser) {
+        this.GoptParser = GoptParser;
+    }
+
+    /**
+     * Method with the actual generated action code.
+     */
+    public final Symbol CUP$parser$do_action(
+            int CUP$parser$act_num,
+            lr_parser CUP$parser$parser,
+            Stack CUP$parser$stack,
+            int CUP$parser$top)
+            throws Exception {
+      /* Symbol object for return from actions */
+        Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+        switch (CUP$parser$act_num) {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 11: // grad2 ::= RmsGrad RGRAD
+            {
+                Object RESULT = null;
+                int rgleft = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int rgright = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float rg = (Float) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gopt: RMS Force " + rg);
+                GoptParser.addToResult("CUP:gopt: RMS Force " + rg);
+
+                CUP$parser$result = new Symbol(7/*grad2*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 10: // grad1 ::= MaxGrad MGRAD
+            {
+                Object RESULT = null;
+                int mgleft = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int mgright = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float mg = (Float) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gopt: Maximum Force " + mg);
+                GoptParser.addToResult("CUP:gopt: Maximum Force " + mg);
+
+
+                CUP$parser$result = new Symbol(6/*grad1*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 9: // cycle ::= grad2
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new Symbol(5/*cycle*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 8: // cycle ::= grad1
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new Symbol(5/*cycle*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 7: // cycle ::= NSearch ITERATION
+            {
+                Object RESULT = null;
+                int cleft = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int cright = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Integer c = (Integer) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gopt:  ITERATION " + c);
+                GoptParser.addToResult("CUP:gopt:  ITERATION " + c);
+
+
+                CUP$parser$result = new Symbol(5/*cycle*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 6: // scfcycle ::= cycle
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new Symbol(4/*scfcycle*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 5: // scfcycle ::= Energ ENERGY
+            {
+                Object RESULT = null;
+                int eleft = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left;
+                int eright = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right;
+                Float e = (Float) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).value;
+                //___________________________________________________________________
+                if (DEBUG) System.out.println("CUP:gopt:  ENERGY " + e);
+                GoptParser.addToResult("CUP:gopt:  ENERGY " + e);
+
+
+                CUP$parser$result = new Symbol(4/*scfcycle*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 4: // scfpat ::= scfcycle
+            {
+                Object RESULT = null;
+
+                CUP$parser$result = new Symbol(3/*scfpat*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 3: // scfpat ::= scfpat scfcycle
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gopt: in scfpat");
+                //GoptParser.addToResult("CUP:gopt: in scfpat");
+
+                CUP$parser$result = new Symbol(3/*scfpat*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 2: // scfintro ::= FOUNDITER
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration");
+                GoptParser.addToResult("CUP:gopt:  found the start of Iteration");
+
+                CUP$parser$result = new Symbol(2/*scfintro*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 1: // $START ::= startpt EOF
+            {
+                Object RESULT = null;
+                int start_valleft = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left;
+                int start_valright = ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).right;
+                Object start_val = (Object) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
+                RESULT = start_val;
+                CUP$parser$result = new Symbol(0/*$START*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+          /* ACCEPT */
+            CUP$parser$parser.done_parsing();
+            return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+            case 0: // startpt ::= scfintro scfpat SCFDONE
+            {
+                Object RESULT = null;
+                if (DEBUG) System.out.println("CUP:gopt:  end of parse tree ");
+                table = new JTable();
+
+//       table = parseSCF.getTable();
+
+                CUP$parser$result = new Symbol(1/*startpt*/, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)).left, ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 0)).right, RESULT);
+            }
+            return CUP$parser$result;
+
+          /* . . . . . .*/
+            default:
+                throw new Exception(
+                        "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+


[14/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaLexer.java
new file mode 100644
index 0000000..01e13d0
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaLexer.java
@@ -0,0 +1,703 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfa;/* The following code was generated by JFlex 1.4.3 on 9/15/14 3:42 PM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/15/14 3:42 PM from the specification file
+ * <tt>scfa.flex</tt>
+ */
+public class SCFaLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int ITER2 = 4;
+  public static final int INTVALUE = 8;
+  public static final int IGNOREALL = 16;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  3,  3,  4,  4,  2,  2,  2,  2, 
+     2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     6,  0,  0,  0,  0,  0,  0,  0, 21,  5,  0,  2,  0,  2,  3,  0, 
+     1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 14,  0,  0,  4,  0,  0, 
+     0,  0,  0, 12, 18, 17, 13,  0, 23,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0, 24, 11,  0, 22,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0, 16,  0,  9,  0,  0,  8,  0,  0,  0, 10,  0, 20, 19, 
+     0,  0,  0,  7,  0,  0,  0,  0,  0, 15,  0,  0,  2,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\5\0\5\1\1\2\3\1\7\0\1\3\2\0\1\4"+
+    "\5\0\1\5\12\0\1\6\15\0\1\7\1\10";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[57];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\31\0\62\0\113\0\144\0\175\0\226\0\257"+
+    "\0\310\0\341\0\372\0\372\0\u0113\0\u012c\0\u0145\0\u015e"+
+    "\0\u0177\0\u0190\0\u0113\0\u01a9\0\u01c2\0\175\0\u01db\0\u01f4"+
+    "\0\u01a9\0\u020d\0\u0226\0\u023f\0\u0258\0\u0271\0\175\0\u028a"+
+    "\0\u02a3\0\u02bc\0\u02d5\0\u02ee\0\u0307\0\u0320\0\u0339\0\u0352"+
+    "\0\u036b\0\175\0\u0384\0\u039d\0\u03b6\0\u03cf\0\u03e8\0\u0401"+
+    "\0\u041a\0\u0433\0\u044c\0\u0465\0\u047e\0\u0497\0\u04b0\0\175"+
+    "\0\175";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[57];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\6\6\1\7\30\6\1\10\4\6\1\11\1\12\46\6"+
+    "\1\13\1\14\27\6\1\15\1\16\26\6\40\0\1\17"+
+    "\42\0\1\20\23\0\1\21\33\0\1\22\12\0\1\13"+
+    "\30\0\1\23\1\0\1\24\26\0\1\23\37\0\1\25"+
+    "\24\0\1\26\41\0\1\27\33\0\1\30\11\0\1\31"+
+    "\40\0\1\32\25\0\1\33\34\0\1\34\30\0\1\35"+
+    "\40\0\1\36\17\0\1\37\31\0\1\40\41\0\1\41"+
+    "\13\0\1\42\46\0\1\43\17\0\1\44\26\0\1\45"+
+    "\33\0\1\46\32\0\1\47\27\0\1\50\21\0\1\51"+
+    "\40\0\1\52\20\0\1\53\43\0\1\54\34\0\1\55"+
+    "\31\0\1\56\1\0\1\57\27\0\1\60\30\0\1\61"+
+    "\16\0\1\62\30\0\1\63\20\0\1\64\30\0\1\65"+
+    "\31\0\1\66\30\0\1\67\26\0\1\70\30\0\1\71"+
+    "\24\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1225];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\5\0\1\11\10\1\7\0\1\11\2\0\1\1\5\0"+
+    "\1\11\12\0\1\11\15\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[57];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public SCFaLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public SCFaLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Found Shell SCF");
+	   yybegin(ITER);
+	   return new Symbol(SCFaSym.FOUNDITER);
+          }
+        case 9: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Found the cycle number");
+   yybegin(INTVALUE);
+   return new Symbol(SCFaSym.NSearch);
+          }
+        case 10: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Done");
+               yybegin(IGNOREALL);
+              return new Symbol(SCFaSym.SCFDONE);
+          }
+        case 11: break;
+        case 2: 
+          { if  (Settings.DEBUG) System.out.println("SCFaFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(SCFaSym.ITERATION, new Integer(yytext()));
+          }
+        case 12: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Found the energy");
+               yybegin(IGNOREALL);
+              return new Symbol(SCFaSym.SCFDONE);
+          }
+        case 13: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Found in FLOATVALUE the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(SCFaSym.ENERGY, new Float(yytext()));
+          }
+        case 14: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("SCFaFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(SCFaSym.Energ);
+          }
+        case 15: break;
+        case 1: 
+          { 
+          }
+        case 16: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(SCFaSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = SCFaSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java SCFaLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        SCFaLexer scanner = null;
+        try {
+          scanner = new SCFaLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaParser.java
new file mode 100644
index 0000000..03684d8
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaParser.java
@@ -0,0 +1,322 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfa;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class SCFaParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public SCFaParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public SCFaParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public SCFaParser(final FileReader fileReader) {
+        super(new SCFaLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\010\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\012\002" +
+                    "\000\002\006\006\000\002\007\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\017\000\004\004\005\001\002\000\004\006\011\001" +
+                    "\002\000\004\006\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\020\006\011\001" +
+                    "\002\000\004\012\013\001\002\000\006\005\ufffd\006\ufffd" +
+                    "\001\002\000\004\007\ufffc\001\002\000\004\007\015\001" +
+                    "\002\000\004\013\017\001\002\000\006\005\ufffb\006\ufffb" +
+                    "\001\002\000\006\005\ufffa\006\ufffa\001\002\000\004\002" +
+                    "\001\001\002\000\006\005\ufffe\006\ufffe\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\017\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\011\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\020\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\012\013\001\001\000\004" +
+                    "\007\015\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //energy, iteration
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+    /*Adding the parsed data to the hash map */
+   @Override
+   public HashMap<String, String> getParsedData() throws Exception {
+
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int energyCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString = result.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("ENERGY")){
+                    results.put("SCFaParser_ENERGY_"+energyCount,dataString);
+                    energyCount++;
+                }else if(keyString.equalsIgnoreCase("ITERATION")){
+                    results.put("SCFaParser_ITERATION_"+iterationCount,dataString);
+                    iterationCount++;
+                }
+
+            }
+
+        }
+        return results;
+    }
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final SCFaParser SCFaParser;
+
+  /** Constructor */
+  CUP$parser$actions(SCFaParser SCFaParser) {
+    this.SCFaParser = SCFaParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // cycle ::= Energ ENERGY 
+            {
+              Object RESULT = null;
+		int enerleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int enerright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float ener = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:scfa:  ENERGY "+ener);
+    SCFaParser.addToResult("ENERGY "+ener);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*cycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= NSearch ITERATION NT$0 cycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int iterleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int iterright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Integer iter = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int iterleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int iterright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer iter = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:scfa: ITERATION  "+iter);
+   SCFaParser.addToResult("ITERATION "+iter);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:scfa: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:scfa:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaSym.java
new file mode 100644
index 0000000..98b145b
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfa/SCFaSym.java
@@ -0,0 +1,43 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfa;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Mon Sep 15 15:43:00 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class SCFaSym {
+  /* terminals */
+  public static final int MGRAD = 10;
+  public static final int RmsGrad = 7;
+  public static final int Energ = 5;
+  public static final int MaxGrad = 6;
+  public static final int ENERGY = 9;
+  public static final int EOF = 0;
+  public static final int ITERATION = 8;
+  public static final int NSearch = 4;
+  public static final int RGRAD = 11;
+  public static final int error = 1;
+  public static final int SCFDONE = 3;
+  public static final int FOUNDITER = 2;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbLexer.java
new file mode 100644
index 0000000..7336e88
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbLexer.java
@@ -0,0 +1,788 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfb;/* The following code was generated by JFlex 1.4.3 on 9/15/14 4:04 PM */
+
+import java_cup.runtime.*;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/15/14 4:04 PM from the specification file
+ * <tt>scfb.flex</tt>
+ */
+public class SCFbLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int FLOATVALUE3 = 16;
+  public static final int LENXVALUE = 10;
+  public static final int SCF3 = 6;
+  public static final int SCF2 = 4;
+  public static final int INTVALUE = 12;
+  public static final int SCF1 = 2;
+  public static final int IGNOREALL = 18;
+  public static final int EQ3 = 8;
+  public static final int YYINITIAL = 0;
+  public static final int FLOATVALUE = 14;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7, 
+     8,  8,  9, 9
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    17,  0,  0,  0,  0,  0,  0,  0, 27, 11,  2,  4,  0, 40,  5,  1, 
+     3,  3, 42,  3,  3,  3,  3,  3,  3,  3, 21,  0,  0,  9,  0,  0, 
+     0, 30,  0, 12, 26, 10, 20,  0, 29,  0,  0, 43, 24,  0,  0,  0, 
+    44,  0, 28, 19,  8, 31, 41,  0, 25,  0,  0,  0,  0,  0,  0,  0, 
+     0, 32,  0, 36,  6, 16, 33, 39, 18, 45,  0, 46, 13,  0, 23, 14, 
+    22,  0, 35, 15, 34,  0, 38,  0,  0, 37,  0,  0,  7,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\12\0\5\1\1\2\12\1\1\3\1\4\1\1\1\5"+
+    "\5\1\4\0\1\6\7\0\1\7\1\10\1\0\1\11"+
+    "\1\0\1\12\23\0\1\13\3\0\1\14\1\11\1\0"+
+    "\1\12\3\0\1\15\2\0\1\16\5\0\1\17\2\0"+
+    "\1\20\11\0\1\21\3\0\1\22\1\23\4\0\1\24";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[116];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\57\0\136\0\215\0\274\0\353\0\u011a\0\u0149"+
+    "\0\u0178\0\u01a7\0\u01d6\0\u0205\0\u0234\0\u0263\0\u0292\0\u02c1"+
+    "\0\u02c1\0\u02f0\0\u031f\0\u034e\0\u037d\0\u03ac\0\u03db\0\u040a"+
+    "\0\u0439\0\u0468\0\u01d6\0\u0497\0\u0497\0\u04c6\0\u04c6\0\u04f5"+
+    "\0\u0524\0\u0553\0\u0582\0\u05b1\0\u05e0\0\u060f\0\u063e\0\u01d6"+
+    "\0\u066d\0\u069c\0\u06cb\0\u06fa\0\u0729\0\u0758\0\u0787\0\u01d6"+
+    "\0\u01d6\0\u04f5\0\u07b6\0\u0553\0\u07e5\0\u0814\0\u0843\0\u0872"+
+    "\0\u08a1\0\u08d0\0\u08ff\0\u092e\0\u095d\0\u098c\0\u09bb\0\u09ea"+
+    "\0\u0a19\0\u0a48\0\u0a77\0\u0aa6\0\u0ad5\0\u0b04\0\u0b33\0\u0b62"+
+    "\0\u01d6\0\u0b91\0\u0bc0\0\u0bef\0\u01d6\0\u0c1e\0\u0c1e\0\u0c4d"+
+    "\0\u0c4d\0\u0c7c\0\u0cab\0\u01d6\0\u0cda\0\u0d09\0\u01d6\0\u0d38"+
+    "\0\u0d67\0\u0d96\0\u0dc5\0\u0df4\0\u01d6\0\u0e23\0\u0e52\0\u01d6"+
+    "\0\u0e81\0\u0eb0\0\u0edf\0\u0f0e\0\u0f3d\0\u0f6c\0\u0f9b\0\u0fca"+
+    "\0\u0ff9\0\u01d6\0\u1028\0\u1057\0\u1086\0\u01d6\0\u01d6\0\u10b5"+
+    "\0\u10e4\0\u1113\0\u1142\0\u01d6";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[116];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\14\13\1\14\1\13\1\15\70\13\1\16\51\13\1\17"+
+    "\36\13\1\20\1\21\2\13\1\21\2\13\1\22\1\13"+
+    "\1\23\6\13\1\24\4\13\1\25\5\13\1\26\5\13"+
+    "\1\27\3\13\1\30\1\13\1\20\1\31\1\32\13\13"+
+    "\1\33\50\13\1\34\1\35\2\13\1\35\40\13\1\35"+
+    "\1\13\1\34\7\13\1\36\1\37\2\13\1\37\40\13"+
+    "\1\37\1\13\1\36\7\13\1\40\1\41\2\13\1\41"+
+    "\40\13\1\41\1\13\1\40\7\13\1\42\1\43\2\13"+
+    "\1\43\40\13\1\43\1\13\1\42\63\13\74\0\1\44"+
+    "\67\0\1\45\50\0\1\46\52\0\1\47\45\0\1\20"+
+    "\46\0\1\20\16\0\1\50\20\0\1\51\41\0\1\52"+
+    "\42\0\1\53\74\0\1\54\43\0\1\55\116\0\1\56"+
+    "\14\0\1\20\45\0\1\57\1\20\16\0\1\60\56\0"+
+    "\1\61\47\0\1\34\46\0\1\34\7\0\1\36\46\0"+
+    "\1\36\7\0\1\62\1\0\1\63\44\0\1\62\7\0"+
+    "\1\62\46\0\1\62\7\0\1\64\1\0\1\65\44\0"+
+    "\1\64\7\0\1\64\46\0\1\64\22\0\1\66\60\0"+
+    "\1\67\65\0\1\70\53\0\1\71\66\0\1\72\51\0"+
+    "\1\73\31\0\1\74\114\0\1\75\55\0\1\76\63\0"+
+    "\1\77\13\0\1\100\60\0\1\63\2\0\2\101\2\0"+
+    "\1\101\5\0\1\101\11\0\1\101\17\0\1\63\7\0"+
+    "\1\65\2\0\2\102\2\0\1\102\5\0\1\102\11\0"+
+    "\1\102\17\0\1\65\23\0\1\103\66\0\1\104\60\0"+
+    "\1\105\46\0\1\106\72\0\1\107\67\0\1\110\62\0"+
+    "\1\111\52\0\1\112\15\0\1\113\66\0\1\114\51\0"+
+    "\1\115\51\0\1\116\1\117\2\0\1\117\40\0\1\117"+
+    "\1\0\1\116\7\0\1\120\1\121\2\0\1\121\40\0"+
+    "\1\121\1\0\1\120\24\0\1\122\57\0\1\123\46\0"+
+    "\1\124\77\0\1\125\50\0\1\126\101\0\1\127\27\0"+
+    "\1\130\57\0\1\131\55\0\1\132\41\0\1\116\46\0"+
+    "\1\116\7\0\1\120\46\0\1\120\12\0\1\104\67\0"+
+    "\1\133\55\0\1\134\53\0\1\135\64\0\1\136\75\0"+
+    "\1\137\35\0\1\140\61\0\1\141\63\0\1\142\57\0"+
+    "\1\143\67\0\1\144\35\0\1\145\56\0\1\146\113\0"+
+    "\1\147\43\0\1\150\31\0\1\151\66\0\1\152\60\0"+
+    "\1\153\47\0\1\154\53\0\1\155\117\0\1\156\43\0"+
+    "\1\157\34\0\1\160\60\0\1\161\47\0\1\162\66\0"+
+    "\1\163\57\0\1\164\31\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[4465];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\12\0\1\11\17\1\1\11\10\1\4\0\1\11\7\0"+
+    "\2\11\1\0\1\1\1\0\1\1\23\0\1\11\3\0"+
+    "\1\11\1\1\1\0\1\1\3\0\1\11\2\0\1\11"+
+    "\5\0\1\11\2\0\1\11\11\0\1\11\3\0\2\11"+
+    "\4\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[116];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public SCFbLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public SCFbLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 13: 
+          { yybegin(LENXVALUE);
+	   return new Symbol(SCFbSym.FOUNDLENX);
+          }
+        case 21: break;
+        case 2: 
+          { return new Symbol(SCFbSym.INT, yytext());
+          }
+        case 22: break;
+        case 15: 
+          { yybegin(EQ3);
+	    return new Symbol(SCFbSym.ERHF);
+          }
+        case 23: break;
+        case 5: 
+          { yybegin(SCF2);
+	 return new Symbol(SCFbSym.INT, yytext());
+          }
+        case 24: break;
+        case 4: 
+          { yybegin(SCF2);
+	 return new Symbol(SCFbSym.LENXINT, yytext());
+          }
+        case 25: break;
+        case 16: 
+          { return new Symbol(SCFbSym.DUMMY);
+          }
+        case 26: break;
+        case 19: 
+          { return new Symbol(SCFbSym.AU);
+          }
+        case 27: break;
+        case 8: 
+          { yybegin(EQ3);
+	return new Symbol(SCFbSym.PE);
+          }
+        case 28: break;
+        case 18: 
+          { yybegin(IGNOREALL);
+		return new Symbol(SCFbSym.LEAVE);
+          }
+        case 29: break;
+        case 20: 
+          { yybegin(SCF1);
+		       return new Symbol(SCFbSym.FOUNDSCF);
+          }
+        case 30: break;
+        case 12: 
+          { yybegin(EQ3);
+	  return new Symbol(SCFbSym.MINUSVT);
+          }
+        case 31: break;
+        case 14: 
+          { yybegin(EQ3);
+           return new Symbol(SCFbSym.CONVG);
+          }
+        case 32: break;
+        case 7: 
+          { yybegin(EQ3);
+	return new Symbol(SCFbSym.KE);
+          }
+        case 33: break;
+        case 17: 
+          { yybegin(SCF3);
+	       return new Symbol(SCFbSym.SCFDONE);
+          }
+        case 34: break;
+        case 9: 
+          { yybegin(SCF2);
+	   return new Symbol(SCFbSym.FLOAT, yytext());
+          }
+        case 35: break;
+        case 6: 
+          { yybegin(EQ3);
+	return new Symbol(SCFbSym.EE);
+          }
+        case 36: break;
+        case 11: 
+          { yybegin(EQ3);
+	  return new Symbol(SCFbSym.S2);
+          }
+        case 37: break;
+        case 10: 
+          { yybegin(SCF3);
+	   return new Symbol(SCFbSym.FLOAT, yytext());
+          }
+        case 38: break;
+        case 3: 
+          { yybegin(FLOATVALUE3);
+	   return new Symbol(SCFbSym.EQUALS);
+          }
+        case 39: break;
+        case 1: 
+          { 
+          }
+        case 40: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(SCFbSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = SCFbSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java SCFbLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        SCFbLexer scanner = null;
+        try {
+          scanner = new SCFbLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}


[22/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Parser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Parser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Parser.java
new file mode 100644
index 0000000..9450ea9
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Parser.java
@@ -0,0 +1,539 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.g1;
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class G1Parser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public G1Parser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public G1Parser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public G1Parser(final FileReader fileReader) {
+        super(new G1Lexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\025\000\002\003\007\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\021\002" +
+                    "\000\002\006\006\000\002\022\002\000\002\007\007\000" +
+                    "\002\010\004\000\002\011\004\000\002\012\004\000\002" +
+                    "\013\003\000\002\014\004\000\002\014\003\000\002\023" +
+                    "\002\000\002\016\006\000\002\024\002\000\002\015\007" +
+                    "\000\002\017\004\000\002\020\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\004\004\005\001\002\000\004\007\012\001" +
+                    "\002\000\004\007\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\027\007\012\001" +
+                    "\002\000\006\005\ufffd\007\ufffd\001\002\000\004\022\013" +
+                    "\001\002\000\004\006\ufffc\001\002\000\004\006\016\001" +
+                    "\002\000\006\005\ufffb\007\ufffb\001\002\000\004\020\017" +
+                    "\001\002\000\004\010\ufffa\001\002\000\004\010\022\001" +
+                    "\002\000\004\011\024\001\002\000\004\023\023\001\002" +
+                    "\000\004\011\ufff8\001\002\000\004\024\026\001\002\000" +
+                    "\006\005\ufff9\007\ufff9\001\002\000\006\005\ufff7\007\ufff7" +
+                    "\001\002\000\004\012\031\001\002\000\006\005\ufffe\007" +
+                    "\ufffe\001\002\000\004\014\ufff5\001\002\000\004\017\054" +
+                    "\001\002\000\004\014\035\001\002\000\006\014\035\017" +
+                    "\ufff6\001\002\000\004\025\037\001\002\000\006\014\ufff3" +
+                    "\017\ufff3\001\002\000\004\013\ufff2\001\002\000\004\013" +
+                    "\041\001\002\000\004\021\043\001\002\000\006\014\ufff1" +
+                    "\017\ufff1\001\002\000\004\015\ufff0\001\002\000\004\015" +
+                    "\046\001\002\000\004\016\051\001\002\000\004\026\047" +
+                    "\001\002\000\004\016\uffee\001\002\000\006\014\uffef\017" +
+                    "\uffef\001\002\000\004\027\052\001\002\000\006\014\uffed" +
+                    "\017\uffed\001\002\000\006\014\ufff4\017\ufff4\001\002\000" +
+                    "\004\002\001\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\052\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\027\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\021\013\001\001\000\004" +
+                    "\007\014\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\004\022\017\001\001\000\004\010\020\001\001\000\004" +
+                    "\011\024\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\006" +
+                    "\012\031\013\032\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\006\014\033\016\035\001\001" +
+                    "\000\004\016\052\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\004\023\037\001\001\000\004\015\041\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\024\043\001" +
+                    "\001\000\004\017\044\001\001\000\004\020\047\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //rmsForce, maximum force, iteration and energy
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int mpRMSForceCount=0;
+        int mpMaximumForceCount=0;
+        int mpIterationCount=0;
+        int energyCount=0;
+        int rmsForceCount=0;
+        int maximumForceCount=0;
+        int iterationCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp = singleString.split(" ");
+            String secondElement=temp[1];
+            String thirdElement=temp[2];
+            if(thirdElement.equals("RMS")){
+                results.put("G1_Mp_RMS_Force_"+mpRMSForceCount,temp[4]);
+                mpRMSForceCount++;
+            }else if (thirdElement.equals("Maximum")){
+                results.put("G1_MP_Maximum_Force_"+mpMaximumForceCount,temp[4]);
+                mpMaximumForceCount++;
+            }else if (temp[3].equals("ITERATION")&&temp[2].equals("MP")){
+                results.put("G1_MP_Iteration_"+mpIterationCount,temp[3]);
+                mpIterationCount++;
+            }else if(thirdElement.equals("ENERGY")){
+                results.put("G1_Energy_"+energyCount,temp[3]);
+                energyCount++;
+            }else if(secondElement.equals("RMS")){
+                results.put("G1_RMS_Force"+rmsForceCount,temp[3]);
+                rmsForceCount++;
+            }else if(secondElement.equals("Maximum")){
+                results.put("G1_Maximum_Force"+maximumForceCount,temp[3]);
+                maximumForceCount++;
+            }else if(thirdElement.equals("ITERATION")){
+                results.put("G1_Iteration_"+iterationCount,temp[3]);
+                iterationCount++;
+            }
+        }
+
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final G1Parser G1Parser;
+
+  /** Constructor */
+  CUP$parser$actions(G1Parser G1Parser) {
+    this.G1Parser = G1Parser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 20: // force2 ::= MPRms MPRGRAD 
+            {
+              Object RESULT = null;
+		int mprgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mprgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mprg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+   G1Parser.addToResult("CUP:g1: MP RMS Force "+mprg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(14/*force2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 19: // force1 ::= MPMax MPMGRAD 
+            {
+              Object RESULT = null;
+		int mpmgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpmgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpmg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+   G1Parser.addToResult("CUP:g1: MP Maximum Force "+mpmg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*force1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 18: // mpcycle ::= NMP MPITER NT$3 force1 force2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$3
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*mpcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 17: // NT$3 ::= 
+            {
+              Object RESULT = null;
+		int itleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int itright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer it = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+   G1Parser.addToResult("CUP:g1:  MP ITERATION "+it);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(18/*NT$3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 16: // mpcycle1 ::= MPEnerg MPENERGY NT$2 mpcycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$2
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*mpcycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 15: // NT$2 ::= 
+            {
+              Object RESULT = null;
+		int mpenleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mpenright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mpen = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+   G1Parser.addToResult("CUP:g1:  ENERGY "+mpen);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(17/*NT$2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 14: // mppat ::= mpcycle1 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // mppat ::= mppat mpcycle1 
+            {
+              Object RESULT = null;
+		
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*mppat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // mpintro ::= MPStart 
+            {
+              Object RESULT = null;
+		
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*mpintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // mp2 ::= mpintro mppat 
+            {
+              Object RESULT = null;
+		
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*mp2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // grad2 ::= RmsGrad1 RGRAD1 
+            {
+              Object RESULT = null;
+		int rgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int rgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float rg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+   G1Parser.addToResult("CUP:gopt: RMS Force "+rg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(7/*grad2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // grad1 ::= MaxGrad1 MGRAD1 
+            {
+              Object RESULT = null;
+		int mgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+   G1Parser.addToResult("CUP:gopt: Maximum Force "+mg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*grad1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle ::= NSearch1 ITERATION1 NT$1 grad1 grad2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$1
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*cycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // NT$1 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c);
+   G1Parser.addToResult("CUP:gopt:  ITERATION "+c);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(16/*NT$1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= Energ1 ENERGY1 NT$0 cycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+   G1Parser.addToResult("CUP:gopt:  ENERGY "+e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(15/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER1 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE1 mp2 MPDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Sym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Sym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Sym.java
new file mode 100644
index 0000000..f0e5e06
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/g1/G1Sym.java
@@ -0,0 +1,54 @@
+
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.g1;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Sep 10 08:33:37 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class G1Sym {
+  /* terminals */
+  public static final int ENERGY1 = 16;
+  public static final int MPMGRAD = 20;
+  public static final int MGRAD1 = 17;
+  public static final int MaxGrad1 = 6;
+  public static final int NSearch1 = 4;
+  public static final int MPRGRAD = 21;
+  public static final int MPRms = 12;
+  public static final int RmsGrad1 = 7;
+  public static final int MPMax = 11;
+  public static final int MPDONE = 13;
+  public static final int EOF = 0;
+  public static final int MPENERGY = 19;
+  public static final int ITERATION1 = 14;
+  public static final int NMP = 9;
+  public static final int MPEnerg = 10;
+  public static final int error = 1;
+  public static final int MPITER = 15;
+  public static final int MPStart = 8;
+  public static final int FOUNDITER1 = 2;
+  public static final int Energ1 = 5;
+  public static final int SCFDONE1 = 3;
+  public static final int RGRAD1 = 18;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianLexer.java
new file mode 100644
index 0000000..9801a99
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianLexer.java
@@ -0,0 +1,864 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gaussian;/* The following code was generated by JFlex 1.4.3 on 9/10/14 9:00 AM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/10/14 9:00 AM from the specification file
+ * <tt>gaussian.flex</tt>
+ */
+public class GaussianLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 6;
+  public static final int ITER1 = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER = 2;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3, 3
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, 
+     0, 19,  9,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, 
+     0,  0,  0,  0,  0,  0, 13, 18, 12,  0,  0,  0,  0,  7,  0,  0, 
+     8,  0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0, 21,  0, 23, 15, 22, 14,  0,  0,  0,  0, 24,  0,  3, 
+     4,  0, 16, 20,  5, 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\4\0\22\1\4\0\1\2\2\0\1\3\4\0\1\4"+
+    "\6\0\1\5\1\6\1\7\1\10\1\11\1\0\1\12"+
+    "\1\13\1\14\1\15\3\0\1\16\1\0\1\17\1\20"+
+    "\42\0\1\21\1\22";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[94];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\31\0\62\0\113\0\144\0\175\0\226\0\257"+
+    "\0\310\0\341\0\372\0\u0113\0\u012c\0\u0145\0\u015e\0\u0177"+
+    "\0\u0190\0\u01a9\0\u01c2\0\u01db\0\u01f4\0\u020d\0\u0226\0\u023f"+
+    "\0\u0258\0\u0271\0\144\0\u028a\0\u02a3\0\144\0\u02bc\0\u02d5"+
+    "\0\u02ee\0\u0307\0\144\0\u01a9\0\u0320\0\u0339\0\u0352\0\u036b"+
+    "\0\u0384\0\144\0\144\0\144\0\144\0\144\0\u039d\0\144"+
+    "\0\144\0\144\0\144\0\u03b6\0\u03cf\0\u03e8\0\144\0\u0401"+
+    "\0\144\0\144\0\u041a\0\u0433\0\u044c\0\u0465\0\u047e\0\u0497"+
+    "\0\u04b0\0\u04c9\0\u04e2\0\u04fb\0\u0514\0\u052d\0\u0546\0\u055f"+
+    "\0\u0578\0\u0591\0\u05aa\0\u05c3\0\u05dc\0\u05f5\0\u060e\0\u0627"+
+    "\0\u0640\0\u0659\0\u0672\0\u068b\0\u06a4\0\u06bd\0\u06d6\0\u06ef"+
+    "\0\u0708\0\u0721\0\u073a\0\u0753\0\144\0\144";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[94];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\2\5\1\6\31\5\1\7\3\5\1\10\3\5\1\11"+
+    "\2\5\1\12\1\5\1\13\1\14\1\15\10\5\1\16"+
+    "\1\17\3\5\1\20\3\5\1\21\2\5\1\22\1\5"+
+    "\1\23\1\24\2\5\1\25\1\5\1\26\33\5\33\0"+
+    "\1\27\32\0\1\30\34\0\1\31\34\0\1\32\33\0"+
+    "\1\33\27\0\1\34\30\0\1\35\35\0\1\36\7\0"+
+    "\1\37\32\0\1\40\34\0\1\41\34\0\1\42\33\0"+
+    "\1\43\27\0\1\44\30\0\1\45\37\0\1\46\32\0"+
+    "\1\47\3\0\1\50\33\0\1\51\34\0\1\52\1\53"+
+    "\33\0\1\54\32\0\1\55\30\0\1\56\13\0\1\57"+
+    "\33\0\1\60\34\0\1\61\34\0\1\62\32\0\1\63"+
+    "\30\0\1\64\14\0\1\65\27\0\1\66\34\0\1\67"+
+    "\24\0\1\70\27\0\1\71\57\0\1\72\2\0\1\73"+
+    "\30\0\1\74\30\0\1\75\30\0\1\76\30\0\1\77"+
+    "\30\0\1\100\30\0\1\101\30\0\1\102\30\0\1\103"+
+    "\30\0\1\104\30\0\1\105\30\0\1\106\30\0\1\107"+
+    "\30\0\1\110\30\0\1\111\30\0\1\112\30\0\1\113"+
+    "\30\0\1\114\30\0\1\115\30\0\1\116\30\0\1\117"+
+    "\30\0\1\120\30\0\1\121\30\0\1\122\30\0\1\123"+
+    "\30\0\1\124\30\0\1\125\30\0\1\126\30\0\1\127"+
+    "\30\0\1\130\30\0\1\131\30\0\1\132\30\0\1\133"+
+    "\30\0\1\134\30\0\1\135\30\0\1\136\26\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1900];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\4\0\1\11\21\1\4\0\1\11\2\0\1\11\4\0"+
+    "\1\11\6\0\5\11\1\0\4\11\3\0\1\11\1\0"+
+    "\2\11\42\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[94];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GaussianLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GaussianLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 17: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(GaussianSym.FOUNDITER);
+          }
+        case 19: break;
+        case 12: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 20: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 21: break;
+        case 2: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found hf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 22: break;
+        case 16: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found geom");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 23: break;
+        case 10: 
+          { if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 24: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 25: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 26: break;
+        case 18: 
+          { yybegin(IGNOREALL);
+    return new Symbol(GaussianSym.SCFDONE);
+          }
+        case 27: break;
+        case 13: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 28: break;
+        case 9: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 29: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 30: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 31: break;
+        case 15: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found scf=");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+          }
+        case 32: break;
+        case 6: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP4");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 33: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 34: break;
+        case 14: 
+          { if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+          }
+        case 35: break;
+        case 1: 
+          { 
+          }
+        case 36: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GaussianSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GaussianSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GaussianLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GaussianLexer scanner = null;
+        try {
+          scanner = new GaussianLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianParser.java
new file mode 100644
index 0000000..ea61ef8
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianParser.java
@@ -0,0 +1,187 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gaussian;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import java.io.FileReader;
+import java.util.HashMap;
+
+
+public class GaussianParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public GaussianParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GaussianParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GaussianParser(final FileReader fileReader) {
+        super(new GaussianLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\003\000\002\003\003\000\002\002\004\000\002\004" +
+                    "\005"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\004\004\005\001\002\000\004\002\001\001" +
+                    "\002\000\004\006\010\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\007\011\001\002\000" +
+                    "\004\002\uffff\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\003\005\004\003\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        return null;
+    }
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+
+  private final GaussianParser GaussianParser;
+
+  /** Constructor */
+  CUP$parser$actions(GaussianParser GaussianParser) {
+    this.GaussianParser = GaussianParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER RUNTYP RUNTYP1 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianSym.java
new file mode 100644
index 0000000..25f22f0
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gaussian/GaussianSym.java
@@ -0,0 +1,37 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gaussian;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Sep 10 09:00:14 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GaussianSym {
+  /* terminals */
+  public static final int RUNTYP = 4;
+  public static final int SCFDONE = 3;
+  public static final int error = 1;
+  public static final int FOUNDITER = 2;
+  public static final int RUNTYP1 = 5;
+  public static final int EOF = 0;
+}
+


[06/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/scripts/jquery-1.11.1.js
----------------------------------------------------------------------
diff --git a/datacat/web/portal/scripts/jquery-1.11.1.js b/datacat/web/portal/scripts/jquery-1.11.1.js
new file mode 100755
index 0000000..d4b67f7
--- /dev/null
+++ b/datacat/web/portal/scripts/jquery-1.11.1.js
@@ -0,0 +1,10308 @@
+/*!
+ * jQuery JavaScript Library v1.11.1
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-05-01T17:42Z
+ */
+
+(function( global, factory ) {
+
+	if ( typeof module === "object" && typeof module.exports === "object" ) {
+		// For CommonJS and CommonJS-like environments where a proper window is present,
+		// execute the factory and get jQuery
+		// For environments that do not inherently posses a window with a document
+		// (such as Node.js), expose a jQuery-making factory as module.exports
+		// This accentuates the need for the creation of a real window
+		// e.g. var jQuery = require("jquery")(window);
+		// See ticket #14549 for more info
+		module.exports = global.document ?
+			factory( global, true ) :
+			function( w ) {
+				if ( !w.document ) {
+					throw new Error( "jQuery requires a window with a document" );
+				}
+				return factory( w );
+			};
+	} else {
+		factory( global );
+	}
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//
+
+var deletedIds = [];
+
+var slice = deletedIds.slice;
+
+var concat = deletedIds.concat;
+
+var push = deletedIds.push;
+
+var indexOf = deletedIds.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+	version = "1.11.1",
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		// Need init if jQuery is called (just allow error to be thrown if not included)
+		return new jQuery.fn.init( selector, context );
+	},
+
+	// Support: Android<4.1, IE<9
+	// Make sure we trim BOM and NBSP
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: version,
+
+	constructor: jQuery,
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num != null ?
+
+			// Return just the one element from the set
+			( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+			// Return all the elements in a clean array
+			slice.call( this );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: deletedIds.sort,
+	splice: deletedIds.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+
+		// skip the boolean and the target
+		target = arguments[ i ] || {};
+		i++;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( i === length ) {
+		target = this;
+		i--;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+	// Assume jQuery is ready without the ready module
+	isReady: true,
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	noop: function() {},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		// parseFloat NaNs numeric-cast false positives (null|true|false|"")
+		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+		// subtraction forces infinities to NaN
+		return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!hasOwn.call(obj, "constructor") &&
+				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( support.ownLast ) {
+			for ( key in obj ) {
+				return hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return obj + "";
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Support: Android<4.1, IE<9
+	trim: function( text ) {
+		return text == null ?
+			"" :
+			( text + "" ).replace( rtrim, "" );
+	},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( indexOf ) {
+				return indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var len = +second.length,
+			j = 0,
+			i = first.length;
+
+		while ( j < len ) {
+			first[ i++ ] = second[ j++ ];
+		}
+
+		// Support: IE<9
+		// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
+		if ( len !== len ) {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, invert ) {
+		var callbackInverse,
+			matches = [],
+			i = 0,
+			length = elems.length,
+			callbackExpect = !invert;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			callbackInverse = !callback( elems[ i ], i );
+			if ( callbackInverse !== callbackExpect ) {
+				matches.push( elems[ i ] );
+			}
+		}
+
+		return matches;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their new values
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret.push( value );
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret.push( value );
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	now: function() {
+		return +( new Date() );
+	},
+
+	// jQuery.support is not used in Core but other projects attach their
+	// properties to it so it needs to exist.
+	support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( type === "function" || jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v1.10.19
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-04-18
+ */
+(function( window ) {
+
+var i,
+	support,
+	Expr,
+	getText,
+	isXML,
+	tokenize,
+	compile,
+	select,
+	outermostContext,
+	sortInput,
+	hasDuplicate,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+		// Operator (capture 2)
+		"*([*^$|!~]?=)" + whitespace +
+		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+		"*\\]",
+
+	pseudos = ":(" + characterEncoding + ")(?:\\((" +
+		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+		// 1. quoted (capture 3; capture 4 or capture 5)
+		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+		// 2. simple (capture 6)
+		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+		// 3. anything else (capture 2)
+		".*" +
+		")\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rsibling = /[+~]/,
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox<24
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			high < 0 ?
+				// BMP codepoint
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document (jQuery #6963)
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key + " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key + " " ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+	return context && typeof context.getElementsByTagName !== strundefined && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var hasCompare,
+		doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent !== parent.top ) {
+		// IE11 does not have attachEvent, so all must suffer
+		if ( parent.addEventListener ) {
+			parent.addEventListener( "unload", function() {
+				setDocument();
+			}, false );
+		} else if ( parent.attachEvent ) {
+			parent.attachEvent( "onunload", function() {
+				setDocument();
+			});
+		}
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [ m ] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select msallowclip=''><option selected=''></option></select>";
+
+			// Support: IE8, Opera 11-12.16
+			// Nothing should be selected when empty strings follow ^= or $= or *=
+			// The test attribute must be unknown in Opera but "safe" for WinRT
+			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+			if ( div.querySelectorAll("[msallowclip^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+			// Support: Windows 8 Native Apps
+			// The type and name attributes are restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "name", "D" );
+
+			// Support: IE8
+			// Enforce case-sensitivity of name attribute
+			if ( div.querySelectorAll("[name=d]").length ) {
+				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+		docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+	hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = hasCompare || rnative.test( docElem.contains ) ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = hasCompare ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		// Sort on method existence if only one input has compareDocumentPosition
+		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+		if ( compare ) {
+			return compare;
+		}
+
+		// Calculate position if both inputs belong to the same document
+		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+			a.compareDocumentPosition( b ) :
+
+			// Otherwise we know they are disconnected
+			1;
+
+		// Disconnected nodes
+		if ( compare & 1 ||
+			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+			// Choose the first element that is related to our preferred document
+			if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+				return -1;
+			}
+			if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+				return 1;
+			}
+
+			// Maintain original order
+			return sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+		}
+
+		return compare & 4 ? -1 : 1;
+	} :
+	function( a, b ) {
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Parentless nodes are either documents or disconnected
+		if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val !== undefined ?
+		val :
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	// Clear input after sorting to release objects
+	// See https://github.com/jquery/sizzle/pull/225
+	sortInput = null;
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		while ( (node = elem[i++]) ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (jQuery #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[6] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] ) {
+				match[2] = match[4] || match[5] || "";
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+			//   but not by others (comment: 8; processing instruction: 7; etc.)
+			// nodeType < 6 works because attributes (2) do not appear as children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeType < 6 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+
+				// Support: IE<8
+				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( (tokens = []) );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var oldCache, outerCache,
+				newCache = [ dirruns, doneName ];
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (oldCache = outerCache[ dir ]) &&
+							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+							// Assign to newCache so results back-propagate to previous elements
+							return (newCache[ 2 ] = oldCache[ 2 ]);
+						} else {
+							// Reuse newcache so results back-propagate to previous elements
+							outerCache[ dir ] = newCache;
+
+							// A match means we're done; a fail means we have to keep checking
+							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	var bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, outermost ) {
+			var elem, j, matcher,
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				setMatched = [],
+				contextBackup = outermostContext,
+				// We must always have either seed elements or outermost context
+				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+				len = elems.length;
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			// Support: IE<9, Safari
+			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !match ) {
+			match = tokenize( selector );
+		}
+		i = match.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( match[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+		// Save selector and tokenization
+		cached.selector = selector;
+	}
+	return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ *  selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ *  selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		compiled = typeof selector === "function" && selector,
+		match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+	results = results || [];
+
+	// Try to minimize operations if there is no seed and only one group
+	if ( match.length === 1 ) {
+
+		// Take a shortcut and set the context if the root selector is an ID
+		tokens = match[0] = match[0].slice( 0 );
+		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+				support.getById && context.nodeType === 9 && documentIsHTML &&
+				Expr.relative[ tokens[1].type ] ) {
+
+			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+			if ( !context ) {
+				return results;
+
+			// Precompiled matchers will still verify ancestry, so step up a level
+			} else if ( compiled ) {
+				context = context.parentNode;
+			}
+
+			selector = selector.slice( tokens.shift().value.length );
+		}
+
+		// Fetch a seed set for right-to-left matching
+		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+		while ( i-- ) {
+			token = tokens[i];
+
+			// Abort if we hit a combinator
+			if ( Expr.relative[ (type = token.type) ] ) {
+				break;
+			}
+			if ( (find = Expr.find[ type ]) ) {
+				// Search, expanding context for leading sibling combinators
+				if ( (seed = find(
+					token.matches[0].replace( runescape, funescape ),
+					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+				)) ) {
+
+					// If seed is empty or no tokens remain, we can return early
+					tokens.splice( i, 1 );
+					selector = seed.length && toSelector( tokens );
+					if ( !selector ) {
+						push.apply( results, seed );
+						return results;
+					}
+
+					break;
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function if one is not provided
+	// Provide `match` to avoid retokenization if we modified the selector above
+	( compiled || compile( selector, match ) )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector ) && testContext( context.parentNode ) || context
+	);
+	return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return elem[ name ] === true ? name.toLowerCase() :
+					(val = elem.getAttributeNode( name )) && val.specified ?
+					val.value :
+				null;
+		}
+	});
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep( elements, function( elem, i ) {
+			/* jshint -W018 */
+			return !!qualifier.call( elem, i, elem ) !== not;
+		});
+
+	}
+
+	if ( qualifier.nodeType ) {
+		return jQuery.grep( elements, function( elem ) {
+			return ( elem === qualifier ) !== not;
+		});
+
+	}
+
+	if ( typeof qualifier === "string" ) {
+		if ( risSimple.test( qualifier ) ) {
+			return jQuery.filter( qualifier, elements, not );
+		}
+
+		qualifier = jQuery.filter( qualifier, elements );
+	}
+
+	return jQuery.grep( elements, function( elem ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+	});
+}
+
+jQuery.filter = function( expr, elems, not ) {
+	var elem = elems[ 0 ];
+
+	if ( not ) {
+		expr = ":not(" + expr + ")";
+	}
+
+	return elems.length === 1 && elem.nodeType === 1 ?
+		jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+		jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+			return elem.nodeType === 1;
+		}));
+};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var i,
+			ret = [],
+			self = this,
+			len = self.length;
+
+		if ( typeof selector !== "string" ) {
+			return this.pushStack( jQuery( selector ).filter(function() {
+				for ( i = 0; i < len; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			}) );
+		}
+
+		for ( i = 0; i < len; i++ ) {
+			jQuery.find( selector, self[ i ], ret );
+		}
+
+		// Needed because $( selector, context ) becomes $( context ).find( selector )
+		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+		ret.selector = this.selector ? this.selector + " " + selector : selector;
+		return ret;
+	},
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], false) );
+	},
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], true) );
+	},
+	is: function( selector ) {
+		return !!winnow(
+			this,
+
+			// If this is a positional/relative selector, check membership in the returned set
+			// so $("p:first").is("p:last") won't return true for a doc with two "p".
+			typeof selector === "string" && rneedsContext.test( selector ) ?
+				jQuery( selector ) :
+				selector || [],
+			false
+		).length;
+	}
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	document = window.document,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	init = jQuery.fn.init = function( selector, context ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					// Intentionally let the error be thrown if parseHTML is not present
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return typeof rootjQuery.ready !== "undefined" ?
+				rootjQuery.ready( selector ) :
+				// Execute immediately if ready is not present
+				selector( jQuery );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	};
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.extend({
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+jQuery.fn.extend({
+	has: function( target ) {
+		var i,
+			targets = jQuery( target, this ),
+			len = targets.length;
+
+		return this.filter(function() {
+			for ( i = 0; i < len; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	closest: function( selectors, context ) {
+		var cur,
+			i = 0,
+			l = this.length,
+			matched = [],
+			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( ; i < l; i++ ) {
+			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+				// Always skip document fragments
+				if ( cur.nodeType < 11 && (pos ?
+					pos.index(cur) > -1 :
+
+					// Don't pass non-elements to Sizzle
+					cur.nodeType === 1 &&
+						jQuery.find.matchesSelector(cur, selectors)) ) {
+
+					matched.push( cur );
+					break;
+				}
+			}
+		}
+
+		return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		return this.pushStack(
+			jQuery.unique(
+				jQuery.merge( this.get(), jQuery( selector, context ) )
+			)
+		);
+	},
+
+	addBack: function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter(selector)
+		);
+	}
+});
+
+function sibling( cur, dir ) {
+	do {
+		cur = cur[ dir ];
+	} while ( cur && cur.nodeType !== 1 );
+
+	return cur;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return sibling( elem, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return sibling( elem, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.merge( [], elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( name.slice( -5 ) !== "Until" ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		if ( this.length > 1 ) {
+			// Remove duplicates
+			if ( !guaranteedUnique[ name ] ) {
+				ret = jQuery.unique( ret );
+			}
+
+			// Reverse order for parents* and prev-derivatives
+			if ( rparentsprev.test( name ) ) {
+				ret = ret.reverse();
+			}
+		}
+
+		return this.pushStack( ret );
+	};
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.le

<TRUNCATED>

[21/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordLexer.java
new file mode 100644
index 0000000..4f17b3d
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordLexer.java
@@ -0,0 +1,773 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gfinalcoord;/* The following code was generated by JFlex 1.4.3 on 9/10/14 9:08 AM */
+
+import java_cup.runtime.*;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/10/14 9:08 AM from the specification file
+ * <tt>gfinalcoord.flex</tt>
+ */
+public class GFinalCoordLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int INPUTF = 30;
+  public static final int ITER2 = 4;
+  public static final int INPUTE = 28;
+  public static final int INPUTD = 26;
+  public static final int INPUTC = 24;
+  public static final int INPUTB = 22;
+  public static final int INPUTA = 20;
+  public static final int INTVALUE = 8;
+  public static final int INPUT = 18;
+  public static final int IGNOREALL = 16;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 
+     2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,  2,  2,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    17,  0,  0,  0,  0,  0,  0,  0, 18,  6,  0,  3,  0, 27,  4,  0, 
+     1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0, 
+     0, 13, 19,  7, 10, 15,  5, 21, 20, 11,  2,  2, 26,  2, 12,  8, 
+     2,  2,  9, 16, 14, 28,  2,  2, 22, 23, 24,  0,  0,  0,  0, 25, 
+     0,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 
+     2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\10\0\5\1\2\2\10\1\4\0\1\2\14\0\1\2"+
+    "\1\3\1\4\1\5\1\6\4\0\1\2\4\0\1\2"+
+    "\4\0\1\2\4\0\1\2\4\0\1\2\4\0\1\2"+
+    "\4\0\1\2\4\0\1\2\4\0\1\2\14\0\1\7"+
+    "\12\0\1\10\14\0\1\11\41\0\1\12";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[161];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\35\0\72\0\127\0\164\0\221\0\256\0\313"+
+    "\0\350\0\u0105\0\u0122\0\u013f\0\u015c\0\u0179\0\u0196\0\u01b3"+
+    "\0\u01d0\0\u01ed\0\u020a\0\u0227\0\u0244\0\u0261\0\u027e\0\u029b"+
+    "\0\u02b8\0\u02d5\0\u02f2\0\u030f\0\u01b3\0\u032c\0\u01ed\0\u0349"+
+    "\0\u0227\0\u0366\0\u0261\0\u0383\0\u03a0\0\u03bd\0\u03da\0\u03f7"+
+    "\0\u0414\0\u032c\0\u0349\0\u0366\0\u0383\0\u0431\0\u044e\0\u046b"+
+    "\0\u0488\0\u04a5\0\u04c2\0\u04df\0\u04fc\0\u0519\0\u0536\0\u0553"+
+    "\0\u0570\0\u058d\0\u05aa\0\u05c7\0\u05e4\0\u0601\0\u061e\0\u063b"+
+    "\0\u0658\0\u0675\0\u0692\0\u06af\0\u06cc\0\u06e9\0\u0706\0\u0723"+
+    "\0\u0740\0\u075d\0\u077a\0\u0797\0\u07b4\0\u07d1\0\u07ee\0\u080b"+
+    "\0\u0828\0\u0845\0\u0862\0\u087f\0\u089c\0\u08b9\0\u08d6\0\u08f3"+
+    "\0\u0910\0\u092d\0\u094a\0\u0967\0\u0984\0\u09a1\0\u09be\0\u09db"+
+    "\0\u09f8\0\u0a15\0\u0a32\0\u0a4f\0\u0a6c\0\u0a89\0\350\0\u0aa6"+
+    "\0\u0ac3\0\u0ae0\0\u0afd\0\u0b1a\0\u0b37\0\u0b54\0\u0b71\0\u0b8e"+
+    "\0\u0bab\0\350\0\u0bc8\0\u0be5\0\u0c02\0\u0c1f\0\u0c3c\0\u0c59"+
+    "\0\u0c76\0\u0c93\0\u0cb0\0\u0ccd\0\u0cea\0\u0d07\0\350\0\u0d24"+
+    "\0\u0d41\0\u0d5e\0\u0d7b\0\u0d98\0\u0db5\0\u0dd2\0\u0def\0\u0e0c"+
+    "\0\u0e29\0\u0e46\0\u0e63\0\u0e80\0\u0e9d\0\u0eba\0\u0ed7\0\u0ef4"+
+    "\0\u0f11\0\u0f2e\0\u0f4b\0\u0f68\0\u0f85\0\u0fa2\0\u0fbf\0\u0fdc"+
+    "\0\u0ff9\0\u1016\0\u1033\0\u1050\0\u106d\0\u108a\0\u10a7\0\u10c4"+
+    "\0\350";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[161];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\7\11\1\12\34\11\1\13\6\11\1\14\14\11\1\15"+
+    "\40\11\1\16\2\11\1\16\1\11\4\16\1\17\5\16"+
+    "\2\11\10\16\1\11\1\16\1\11\1\20\1\11\1\21"+
+    "\27\11\1\21\2\11\1\22\1\11\1\23\27\11\1\23"+
+    "\2\11\1\24\1\11\1\25\27\11\1\25\2\11\1\26"+
+    "\1\11\1\27\27\11\1\27\1\11\45\0\1\30\50\0"+
+    "\1\31\34\0\1\32\43\0\1\33\2\0\2\16\2\0"+
+    "\1\16\1\0\12\16\2\0\10\16\1\0\1\16\1\0"+
+    "\2\16\2\0\1\16\1\0\5\16\1\34\4\16\2\0"+
+    "\10\16\1\0\1\16\1\0\1\35\2\0\1\36\31\0"+
+    "\1\35\34\0\1\37\2\0\1\40\31\0\1\37\34\0"+
+    "\1\41\2\0\1\42\31\0\1\41\34\0\1\43\2\0"+
+    "\1\44\31\0\1\43\43\0\1\45\41\0\1\46\36\0"+
+    "\1\47\50\0\1\50\2\0\2\16\2\0\1\16\1\0"+
+    "\7\16\1\51\2\16\2\0\10\16\1\0\1\16\1\0"+
+    "\1\52\34\0\1\53\34\0\1\54\34\0\1\55\44\0"+
+    "\1\56\34\0\1\57\54\0\1\60\36\0\1\61\2\0"+
+    "\2\16\2\0\1\16\1\0\10\16\1\62\1\16\2\0"+
+    "\10\16\1\0\1\16\12\0\1\63\47\0\1\64\26\0"+
+    "\1\65\50\0\1\66\2\0\2\16\2\0\1\16\1\0"+
+    "\2\16\1\67\7\16\2\0\10\16\1\0\1\16\13\0"+
+    "\1\70\40\0\1\71\31\0\1\72\53\0\1\73\2\0"+
+    "\2\16\2\0\1\16\1\0\5\16\1\74\4\16\2\0"+
+    "\10\16\1\0\1\16\14\0\1\75\41\0\1\76\25\0"+
+    "\1\77\55\0\1\100\2\0\2\16\2\0\1\16\1\0"+
+    "\12\16\2\0\10\16\1\0\1\101\15\0\1\102\40\0"+
+    "\1\103\44\0\1\104\36\0\1\105\2\0\2\16\2\0"+
+    "\1\16\1\0\1\106\11\16\2\0\10\16\1\0\1\16"+
+    "\16\0\1\107\37\0\1\110\23\0\1\111\57\0\1\112"+
+    "\2\0\2\16\2\0\1\16\1\0\12\16\2\0\7\16"+
+    "\1\113\1\0\1\16\17\0\1\114\36\0\1\115\20\0"+
+    "\1\116\62\0\1\117\2\0\2\16\2\0\1\16\1\0"+
+    "\10\16\1\120\1\16\2\0\10\16\1\0\1\16\20\0"+
+    "\1\121\35\0\1\122\44\0\1\123\36\0\1\124\2\0"+
+    "\2\16\2\0\1\16\1\0\6\16\1\125\3\16\2\0"+
+    "\10\16\1\0\1\16\21\0\1\126\34\0\1\127\20\0"+
+    "\1\130\62\0\1\131\2\0\2\16\2\0\1\16\1\0"+
+    "\2\16\1\132\7\16\2\0\10\16\1\0\1\16\22\0"+
+    "\1\133\33\0\1\134\26\0\1\135\54\0\1\136\2\0"+
+    "\2\16\2\0\1\16\1\0\12\16\1\137\1\0\10\16"+
+    "\1\0\1\16\23\0\1\140\32\0\1\141\45\0\1\142"+
+    "\35\0\1\143\13\0\1\144\32\0\1\145\45\0\1\146"+
+    "\32\0\1\147\50\0\1\150\14\0\1\151\45\0\1\152"+
+    "\36\0\1\153\41\0\1\154\21\0\1\155\25\0\1\156"+
+    "\44\0\1\157\46\0\1\160\17\0\1\161\24\0\1\162"+
+    "\47\0\1\163\46\0\1\164\16\0\1\165\40\0\1\166"+
+    "\46\0\1\167\15\0\1\170\41\0\1\171\46\0\1\172"+
+    "\10\0\1\173\46\0\1\174\46\0\1\147\20\0\1\175"+
+    "\36\0\1\176\33\0\1\177\35\0\1\200\34\0\1\201"+
+    "\34\0\1\202\34\0\1\203\34\0\1\204\34\0\1\205"+
+    "\34\0\1\206\34\0\1\207\34\0\1\210\34\0\1\211"+
+    "\34\0\1\212\34\0\1\213\34\0\1\214\42\0\1\215"+
+    "\26\0\1\216\34\0\1\217\34\0\1\220\34\0\1\221"+
+    "\34\0\1\222\34\0\1\223\34\0\1\224\34\0\1\225"+
+    "\34\0\1\226\34\0\1\227\34\0\1\230\34\0\1\231"+
+    "\34\0\1\232\34\0\1\233\34\0\1\234\34\0\1\235"+
+    "\34\0\1\236\34\0\1\237\34\0\1\240\43\0\1\241"+
+    "\4\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[4321];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\10\0\1\11\16\1\4\0\1\1\14\0\5\1\4\0"+
+    "\1\1\4\0\1\1\4\0\1\1\4\0\1\1\4\0"+
+    "\1\1\4\0\1\1\4\0\1\1\4\0\1\1\4\0"+
+    "\1\1\14\0\1\11\12\0\1\11\14\0\1\11\41\0"+
+    "\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[161];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GFinalCoordLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GFinalCoordLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 2: 
+          { yybegin (INPUTA);
+   return new Symbol(GFinalCoordSym.INPUT2);
+          }
+        case 11: break;
+        case 5: 
+          { yybegin (INPUTD);
+   return new Symbol(GFinalCoordSym.INPUT5, new Float(yytext()));
+          }
+        case 12: break;
+        case 6: 
+          { yybegin (INPUT);
+   return new Symbol(GFinalCoordSym.INPUT6, new Float(yytext()));
+          }
+        case 13: break;
+        case 9: 
+          { yybegin (IGNOREALL);
+   return new Symbol(GFinalCoordSym.SCFDONE);
+          }
+        case 14: break;
+        case 8: 
+          { yybegin(ITER);
+	   return new Symbol(GFinalCoordSym.FOUNDITER);
+          }
+        case 15: break;
+        case 10: 
+          { yybegin(INPUT);
+            return new Symbol(GFinalCoordSym.INPUT1);
+          }
+        case 16: break;
+        case 7: 
+          { yybegin(IGNOREALL);
+      return new Symbol(GFinalCoordSym.SCFDONE);
+          }
+        case 17: break;
+        case 4: 
+          { yybegin (INPUTC);
+   return new Symbol(GFinalCoordSym.INPUT4, new Float(yytext()));
+          }
+        case 18: break;
+        case 3: 
+          { yybegin (INPUTB);
+   return new Symbol(GFinalCoordSym.INPUT3, new Float(yytext()));
+          }
+        case 19: break;
+        case 1: 
+          { 
+          }
+        case 20: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GFinalCoordSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GFinalCoordSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GFinalCoordLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GFinalCoordLexer scanner = null;
+        try {
+          scanner = new GFinalCoordLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordParser.java
new file mode 100644
index 0000000..8889053
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordParser.java
@@ -0,0 +1,339 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gfinalcoord;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class GFinalCoordParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public GFinalCoordParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GFinalCoordParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GFinalCoordParser(final FileReader fileReader) {
+        super(new GFinalCoordLexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\012\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\004\000\002\005\004\000\002\005\003\000\002\006\007" +
+                    "\000\002\007\003\000\002\010\003\000\002\011\003\000" +
+                    "\002\012\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\023\000\004\006\005\001\002\000\004\005\011\001" +
+                    "\002\000\004\004\010\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\005\uffff\001\002\000" +
+                    "\004\010\017\001\002\000\006\005\011\007\014\001\002" +
+                    "\000\006\005\ufffd\007\ufffd\001\002\000\004\002\001\001" +
+                    "\002\000\006\005\ufffe\007\ufffe\001\002\000\004\011\020" +
+                    "\001\002\000\004\011\ufffb\001\002\000\004\012\ufffa\001" +
+                    "\002\000\004\012\022\001\002\000\004\013\ufff9\001\002" +
+                    "\000\004\013\024\001\002\000\006\005\ufff8\007\ufff8\001" +
+                    "\002\000\006\005\ufffc\007\ufffc\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\023\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\011\006\012\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\007\015\001" +
+                    "\001\000\004\006\014\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\004\010\020\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\004\011\022\001\001" +
+                    "\000\002\001\001\000\004\012\024\001\001\000\002\001" +
+                    "\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //center# atomic# x_coord y_coord z_coord
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        int e6Count=0;
+        int e5Count=0;
+        int e4Count=0;
+        int e=0;
+        HashMap<String, String> results = new HashMap<String, String>();
+        for (int i = 0; i < result.size(); i++) {
+            String singleString= result.get(i);
+            String[] temp= singleString.split(" ");
+            String firstElement=temp[0];
+            String dataElement=temp[1];
+            if(firstElement.equals("e6")){
+                results.put("GFinalCoord_e6_"+e6Count,dataElement);
+                e6Count++;
+            }else if(firstElement.equals("e5")){
+                results.put("GFinalCoord_e5_"+e5Count,dataElement);
+                e5Count++;
+            }else if(firstElement.equals("e4")){
+                results.put("GFinalCoord_e4_"+e4Count,dataElement);
+                e4Count++;
+            }else if(firstElement.equals("e")){
+                results.put("GFinalCoord_e_"+e,dataElement);
+                e++;
+            }
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+
+  private final GFinalCoordParser GFinalCoordParser;
+
+  /** Constructor */
+  CUP$parser$actions(GFinalCoordParser GFinalCoordParser) {
+    this.GFinalCoordParser = GFinalCoordParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // inp6 ::= INPUT6 
+            {
+              Object RESULT = null;
+		int e6left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int e6right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e6 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+        GFinalCoordParser.addToResult("e6 "+e6);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*inp6*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // inp5 ::= INPUT5 
+            {
+              Object RESULT = null;
+		int e5left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int e5right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e5 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+        GFinalCoordParser.addToResult("e5 "+e5);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(7/*inp5*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // inp4 ::= INPUT4 
+            {
+              Object RESULT = null;
+		int e4left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int e4right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e4 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+        GFinalCoordParser.addToResult("e4 "+e4);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*inp4*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // inp3 ::= INPUT3 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+        GFinalCoordParser.addToResult("e "+e);
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*inp3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // scfcycle ::= INPUT2 inp3 inp4 inp5 inp6 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER INPUT1 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordSym.java
new file mode 100644
index 0000000..3e1203a
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gfinalcoord/GFinalCoordSym.java
@@ -0,0 +1,41 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gfinalcoord;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Sep 10 09:08:56 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GFinalCoordSym {
+  /* terminals */
+  public static final int EOF = 0;
+  public static final int error = 1;
+  public static final int INPUT6 = 9;
+  public static final int INPUT5 = 8;
+  public static final int INPUT4 = 7;
+  public static final int SCFDONE = 5;
+  public static final int INPUT3 = 6;
+  public static final int FOUNDITER = 4;
+  public static final int INPUT2 = 3;
+  public static final int INPUT1 = 2;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaLexer.java
new file mode 100644
index 0000000..05439b1
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaLexer.java
@@ -0,0 +1,782 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gmcscfa;/* The following code was generated by JFlex 1.4.3 on 9/10/14 9:36 AM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/10/14 9:36 AM from the specification file
+ * <tt>gmcscfa.flex</tt>
+ */
+public class GMCSCFaLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int ITER2 = 6;
+  public static final int DASH = 10;
+  public static final int INTVALUE = 12;
+  public static final int SCF1 = 2;
+  public static final int IGNOREALL = 24;
+  public static final int ITER = 4;
+  public static final int YYINITIAL = 0;
+  public static final int ITER8 = 8;
+  public static final int ITER7 = 22;
+  public static final int ITER6 = 20;
+  public static final int ITER5 = 18;
+  public static final int FLOATVALUE = 14;
+  public static final int ITER4 = 16;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  1,  1,  6,  6, 
+     7,  7,  8,  8,  9,  9, 10, 10,  1, 1
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    11,  0,  0,  0,  0,  0,  0,  0, 19,  6,  0,  3,  0, 25,  4,  0, 
+     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  0,  0,  0,  0,  0, 
+     0, 13,  0, 23, 18,  9,  5, 16,  0,  7,  0,  0, 14, 21, 15, 12, 
+    24, 22, 10, 20,  8,  0, 26,  0,  0, 17,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\13\0\2\1\2\2\1\1\2\3\3\1\3\4\10\1"+
+    "\5\0\1\5\13\0\1\6\2\0\1\7\1\10\1\11"+
+    "\1\12\65\0\1\13\1\0\1\14\5\0\1\15\61\0"+
+    "\1\16";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[168];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\33\0\66\0\121\0\154\0\207\0\242\0\275"+
+    "\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u0129\0\u015f\0\u017a"+
+    "\0\u0129\0\u0195\0\u01b0\0\u01cb\0\u01e6\0\u0129\0\u0201\0\u021c"+
+    "\0\u0237\0\u0252\0\u026d\0\u0288\0\u02a3\0\u02be\0\u02d9\0\u02f4"+
+    "\0\u030f\0\u032a\0\u01b0\0\u0345\0\u0360\0\u0201\0\u037b\0\u0237"+
+    "\0\u0396\0\u026d\0\u03b1\0\u02a3\0\u03cc\0\u02d9\0\u03e7\0\u0402"+
+    "\0\u041d\0\u0345\0\u0438\0\u0453\0\u0396\0\u03b1\0\u03cc\0\u03e7"+
+    "\0\u046e\0\u0489\0\u04a4\0\u04bf\0\u04da\0\u04f5\0\u0510\0\u052b"+
+    "\0\u0546\0\u0561\0\u057c\0\u0597\0\u05b2\0\u05cd\0\u05e8\0\u0603"+
+    "\0\u061e\0\u0639\0\u0654\0\u066f\0\u068a\0\u06a5\0\u06c0\0\u06db"+
+    "\0\u06f6\0\u0711\0\u072c\0\u0747\0\u0762\0\u077d\0\u0798\0\u07b3"+
+    "\0\u07ce\0\u07e9\0\u0804\0\u081f\0\u083a\0\u0855\0\u0870\0\u088b"+
+    "\0\u08a6\0\u08c1\0\u08dc\0\u08f7\0\u0912\0\u092d\0\u0948\0\u0963"+
+    "\0\u097e\0\u0999\0\u09b4\0\u09cf\0\u09ea\0\u0129\0\u0a05\0\u0129"+
+    "\0\u0a20\0\u0a3b\0\u0a56\0\u0a71\0\u0a8c\0\u0129\0\u0aa7\0\u0ac2"+
+    "\0\u0add\0\u0af8\0\u0b13\0\u0b2e\0\u0b49\0\u0b64\0\u0b7f\0\u0b9a"+
+    "\0\u0bb5\0\u0bd0\0\u0beb\0\u0c06\0\u0c21\0\u0c3c\0\u0c57\0\u0c72"+
+    "\0\u0c8d\0\u0ca8\0\u0cc3\0\u0cde\0\u0cf9\0\u0d14\0\u0d2f\0\u0d4a"+
+    "\0\u0d65\0\u0d80\0\u0d9b\0\u0db6\0\u0dd1\0\u0dec\0\u0e07\0\u0e22"+
+    "\0\u0e3d\0\u0e58\0\u0e73\0\u0e8e\0\u0ea9\0\u0ec4\0\u0edf\0\u0efa"+
+    "\0\u0f15\0\u0f30\0\u0f4b\0\u0f66\0\u0f81\0\u0f9c\0\u0fb7\0\u0129";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[168];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\7\14\1\15\57\14\1\16\1\17\26\14\1\20\2\14"+
+    "\1\21\1\22\31\14\2\23\1\24\25\14\1\24\17\14"+
+    "\1\25\14\14\1\26\3\27\25\26\1\30\1\26\1\14"+
+    "\2\31\1\32\25\14\1\32\2\14\2\33\1\34\25\14"+
+    "\1\34\2\14\2\35\1\36\25\14\1\36\2\14\2\37"+
+    "\1\40\25\14\1\40\1\14\43\0\1\41\23\0\2\17"+
+    "\61\0\1\42\2\0\2\22\31\0\2\43\1\0\1\44"+
+    "\27\0\2\43\45\0\1\45\16\0\2\46\31\0\2\46"+
+    "\26\0\1\47\2\0\2\50\1\0\1\51\27\0\2\50"+
+    "\31\0\2\52\1\0\1\53\27\0\2\52\31\0\2\54"+
+    "\1\0\1\55\27\0\2\54\31\0\2\56\1\0\1\57"+
+    "\27\0\2\56\41\0\1\60\52\0\1\61\2\0\2\62"+
+    "\50\0\1\63\43\0\1\64\2\0\2\65\31\0\2\66"+
+    "\31\0\2\67\31\0\2\70\42\0\1\71\51\0\1\72"+
+    "\13\0\1\73\51\0\1\74\14\0\1\75\50\0\1\76"+
+    "\16\0\1\77\46\0\1\100\14\0\1\101\50\0\1\102"+
+    "\20\0\1\103\44\0\1\104\14\0\1\105\50\0\1\106"+
+    "\21\0\1\107\43\0\1\110\14\0\1\111\50\0\1\112"+
+    "\10\0\1\113\54\0\1\114\14\0\1\115\50\0\1\116"+
+    "\16\0\1\117\46\0\1\120\11\0\1\121\53\0\1\122"+
+    "\20\0\1\123\44\0\1\124\15\0\1\125\47\0\1\126"+
+    "\14\0\1\127\50\0\1\130\11\0\1\131\53\0\1\132"+
+    "\30\0\1\133\34\0\1\134\16\0\1\135\46\0\1\136"+
+    "\15\0\1\137\47\0\1\140\17\0\1\141\45\0\1\142"+
+    "\20\0\1\143\44\0\1\144\14\0\1\145\50\0\1\146"+
+    "\33\0\1\147\31\0\1\150\12\0\1\151\52\0\1\152"+
+    "\12\0\1\153\52\0\1\154\20\0\1\155\44\0\1\156"+
+    "\13\0\1\157\51\0\1\160\12\0\1\161\41\0\1\162"+
+    "\24\0\1\163\31\0\1\164\41\0\1\165\34\0\1\166"+
+    "\31\0\1\167\24\0\1\170\32\0\1\171\32\0\1\172"+
+    "\32\0\1\173\32\0\1\174\32\0\1\175\32\0\1\176"+
+    "\32\0\1\177\41\0\1\200\21\0\1\201\37\0\1\202"+
+    "\37\0\1\203\20\0\1\204\27\0\1\205\37\0\1\206"+
+    "\32\0\1\207\32\0\1\210\32\0\1\211\35\0\1\212"+
+    "\31\0\1\213\35\0\1\214\16\0\1\215\43\0\1\216"+
+    "\41\0\1\217\27\0\1\220\36\0\1\221\32\0\1\222"+
+    "\11\0\1\223\41\0\1\224\32\0\1\225\43\0\1\226"+
+    "\34\0\1\227\33\0\1\230\25\0\1\231\15\0\1\232"+
+    "\40\0\1\233\32\0\1\234\44\0\1\235\14\0\1\236"+
+    "\52\0\1\237\12\0\1\240\33\0\1\241\35\0\1\242"+
+    "\32\0\1\243\32\0\1\244\41\0\1\245\25\0\1\246"+
+    "\42\0\1\247\35\0\1\250\2\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[4050];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\13\0\1\11\1\1\1\11\2\1\1\11\4\1\1\11"+
+    "\12\1\5\0\1\1\13\0\1\1\2\0\4\1\65\0"+
+    "\1\11\1\0\1\11\5\0\1\11\61\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[168];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public GMCSCFaLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public GMCSCFaLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 4: 
+          { if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found new line");
+          }
+        case 15: break;
+        case 7: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GMCSCFaSym.ENERGY, new Float(yytext()));
+          }
+        case 16: break;
+        case 10: 
+          { if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float3");
+     yybegin(ITER2);
+      return new Symbol(GMCSCFaSym.FLOAT3);
+          }
+        case 17: break;
+        case 9: 
+          { if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GMCSCFaSym.FLOAT2);
+          }
+        case 18: break;
+        case 12: 
+          { yybegin(DASH);
+          }
+        case 19: break;
+        case 8: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GMCSCFaSym.FLOAT1);
+          }
+        case 20: break;
+        case 5: 
+          { if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float value");
+  yybegin(ITER);
+          }
+        case 21: break;
+        case 13: 
+          { yybegin(IGNOREALL);
+  return new Symbol(GMCSCFaSym.SCFDONE);
+          }
+        case 22: break;
+        case 11: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the dash");
+               yybegin(DASH);
+          }
+        case 23: break;
+        case 6: 
+          { if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float4");
+     yybegin(ITER);
+      return new Symbol(GMCSCFaSym.FLOAT4);
+          }
+        case 24: break;
+        case 2: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+   return new Symbol(GMCSCFaSym.INTCycle, new Integer(yytext()));
+          }
+        case 25: break;
+        case 14: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found START OF");
+	   yybegin(ITER);
+	   return new Symbol(GMCSCFaSym.FOUNDITER);
+          }
+        case 26: break;
+        case 1: 
+          { 
+          }
+        case 27: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER8); 
+      return new Symbol(GMCSCFaSym.INT1, new Integer(yytext()));
+          }
+        case 28: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(GMCSCFaSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = GMCSCFaSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java GMCSCFaLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        GMCSCFaLexer scanner = null;
+        try {
+          scanner = new GMCSCFaLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaSym.java
new file mode 100644
index 0000000..bfdd7d9
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GMCSCFaSym.java
@@ -0,0 +1,45 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gmcscfa;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Sep 10 09:37:06 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class GMCSCFaSym {
+  /* terminals */
+  public static final int INTCycle = 7;
+  public static final int ENERGY = 12;
+  public static final int EOF = 0;
+  public static final int INT3 = 6;
+  public static final int INT2 = 5;
+  public static final int INT1 = 4;
+  public static final int error = 1;
+  public static final int FLOAT4 = 13;
+  public static final int FLOAT3 = 11;
+  public static final int FLOAT2 = 10;
+  public static final int SCFDONE = 3;
+  public static final int FLOAT1 = 9;
+  public static final int FOUNDITER = 2;
+  public static final int FLOAT = 8;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GmcscfaParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GmcscfaParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GmcscfaParser.java
new file mode 100644
index 0000000..7fc4800
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/gmcscfa/GmcscfaParser.java
@@ -0,0 +1,336 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.gmcscfa;
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class GmcscfaParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public GmcscfaParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public GmcscfaParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public GmcscfaParser(final FileReader fileReader) {
+        super(new GMCSCFaLexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\010\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\010\002" +
+                    "\000\002\006\012\000\002\007\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\022\000\004\004\005\001\002\000\004\011\012\001" +
+                    "\002\000\004\011\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\023\011\012\001" +
+                    "\002\000\006\005\ufffd\011\ufffd\001\002\000\004\016\ufffc" +
+                    "\001\002\000\004\016\015\001\002\000\004\013\016\001" +
+                    "\002\000\004\013\ufffa\001\002\000\004\014\017\001\002" +
+                    "\000\004\015\020\001\002\000\004\006\021\001\002\000" +
+                    "\004\017\022\001\002\000\006\005\ufffb\011\ufffb\001\002" +
+                    "\000\004\002\001\001\002\000\006\005\ufffe\011\ufffe\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\022\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\010\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\023\001\001\000\002\001" +
+                    "\001\000\004\010\012\001\001\000\004\007\013\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //energy, iteration
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+   @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int energy=0;
+        int iteration=0;
+        for (int i=0;i<result.size();i++){
+            String singleResult=result.get(i);
+            String[] temp= singleResult.split(" ");
+            if(temp.length>1){
+                String keyElement=temp[0];
+                String dataEelement=temp[1];
+                if(keyElement.equals("ENERGY")){
+                    results.put("GmcscfaParser_ENERGY_"+energy,dataEelement);
+                    energy++;
+                }else if (keyElement.equals("ITERATION")){
+                    results.put("GmcscfaParser_ITERATION_"+iteration,dataEelement);
+                    iteration++;
+                }
+            }
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+
+  private final GmcscfaParser GmcscfaParser;
+
+  /** Constructor */
+  CUP$parser$actions(GmcscfaParser GmcscfaParser) {
+    this.GmcscfaParser = GmcscfaParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // en ::= ENERGY 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e);
+   GmcscfaParser.addToResult("ENERGY "+e);
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*en*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= INTCycle NT$0 en FLOAT1 FLOAT2 FLOAT3 INT1 FLOAT4 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+    GmcscfaParser.addToResult("ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+


[15/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cLexer.java
new file mode 100644
index 0000000..6352651
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cLexer.java
@@ -0,0 +1,682 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5c;/* The following code was generated by JFlex 1.4.3 on 9/14/14 12:10 PM */
+
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/14/14 12:10 PM from the specification file
+ * <tt>mp2to5c.flex</tt>
+ */
+public class MP2to5cLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 4;
+  public static final int FLOATVAL = 2;
+  public static final int YYINITIAL = 0;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  2,  3,  0, 
+     1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0, 19,  9,  4,  6,  0,  0, 17,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0, 15,  0,  0, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0, 13,  4, 12,  0, 21,  0, 10,  0,  0,  8, 16, 18, 20, 
+     0,  0, 11,  0, 14,  7,  0,  0,  0, 22,  0,  0,  5,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\10\1\7\0\1\2\14\0\1\2\7\0\1\3"+
+    "\1\4\7\0\1\5\1\6";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[50];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\30\0\60\0\110\0\140\0\170\0\220\0\250"+
+    "\0\300\0\330\0\360\0\u0108\0\u0120\0\u0138\0\u0150\0\u0168"+
+    "\0\u0180\0\330\0\u0198\0\u01b0\0\u01c8\0\u01e0\0\u01f8\0\u0210"+
+    "\0\u0228\0\u0240\0\u0258\0\u0270\0\u0288\0\u02a0\0\u02b8\0\u02d0"+
+    "\0\u02d0\0\u02e8\0\u0300\0\u0318\0\u0330\0\u0348\0\u0360\0\110"+
+    "\0\110\0\u0378\0\u0390\0\u03a8\0\u03c0\0\u03d8\0\u03f0\0\u0408"+
+    "\0\110\0\110";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[50];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\6\4\1\5\2\4\1\6\5\4\1\7\1\4\1\10"+
+    "\5\4\1\11\1\4\1\12\1\13\2\4\1\13\52\4"+
+    "\37\0\1\14\32\0\1\15\31\0\1\16\1\0\1\17"+
+    "\33\0\1\20\21\0\1\21\14\0\1\22\1\0\1\23"+
+    "\25\0\1\22\36\0\1\24\32\0\1\25\34\0\1\26"+
+    "\21\0\1\27\40\0\1\30\17\0\1\31\15\0\1\23"+
+    "\2\0\2\32\3\0\1\32\2\0\1\32\23\0\1\33"+
+    "\33\0\1\34\25\0\1\33\37\0\1\35\31\0\1\36"+
+    "\31\0\1\37\2\0\1\40\1\41\2\0\1\41\33\0"+
+    "\1\42\33\0\1\43\37\0\1\44\15\0\1\45\33\0"+
+    "\1\46\11\0\1\40\40\0\1\47\33\0\1\50\37\0"+
+    "\1\51\15\0\1\50\31\0\1\52\24\0\1\53\26\0"+
+    "\1\54\31\0\1\55\35\0\1\56\22\0\1\57\37\0"+
+    "\1\60\20\0\1\61\37\0\1\62\1\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1056];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\7\1\7\0\1\1\14\0\1\1\7\0"+
+    "\2\11\7\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[50];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MP2to5cLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MP2to5cLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 5: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5cSym.ALGOPT, yytext());
+          }
+        case 7: break;
+        case 3: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5cSym.ALGOPT, yytext());
+          }
+        case 8: break;
+        case 6: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5cSym.MP2OPT, yytext());
+          }
+        case 9: break;
+        case 4: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5cSym.MP2OPT, yytext());
+          }
+        case 10: break;
+        case 2: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5cSym.FLOAT, yytext());
+          }
+        case 11: break;
+        case 1: 
+          { 
+          }
+        case 12: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(MP2to5cSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = MP2to5cSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MP2to5cLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MP2to5cLexer scanner = null;
+        try {
+          scanner = new MP2to5cLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cParser.java
new file mode 100644
index 0000000..d600983
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cParser.java
@@ -0,0 +1,263 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5c;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class MP2to5cParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public MP2to5cParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MP2to5cParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MP2to5cParser(final FileReader fileReader) {
+        super(new MP2to5cLexer(fileReader));
+    }
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\005\000\002\003\004\000\002\002\004\000\002\003" +
+                    "\003\000\002\004\003\000\002\004\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\021\004\022\005\001\002\000\010\002" +
+                    "\ufffe\021\ufffe\022\ufffe\001\002\000\010\002\ufffd\021\ufffd" +
+                    "\022\ufffd\001\002\000\010\002\uffff\021\uffff\022\uffff\001" +
+                    "\002\000\010\002\011\021\004\022\005\001\002\000\010" +
+                    "\002\001\021\001\022\001\001\002\000\004\002\000\001" +
+                    "\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\007\000\006\003\006\004\005\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\004\004\007" +
+                    "\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //mp2SpecificOption and algorithmOption
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int specificOptionCount=0;
+        int algorithmOPtionCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString= result.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("SpecificOption")){
+                    results.put("MP2to5cParser_MP2_Specific_Option_"+specificOptionCount,dataString);
+                    specificOptionCount++;
+                }else if(keyString.equalsIgnoreCase("AlgorithmOption")){
+                    results.put("MP2to5cParser_MP2_Algorithm_Option_"+algorithmOPtionCount,dataString);
+                    algorithmOPtionCount++;
+                }
+            }
+
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+  /** User initialization code. */
+  public void user_init() throws java.lang.Exception
+    {
+ if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  entry");
+    }
+
+
+
+    ///public static boolean DEBUG = false;
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+  private final MP2to5cParser MP2to5cParser;
+
+  /** Constructor */
+  CUP$parser$actions(MP2to5cParser MP2to5cParser) {
+    this.MP2to5cParser = MP2to5cParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // element ::= MP2OPT 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  MP2-Specific Option: "+s);
+         MP2to5cParser.addToResult("SpecificOption "+s);
+	   //ParseMP2to5.put("MP2-Specific Option: ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // element ::= ALGOPT 
+            {
+              Object RESULT = null;
+		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  Algorithm Option:  "+s);
+         MP2to5cParser.addToResult("AlgorithmOption "+s);
+	   //ParseMP2to5.put("Algorithm Option:  ", s);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // startpt ::= element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= startpt element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cSym.java
new file mode 100644
index 0000000..8f947ef
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5c/MP2to5cSym.java
@@ -0,0 +1,51 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5c;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Sep 14 12:10:10 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MP2to5cSym {
+  /* terminals */
+  public static final int E4_SDTQ = 8;
+  public static final int MP2OPT = 16;
+  public static final int LIM = 18;
+  public static final int UMP4_SDQ = 11;
+  public static final int UMP4_SDTQ = 12;
+  public static final int E4_DQ = 6;
+  public static final int FCOPT = 13;
+  public static final int UMP4_DQ = 10;
+  public static final int E4_SDQ = 7;
+  public static final int E3 = 5;
+  public static final int E2 = 2;
+  public static final int FLOAT = 19;
+  public static final int EOF = 0;
+  public static final int error = 1;
+  public static final int MP4_T = 4;
+  public static final int FCOPT2 = 14;
+  public static final int ALGOPT = 15;
+  public static final int VAR = 17;
+  public static final int EUMP3 = 9;
+  public static final int EUMP2 = 3;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dLexer.java
new file mode 100644
index 0000000..cf9d2f6
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dLexer.java
@@ -0,0 +1,737 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5d;/* The following code was generated by JFlex 1.4.3 on 9/14/14 12:22 PM */
+
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/14/14 12:22 PM from the specification file
+ * <tt>mp2to5d.flex</tt>
+ */
+public class MP2to5dLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 4;
+  public static final int FLOATVAL = 2;
+  public static final int YYINITIAL = 0;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2, 2
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  6,  7,  0,  2,  0,  2,  3,  0, 
+     1,  1,  9, 14, 15,  1,  1,  1,  1,  1,  0,  0,  0, 10,  0,  0, 
+     0,  0,  0,  0, 17,  8,  0,  0,  0,  0,  0,  0,  0, 12,  0,  0, 
+    13, 18,  0, 19, 16, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  4,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\3\0\6\1\7\0\1\2\1\3\1\0\1\4\11\0"+
+    "\1\2\7\0\1\5\1\6\6\0\1\7\4\0\1\10"+
+    "\1\0\1\11\3\0\1\12\1\13\3\0\1\14\1\15";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[63];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\24\0\50\0\74\0\120\0\144\0\170\0\214"+
+    "\0\240\0\264\0\310\0\334\0\360\0\u0104\0\u0118\0\214"+
+    "\0\u012c\0\74\0\u0140\0\74\0\u0154\0\u0168\0\u017c\0\u0190"+
+    "\0\u01a4\0\u01b8\0\u01cc\0\u01e0\0\u01f4\0\u0208\0\u0208\0\u021c"+
+    "\0\u0230\0\u0244\0\u0258\0\u026c\0\u0280\0\74\0\74\0\u0294"+
+    "\0\u02a8\0\u02bc\0\u02d0\0\u02e4\0\u02f8\0\74\0\u030c\0\u0320"+
+    "\0\u0334\0\u0348\0\74\0\u035c\0\74\0\u0370\0\u0384\0\u0398"+
+    "\0\74\0\74\0\u03ac\0\u03c0\0\u03d4\0\74\0\74";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[63];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\10\4\1\5\2\4\1\6\1\7\10\4\1\10\1\11"+
+    "\2\4\1\11\3\4\1\10\4\4\2\10\30\4\35\0"+
+    "\1\12\1\0\1\13\2\0\1\14\1\15\20\0\1\16"+
+    "\24\0\1\17\7\0\1\20\1\0\1\21\5\0\1\20"+
+    "\4\0\2\20\5\0\1\20\7\0\1\20\4\0\2\20"+
+    "\16\0\1\22\25\0\1\23\21\0\1\24\17\0\1\25"+
+    "\32\0\1\26\25\0\1\27\5\0\1\21\2\0\2\30"+
+    "\2\0\1\30\1\21\4\0\2\21\1\0\1\30\17\0"+
+    "\1\31\27\0\1\32\1\0\1\33\17\0\1\34\12\0"+
+    "\1\35\16\0\1\36\1\37\2\0\1\37\3\0\1\36"+
+    "\4\0\2\36\15\0\1\40\4\0\1\41\27\0\1\42"+
+    "\22\0\1\43\10\0\1\44\35\0\1\45\4\0\1\36"+
+    "\7\0\1\36\4\0\2\36\16\0\1\46\23\0\1\47"+
+    "\20\0\1\50\34\0\1\51\1\0\1\52\22\0\1\53"+
+    "\1\0\1\54\7\0\1\55\26\0\1\56\33\0\1\57"+
+    "\10\0\1\60\36\0\1\61\22\0\1\62\14\0\1\63"+
+    "\20\0\1\64\26\0\1\65\20\0\1\66\34\0\1\67"+
+    "\1\0\1\70\13\0\1\71\23\0\1\72\33\0\1\73"+
+    "\10\0\1\74\23\0\1\75\26\0\1\76\23\0\1\77"+
+    "\11\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1000];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\3\0\1\11\5\1\7\0\1\1\1\11\1\0\1\11"+
+    "\11\0\1\1\7\0\2\11\6\0\1\11\4\0\1\11"+
+    "\1\0\1\11\3\0\2\11\3\0\2\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[63];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MP2to5dLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MP2to5dLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 7: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     yybegin(FLOATVAL); 
+	     return new Symbol(MP2to5dSym.E4_DQ);
+          }
+        case 14: break;
+        case 13: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		 yybegin(FLOATVAL); 
+		 return new Symbol(MP2to5dSym.UMP4_SDTQ);
+          }
+        case 15: break;
+        case 3: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 yybegin(FLOATVAL); 
+	 return new Symbol(MP2to5dSym.E2);
+          }
+        case 16: break;
+        case 10: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       yybegin(FLOATVAL); 
+	       return new Symbol(MP2to5dSym.E4_SDTQ);
+          }
+        case 17: break;
+        case 5: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    yybegin(FLOATVAL); 
+	    return new Symbol(MP2to5dSym.EUMP2);
+          }
+        case 18: break;
+        case 12: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		yybegin(FLOATVAL); 
+		return new Symbol(MP2to5dSym.UMP4_SDQ);
+          }
+        case 19: break;
+        case 8: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     yybegin(FLOATVAL); 
+	     return new Symbol(MP2to5dSym.MP4_T);
+          }
+        case 20: break;
+        case 4: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 yybegin(FLOATVAL); 
+	 return new Symbol(MP2to5dSym.E3);
+          }
+        case 21: break;
+        case 2: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5dSym.FLOAT, yytext());
+          }
+        case 22: break;
+        case 9: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	      yybegin(FLOATVAL); 
+	      return new Symbol(MP2to5dSym.E4_SDQ);
+          }
+        case 23: break;
+        case 6: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    yybegin(FLOATVAL); 
+	    return new Symbol(MP2to5dSym.EUMP3);
+          }
+        case 24: break;
+        case 11: 
+          { if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       yybegin(FLOATVAL); 
+	       return new Symbol(MP2to5dSym.UMP4_DQ);
+          }
+        case 25: break;
+        case 1: 
+          { 
+          }
+        case 26: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(MP2to5dSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = MP2to5dSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MP2to5dLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MP2to5dLexer scanner = null;
+        try {
+          scanner = new MP2to5dLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dParser.java
new file mode 100644
index 0000000..36bc9fa
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dParser.java
@@ -0,0 +1,460 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5d;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class MP2to5dParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public MP2to5dParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MP2to5dParser(java_cup.runtime.Scanner s) {super(s);}
+
+  /** Constructor which uses the file reader */
+    public MP2to5dParser(final FileReader fileReader){super(new MP2to5dLexer(fileReader));}
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\016\000\002\003\004\000\002\002\004\000\002\003" +
+                    "\003\000\002\004\004\000\002\004\004\000\002\004\004" +
+                    "\000\002\004\004\000\002\004\004\000\002\004\004\000" +
+                    "\002\004\004\000\002\004\004\000\002\004\004\000\002" +
+                    "\004\004\000\002\004\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\033\000\030\004\017\005\014\006\004\007\016\010" +
+                    "\020\011\013\012\011\013\012\014\015\015\010\016\006" +
+                    "\001\002\000\004\025\035\001\002\000\032\002\034\004" +
+                    "\017\005\014\006\004\007\016\010\020\011\013\012\011" +
+                    "\013\012\014\015\015\010\016\006\001\002\000\004\025" +
+                    "\032\001\002\000\032\002\uffff\004\uffff\005\uffff\006\uffff" +
+                    "\007\uffff\010\uffff\011\uffff\012\uffff\013\uffff\014\uffff\015" +
+                    "\uffff\016\uffff\001\002\000\004\025\031\001\002\000\004" +
+                    "\025\030\001\002\000\004\025\027\001\002\000\004\025" +
+                    "\026\001\002\000\004\025\025\001\002\000\004\025\024" +
+                    "\001\002\000\004\025\023\001\002\000\004\025\022\001" +
+                    "\002\000\004\025\021\001\002\000\032\002\ufffa\004\ufffa" +
+                    "\005\ufffa\006\ufffa\007\ufffa\010\ufffa\011\ufffa\012\ufffa\013" +
+                    "\ufffa\014\ufffa\015\ufffa\016\ufffa\001\002\000\032\002\ufffe" +
+                    "\004\ufffe\005\ufffe\006\ufffe\007\ufffe\010\ufffe\011\ufffe\012" +
+                    "\ufffe\013\ufffe\014\ufffe\015\ufffe\016\ufffe\001\002\000\032" +
+                    "\002\ufffb\004\ufffb\005\ufffb\006\ufffb\007\ufffb\010\ufffb\011" +
+                    "\ufffb\012\ufffb\013\ufffb\014\ufffb\015\ufffb\016\ufffb\001\002" +
+                    "\000\032\002\ufff6\004\ufff6\005\ufff6\006\ufff6\007\ufff6\010" +
+                    "\ufff6\011\ufff6\012\ufff6\013\ufff6\014\ufff6\015\ufff6\016\ufff6" +
+                    "\001\002\000\032\002\ufffd\004\ufffd\005\ufffd\006\ufffd\007" +
+                    "\ufffd\010\ufffd\011\ufffd\012\ufffd\013\ufffd\014\ufffd\015\ufffd" +
+                    "\016\ufffd\001\002\000\032\002\ufff9\004\ufff9\005\ufff9\006" +
+                    "\ufff9\007\ufff9\010\ufff9\011\ufff9\012\ufff9\013\ufff9\014\ufff9" +
+                    "\015\ufff9\016\ufff9\001\002\000\032\002\ufff7\004\ufff7\005" +
+                    "\ufff7\006\ufff7\007\ufff7\010\ufff7\011\ufff7\012\ufff7\013\ufff7" +
+                    "\014\ufff7\015\ufff7\016\ufff7\001\002\000\032\002\ufff8\004" +
+                    "\ufff8\005\ufff8\006\ufff8\007\ufff8\010\ufff8\011\ufff8\012\ufff8" +
+                    "\013\ufff8\014\ufff8\015\ufff8\016\ufff8\001\002\000\032\002" +
+                    "\ufff5\004\ufff5\005\ufff5\006\ufff5\007\ufff5\010\ufff5\011\ufff5" +
+                    "\012\ufff5\013\ufff5\014\ufff5\015\ufff5\016\ufff5\001\002\000" +
+                    "\032\002\ufff4\004\ufff4\005\ufff4\006\ufff4\007\ufff4\010\ufff4" +
+                    "\011\ufff4\012\ufff4\013\ufff4\014\ufff4\015\ufff4\016\ufff4\001" +
+                    "\002\000\032\002\001\004\001\005\001\006\001\007\001" +
+                    "\010\001\011\001\012\001\013\001\014\001\015\001\016" +
+                    "\001\001\002\000\004\002\000\001\002\000\032\002\ufffc" +
+                    "\004\ufffc\005\ufffc\006\ufffc\007\ufffc\010\ufffc\011\ufffc\012" +
+                    "\ufffc\013\ufffc\014\ufffc\015\ufffc\016\ufffc\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\033\000\006\003\004\004\006\001\001\000\002\001" +
+                    "\001\000\004\004\032\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+
+
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        HashMap<String, String> results= new HashMap<String,String>();
+        parse();
+        int j=0,k=0,a=0,b=0,c=0,d=0,f=0, m=0, n=0 , p=0, q=0;
+        for(int i=0;i<result.size();i++){
+            String singleResult=result.get(i);
+            String[] temp = singleResult.split(" ");
+            String secondElement=temp[2];
+            if(temp.length>6){
+                String fourthElement=temp [4];
+                if (fourthElement.equalsIgnoreCase("UMP4(SDTQ)")) {
+                    results.put("MP2to5d_UMP4(SDTQ)_" + k, temp[5]);
+                    k++;
+                }else if (fourthElement.equalsIgnoreCase("UMP4(SDQ)")) {
+                    results.put("MP2to5d_UMP4(SDQ)_" + a, temp[5]);
+                    a++;
+                }else if(fourthElement.equalsIgnoreCase("UMP4(DQ)")) {
+                    results.put("MP2to5d_UMP4(DQ)_" + b, temp[5]);
+                    b++;
+                }else if(fourthElement.equalsIgnoreCase("EUMP3")) {
+                    results.put("MP2to5d_EUMP3_" + c, temp[5]);
+                    c++;
+                }else if (fourthElement.equalsIgnoreCase("EUMP2")) {
+                    results.put("MP2to5d_EUMP2_" + q, temp[5]);
+                    q++;
+                }
+
+            }
+
+            if(secondElement.equalsIgnoreCase("E2")) {
+                results.put("MP2to5d_E2_" + j, temp[3]);
+                j++;
+            }else  if(secondElement.equalsIgnoreCase("E4(SDTQ)")) {
+                results.put("MP2to5d_E4(SDTQ)_" + d, temp[3]);
+                d++;
+            }else if (secondElement.equalsIgnoreCase("E4(SDQ)")) {
+                results.put("MP2to5d_E4(SDQ)_" + f, temp[3]);
+                f++;
+            }else if (secondElement.equalsIgnoreCase("E4(DQ)")) {
+                results.put("MP2to5d_E4(DQ)_" + m, temp[3]);
+                m++;
+            }else if (secondElement.equalsIgnoreCase("E3")) {
+                results.put("MP2to5d_E3_" + n, temp[3]);
+                n++;
+            }else if (secondElement.equalsIgnoreCase("MP4(T)")) {
+                results.put("MP2to5d_MP4(T)_" + p, temp[3]);
+                p++;
+
+            }else{
+                continue;
+            }
+        }
+
+        return results;
+    }
+
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+  /** User initialization code. */
+  public void user_init() throws java.lang.Exception
+    {
+ if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  entry");
+    }
+
+
+
+    ///public static boolean DEBUG = false;
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+  private final MP2to5dParser MP2to5dParser;
+
+  /** Constructor */
+  CUP$parser$actions(MP2to5dParser MP2to5dParser) {
+    this.MP2to5dParser = MP2to5dParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // element ::= UMP4_SDTQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(SDTQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP4 correction UMP4(SDTQ) "+f);
+           //ParseMP2to5.put("MP4 correction UMP4(SDTQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // element ::= UMP4_SDQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(SDQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP4 correction UMP4(SDQ) "+f);
+           //ParseMP2to5.put("MP4 correction UMP4(SDQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // element ::= UMP4_DQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(DQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP4 correction UMP4(DQ) "+f);
+	  // ParseMP2to5.put("MP4 correction UMP4(DQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // element ::= EUMP3 FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP3 correction EUMP3"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP3 correction EUMP3 "+f);
+	   //ParseMP2to5.put("MP3 correction EUMP3", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // element ::= E4_SDTQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(SDTQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  E4(SDTQ) "+f);
+	   //ParseMP2to5.put("E4(SDTQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // element ::= E4_SDQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(SDQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  E4(SDQ) "+f);
+	  // ParseMP2to5.put("E4(SDQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // element ::= E4_DQ FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(DQ)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  E4(DQ) "+f);
+	   //ParseMP2to5.put("E4(DQ)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // element ::= E3 FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E3 "+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  E3 "+f);
+	   //ParseMP2to5.put("E3", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // element ::= MP4_T FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4(T)"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP4(T) "+f);
+	   //ParseMP2to5.put("MP4(T)", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // element ::= EUMP2 FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP2 energy EUMP2"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  MP2 energy EUMP2 "+f);
+          // ParseMP2to5.put("MP2 energy EUMP2", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // element ::= E2 FLOAT 
+            {
+              Object RESULT = null;
+		int fleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int fright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String f = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E2"+f);
+         MP2to5dParser.addToResult("CUP:mp2to5d:  E2 "+f);
+          // ParseMP2to5.put("E2", f);
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // startpt ::= element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= startpt element 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dSym.java
new file mode 100644
index 0000000..6167ede
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mp2to5d/MP2to5dSym.java
@@ -0,0 +1,51 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mp2to5d;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Sun Sep 14 12:22:07 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MP2to5dSym {
+  /* terminals */
+  public static final int E4_SDTQ = 8;
+  public static final int MP2OPT = 16;
+  public static final int LIM = 18;
+  public static final int UMP4_SDQ = 11;
+  public static final int UMP4_SDTQ = 12;
+  public static final int E4_DQ = 6;
+  public static final int FCOPT = 13;
+  public static final int UMP4_DQ = 10;
+  public static final int E4_SDQ = 7;
+  public static final int E3 = 5;
+  public static final int E2 = 2;
+  public static final int FLOAT = 19;
+  public static final int EOF = 0;
+  public static final int error = 1;
+  public static final int MP4_T = 4;
+  public static final int FCOPT2 = 14;
+  public static final int ALGOPT = 15;
+  public static final int VAR = 17;
+  public static final int EUMP3 = 9;
+  public static final int EUMP2 = 3;
+}
+


[11/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParser.java
----------------------------------------------------------------------
diff --git a/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParser.java b/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParser.java
new file mode 100644
index 0000000..2dbbdd5
--- /dev/null
+++ b/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParser.java
@@ -0,0 +1,114 @@
+package org.apache.airavata.datacat.regexParser;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.parsers.DefaultParser;
+import org.apache.airavata.datacat.parsers.IParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexParser extends DefaultParser implements IParser {
+    private static Logger log = LoggerFactory.getLogger(RegexParser.class);
+    private Map<String, String> regexMap;
+
+    /**
+     * parses a file using the provided regular expression
+     * @param file
+     * @param regex
+     * @return (String) extracted value
+     * @throws IOException
+     */
+    public String parseRegex(String file, String regex) throws IOException {
+        String fileContent = readFile(file, null);
+        Pattern p = Pattern.compile(regex);
+        Matcher m = p.matcher(fileContent);
+
+        String result = "";
+        while (m.find() && m.find()) {
+
+            //return one value
+            if (m.groupCount() == 1)
+                result = m.group(1);
+
+            //allowing it to return a string of values
+            else if (m.groupCount() > 1)
+                for (int i = 0; i < m.groupCount(); i++)
+                    result = m.group(i) + "\t";
+            else
+                result = null;
+        }
+        return result;
+    }
+
+    /**
+     * Reads a file
+     * @param path
+     * @param encoding
+     * @return the file converted to a String
+     * @throws IOException
+     */
+    private String readFile(String path, Charset encoding)
+            throws IOException {
+        if (encoding == null) {
+            encoding = Charset.defaultCharset();
+        }
+        byte[] encoded = Files.readAllBytes(Paths.get(path));
+        return new String(encoded, encoding);
+    }
+
+    /**
+     * Parses the file
+     * @param outputMonitorMessage
+     * @return OutputMetadataDTO
+     */
+    @Override
+    public OutputMetadataDTO parse(OutputMonitorMessage outputMonitorMessage) {
+        OutputMetadataDTO outputMetadataDTO = super.parse(outputMonitorMessage);
+        HashMap<String, String> customMetadata = new HashMap<>();
+
+        //looking for the gaussian output files
+        String[] outPutFiles = (new File(outputMonitorMessage.getOutputPath())).list(new FilenameFilter() {
+            public boolean accept(File dir, String filename) {
+                return filename.endsWith(".out");
+            }
+        });
+        if (outPutFiles != null && outPutFiles.length > 0) {
+            String outFile = outputMonitorMessage.getOutputPath() + File.separator + outPutFiles[0];
+            String uniqueID = UUID.randomUUID().toString();
+
+            //parsing the file using regex
+            String result = "";
+
+            //reading the regexes provided in the properties file
+            regexMap = RegexParserProperties.getInstance().getRegexMap();
+            for (Map.Entry<String, String> entry : regexMap.entrySet()) {
+                try {
+                    result = parseRegex(outFile, entry.getValue());
+                    if (result == null || result.length() < 1)
+                        continue;
+                } catch (IOException e) {
+                    log.error("Error occured while parsing the regex " + e.toString());
+                }
+                customMetadata.put(entry.getKey(), result);
+            }
+        }
+        outputMetadataDTO.setCustomMetaData(customMetadata);
+
+        return outputMetadataDTO;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParserProperties.java
----------------------------------------------------------------------
diff --git a/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParserProperties.java b/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParserProperties.java
new file mode 100644
index 0000000..53d12ce
--- /dev/null
+++ b/datacat/regexParser/src/main/java/org/apache/airavata/datacat/regexParser/RegexParserProperties.java
@@ -0,0 +1,86 @@
+package org.apache.airavata.datacat.regexParser;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class RegexParserProperties {
+
+    //location of the properties file
+    public static final String REGEX_PARSER_PROPERTIES = "../conf/regexParser.properties";
+    public static final String DEFAULT_REGEX_PARSER_PROPERTIES = "regexParser.properties";
+
+    private static RegexParserProperties instance;
+
+    private final Logger logger = LogManager.getLogger(RegexParserProperties.class);
+    private Map<String, String> properties;
+    private Map<String, String> regexMap;
+
+    // the singleton method for the RegexParserConstructor
+    public static RegexParserProperties getInstance() {
+        if (instance == null) {
+            instance = new RegexParserProperties();
+        }
+        return instance;
+    }
+
+    private RegexParserProperties() {
+        try {
+            //resolute the correct property file
+            InputStream fileInput;
+            if (new File(REGEX_PARSER_PROPERTIES).exists()) {
+                fileInput = new FileInputStream(REGEX_PARSER_PROPERTIES);
+            } else {
+                fileInput = ClassLoader.getSystemResource(DEFAULT_REGEX_PARSER_PROPERTIES).openStream();
+            }
+            //load the properties file and extract the regular expressions as a Hashmap
+            this.properties = getProperties(fileInput);
+            fileInput.close();
+
+            //initialize the map of regular expressions
+            this.regexMap = new HashMap<String, String>();
+            try {
+                for (Map.Entry<String, String> entry : this.properties.entrySet()) {
+                    this.regexMap.put(entry.getKey(), entry.getValue());
+                }
+            } catch (Exception e) {
+                logger.error("Error occured while reading regexes from file " + e.getMessage());
+            }
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * This method reads an input stream, and returns the regular expressions as a Map
+     * @param fileInputStream
+     * @return Map of regular expressions with the provided tokens
+     * @throws IOException
+     */
+    private Map<String, String> getProperties(InputStream fileInputStream) throws IOException {
+        BufferedReader reader = new BufferedReader(new InputStreamReader(fileInputStream));
+        String line;
+        Map<String, String> result = new HashMap<String, String>();
+        while ((line = reader.readLine()) != null) {
+            if (line.trim().length() == 0 || line.startsWith("#"))
+                continue;
+
+            //extract the key value pairs of the property file
+            String key = line.replaceFirst("([^=]+)=(.*)", "$1");
+            String val = line.replaceFirst("([^=]+)=(.*)", "$2");
+            result.put(key, val);
+
+        }
+        reader.close();
+        return result;
+    }
+
+    public Map<String, String> getRegexMap() {
+        return regexMap;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/regexParser/src/main/resources/regexParser.properties
----------------------------------------------------------------------
diff --git a/datacat/regexParser/src/main/resources/regexParser.properties b/datacat/regexParser/src/main/resources/regexParser.properties
new file mode 100644
index 0000000..3464bf5
--- /dev/null
+++ b/datacat/regexParser/src/main/resources/regexParser.properties
@@ -0,0 +1,9 @@
+#here you can specify which details to extract by
+#<key_value>=<regex>
+#ex: RMS FORCE=RMS\s+Force\s+(\d*\.?\d*)
+
+RMS_Force = RMS\s+Force\s+(\d*\.?\d*)
+Maximum_Force = Maximum\s+Force\s+(\d*\.?\d*)
+Maximum_Displacement =  Maximum\s+Displacement\s+(\d*\.?\d*)
+RMS_Displacement  = RMS\s+Displacement\s+(\d*\.?\d*)
+Energy = Predicted\s+change\s+in\s+Energy=(.*)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/regexParser/src/test/java/org/apache/airavata/datacat/regexParser/RegexParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/regexParser/src/test/java/org/apache/airavata/datacat/regexParser/RegexParserTest.java b/datacat/regexParser/src/test/java/org/apache/airavata/datacat/regexParser/RegexParserTest.java
new file mode 100644
index 0000000..10d6c4d
--- /dev/null
+++ b/datacat/regexParser/src/test/java/org/apache/airavata/datacat/regexParser/RegexParserTest.java
@@ -0,0 +1,57 @@
+package org.apache.airavata.datacat.regexParser;
+
+import junit.framework.Assert;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class RegexParserTest {
+    private static Logger log = LoggerFactory.getLogger(RegexParserTest.class);
+
+    // Configure the output files here
+    private final static String FILEPATH = "/data-root/scnakandala/Gaussian/Regex_test_6IDontNeedaNode_1db684c9-8641-472a-8e85-0aaebc37d6ff/";
+    private final static String FILE = "/data-root/scnakandala/Gaussian/Regex_test_6IDontNeedaNode_1db684c9-8641-472a-8e85-0aaebc37d6ff/gaussian1.out";
+
+    private RegexParser regexParser;
+
+    @Before
+    public void setup() {
+        regexParser = new RegexParser();
+    }
+
+    /*
+     * This method tests the complete functionality of the regexParser
+     *
+     */
+    @Test
+    public void testParser() {
+        //create a dummy output monitor message
+        OutputMonitorMessage message = new OutputMonitorMessage();
+        message.setApplicationName("Gaussian");
+        message.setOutputPath(FILEPATH);
+        message.setExperimentID("Sachith");
+
+        //parse it to the parser
+        OutputMetadataDTO outputMetadataDTO = regexParser.parse(message);
+
+        System.out.println(String.valueOf(outputMetadataDTO.getCustomMetaData().entrySet()));
+        Assert.assertNotNull(outputMetadataDTO.getCustomMetaData().entrySet());
+
+    }
+
+    /*
+    * This method tests if the parseRegex Method works properly
+     */
+    @Test
+    public void testParseRegex() throws IOException {
+        String s = regexParser.parseRegex(FILE, "RMS\\s+Force\\s+(\\d*\\.?\\d*)");
+        log.debug(s);
+        Assert.assertNotNull(s);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/server/pom.xml b/datacat/server/pom.xml
new file mode 100644
index 0000000..fb22ffe
--- /dev/null
+++ b/datacat/server/pom.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>server</artifactId>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                    <compilerArgument>-Xlint:unchecked</compilerArgument>
+                    <optimize>true</optimize>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.airavata.datacat.server.DataCatServer</mainClass>
+                            <addClasspath>true</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <executions>
+                    <execution>
+                        <id>distribution-package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <!--These are needed for Jersey -->
+        <repository>
+            <id>maven2-repository.dev.java.net</id>
+            <name>Java.net Repository for Maven</name>
+            <url>http://download.java.net/maven/2/</url>
+            <layout>default</layout>
+        </repository>
+        <repository>
+            <id>maven-repository.dev.java.net</id>
+            <name>Java.net Maven 1 Repository (legacy)</name>
+            <url>http://download.java.net/maven/1</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.solr</groupId>
+            <artifactId>solr-solrj</artifactId>
+            <version>${solrj.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.3</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-framework</artifactId>
+            <version>2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0-m09</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-common</artifactId>
+            <version>2.0-m05-1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-server</artifactId>
+            <version>2.0-m05-1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.containers</groupId>
+            <artifactId>jersey-container-grizzly2-http</artifactId>
+            <version>2.0-m05-1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+            <version>${curator.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-x-discovery</artifactId>
+            <version>${curator.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+
+        <!--dependencies required for user api-->
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.authenticator.stub</artifactId>
+            <version>${carbon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.um.ws.api.stub</artifactId>
+            <version>${carbon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.um.ws.api</artifactId>
+            <version>${carbon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2.wso2</groupId>
+            <artifactId>axis2-client</artifactId>
+            <version>${axis2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.authenticator.stub</artifactId>
+            <version>4.0.0</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/assembly/bin-assembly.xml b/datacat/server/src/main/assembly/bin-assembly.xml
new file mode 100644
index 0000000..d916d35
--- /dev/null
+++ b/datacat/server/src/main/assembly/bin-assembly.xml
@@ -0,0 +1,77 @@
+<!--Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>bin</id>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>datacat-server</baseDirectory>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources/bin</directory>
+            <outputDirectory>bin</outputDirectory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>755</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/conf</directory>
+            <outputDirectory>conf</outputDirectory>
+            <includes>
+                <include>*.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/security</directory>
+            <outputDirectory>security</outputDirectory>
+            <includes>
+                <include>*.jks</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <outputDirectory>conf</outputDirectory>
+            <includes>
+                <include>log4j.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../solr-server</directory>
+            <outputDirectory>solr-server</outputDirectory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/lib</outputDirectory>
+            <includes>
+                <include>*:jar:*</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/DataCatServer.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/DataCatServer.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/DataCatServer.java
new file mode 100644
index 0000000..11483bd
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/DataCatServer.java
@@ -0,0 +1,203 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server;
+
+import org.apache.airavata.datacat.server.services.DataCatService;
+import org.apache.airavata.datacat.server.services.PublisherService;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.curator.x.discovery.ServiceDiscovery;
+import org.apache.curator.x.discovery.ServiceDiscoveryBuilder;
+import org.apache.curator.x.discovery.ServiceInstance;
+import org.apache.curator.x.discovery.UriSpec;
+import org.apache.curator.x.discovery.details.JsonInstanceSerializer;
+import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.grizzly.ssl.SSLContextConfigurator;
+import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.core.UriBuilder;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+
+public class DataCatServer {
+    private final static Logger logger = LoggerFactory.getLogger(DataCatService.class);
+
+    public static void main(String[] args) throws IOException {
+        try {
+            // Grizzly ssl configuration
+            SSLContextConfigurator sslContext = new SSLContextConfigurator();
+
+            // set up security context
+            if (new File("../security/" + ServerProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_FILE, "")).exists()) {
+                sslContext.setKeyStoreFile("../security/" + ServerProperties.getInstance()
+                        .getProperty(Constants.KEYSTORE_FILE, ""));
+                logger.info("Using the configured key store");
+            } else {
+                sslContext.setKeyStoreFile(ClassLoader.getSystemResource("security/" +
+                        ServerProperties.getInstance()
+                                .getProperty(Constants.KEYSTORE_FILE, "")).getPath());
+                logger.info("Using the default key store");
+            }
+            sslContext.setKeyStorePass(ServerProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_PWD,""));
+
+            if (new File("../security/" + ServerProperties.getInstance()
+                    .getProperty(Constants.TRUSTSTORE_FILE, "")).exists()) {
+                sslContext.setTrustStoreFile("../security/" + ServerProperties.getInstance()
+                        .getProperty(Constants.TRUSTSTORE_FILE, ""));
+                logger.info("Using the configured trust store");
+            } else {
+                sslContext.setTrustStoreFile(ClassLoader.getSystemResource("security/" +
+                        ServerProperties.getInstance()
+                                .getProperty(Constants.TRUSTSTORE_FILE, "")).getPath());
+                logger.info("Using the default trust store");
+            }
+            sslContext.setTrustStoreFile(ServerProperties.getInstance()
+                    .getProperty(Constants.TRUSTSTORE_PWD, ""));
+
+            URI datacatUri = UriBuilder.fromUri(
+                    ServerProperties.getInstance().getProperty(Constants.DATACAT_URI, "")).build();
+
+            ResourceConfig dataCatConfig = new ResourceConfig(DataCatService.class);
+            final HttpServer dataCatServer = GrizzlyHttpServerFactory.createHttpServer(
+                    datacatUri, dataCatConfig, true,
+                    new SSLEngineConfigurator(sslContext).setClientMode(false).setNeedClientAuth(false));
+
+            URI publisherUri = UriBuilder.fromUri(
+                    ServerProperties.getInstance().getProperty(Constants.PUBLISHER_URI, "")).build();
+
+            ResourceConfig publisherConfig = new ResourceConfig(PublisherService.class);
+            final HttpServer publisherServer = GrizzlyHttpServerFactory.createHttpServer(
+                    publisherUri, publisherConfig,
+                true,new SSLEngineConfigurator(sslContext).setClientMode(false).setNeedClientAuth(false));
+
+            //Running a proxy api for the user api is not essential
+            //URI userstoreUri = UriBuilder.fromUri(
+            //        ServerProperties.getInstance().getProperty(Constants.USERSTORE_URI, "")).build();
+
+            //ResourceConfig userstoreConfig = new ResourceConfig(UserStoreService.class);
+            //final HttpServer userstoreServer = GrizzlyHttpServerFactory.createHttpServer(userstoreUri, userstoreConfig);
+            //userstoreServer.start();
+
+            try {
+                new Thread() {
+                    public void run() {
+                        try {
+                            logger.info("Starting DataCat Service. URI:"
+                                    + ServerProperties.getInstance().getProperty(Constants.DATACAT_URI,"")
+                                    ,"datacat-service");
+                            dataCatServer.start();
+                            //registerWithZk(ServerProperties.getInstance().getProperty(Constants.DATACAT_URI,"")
+                            //        ,"datacat-service");
+                            Thread.currentThread().join();
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            logger.error("There was an error when starting DataCat Service." +
+                                    "Unable to start DataCat Service", e);
+                            System.exit(-1);
+                        }
+                    }
+                }.start();
+                Runtime.getRuntime().addShutdownHook(new Thread() {
+                    public void run() {
+                        dataCatServer.stop();
+                        logger.info("DataCat Service Stopped!");
+                    }
+                });
+            } catch (Exception e) {
+                e.printStackTrace();
+                logger.error("Unable to start DataCat Service", e);
+                throw e;
+            }
+            try {
+                new Thread() {
+                    public void run() {
+                        try {
+                            logger.info("Starting Publisher Service. URI:"
+                                    +ServerProperties.getInstance().getProperty(Constants.PUBLISHER_URI,"")
+                                    ,"publisher-service");
+                            publisherServer.start();
+                            //registerWithZk(ServerProperties.getInstance().getProperty(Constants.PUBLISHER_URI,"")
+                            //       ,"publisher-service");
+                            Thread.currentThread().join();
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            logger.error("There was an error when starting Publisher Service." +
+                                    "Unable to start Publisher Service", e);
+                            System.exit(-1);
+                        }
+                    }
+                }.start();
+                Runtime.getRuntime().addShutdownHook(new Thread() {
+                    public void run() {
+                        publisherServer.stop();
+                        logger.info("Publisher Service Stopped!");
+                    }
+                });
+            } catch (Exception e) {
+                e.printStackTrace();
+                logger.error("Unable to start Publisher Service", e);
+                throw e;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(e.toString(), e);
+        }
+    }
+
+    /**
+     * Method to register the service with Zookeeper
+     * @throws Exception
+     */
+    private static void registerWithZk(String uri, String name) throws Exception {
+        CuratorFramework curator = CuratorFrameworkFactory.newClient(
+                ServerProperties.getInstance().getProperty(
+                        Constants.ZK_HOST, ""),
+                new ExponentialBackoffRetry(1000, 3));
+        curator.start();
+        JsonInstanceSerializer<String> serializer =
+                new JsonInstanceSerializer<String>(String.class );
+        ServiceInstance<String> instance =
+                ServiceInstance.<String>builder()
+                        .name(name)
+                        .payload(new String(Constants.DATACAT_SERVER_VERSION))
+                        .sslPort(Integer.parseInt(uri.split(":")[2].replaceAll("/","")))
+                        .uriSpec(new UriSpec(uri))
+                        .build();
+        ServiceDiscovery<String> discovery =
+                ServiceDiscoveryBuilder.builder(String.class)
+                        .client(curator)
+                        .basePath("services")
+                        .serializer(serializer)
+                        .thisInstance(instance)
+                        .build();
+        discovery.start();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/IDataModel.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/IDataModel.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/IDataModel.java
new file mode 100644
index 0000000..5ae3dc0
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/IDataModel.java
@@ -0,0 +1,48 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db;
+
+import org.apache.airavata.datacat.models.AclDTO;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+public interface IDataModel {
+
+    public void addMetadata(OutputMetadataDTO outputMetadataDTO) throws Exception;
+
+    public void updateMetadata(OutputMetadataDTO outputMetadataDTO) throws Exception;
+
+    public void deleteFileMetadata(String dataArchiveNode, String filePath, String fileName) throws  Exception;
+
+    public ArrayList<String> getAclList(String id) throws Exception;
+
+    public void updateAclList(AclDTO aclDTO) throws Exception;
+
+    public String getMetadataDocHTMLById(String id) throws Exception;
+
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromParameters(List<PrimaryQueryParameter> primaryQueryParameters, String username, String[] userRoles, int startRow, int endRow) throws Exception;
+
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromQueryString(String query, String username, String[] userRoles, int startRow, int endRow) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrClientFactory.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrClientFactory.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrClientFactory.java
new file mode 100644
index 0000000..ef94c03
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrClientFactory.java
@@ -0,0 +1,49 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db.solr;
+
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.solr.client.solrj.impl.HttpClientUtil;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
+
+public class SolrClientFactory {
+    public HttpSolrServer createSolrMetadataClient() {
+        HttpSolrServer server = new HttpSolrServer(
+                ServerProperties.getInstance().getProperty(Constants.SOLR_METADATA_URL,""));
+        HttpClientUtil.setBasicAuth((DefaultHttpClient) server.getHttpClient(),
+                ServerProperties.getInstance().getProperty(Constants.SOLR_USERNAME, ""),
+                ServerProperties.getInstance().getProperty(Constants.SOLR_PASSWORD, "")
+        );
+        return server;
+    }
+
+    public HttpSolrServer createSolrAclClient() {
+        HttpSolrServer server = new HttpSolrServer(
+                ServerProperties.getInstance().getProperty(Constants.SOLR_ACL_URL,""));
+        HttpClientUtil.setBasicAuth((DefaultHttpClient) server.getHttpClient(),
+                ServerProperties.getInstance().getProperty(Constants.SOLR_USERNAME, ""),
+                ServerProperties.getInstance().getProperty(Constants.SOLR_PASSWORD, "")
+        );
+        return server;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrDataModel.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrDataModel.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrDataModel.java
new file mode 100644
index 0000000..0ded691
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrDataModel.java
@@ -0,0 +1,83 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db.solr;
+
+import org.apache.airavata.datacat.models.AclDTO;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+import org.apache.airavata.datacat.server.db.IDataModel;
+import org.apache.http.MethodNotSupportedException;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+public class SolrDataModel implements IDataModel {
+
+    private SolrIndexer solrIndexer;
+
+    private SolrQuerier solrQuerier;
+
+    public SolrDataModel(){
+        this.solrIndexer = new SolrIndexer();
+        solrQuerier = new SolrQuerier();
+    }
+
+    @Override
+    public void addMetadata(OutputMetadataDTO outputMetadataDTO) throws Exception{
+        solrIndexer.addMetadata(outputMetadataDTO);
+    }
+
+    @Override
+    public void updateMetadata(OutputMetadataDTO outputMetadataDTO)throws Exception {
+        solrIndexer.updateMetadata(outputMetadataDTO);
+    }
+
+    @Override
+    public void deleteFileMetadata(String dataArchiveNode, String filePath, String fileName) throws Exception {
+        throw new MethodNotSupportedException("Method still not implemented!!");
+    }
+
+    @Override
+    public ArrayList<String> getAclList(String id) throws Exception {
+        return solrQuerier.getAclList(id);
+    }
+
+    @Override
+    public void updateAclList(AclDTO aclDTO) throws Exception {
+        solrIndexer.updateACL(aclDTO);
+    }
+
+    @Override
+    public String getMetadataDocHTMLById(String id) throws Exception {
+       return solrQuerier.getMetadataDocHTMLById(id);
+    }
+
+    @Override
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromParameters(List<PrimaryQueryParameter> primaryQueryParameters, String username, String[] userRoles, int startRow, int numberOfRows) throws Exception {
+        return solrQuerier.getResultsFromParameters(primaryQueryParameters, username, userRoles, startRow, numberOfRows);
+    }
+
+    @Override
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromQueryString(String query, String username, String[] userRoles, int startRow, int numberOfRows) throws Exception {
+        return solrQuerier.getResultsFromQueryString(query, username, userRoles, startRow, numberOfRows);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrIndexer.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrIndexer.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrIndexer.java
new file mode 100644
index 0000000..cf2ecb1
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrIndexer.java
@@ -0,0 +1,107 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db.solr;
+
+import org.apache.airavata.datacat.models.AclDTO;
+import org.apache.airavata.datacat.models.AclFields;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.MetadataFields;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.common.SolrInputDocument;
+
+import java.io.IOException;
+import java.util.UUID;
+
+public class SolrIndexer {
+
+    private final Logger logger = LogManager.getLogger(SolrIndexer.class);
+
+    private SolrClientFactory solrClientFactory;
+
+    public SolrIndexer() {
+        solrClientFactory = new SolrClientFactory();
+    }
+
+    public void addMetadata(OutputMetadataDTO outputMetadataDTO) throws IOException, SolrServerException {
+        addData(outputMetadataDTO);
+    }
+
+    public void updateMetadata(OutputMetadataDTO outputMetadataDTO) throws IOException, SolrServerException {
+        addData(outputMetadataDTO);
+    }
+
+    public void updateACL(AclDTO aclDTO) throws IOException, SolrServerException {
+        HttpSolrServer aclClient = solrClientFactory.createSolrAclClient();
+        SolrInputDocument aclDoc = new SolrInputDocument();
+        aclDoc.addField(AclFields.ID, aclDTO.getId());
+        aclDoc.addField(AclFields.ACL, aclDTO.getAcl());
+
+        aclClient.add(aclDoc, 1);
+        logger.info("Updated ACL for metadata file. Id:"+aclDTO.getId());
+    }
+
+    private void addData(OutputMetadataDTO outputMetadataDTO) throws IOException, SolrServerException {
+        HttpSolrServer metadataClient = solrClientFactory.createSolrMetadataClient();
+        SolrInputDocument metadataDoc = new SolrInputDocument();
+
+        HttpSolrServer aclClient = solrClientFactory.createSolrAclClient();
+        SolrInputDocument aclDoc = new SolrInputDocument();
+
+        if (outputMetadataDTO.getId() == "") {
+            String primaryKey = UUID.randomUUID().toString();
+            metadataDoc.addField(MetadataFields.ID, primaryKey);
+            aclDoc.addField(AclFields.ID, primaryKey);
+        } else {
+            metadataDoc.addField(MetadataFields.ID, outputMetadataDTO.getId());
+            aclDoc.addField(AclFields.ID, outputMetadataDTO.getId());
+        }
+
+        metadataDoc.addField(MetadataFields.EXPERIMENT_ID, outputMetadataDTO.getExperimentId());
+        metadataDoc.addField(MetadataFields.EXPERIMENT_NAME, outputMetadataDTO.getExperimentName());
+        metadataDoc.addField(MetadataFields.OUTPUT_PATH, outputMetadataDTO.getOutputPath());
+        metadataDoc.addField(MetadataFields.OWNER_ID, outputMetadataDTO.getOwnerId());
+        metadataDoc.addField(MetadataFields.GATEWAY_ID, outputMetadataDTO.getGatewayId());
+        metadataDoc.addField(MetadataFields.APPLICATION_NAME, outputMetadataDTO.getApplicationName());
+        metadataDoc.addField(MetadataFields.HOST, outputMetadataDTO.getHost());
+        metadataDoc.addField(MetadataFields.CREATED_DATE, outputMetadataDTO.getCreatedDate());
+
+        if(outputMetadataDTO.getCustomMetaData()!=null) {
+            Object[] metadata_keys = outputMetadataDTO.getCustomMetaData().keySet().toArray();
+            String key = "";
+            for (int i = 0; i < metadata_keys.length; i++) {
+                key = (String) metadata_keys[i];
+                if (key.equals("id"))
+                    continue;
+                metadataDoc.addField(key,
+                        outputMetadataDTO.getCustomMetaData().get(key)
+                );
+            }
+        }
+        metadataClient.add(metadataDoc,1);
+
+        aclDoc.addField(AclFields.ACL, outputMetadataDTO.getOwnerId());
+        aclClient.add(aclDoc,1);
+        logger.info("Indexed Metadata file. Experiment Name:"+ outputMetadataDTO.getExperimentName());
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQuerier.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQuerier.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQuerier.java
new file mode 100644
index 0000000..bf89a88
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQuerier.java
@@ -0,0 +1,133 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db.solr;
+
+import com.google.gson.Gson;
+import org.apache.airavata.datacat.models.AclFields;
+import org.apache.airavata.datacat.models.MetadataFields;
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import java.io.IOException;
+import java.util.*;
+
+public class SolrQuerier {
+    private final Logger logger = LogManager.getLogger(SolrQuerier.class);
+
+    private SolrQueryBuilder solrQueryBuilder;
+
+    private SolrClientFactory solrClientFactory;
+
+    private ObjectMapper objectMapper;
+
+    public SolrQuerier(){
+        this.solrClientFactory = new SolrClientFactory();
+        this.solrQueryBuilder = new SolrQueryBuilder();
+        this.objectMapper = new ObjectMapper();
+    }
+
+    public String getMetadataDocHTMLById(String id) throws SolrServerException {
+        SolrServer server = solrClientFactory.createSolrMetadataClient();
+        SolrQuery solrQuery = new SolrQuery(MetadataFields.ID+":"+id);
+        QueryResponse solrResponse = server.query(solrQuery);
+        SolrDocumentList docs = solrResponse.getResults();
+        String html = "<html>\n" +
+                "\n" +
+                "<head>\n" +
+                "<style>\n" +
+                "table, th, td {\n" +
+                "    border: 1px solid black;\n" +
+                "    border-collapse: collapse;\n" +
+                "}\n" +
+                "th, td {\n" +
+                "    padding: 5px;\n" +
+                "    text-align: left;\n" +
+                "}\n" +
+                "</style>\n" +
+                "</head>\n" +
+                "\n" +
+                "<body>"+
+                "<table>";
+        html += "<tr><th>Property</th><th>Value</th></tr>";
+        if(docs.size()==1){
+            SolrDocument doc = docs.get(0);
+            Collection<String> fieldNames = doc.getFieldNames();
+            Iterator<String> fieldNamesIterator = fieldNames.iterator();
+            for(int i=0;i<fieldNames.size();i++){
+                html += "<tr>";
+                String fieldName = fieldNamesIterator.next();
+                html += "<td>" + fieldName + "</td>" + "<td>" + doc.getFieldValue(fieldName) + "</td>";
+                html += "</tr>";
+            }
+        }
+        html += "</table>" +
+                 "</html>";
+        return  html;
+    }
+
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromParameters(List<PrimaryQueryParameter> primaryQueryParameters,
+                                                          String username, String[] userRoles, int startRow, int numberOfRows
+    )throws SolrServerException, IOException {
+        SolrQuery solrQuery;
+        logger.info("Retrieving results for the query parameters");
+        solrQuery = solrQueryBuilder.generateQueryFromParameters(primaryQueryParameters, username, userRoles, startRow,
+                numberOfRows
+        );
+        return getResults(solrQuery);
+    }
+
+    public ArrayList<LinkedHashMap<String, Object>> getResultsFromQueryString(String queryString, String username, String[] userRoles,
+                                                           int startRow, int numberOfRows
+    )throws SolrServerException, IOException {
+        SolrQuery solrQuery;
+        logger.info("Retrieving results for the query string:"+queryString);
+        solrQuery = solrQueryBuilder.generateQueryFromQueryString(queryString, username, userRoles, startRow, numberOfRows);
+        return getResults(solrQuery);
+    }
+
+    private ArrayList<LinkedHashMap<String, Object>> getResults(SolrQuery solrQuery) throws IOException, SolrServerException {
+        SolrServer server = solrClientFactory.createSolrMetadataClient();
+        QueryResponse solrResponse = server.query(solrQuery);
+        SolrDocumentList docs = solrResponse.getResults();
+        String json= (new Gson()).toJson(docs);
+        ArrayList<LinkedHashMap<String, Object>> result =
+                new ObjectMapper().readValue(json, ArrayList.class);
+         return result;
+    }
+
+    public ArrayList<String> getAclList(String id) throws SolrServerException, IOException {
+        SolrServer server = solrClientFactory.createSolrAclClient();
+        SolrQuery solrQuery = new SolrQuery(AclFields.ID+":"+id);
+        QueryResponse solrResponse = server.query(solrQuery);
+        SolrDocumentList docs = solrResponse.getResults();
+        String json= (new Gson()).toJson(docs);
+        ArrayList<LinkedHashMap<String, Object>> result = objectMapper.readValue(json, ArrayList.class);
+        return (ArrayList<String>)result.get(0).get(AclFields.ACL);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQueryBuilder.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQueryBuilder.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQueryBuilder.java
new file mode 100644
index 0000000..d334a74
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/db/solr/SolrQueryBuilder.java
@@ -0,0 +1,101 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.db.solr;
+
+import org.apache.airavata.datacat.models.PrimaryQueryParameter;
+import org.apache.solr.client.solrj.SolrQuery;
+
+import java.util.List;
+
+public class SolrQueryBuilder {
+
+    public SolrQuery generateQueryFromParameters(List<PrimaryQueryParameter> primaryQueryParameters,
+                                                 String username, String[] userGroups, int startRow, int numberOfRows
+    ) {
+        SolrQuery solrQuery = new SolrQuery();
+        String aclSubQuery = getAclSubQuery(username, userGroups);
+        solrQuery.setQuery(aclSubQuery);
+
+        PrimaryQueryParameter qp;
+        for (int i = 0; i < primaryQueryParameters.size(); i++) {
+            qp = primaryQueryParameters.get(i);
+            switch (qp.getPrimaryQueryType()) {
+                case EQUALS:
+                    solrQuery = solrQuery.addFilterQuery(qp.getField() + ":\"" + qp.getFirstParameter() + "\"");
+                    break;
+                case PHRASE:
+                    solrQuery = solrQuery.addFilterQuery(qp.getField() + ":\"" + qp.getFirstParameter() + "\"");
+                    break;
+                case SUBSTRING:
+                    solrQuery = solrQuery.addFilterQuery(qp.getField() + ":*" + qp.getFirstParameter() + "*");
+                    break;
+                case WILDCARD:
+                    solrQuery = solrQuery.addFilterQuery(qp.getField() + ":" + qp.getFirstParameter());
+                    break;
+                case RANGE:
+                    solrQuery = solrQuery.addFilterQuery(qp.getField() + ":["
+                            + qp.getFirstParameter() + " TO " + qp.getSecondParameter() + "]");
+                    break;
+            }
+        }
+
+        solrQuery.setStart(startRow-1);
+        solrQuery.setRows(numberOfRows);
+
+        return solrQuery;
+    }
+
+    public SolrQuery generateQueryFromQueryString(String userQuery, String username, String[] userGroups,
+                                                  int startRow, int numberOfRows
+    ) {
+        String aclSubQuery = getAclSubQuery(username, userGroups);
+
+        SolrQuery solrQuery = new SolrQuery(aclSubQuery);
+        solrQuery = solrQuery.addFilterQuery(userQuery);
+        solrQuery = solrQuery.setStart(startRow-1);
+        solrQuery = solrQuery.setRows(numberOfRows);
+
+        return solrQuery;
+    }
+
+    private String getAclSubQuery(String username, String[] userGroups){
+        //for generating access control filter query
+        String query = "";
+        if (username != null && username != "") {
+            if (userGroups != null && userGroups.length > 0) {
+                String temp = "(" + username + " OR ";
+                for (int i = 0; i < userGroups.length - 1; i++) {
+                    temp = temp + userGroups[i] + " OR ";
+                }
+                temp = temp + userGroups[userGroups.length - 1] + ")";
+
+                query = "{!join from=id to=id fromIndex=acl}acl:" + temp;
+            } else {
+                query = "{!join from=id to=id fromIndex=acl}acl:" + username;
+            }
+        } else {
+            query = "{!join from=id to=id fromIndex=acl}acl:public";
+        }
+
+        return query;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/DataCatService.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/DataCatService.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/DataCatService.java
new file mode 100644
index 0000000..4537cd1
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/DataCatService.java
@@ -0,0 +1,168 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.services;
+
+import org.apache.airavata.datacat.models.AclDTO;
+import org.apache.airavata.datacat.models.QueryObject;
+import org.apache.airavata.datacat.server.db.IDataModel;
+import org.apache.airavata.datacat.server.db.solr.SolrDataModel;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+
+@Path("/datacat")
+public class DataCatService{
+
+    private final Logger logger = LogManager.getLogger(DataCatService.class);
+
+    private IDataModel dataModel;
+
+    private ObjectMapper objectMapper;
+
+    public DataCatService(){
+        this.dataModel = new SolrDataModel();
+        this.objectMapper = new ObjectMapper();
+    }
+
+    private String serialize (Object object) throws IOException {                                       // serialize given objects
+        return objectMapper.writeValueAsString(object);
+    }
+
+
+    @GET                                                                                                // http request type
+    @Path("/getAPIVersion")                                                                             // relative path annotation
+    @Consumes("application/json")                                                                       // accepting data type
+    public Response getAPIVersion(){
+        return Response.status(200).entity(Constants.DATACAT_SERVER_VERSION).build();                   // response with corresponding header
+    }
+
+    @GET
+    @Path("/getMetadataDocHTMLById")
+    @Consumes("application/json")                                                                       // get full metadata list of a data product
+    public Response getMetadataDocHTMLById(@QueryParam("id") String id){
+        try {
+            String jsonDoc = dataModel.getMetadataDocHTMLById(id);
+            return Response.status(200).entity(jsonDoc).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @POST
+    @Path("/getResults")
+    @Consumes("application/json")
+    public Response getResults(InputStream incomingData){                                               // search metadata
+        StringBuilder stringBuilder = new StringBuilder();
+        try {
+            BufferedReader in = new BufferedReader(new InputStreamReader(incomingData));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                stringBuilder.append(line);
+            }
+            QueryObject queryObject = objectMapper.readValue(stringBuilder.toString(), QueryObject.class);
+            String username = queryObject.getUsername();
+            String[] userRoles = queryObject.getUserGroups();
+            ArrayList<LinkedHashMap<String, Object>> fileMetadataDTO;
+            if(!queryObject.isQueryStringSet()){
+                fileMetadataDTO =  dataModel.getResultsFromParameters(                                  // do full text search
+                        queryObject.getPrimaryQueryParameterList(), username, userRoles, queryObject.getStartRow(),
+                        queryObject.getNumberOfRows()
+                );
+            }else {
+                fileMetadataDTO =  dataModel.getResultsFromQueryString(                                 // do fielded search
+                        queryObject.getQueryString(), username, userRoles,queryObject.getStartRow(),
+                        queryObject.getNumberOfRows()
+                );
+            }
+            String result = serialize(fileMetadataDTO);                                                 // serialize response object
+            return Response.status(200).entity(result).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @GET
+    @Path("/getAclList")
+    @Produces("application/json")
+    public Response getAclList(@QueryParam("id") String id){                                            // retrieve ACL list of a data product given the id
+        try {
+            ArrayList<String> result = dataModel.getAclList(id);
+            return Response.status(200).entity(serialize(result)).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @POST
+    @Path("/updateAclList")
+    public Response updateAclList(InputStream incomingData){                                            // update ACL list of a data product
+        StringBuilder stringBuilder = new StringBuilder();
+        try {
+            BufferedReader in = new BufferedReader(new InputStreamReader(incomingData));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                stringBuilder.append(line);
+            }
+            AclDTO aclDTO = objectMapper.readValue(stringBuilder.toString(), AclDTO.class);
+            dataModel.updateAclList(aclDTO);
+            return Response.status(200).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @GET
+    @Path("/getMetadataFieldList")
+    @Produces("application/json")
+    public Response getMetadataFieldList(){                                                             // get the list of searchable/indexed fields in database
+        try {
+            String[] fields = ServerProperties.getInstance().getProperty(Constants.FILE_METADATA_FIELDS, "").split(",");
+            String json = "";
+            if(fields.length>=1){
+                json = "[";
+                for(int i=0;i<fields.length-1;i++){
+                    json = json + "\"" + fields[i] + "\",";
+                }
+                json = json + "\"" + fields[fields.length-1] + "\"]";
+            }
+            return Response.status(200).entity(json).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/PublisherService.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/PublisherService.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/PublisherService.java
new file mode 100644
index 0000000..e595dcb
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/PublisherService.java
@@ -0,0 +1,112 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.services;
+
+//These are Jersey jars
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.server.db.IDataModel;
+import org.apache.airavata.datacat.server.db.solr.SolrDataModel;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+
+@Path("/publisher")
+public class PublisherService{
+
+    private final Logger logger = LogManager.getLogger(PublisherService.class);
+
+    private IDataModel dataModel =  new SolrDataModel();
+
+    ObjectMapper mapper = new ObjectMapper();
+
+
+    @GET
+    @Path("/getAPIVersion")
+    public Response getAPIVersion(){
+        return Response.status(200).entity(Constants.DATACAT_SERVER_VERSION).build();
+    }
+
+    @DELETE
+    @Path("/deleteFileMetadata")
+    public Response deleteFileMetadata(@QueryParam("dataArchiveNode") String dataArchiveNode,
+                                       @QueryParam("fileName") String fileName,
+                                       @QueryParam("filePath") String filePath
+    ) {
+        try {
+            dataModel.deleteFileMetadata(dataArchiveNode, filePath, fileName);
+
+            // return HTTP response 200 in case of success
+            return Response.status(200).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @POST
+    @Path("/addFileMetadata")
+    public Response addFileMetadata(InputStream incomingData) {
+        StringBuilder stringBuilder = new StringBuilder();
+        try {
+            BufferedReader in = new BufferedReader(new InputStreamReader(incomingData));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                stringBuilder.append(line);
+            }
+            OutputMetadataDTO outputMetadataDTO = mapper.readValue(stringBuilder.toString(),OutputMetadataDTO.class);
+            dataModel.addMetadata(outputMetadataDTO);
+            // return HTTP response 200 in case of success
+            return Response.status(200).entity(stringBuilder.toString()).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @PUT
+    @Path("/updateFileMetadata")
+    public Response updateFileMetadata(InputStream incomingData) {
+        StringBuilder stringBuilder = new StringBuilder();
+        try {
+            BufferedReader in = new BufferedReader(new InputStreamReader(incomingData));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                stringBuilder.append(line);
+            }
+            OutputMetadataDTO outputMetadataDTO = mapper.readValue(stringBuilder.toString(),OutputMetadataDTO.class);
+            dataModel.updateMetadata(outputMetadataDTO);
+            // return HTTP response 200 in case of success
+            return Response.status(200).entity(stringBuilder.toString()).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/UserStoreService.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/UserStoreService.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/UserStoreService.java
new file mode 100644
index 0000000..0503fb1
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/services/UserStoreService.java
@@ -0,0 +1,109 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.services;
+
+import org.apache.airavata.datacat.server.userstore.IUserStoreClient;
+import org.apache.airavata.datacat.server.userstore.WSO2IUserStoreClient;
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+@Path("/userstore")
+public class UserStoreService {
+
+    private final Logger logger = LogManager.getLogger(UserStoreService.class);
+
+    private IUserStoreClient iUserStoreClient;
+
+    private ObjectMapper objectMapper;
+
+    public UserStoreService(){
+        this.iUserStoreClient = new WSO2IUserStoreClient();
+    }
+
+    @GET
+    @Path("/getAPIVersion")
+    @Consumes("application/json")
+    public Response getAPIVersion(){
+        return Response.status(200).entity(Constants.DATACAT_SERVER_VERSION).build();
+    }
+
+    @GET
+    @Path("/authenticate")
+    @Produces("application/json")
+    public Response authenticate(@QueryParam("username") String username, @QueryParam("password") String password){
+        try {
+            boolean status = iUserStoreClient.authenticateUser(username, password);
+            return Response.status(200).entity(status+"").build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+
+    @GET
+    @Path("/getGroupsOfUser")
+    @Produces("application/json")
+    public Response getGroupsOfUser(@QueryParam("username") String username){
+        try {
+            List<String> groups = iUserStoreClient.getUserGroups(username);
+            String json = "";
+            if(groups.size()>=1){
+                json = "[";
+                for(int i=0;i<groups.size()-1;i++){
+                    json = json + "\"" + groups.get(i) + "\",";
+                }
+                json = json + "\"" + groups.get(groups.size()-1) + "\"]";
+            }
+            return Response.status(200).entity(json).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+
+    @GET
+    @Path("/getGroupsList")
+    @Produces("application/json")
+    public Response getGroupsList(){
+        try {
+            List<String> groups = iUserStoreClient.getAllGroups();
+            String json = "";
+            if(groups.size()>=1){
+                json = "[";
+                for(int i=0;i<groups.size()-1;i++){
+                    json = json + "\"" + groups.get(i) + "\",";
+                }
+                json = json + "\"" + groups.get(groups.size()-1) + "\"]";
+            }
+            return Response.status(200).entity(json).build();
+        } catch (Exception e) {
+            logger.error(e.toString());
+            return Response.status(503).entity(e.toString()).build();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/IUserStoreClient.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/IUserStoreClient.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/IUserStoreClient.java
new file mode 100644
index 0000000..6b69b59
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/IUserStoreClient.java
@@ -0,0 +1,29 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.userstore;
+
+import java.util.List;
+
+public interface IUserStoreClient {
+    public boolean authenticateUser(String username, String password) throws Exception;
+    public List<String> getUserGroups(String username) throws Exception;
+    public List<String> getAllGroups() throws Exception;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/WSO2IUserStoreClient.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/WSO2IUserStoreClient.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/WSO2IUserStoreClient.java
new file mode 100644
index 0000000..678d0ee
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/userstore/WSO2IUserStoreClient.java
@@ -0,0 +1,102 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.server.userstore;
+
+import org.apache.airavata.datacat.server.util.Constants;
+import org.apache.airavata.datacat.server.util.ServerProperties;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Stub;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.transport.http.HttpTransportProperties;
+import org.wso2.carbon.um.ws.api.stub.RemoteUserStoreManagerServiceStub;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This class contains the basic functionality based on a backend wso2 IS
+ */
+
+public class WSO2IUserStoreClient implements IUserStoreClient {
+
+    private static final String ADMIN_ROLE = "admin";
+    private static final String INTERNAL_ROLE_PREFIX = "Internal";
+
+    @Override
+    public boolean authenticateUser(String username, String password) throws Exception{
+        Stub serviceStub = getServiceStub();
+        boolean isAuthentic = ((RemoteUserStoreManagerServiceStub) serviceStub).authenticate(username, password);
+        return isAuthentic;
+    }
+
+    @Override
+    public List<String> getUserGroups(String username) throws Exception {
+        Stub serviceStub = getServiceStub();
+        List<String> temp = Arrays.asList(((RemoteUserStoreManagerServiceStub) serviceStub).getRoleListOfUser(username));
+        List<String> result = new ArrayList<String>();
+        for(int i=0;i<temp.size();i++){
+            if(temp.get(i).equals(ADMIN_ROLE) || temp.get(i).startsWith(INTERNAL_ROLE_PREFIX)){
+                continue;
+            }
+            result.add(temp.get(i));
+        }
+        return result;
+    }
+
+    @Override
+    public List<String> getAllGroups() throws Exception {
+        Stub serviceStub = getServiceStub();
+        List<String> temp = Arrays.asList(((RemoteUserStoreManagerServiceStub) serviceStub).getRoleNames());
+        List<String> result = new ArrayList<String>();
+        for(int i=0;i<temp.size();i++){
+            if(temp.get(i).equals(ADMIN_ROLE) || temp.get(i).startsWith(INTERNAL_ROLE_PREFIX)){
+                continue;
+            }
+            result.add(temp.get(i));
+        }
+
+        return result;
+    }
+
+    private Stub getServiceStub() throws AxisFault {
+        String serviceName = "RemoteUserStoreManagerService";
+        ServerProperties properties = ServerProperties.getInstance();
+        String endPoint = properties.getProperty(Constants.IS_URL, "") + "/services/" + serviceName;
+        Stub serviceStub = new RemoteUserStoreManagerServiceStub(endPoint);
+
+        ServiceClient serviceClient;
+        Options options;
+        serviceClient = serviceStub._getServiceClient();
+        options = serviceClient.getOptions();
+        HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
+
+        authenticator.setUsername(properties.getProperty(Constants.IS_USERNAME,""));
+        authenticator.setPassword(properties.getProperty(Constants.IS_PASSWORD, ""));
+        authenticator.setPreemptiveAuthentication(true);
+        options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);
+        serviceClient.setOptions(options);
+
+        return serviceStub;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/Constants.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/Constants.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/Constants.java
new file mode 100644
index 0000000..d42aeb8
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/Constants.java
@@ -0,0 +1,22 @@
+package org.apache.airavata.datacat.server.util;
+
+public class Constants {
+    public static final String DATACAT_SERVER_VERSION = "1.0-SNAPSHOT";
+    public static final String DATACAT_URI = "DATACAT_URI";
+    public static final String PUBLISHER_URI = "PUBLISHER_URI";
+    public static final String SOLR_METADATA_URL = "SOLR_METADATA_URL";
+    public static final String SOLR_ACL_URL = "SOLR_ACL_URL";
+    public static final String SOLR_USERNAME = "SOLR_USERNAME";
+    public static final String SOLR_PASSWORD = "SOLR_PASSWORD";
+    public static final String IS_URL = "IS_URL";
+    public static final String IS_USERNAME = "IS_USERNAME";
+    public static final String IS_PASSWORD = "IS_PASSWORD";
+    public static final String METADATA_PRIMARY_INDEX= "METADATA_PRIMARY_INDEX";
+    public static final String FILE_METADATA_FIELDS = "FILE_METADATA_FIELDS";
+    public static final String USERSTORE_URI = "USERSTORE_URI";
+    public static final String KEYSTORE_FILE = "KEYSTORE_FILE";
+    public static final String KEYSTORE_PWD = "KEYSTORE_PWD";
+    public static final String TRUSTSTORE_FILE = "TRUSTSTORE_FILE";
+    public static final String TRUSTSTORE_PWD = "TRUSTSTORE_PWD";
+    public static final String ZK_HOST = "ZK_HOST";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/ServerProperties.java
----------------------------------------------------------------------
diff --git a/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/ServerProperties.java b/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/ServerProperties.java
new file mode 100644
index 0000000..b74d955
--- /dev/null
+++ b/datacat/server/src/main/java/org/apache/airavata/datacat/server/util/ServerProperties.java
@@ -0,0 +1,55 @@
+package org.apache.airavata.datacat.server.util;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.*;
+
+public class ServerProperties {
+    public static final String SERVER_PROPERTY_FILE = "../conf/server.properties";
+    public static final String DEFAULT_SERVER_PROPERTY_FILE = "conf/server.properties";
+
+    private static ServerProperties instance;
+
+    private final Logger logger = LogManager.getLogger(ServerProperties.class);
+
+    private java.util.Properties properties = null;
+
+    private ServerProperties() {
+        try {
+            InputStream fileInput;
+            if (new File(SERVER_PROPERTY_FILE).exists()) {
+                fileInput = new FileInputStream(SERVER_PROPERTY_FILE);
+                logger.info("Using configured server property (server.properties) file");
+            } else {
+                logger.info("Using default server property (server.properties) file");
+                fileInput = ClassLoader.getSystemResource(DEFAULT_SERVER_PROPERTY_FILE).openStream();
+            }
+            java.util.Properties properties = new java.util.Properties();
+            properties.load(fileInput);
+            fileInput.close();
+            this.properties = properties;
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static ServerProperties getInstance() {
+        if (instance == null) {
+            instance = new ServerProperties();
+        }
+        return instance;
+    }
+
+    public String getProperty(String key, String defaultVal) {
+        String val = this.properties.getProperty(key);
+
+        if (val.isEmpty() || val == "") {
+            return defaultVal;
+        } else {
+            return val;
+        }
+    }
+}


[13/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbParser.java
new file mode 100644
index 0000000..ec055f9
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbParser.java
@@ -0,0 +1,580 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfb;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class SCFbParser extends java_cup.runtime.lr_parser implements GridChemQueueParser{
+
+  /** Default constructor. */
+  public SCFbParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public SCFbParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public SCFbParser(final FileReader fileReader) {
+        super(new SCFbLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\016\000\002\015\002\000\002\003\006\000\002\002" +
+                    "\004\000\002\016\002\000\002\004\006\000\002\017\002" +
+                    "\000\002\020\002\000\002\021\002\000\002\022\002\000" +
+                    "\002\023\002\000\002\024\002\000\002\025\002\000\002" +
+                    "\026\002\000\002\014\043"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\054\000\004\004\006\001\002\000\004\033\014\001" +
+                    "\002\000\004\002\012\001\002\000\004\005\ufffe\001\002" +
+                    "\000\004\005\010\001\002\000\004\050\011\001\002\000" +
+                    "\004\033\ufffd\001\002\000\004\002\uffff\001\002\000\004" +
+                    "\046\001\001\002\000\004\034\ufffc\001\002\000\004\034" +
+                    "\016\001\002\000\004\044\017\001\002\000\004\051\020" +
+                    "\001\002\000\004\040\ufffb\001\002\000\004\040\022\001" +
+                    "\002\000\004\047\023\001\002\000\004\045\024\001\002" +
+                    "\000\004\035\ufffa\001\002\000\004\035\026\001\002\000" +
+                    "\004\044\027\001\002\000\004\051\030\001\002\000\004" +
+                    "\037\ufff9\001\002\000\004\037\032\001\002\000\004\044" +
+                    "\033\001\002\000\004\051\034\001\002\000\004\036\ufff8" +
+                    "\001\002\000\004\036\036\001\002\000\004\044\037\001" +
+                    "\002\000\004\051\040\001\002\000\004\041\ufff7\001\002" +
+                    "\000\004\041\042\001\002\000\004\044\043\001\002\000" +
+                    "\004\051\044\001\002\000\004\042\ufff6\001\002\000\004" +
+                    "\042\046\001\002\000\004\044\047\001\002\000\004\051" +
+                    "\050\001\002\000\004\043\ufff5\001\002\000\004\043\052" +
+                    "\001\002\000\004\044\053\001\002\000\004\051\054\001" +
+                    "\002\000\004\046\ufff4\001\002\000\004\046\056\001\002" +
+                    "\000\004\002\000\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\054\000\006\003\004\004\003\001\001\000\004\014" +
+                    "\012\001\001\000\002\001\001\000\004\016\006\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\004\015\054\001\001\000\004\017\014" +
+                    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\004\020\020\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\004\021\024\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\004" +
+                    "\022\030\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\004\023\034\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\024\040\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\004\025\044\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\026\050\001\001\000\002" +
+                    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int eeCount=0;
+        int peCount=0;
+        int keCount=0;
+        int s2Count=0;
+        int minUSVTCount=0;
+        int convgCount=0;
+        int auCount=0;
+        int erhfCount=0;
+        int lenxCount=0;
+        for(int i=0;i<result.size();i++){
+            String singleString = result.get(i);
+            String[] temp= singleString.split(" ");
+            if(temp.length>1){
+                String keyString= temp[0];
+                String dataString=temp[1];
+                if(keyString.equalsIgnoreCase("EE")){
+                    results.put("SCFbParser_EE_"+eeCount,dataString);
+                    eeCount++;
+                }else if(keyString.equalsIgnoreCase("PE")){
+                    results.put("SCFbParser_PE_"+peCount,dataString);
+                    peCount++;
+                }else if(keyString.equalsIgnoreCase("KE")){
+                    results.put("SCFbParser_KE_"+keCount,dataString);
+                    keCount++;
+                }else if(keyString.equalsIgnoreCase("S2")) {
+                    results.put("SCFbParser_S2_" + s2Count, dataString);
+                    s2Count++;
+                }else if(keyString.equalsIgnoreCase("MINUSVT")) {
+                    results.put("SCFbParser_MINUSVT_" + minUSVTCount, dataString);
+                    minUSVTCount++;
+                }else if(keyString.equalsIgnoreCase("CONVG")) {
+                    results.put("SCFbParser_CONVG_" + convgCount, dataString);
+                    convgCount++;
+                }else if(keyString.equalsIgnoreCase("AU")) {
+                    results.put("SCFbParser_AU_" + auCount, dataString);
+                    auCount++;
+                }else if(keyString.equalsIgnoreCase("ERHF")) {
+                    results.put("SCFbParser_ERHF_" + erhfCount, dataString);
+                    erhfCount++;
+                }else if(keyString.equalsIgnoreCase("LENX")) {
+                    results.put("SCFbParser_LENX_" + lenxCount, dataString);
+                   lenxCount++;
+                }
+
+
+            }
+
+        }
+        return results;
+    }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 2;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true; 
+  private static JTable table;               
+  private static final String tableLabel = "SCF Final Results:";
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+  private final SCFbParser SCFbParser;
+
+  /** Constructor */
+  CUP$parser$actions(SCFbParser SCFbParser) {
+    this.SCFbParser = SCFbParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // scffinal ::= SCFDONE NT$2 ERHF EQUALS FLOAT NT$3 AU INT DUMMY NT$4 CONVG EQUALS FLOAT NT$5 MINUSVT EQUALS FLOAT NT$6 S2 EQUALS FLOAT NT$7 KE EQUALS FLOAT NT$8 PE EQUALS FLOAT NT$9 EE EQUALS FLOAT 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$2
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-31)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-31)).value;
+              // propagate RESULT from NT$3
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-27)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-27)).value;
+              // propagate RESULT from NT$4
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-23)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-23)).value;
+              // propagate RESULT from NT$5
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-19)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-19)).value;
+              // propagate RESULT from NT$6
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-15)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-15)).value;
+              // propagate RESULT from NT$7
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-11)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-11)).value;
+              // propagate RESULT from NT$8
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value;
+              // propagate RESULT from NT$9
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-28)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-28)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-28)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-25)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-25)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-25)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-20)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-20)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-20)).value;
+		int mleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).left;
+		int mright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).right;
+		String m = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-16)).value;
+		int s2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).left;
+		int s2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).right;
+		String s2 = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-12)).value;
+		int keleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;
+		int keright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;
+		String ke = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;
+		int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String pe = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String ee = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  EE "+ee);
+SCFbParser.addToResult("EE "+ee);
+//parseSCF.putField("EE", ee);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*scffinal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-32)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // NT$9 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-24)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-24)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-24)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-21)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-21)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-21)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-16)).value;
+		int mleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).left;
+		int mright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).right;
+		String m = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-12)).value;
+		int s2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;
+		int s2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;
+		String s2 = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;
+		int keleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int keright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String ke = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String pe = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  PE "+pe);
+SCFbParser.addToResult("PE "+pe);
+//parseSCF.putField("PE", pe);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(20/*NT$9*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // NT$8 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-20)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-20)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-20)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-17)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-17)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-17)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-12)).value;
+		int mleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;
+		int mright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;
+		String m = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;
+		int s2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int s2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String s2 = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int keleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int keright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String ke = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  KE "+ke);
+SCFbParser.addToResult("KE "+ke);
+//parseSCF.putField("KE", ke);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(19/*NT$8*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // NT$7 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-16)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-16)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-13)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-13)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-13)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;
+		int mleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int mright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String m = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int s2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int s2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String s2 = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  S2 "+s2);
+SCFbParser.addToResult("S2 "+s2);
+//parseSCF.putField("S2", s2);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(18/*NT$7*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // NT$6 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-12)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-12)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-9)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-9)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-9)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int mleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String m = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //________________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  MINUSVT "+m);
+SCFbParser.addToResult("MINUSVT "+m);
+//parseSCF.putField("-V/T", m);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(17/*NT$6*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // NT$5 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String c = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //______________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  CONVG "+c);
+SCFbParser.addToResult("CONVG "+c);
+//parseSCF.putField("CONVG", c);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(16/*NT$5*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // NT$4 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+ //___________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  AU "+i);
+                SCFbParser.addToResult("AU "+i);
+//parseSCF.putField("AU", i);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(15/*NT$4*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // NT$3 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String e = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //_____________________________________________________
+if (DEBUG) System.out.println("CUP:scfb:  ERHF "+e);
+                SCFbParser.addToResult("ERHF "+e);
+//parseSCF.putField("E(RHF)", e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(14/*NT$3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$2 ::= 
+            {
+              Object RESULT = null;
+ if (DEBUG) System.out.println("CUP:scfb:  scfdone "); 
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*NT$2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfintro ::= FOUNDSCF NT$1 FOUNDLENX LENXINT 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$1
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		String i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 if (DEBUG) System.out.println("CUP:scfb:  LENX --> "+i);
+                SCFbParser.addToResult("LENX "+i);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // NT$1 ::= 
+            {
+              Object RESULT = null;
+ if (DEBUG) System.out.println("CUP:scfb:  found SCF"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*NT$1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // startpt ::= scfintro scffinal NT$0 LEAVE 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		 if (DEBUG) System.out.println("CUP:scfb:  found LEAVE"); 
+             
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // NT$0 ::= 
+            {
+              Object RESULT = null;
+ if (DEBUG) System.out.println("CUP:scfa:  found scfintro scffinal");
+ 	       table = new JTable();
+	      // table = parseSCF.getTable();
+             
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbSym.java
new file mode 100644
index 0000000..ba1693f
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/scfb/SCFbSym.java
@@ -0,0 +1,71 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.scfb;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Mon Sep 15 16:04:59 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class SCFbSym {
+  /* terminals */
+  public static final int TEE = 12;
+  public static final int EQUALS = 34;
+  public static final int PE = 32;
+  public static final int GTEF = 20;
+  public static final int INT = 37;
+  public static final int LEAVE = 36;
+  public static final int LTEF = 19;
+  public static final int SCFDONE = 25;
+  public static final int CONVG = 27;
+  public static final int DUMMY = 35;
+  public static final int IS = 15;
+  public static final int PASS = 5;
+  public static final int ERR = 21;
+  public static final int MAXDP = 23;
+  public static final int S2 = 28;
+  public static final int ATCYCLE = 10;
+  public static final int IE = 16;
+  public static final int EOF = 0;
+  public static final int COEFF = 11;
+  public static final int RMSDP = 22;
+  public static final int IDIAG = 6;
+  public static final int error = 1;
+  public static final int ERHF = 26;
+  public static final int NO09 = 17;
+  public static final int FOUNDLENX = 3;
+  public static final int COLON = 24;
+  public static final int GAP = 13;
+  public static final int DELTAE = 8;
+  public static final int NK = 14;
+  public static final int EE = 33;
+  public static final int DIIS = 9;
+  public static final int LENXINT = 38;
+  public static final int FLOAT = 39;
+  public static final int KE = 31;
+  public static final int MINUSVT = 29;
+  public static final int NV01 = 18;
+  public static final int AU = 30;
+  public static final int FOUNDSCF = 2;
+  public static final int CYCLE = 4;
+  public static final int ENERGY = 7;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/AccessLevels.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/AccessLevels.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/AccessLevels.java
new file mode 100644
index 0000000..f08cb5d
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/AccessLevels.java
@@ -0,0 +1,28 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.util;
+
+public class AccessLevels {
+    public static final String PRIVATE = "private";
+    public static final String GROUP = "group";
+    public static final String COMMUNITY = "community";
+    public static final String GLOBAL = "global";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Constants.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Constants.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Constants.java
new file mode 100644
index 0000000..2f0fc0a
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Constants.java
@@ -0,0 +1,39 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.util;
+
+public class Constants {
+    public static final String PARSER_SEQUENCE = "PARSER_SEQUENCE";
+
+    public static final String ARCHIVING_NODE = "ARCHIVING_NODE";
+
+    public static final String APPLICATION_NAME = "APPLICATION_NAME";
+
+    public static final String USERNAME = "USERNAME";
+
+    public static final String AGENT_USERNAME = "AGENT_USERNAME";
+
+    public static final String AGENT_PASSWORD = "AGENT_PASSWORD";
+
+    public static final String TMP_DIR = "TMP_DIR";
+
+    public static final String SAMPLE_OUTPUT = "SAMPLE_OUTPUT";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Fields.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Fields.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Fields.java
new file mode 100644
index 0000000..01d93f7
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/Fields.java
@@ -0,0 +1,26 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.util;
+
+public class Fields {
+    public static final String INCHI = "inchi";
+    public static final String INCHI_KEY = "inchi_key";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/GridChemProperties.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/GridChemProperties.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/GridChemProperties.java
new file mode 100644
index 0000000..6d2b29f
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/util/GridChemProperties.java
@@ -0,0 +1,77 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.util;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.io.*;
+
+public class GridChemProperties {
+    public static final String GRIDCHEM_PARSERS_PROPERTIES = "../conf/gridchem.properties";
+    public static final String DEFAULT_GRIDCHEM_PARSERS_PROPERTIES = "gridchem.properties";
+
+    private static GridChemProperties instance;
+
+    private final Logger logger = LogManager.getLogger(GridChemProperties.class);
+    private java.util.Properties properties = null;
+
+    private GridChemProperties() {
+        try {
+            InputStream fileInput;
+            if (new File(GRIDCHEM_PARSERS_PROPERTIES).exists()) {
+                fileInput = new FileInputStream(GRIDCHEM_PARSERS_PROPERTIES);
+            } else {
+                fileInput = ClassLoader.getSystemResource(DEFAULT_GRIDCHEM_PARSERS_PROPERTIES).openStream();
+            }
+            java.util.Properties properties = new java.util.Properties();
+            properties.load(fileInput);
+            fileInput.close();
+            this.properties = properties;
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static GridChemProperties getInstance() {
+        if (instance == null) {
+            instance = new GridChemProperties();
+        }
+        return instance;
+    }
+
+    public String[] getParserSequence() {
+        String parsers = getProperty(Constants.PARSER_SEQUENCE, "");
+        String[] parserArray = parsers.split(",");
+        return parserArray;
+    }
+    public String getProperty(String key, String defaultVal) {
+        String val = this.properties.getProperty(key);
+
+        if (val.isEmpty() || val == "") {
+            return defaultVal;
+        } else {
+            return val;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramLexer.java
new file mode 100644
index 0000000..10d93b7
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramLexer.java
@@ -0,0 +1,642 @@
+package org.apache.airavata.datacat.parsers.gridchem.whichProgram;/* The following code was generated by JFlex 1.4.3 on 11/12/14 6:52 PM */
+
+
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 11/12/14 6:52 PM from the specification file
+ * <tt>whichProgram.flex</tt>
+ */
+public class WhichProgramLexer implements java_cup.runtime.Scanner{
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int IGNOREALL = 6;
+  public static final int GETREVISION = 2;
+  public static final int YYINITIAL = 0;
+  public static final int GETVERSION = 4;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  3, 3
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 12,  0,  1,  0, 
+    10,  2,  2, 11,  2,  2,  2,  2,  2,  2,  0,  0,  0, 22,  0,  0, 
+     0, 13,  1,  1,  1, 15,  1,  3,  1, 19,  1,  1, 26, 14, 21, 20, 
+    23,  1, 18, 16, 25,  1, 17,  1,  1, 24,  1,  0,  0,  0,  0,  0, 
+     0,  4,  1,  1,  1,  1,  1,  1,  1,  7,  1,  1,  1,  1,  8,  1, 
+     1,  1,  1,  6,  1,  5,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\4\0\3\1\1\2\1\1\13\0\1\3\25\0\1\4"+
+    "\10\0\1\5\5\0\1\6";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[58];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\33\0\66\0\121\0\154\0\207\0\242\0\275"+
+    "\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195"+
+    "\0\u01b0\0\u01cb\0\u01e6\0\u0201\0\154\0\u021c\0\u0237\0\u0252"+
+    "\0\u026d\0\u0288\0\u02a3\0\u02be\0\u02d9\0\u02f4\0\u030f\0\u032a"+
+    "\0\u0345\0\u0360\0\u037b\0\u0396\0\u03b1\0\u03cc\0\u03e7\0\u0402"+
+    "\0\u041d\0\u0438\0\154\0\u0453\0\u046e\0\u0489\0\u04a4\0\u04bf"+
+    "\0\u04da\0\u04f5\0\u0510\0\154\0\u052b\0\u0546\0\u0561\0\u057c"+
+    "\0\u0597\0\154";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[58];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\3\5\1\6\23\5\1\7\4\5\10\10\1\5\2\10"+
+    "\1\5\11\10\1\5\4\10\2\5\1\11\7\5\2\11"+
+    "\52\5\37\0\1\12\10\0\1\13\37\0\1\14\11\0"+
+    "\10\10\1\0\2\10\1\0\11\10\1\0\4\10\2\0"+
+    "\1\15\7\0\2\15\24\0\1\16\43\0\1\17\40\0"+
+    "\1\20\10\0\1\21\7\0\2\21\25\0\1\22\43\0"+
+    "\1\23\16\0\1\24\31\0\1\25\7\0\2\25\25\0"+
+    "\1\26\44\0\1\27\34\0\1\30\17\0\1\31\43\0"+
+    "\1\32\27\0\1\33\21\0\1\34\37\0\1\35\37\0"+
+    "\1\36\24\0\1\37\43\0\1\40\22\0\1\41\32\0"+
+    "\1\42\40\0\1\43\33\0\1\44\24\0\1\45\42\0"+
+    "\1\46\40\0\1\47\15\0\1\50\37\0\1\51\32\0"+
+    "\1\52\26\0\1\53\41\0\1\54\40\0\1\55\25\0"+
+    "\1\56\25\0\1\57\40\0\1\60\23\0\1\61\25\0"+
+    "\1\62\32\0\1\63\47\0\1\64\22\0\1\65\40\0"+
+    "\1\66\40\0\1\67\27\0\1\70\25\0\1\71\34\0"+
+    "\1\72\6\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[1458];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\4\0\1\11\4\1\13\0\1\11\25\0\1\11\10\0"+
+    "\1\11\5\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[58];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+  public static String format;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public WhichProgramLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public WhichProgramLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public int yylex() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 2: 
+          { if (Settings.DEBUG) System.out.println(yytext());
+		 yybegin(IGNOREALL);
+          }
+        case 7: break;
+        case 3: 
+          { if (Settings.DEBUG) System.out.println(yytext());
+            yybegin(IGNOREALL);
+          }
+        case 8: break;
+        case 4: 
+          { if (Settings.DEBUG) System.out.println(yytext());
+		  WhichProgramLexer.format = "Gauss03";
+          }
+        case 9: break;
+        case 6: 
+          { System.out.println(yytext());
+                  WhichProgramLexer.format = "Molpro";
+                      yybegin(IGNOREALL);
+          }
+        case 10: break;
+        case 5: 
+          { if (Settings.DEBUG) System.out.println(yytext());
+		      WhichProgramLexer.format = "GAMESS";
+		      yybegin(GETVERSION);
+          }
+        case 11: break;
+        case 1: 
+          { 
+          }
+        case 12: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            return YYEOF;
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java WhichProgram <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        WhichProgramLexer scanner = null;
+        try {
+          scanner = new WhichProgramLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.yylex();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+    @Override
+    public Symbol next_token() throws Exception {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramParser.java
new file mode 100644
index 0000000..a929b4a
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramParser.java
@@ -0,0 +1,306 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.whichProgram;
+
+import java_cup.runtime.lr_parser;
+
+import javax.swing.*;
+
+
+public class WhichProgramParser extends java_cup.runtime.lr_parser {
+
+  /** Default constructor. */
+  public WhichProgramParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public WhichProgramParser(java_cup.runtime.Scanner s) {super(s);}
+
+  /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\013\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\012\002" +
+                    "\000\002\006\006\000\002\013\002\000\002\007\007\000" +
+                    "\002\010\004\000\002\011\004"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\026\000\004\004\005\001\002\000\004\007\011\001" +
+                    "\002\000\004\007\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\006\005\027\007\011\001" +
+                    "\002\000\004\013\013\001\002\000\006\005\ufffd\007\ufffd" +
+                    "\001\002\000\004\006\ufffc\001\002\000\004\006\015\001" +
+                    "\002\000\004\012\017\001\002\000\006\005\ufffb\007\ufffb" +
+                    "\001\002\000\004\010\ufffa\001\002\000\004\010\021\001" +
+                    "\002\000\004\014\026\001\002\000\004\011\024\001\002" +
+                    "\000\006\005\ufff9\007\ufff9\001\002\000\004\015\025\001" +
+                    "\002\000\006\005\ufff7\007\ufff7\001\002\000\004\011\ufff8" +
+                    "\001\002\000\004\002\001\001\002\000\006\005\ufffe\007" +
+                    "\ufffe\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\026\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\007\006\011\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\004\006\027\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\004\012\013\001\001\000\004" +
+                    "\007\015\001\001\000\002\001\001\000\002\001\001\000" +
+                    "\004\013\017\001\001\000\004\010\021\001\001\000\002" +
+                    "\001\001\000\004\011\022\001\001\000\002\001\001\000" +
+                    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+                    "\001\001\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final WhichProgramParser parser;
+
+  /** Constructor */
+  CUP$parser$actions(WhichProgramParser WhichProgramParser) {
+    this.parser = WhichProgramParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // grad2 ::= RmsGrad RGRAD 
+            {
+              Object RESULT = null;
+		int rgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int rgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float rg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(7/*grad2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // grad1 ::= MaxGrad MGRAD 
+            {
+              Object RESULT = null;
+		int mgleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int mgright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float mg = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(6/*grad1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle ::= NSearch ITERATION NT$1 grad1 grad2 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$1
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(5/*cycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // NT$1 ::= 
+            {
+              Object RESULT = null;
+		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer c = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*NT$1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // scfcycle ::= Energ ENERGY NT$0 cycle 
+            {
+              Object RESULT = null;
+              // propagate RESULT from NT$0
+              if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null )
+                RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // NT$0 ::= 
+            {
+              Object RESULT = null;
+		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float e = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+ //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramSym.java
new file mode 100644
index 0000000..01fce30
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/whichProgram/WhichProgramSym.java
@@ -0,0 +1,43 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.whichProgram;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Wed Nov 12 18:52:46 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class WhichProgramSym {
+  /* terminals */
+  public static final int MGRAD = 10;
+  public static final int RmsGrad = 7;
+  public static final int Energ = 5;
+  public static final int MaxGrad = 6;
+  public static final int ENERGY = 9;
+  public static final int EOF = 0;
+  public static final int ITERATION = 8;
+  public static final int NSearch = 4;
+  public static final int RGRAD = 11;
+  public static final int error = 1;
+  public static final int SCFDONE = 3;
+  public static final int FOUNDITER = 2;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/resources/gridchem.properties
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/resources/gridchem.properties b/datacat/parsers/src/main/resources/gridchem.properties
new file mode 100644
index 0000000..859d6db
--- /dev/null
+++ b/datacat/parsers/src/main/resources/gridchem.properties
@@ -0,0 +1,16 @@
+TMP_DIR=/home/supun/datacat/tmp
+
+SAMPLE_OUTPUT=/home/supun/datacat/data_root/2H2OOHNCmin.com.out/2H2OOHNCmin.com.out
+
+ARCHIVING_NODE=localhost
+
+APPLICATION_NAME=gaussian 9
+
+USERNAME=sudhakar
+
+AGENT_USERNAME=datacat_agent
+
+AGENT_PASSWORD=agent_password
+
+#specify the parser sequence using commas ( ',' )
+PARSER_SEQUENCE= org.apache.airavata.datacat.parsers.gridchem.gopt.GoptParser
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/resources/regexParser.properties
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/resources/regexParser.properties b/datacat/parsers/src/main/resources/regexParser.properties
new file mode 100644
index 0000000..3464bf5
--- /dev/null
+++ b/datacat/parsers/src/main/resources/regexParser.properties
@@ -0,0 +1,9 @@
+#here you can specify which details to extract by
+#<key_value>=<regex>
+#ex: RMS FORCE=RMS\s+Force\s+(\d*\.?\d*)
+
+RMS_Force = RMS\s+Force\s+(\d*\.?\d*)
+Maximum_Force = Maximum\s+Force\s+(\d*\.?\d*)
+Maximum_Displacement =  Maximum\s+Displacement\s+(\d*\.?\d*)
+RMS_Displacement  = RMS\s+Displacement\s+(\d*\.?\d*)
+Energy = Predicted\s+change\s+in\s+Energy=(.*)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/AbstractGridChemParserTest.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/AbstractGridChemParserTest.java b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/AbstractGridChemParserTest.java
new file mode 100644
index 0000000..8ea3aaf
--- /dev/null
+++ b/datacat/parsers/src/test/java/org/apche/airavata/datacat/parsers/gridchem/AbstractGridChemParserTest.java
@@ -0,0 +1,39 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apche.airavata.datacat.parsers.gridchem;
+
+import org.apache.airavata.datacat.parsers.gridchem.util.Constants;
+import org.apache.airavata.datacat.parsers.gridchem.util.GridChemProperties;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+
+import java.util.Properties;
+
+public abstract class AbstractGridChemParserTest {
+    protected Properties testProperties;
+    protected String TEST_OUTPUT;
+    private Logger logger = Logger.getLogger(AbstractGridChemParserTest.class);
+
+    @Before
+    public void setUp() {
+        TEST_OUTPUT = GridChemProperties.getInstance().getProperty(Constants.SAMPLE_OUTPUT,"");
+    }
+}
\ No newline at end of file


[17/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordLexer.java
new file mode 100644
index 0000000..17c5cc4
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordLexer.java
@@ -0,0 +1,793 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mfinalcoord;/* The following code was generated by JFlex 1.4.3 on 9/12/14 12:00 AM */
+
+import java_cup.runtime.*;
+
+
+/**
+ * This class is a scanner generated by 
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/12/14 12:00 AM from the specification file
+ * <tt>mfinalcoord.flex</tt>
+ */
+public class MFinalCoordLexer implements java_cup.runtime.Scanner {
+
+  /** This character denotes the end of file */
+  public static final int YYEOF = -1;
+
+  /** initial size of the lookahead buffer */
+  private static final int ZZ_BUFFERSIZE = 16384;
+
+  /** lexical states */
+  public static final int INPUTF = 30;
+  public static final int ITER2 = 4;
+  public static final int INPUTE = 28;
+  public static final int INPUTD = 26;
+  public static final int INPUTC = 24;
+  public static final int INPUTB = 22;
+  public static final int INPUTA = 20;
+  public static final int INTVALUE = 8;
+  public static final int INPUT = 18;
+  public static final int IGNOREALL = 16;
+  public static final int ITER = 2;
+  public static final int YYINITIAL = 0;
+  public static final int FLOAT2 = 14;
+  public static final int FLOAT1 = 12;
+  public static final int FLOATVALUE = 10;
+  public static final int ITER3 = 6;
+
+  /**
+   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+   *                  at the beginning of a line
+   * l is of the form l = 2*k, k a non negative integer
+   */
+  private static final int ZZ_LEXSTATE[] = { 
+     0,  0,  1,  1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 
+     2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  9, 9
+  };
+
+  /** 
+   * Translates characters to character classes
+   */
+  private static final char [] ZZ_CMAP = {
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+    13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0, 20,  5,  0, 
+     1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 29,  0,  0,  0,  0,  0, 
+     0,  7, 33, 12, 15, 17,  6, 31, 30, 11,  3,  3, 32, 10, 16,  9, 
+     3,  3, 14, 18,  8,  3,  3,  3, 39, 40, 19,  0,  0,  0,  0,  2, 
+     0, 21,  3,  3, 34, 27,  3, 36, 37, 24,  3,  3, 35,  3, 28, 26, 
+     3,  3, 23, 38, 22,  3,  3,  3, 25,  3,  3,  0,  4,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+  };
+
+  /** 
+   * Translates DFA states to action switch labels.
+   */
+  private static final int [] ZZ_ACTION = zzUnpackAction();
+
+  private static final String ZZ_ACTION_PACKED_0 =
+    "\12\0\6\1\1\2\2\1\2\3\11\1\25\0\1\4"+
+    "\1\5\1\6\1\7\120\0\1\10\20\0\1\11\6\0"+
+    "\1\12\6\0\1\13\25\0\1\14\45\0\1\15";
+
+  private static int [] zzUnpackAction() {
+    int [] result = new int[227];
+    int offset = 0;
+    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAction(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /** 
+   * Translates a state to a row index in the transition table
+   */
+  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+  private static final String ZZ_ROWMAP_PACKED_0 =
+    "\0\0\0\51\0\122\0\173\0\244\0\315\0\366\0\u011f"+
+    "\0\u0148\0\u0171\0\u019a\0\u01c3\0\u01ec\0\u0215\0\u023e\0\u0267"+
+    "\0\u0290\0\u0290\0\u02b9\0\u019a\0\u02e2\0\u030b\0\u0334\0\u035d"+
+    "\0\u0386\0\u03af\0\u03d8\0\u0401\0\u042a\0\u0453\0\u047c\0\u04a5"+
+    "\0\u04ce\0\u04f7\0\u0520\0\u0549\0\u030b\0\u0572\0\u035d\0\u059b"+
+    "\0\u03af\0\u05c4\0\u0401\0\u05ed\0\u0616\0\u063f\0\u0668\0\u0691"+
+    "\0\u06ba\0\u06e3\0\u070c\0\u0572\0\u059b\0\u05c4\0\u05ed\0\u0735"+
+    "\0\u075e\0\u0787\0\u07b0\0\u07d9\0\u0802\0\u082b\0\u0854\0\u087d"+
+    "\0\u08a6\0\u08cf\0\u08f8\0\u0921\0\u094a\0\u0973\0\u099c\0\u09c5"+
+    "\0\u09ee\0\u0a17\0\u0a40\0\u0a69\0\u0a92\0\u0abb\0\u0ae4\0\u0b0d"+
+    "\0\u0b36\0\u0b5f\0\u0b88\0\u0bb1\0\u0bda\0\u0c03\0\u0c2c\0\u0c55"+
+    "\0\u0c7e\0\u0ca7\0\u0cd0\0\u0cf9\0\u0d22\0\u0d4b\0\u0d74\0\u0d9d"+
+    "\0\u0dc6\0\u0def\0\u0e18\0\u0e41\0\u0e6a\0\u0e93\0\u0ebc\0\u0ee5"+
+    "\0\u0f0e\0\u0f37\0\u0f60\0\u0f89\0\u0fb2\0\u0fdb\0\u1004\0\u102d"+
+    "\0\u1056\0\u107f\0\u10a8\0\u10d1\0\u10fa\0\u1123\0\u114c\0\u1175"+
+    "\0\u119e\0\u11c7\0\u11f0\0\u1219\0\u1242\0\u126b\0\u1294\0\u12bd"+
+    "\0\u12e6\0\u130f\0\u1338\0\u1361\0\u138a\0\u13b3\0\u13dc\0\u019a"+
+    "\0\u1405\0\u142e\0\u1457\0\u1480\0\u14a9\0\u14d2\0\u14fb\0\u1524"+
+    "\0\u154d\0\u1576\0\u159f\0\u15c8\0\u15f1\0\u161a\0\u1643\0\u166c"+
+    "\0\u019a\0\u1695\0\u16be\0\u16e7\0\u1710\0\u1739\0\u1762\0\u019a"+
+    "\0\u178b\0\u17b4\0\u17dd\0\u1806\0\u182f\0\u1858\0\u019a\0\u1881"+
+    "\0\u18aa\0\u18d3\0\u18fc\0\u1925\0\u194e\0\u1977\0\u19a0\0\u19c9"+
+    "\0\u19f2\0\u1a1b\0\u1a44\0\u1a6d\0\u1a96\0\u1abf\0\u1ae8\0\u1b11"+
+    "\0\u1b3a\0\u1b63\0\u1b8c\0\u1bb5\0\u019a\0\u1bde\0\u1c07\0\u1c30"+
+    "\0\u1c59\0\u1c82\0\u1cab\0\u1cd4\0\u1cfd\0\u1d26\0\u1d4f\0\u1d78"+
+    "\0\u1da1\0\u1dca\0\u1df3\0\u1e1c\0\u1e45\0\u1e6e\0\u1e97\0\u1ec0"+
+    "\0\u1ee9\0\u1f12\0\u1f3b\0\u1f64\0\u1f8d\0\u1fb6\0\u1fdf\0\u2008"+
+    "\0\u2031\0\u205a\0\u2083\0\u20ac\0\u20d5\0\u20fe\0\u2127\0\u2150"+
+    "\0\u2179\0\u21a2\0\u019a";
+
+  private static int [] zzUnpackRowMap() {
+    int [] result = new int[227];
+    int offset = 0;
+    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+    int i = 0;  /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int high = packed.charAt(i++) << 16;
+      result[j++] = high | packed.charAt(i++);
+    }
+    return j;
+  }
+
+  /** 
+   * The transition table of the DFA
+   */
+  private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+  private static final String ZZ_TRANS_PACKED_0 =
+    "\7\13\1\14\13\13\1\15\35\13\1\16\7\13\1\17"+
+    "\20\13\1\20\61\13\1\21\2\13\1\22\17\13\1\23"+
+    "\26\13\1\24\1\25\2\13\7\25\1\13\6\25\1\13"+
+    "\10\25\1\13\13\25\1\13\1\26\2\13\1\27\17\13"+
+    "\1\27\25\13\1\30\2\13\1\31\17\13\1\31\25\13"+
+    "\1\32\2\13\1\33\17\13\1\33\25\13\1\34\2\13"+
+    "\1\35\17\13\1\35\73\13\1\36\1\13\61\0\1\37"+
+    "\64\0\1\40\62\0\1\41\30\0\1\42\64\0\1\43"+
+    "\17\0\1\21\50\0\1\21\22\0\1\44\25\0\1\25"+
+    "\50\0\1\45\3\0\1\46\44\0\1\45\50\0\1\47"+
+    "\3\0\1\50\44\0\1\47\50\0\1\51\3\0\1\52"+
+    "\44\0\1\51\50\0\1\53\3\0\1\54\44\0\1\53"+
+    "\64\0\1\55\44\0\1\56\51\0\1\57\57\0\1\60"+
+    "\44\0\1\61\67\0\1\62\40\0\1\63\25\0\1\64"+
+    "\50\0\1\65\50\0\1\66\50\0\1\67\64\0\1\70"+
+    "\45\0\1\71\63\0\1\72\25\0\1\73\63\0\1\74"+
+    "\75\0\1\75\32\0\1\76\41\0\1\77\46\0\1\100"+
+    "\63\0\1\101\43\0\1\102\36\0\1\103\56\0\1\104"+
+    "\57\0\1\105\41\0\1\106\47\0\1\107\63\0\1\110"+
+    "\41\0\1\111\40\0\1\112\103\0\1\113\31\0\1\114"+
+    "\41\0\1\115\50\0\1\116\63\0\1\117\37\0\1\120"+
+    "\42\0\1\121\72\0\1\122\41\0\1\123\41\0\1\124"+
+    "\47\0\1\125\65\0\1\126\21\0\1\127\60\0\1\130"+
+    "\72\0\1\131\40\0\1\132\41\0\1\133\44\0\1\134"+
+    "\54\0\1\135\44\0\1\136\54\0\1\137\77\0\1\140"+
+    "\30\0\1\141\41\0\1\142\44\0\1\143\71\0\1\144"+
+    "\24\0\1\145\57\0\1\146\61\0\1\147\46\0\1\150"+
+    "\41\0\1\151\51\0\1\152\61\0\1\153\23\0\1\154"+
+    "\63\0\1\155\100\0\1\156\27\0\1\157\41\0\1\160"+
+    "\52\0\1\161\61\0\1\162\26\0\1\163\57\0\1\164"+
+    "\101\0\1\165\26\0\1\166\41\0\1\167\46\0\1\170"+
+    "\70\0\1\171\30\0\1\172\51\0\1\173\51\0\1\174"+
+    "\57\0\1\175\41\0\1\176\53\0\1\177\64\0\1\200"+
+    "\54\0\1\201\46\0\1\202\42\0\1\203\44\0\1\204"+
+    "\41\0\1\205\42\0\1\206\67\0\1\207\43\0\1\210"+
+    "\36\0\1\211\75\0\1\212\40\0\1\213\41\0\1\214"+
+    "\43\0\1\215\65\0\1\216\41\0\1\217\47\0\1\220"+
+    "\57\0\1\221\74\0\1\222\21\0\1\223\55\0\1\224"+
+    "\61\0\1\225\52\0\1\226\33\0\1\227\41\0\1\230"+
+    "\55\0\1\231\56\0\1\232\41\0\1\233\61\0\1\234"+
+    "\42\0\1\235\41\0\1\236\65\0\1\237\33\0\1\240"+
+    "\100\0\1\241\27\0\1\242\41\0\1\243\67\0\1\244"+
+    "\43\0\1\210\45\0\1\245\41\0\1\246\70\0\1\247"+
+    "\37\0\1\250\41\0\1\251\57\0\1\252\41\0\1\253"+
+    "\57\0\1\254\41\0\1\255\57\0\1\256\41\0\1\257"+
+    "\57\0\1\260\41\0\1\261\57\0\1\262\41\0\1\263"+
+    "\57\0\1\264\41\0\1\265\57\0\1\266\41\0\1\267"+
+    "\57\0\1\270\41\0\1\271\57\0\1\272\41\0\1\273"+
+    "\57\0\1\274\47\0\1\275\51\0\1\276\50\0\1\277"+
+    "\50\0\1\300\50\0\1\301\50\0\1\302\50\0\1\303"+
+    "\50\0\1\304\50\0\1\305\50\0\1\306\50\0\1\307"+
+    "\50\0\1\310\50\0\1\311\50\0\1\312\50\0\1\313"+
+    "\50\0\1\314\50\0\1\315\50\0\1\316\50\0\1\317"+
+    "\50\0\1\320\50\0\1\321\50\0\1\322\50\0\1\323"+
+    "\50\0\1\324\50\0\1\325\50\0\1\326\50\0\1\327"+
+    "\50\0\1\330\50\0\1\331\50\0\1\332\50\0\1\333"+
+    "\50\0\1\334\50\0\1\335\50\0\1\336\50\0\1\337"+
+    "\50\0\1\340\50\0\1\341\50\0\1\342\50\0\1\343"+
+    "\24\0";
+
+  private static int [] zzUnpackTrans() {
+    int [] result = new int[8651];
+    int offset = 0;
+    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackTrans(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      value--;
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+
+  /* error codes */
+  private static final int ZZ_UNKNOWN_ERROR = 0;
+  private static final int ZZ_NO_MATCH = 1;
+  private static final int ZZ_PUSHBACK_2BIG = 2;
+
+  /* error messages for the codes above */
+  private static final String ZZ_ERROR_MSG[] = {
+    "Unkown internal scanner error",
+    "Error: could not match input",
+    "Error: pushback value was too large"
+  };
+
+  /**
+   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+   */
+  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+  private static final String ZZ_ATTRIBUTE_PACKED_0 =
+    "\12\0\1\11\10\1\1\11\12\1\25\0\4\1\120\0"+
+    "\1\11\20\0\1\11\6\0\1\11\6\0\1\11\25\0"+
+    "\1\11\45\0\1\11";
+
+  private static int [] zzUnpackAttribute() {
+    int [] result = new int[227];
+    int offset = 0;
+    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+    return result;
+  }
+
+  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+    int i = 0;       /* index in packed string  */
+    int j = offset;  /* index in unpacked array */
+    int l = packed.length();
+    while (i < l) {
+      int count = packed.charAt(i++);
+      int value = packed.charAt(i++);
+      do result[j++] = value; while (--count > 0);
+    }
+    return j;
+  }
+
+  /** the input device */
+  private java.io.Reader zzReader;
+
+  /** the current state of the DFA */
+  private int zzState;
+
+  /** the current lexical state */
+  private int zzLexicalState = YYINITIAL;
+
+  /** this buffer contains the current text to be matched and is
+      the source of the yytext() string */
+  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+
+  /** the textposition at the last accepting state */
+  private int zzMarkedPos;
+
+  /** the current text position in the buffer */
+  private int zzCurrentPos;
+
+  /** startRead marks the beginning of the yytext() string in the buffer */
+  private int zzStartRead;
+
+  /** endRead marks the last character in the buffer, that has been read
+      from input */
+  private int zzEndRead;
+
+  /** number of newlines encountered up to the start of the matched text */
+  private int yyline;
+
+  /** the number of characters up to the start of the matched text */
+  private int yychar;
+
+  /**
+   * the number of characters from the last newline up to the start of the 
+   * matched text
+   */
+  private int yycolumn;
+
+  /** 
+   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+   */
+  private boolean zzAtBOL = true;
+
+  /** zzAtEOF == true <=> the scanner is at the EOF */
+  private boolean zzAtEOF;
+
+  /** denotes if the user-EOF-code has already been executed */
+  private boolean zzEOFDone;
+
+  /* user code: */
+  public static boolean DEBUG = false;
+
+
+  /**
+   * Creates a new scanner
+   * There is also a java.io.InputStream version of this constructor.
+   *
+   * @param   in  the java.io.Reader to read input from.
+   */
+  public MFinalCoordLexer(java.io.Reader in) {
+    this.zzReader = in;
+  }
+
+  /**
+   * Creates a new scanner.
+   * There is also java.io.Reader version of this constructor.
+   *
+   * @param   in  the java.io.Inputstream to read input from.
+   */
+  public MFinalCoordLexer(java.io.InputStream in) {
+    this(new java.io.InputStreamReader(in));
+  }
+
+
+  /**
+   * Refills the input buffer.
+   *
+   * @return      <code>false</code>, iff there was new input.
+   * 
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+    if (zzStartRead > 0) {
+      System.arraycopy(zzBuffer, zzStartRead,
+                       zzBuffer, 0,
+                       zzEndRead-zzStartRead);
+
+      /* translate stored positions */
+      zzEndRead-= zzStartRead;
+      zzCurrentPos-= zzStartRead;
+      zzMarkedPos-= zzStartRead;
+      zzStartRead = 0;
+    }
+
+    /* is the buffer big enough? */
+    if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+      char newBuffer[] = new char[zzCurrentPos*2];
+      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+      zzBuffer = newBuffer;
+    }
+
+    /* finally: fill the buffer with new input */
+    int numRead = zzReader.read(zzBuffer, zzEndRead,
+                                            zzBuffer.length-zzEndRead);
+
+    if (numRead > 0) {
+      zzEndRead+= numRead;
+      return false;
+    }
+    // unlikely but not impossible: read 0 characters, but not at end of stream    
+    if (numRead == 0) {
+      int c = zzReader.read();
+      if (c == -1) {
+        return true;
+      } else {
+        zzBuffer[zzEndRead++] = (char) c;
+        return false;
+      }     
+    }
+
+	// numRead < 0
+    return true;
+  }
+
+    
+  /**
+   * Closes the input stream.
+   */
+  public final void yyclose() throws java.io.IOException {
+    zzAtEOF = true;            /* indicate end of file */
+    zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+    if (zzReader != null)
+      zzReader.close();
+  }
+
+
+  /**
+   * Resets the scanner to read from a new input stream.
+   * Does not close the old reader.
+   *
+   * All internal variables are reset, the old input stream 
+   * <b>cannot</b> be reused (internal buffer is discarded and lost).
+   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+   *
+   * @param reader   the new input stream 
+   */
+  public final void yyreset(java.io.Reader reader) {
+    zzReader = reader;
+    zzAtBOL  = true;
+    zzAtEOF  = false;
+    zzEOFDone = false;
+    zzEndRead = zzStartRead = 0;
+    zzCurrentPos = zzMarkedPos = 0;
+    yyline = yychar = yycolumn = 0;
+    zzLexicalState = YYINITIAL;
+  }
+
+
+  /**
+   * Returns the current lexical state.
+   */
+  public final int yystate() {
+    return zzLexicalState;
+  }
+
+
+  /**
+   * Enters a new lexical state
+   *
+   * @param newState the new lexical state
+   */
+  public final void yybegin(int newState) {
+    zzLexicalState = newState;
+  }
+
+
+  /**
+   * Returns the text matched by the current regular expression.
+   */
+  public final String yytext() {
+    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+  }
+
+
+  /**
+   * Returns the character at position <tt>pos</tt> from the 
+   * matched text. 
+   * 
+   * It is equivalent to yytext().charAt(pos), but faster
+   *
+   * @param pos the position of the character to fetch. 
+   *            A value from 0 to yylength()-1.
+   *
+   * @return the character at position pos
+   */
+  public final char yycharat(int pos) {
+    return zzBuffer[zzStartRead+pos];
+  }
+
+
+  /**
+   * Returns the length of the matched text region.
+   */
+  public final int yylength() {
+    return zzMarkedPos-zzStartRead;
+  }
+
+
+  /**
+   * Reports an error that occured while scanning.
+   *
+   * In a wellformed scanner (no or only correct usage of 
+   * yypushback(int) and a match-all fallback rule) this method 
+   * will only be called with things that "Can't Possibly Happen".
+   * If this method is called, something is seriously wrong
+   * (e.g. a JFlex bug producing a faulty scanner etc.).
+   *
+   * Usual syntax/scanner level error handling should be done
+   * in error fallback rules.
+   *
+   * @param   errorCode  the code of the errormessage to display
+   */
+  private void zzScanError(int errorCode) {
+    String message;
+    try {
+      message = ZZ_ERROR_MSG[errorCode];
+    }
+    catch (ArrayIndexOutOfBoundsException e) {
+      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+    }
+
+    throw new Error(message);
+  } 
+
+
+  /**
+   * Pushes the specified amount of characters back into the input stream.
+   *
+   * They will be read again by then next call of the scanning method
+   *
+   * @param number  the number of characters to be read again.
+   *                This number must not be greater than yylength()!
+   */
+  public void yypushback(int number)  {
+    if ( number > yylength() )
+      zzScanError(ZZ_PUSHBACK_2BIG);
+
+    zzMarkedPos -= number;
+  }
+
+
+  /**
+   * Contains user EOF-code, which will be executed exactly once,
+   * when the end of file is reached
+   */
+  private void zzDoEOF() throws java.io.IOException {
+    if (!zzEOFDone) {
+      zzEOFDone = true;
+      yyclose();
+    }
+  }
+
+
+  /**
+   * Resumes scanning until the next regular expression is matched,
+   * the end of input is encountered or an I/O-Error occurs.
+   *
+   * @return      the next token
+   * @exception   java.io.IOException  if any I/O-Error occurs
+   */
+  public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+    int zzInput;
+    int zzAction;
+
+    // cached fields:
+    int zzCurrentPosL;
+    int zzMarkedPosL;
+    int zzEndReadL = zzEndRead;
+    char [] zzBufferL = zzBuffer;
+    char [] zzCMapL = ZZ_CMAP;
+
+    int [] zzTransL = ZZ_TRANS;
+    int [] zzRowMapL = ZZ_ROWMAP;
+    int [] zzAttrL = ZZ_ATTRIBUTE;
+
+    while (true) {
+      zzMarkedPosL = zzMarkedPos;
+
+      zzAction = -1;
+
+      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+  
+      zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+      zzForAction: {
+        while (true) {
+    
+          if (zzCurrentPosL < zzEndReadL)
+            zzInput = zzBufferL[zzCurrentPosL++];
+          else if (zzAtEOF) {
+            zzInput = YYEOF;
+            break zzForAction;
+          }
+          else {
+            // store back cached positions
+            zzCurrentPos  = zzCurrentPosL;
+            zzMarkedPos   = zzMarkedPosL;
+            boolean eof = zzRefill();
+            // get translated positions and possibly new buffer
+            zzCurrentPosL  = zzCurrentPos;
+            zzMarkedPosL   = zzMarkedPos;
+            zzBufferL      = zzBuffer;
+            zzEndReadL     = zzEndRead;
+            if (eof) {
+              zzInput = YYEOF;
+              break zzForAction;
+            }
+            else {
+              zzInput = zzBufferL[zzCurrentPosL++];
+            }
+          }
+          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+          if (zzNext == -1) break zzForAction;
+          zzState = zzNext;
+
+          int zzAttributes = zzAttrL[zzState];
+          if ( (zzAttributes & 1) == 1 ) {
+            zzAction = zzState;
+            zzMarkedPosL = zzCurrentPosL;
+            if ( (zzAttributes & 8) == 8 ) break zzForAction;
+          }
+
+        }
+      }
+
+      // store back cached position
+      zzMarkedPos = zzMarkedPosL;
+
+      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+        case 2: 
+          { yybegin (INPUTA);
+   return new Symbol(MFinalCoordSym.INPUT2, new Integer(yytext()));
+          }
+        case 14: break;
+        case 7: 
+          { yybegin (INPUT);
+   return new Symbol(MFinalCoordSym.INPUT7, new Float(yytext()));
+          }
+        case 15: break;
+        case 8: 
+          { yybegin(IGNOREALL);
+      return new Symbol(MFinalCoordSym.SCFDONE);
+          }
+        case 16: break;
+        case 10: 
+          { yybegin(INPUTF);
+            return new Symbol(MFinalCoordSym.INPUT1);
+          }
+        case 17: break;
+        case 5: 
+          { yybegin (INPUTD);
+   return new Symbol(MFinalCoordSym.INPUT5, new Float(yytext()));
+          }
+        case 18: break;
+        case 12: 
+          { yybegin (INPUT);
+   return new Symbol(MFinalCoordSym.DASH1);
+          }
+        case 19: break;
+        case 4: 
+          { yybegin (INPUTC);
+   return new Symbol(MFinalCoordSym.INPUT4, new Float(yytext()));
+          }
+        case 20: break;
+        case 3: 
+          { yybegin (INPUTB);
+   return new Symbol(MFinalCoordSym.INPUT3);
+          }
+        case 21: break;
+        case 6: 
+          { yybegin (INPUTE);
+   return new Symbol(MFinalCoordSym.INPUT6, new Float(yytext()));
+          }
+        case 22: break;
+        case 11: 
+          { yybegin(ITER);
+           return new Symbol(MFinalCoordSym.FOUNDITER);
+          }
+        case 23: break;
+        case 9: 
+          { yybegin(ITER);
+	   return new Symbol(MFinalCoordSym.FOUNDITER);
+          }
+        case 24: break;
+        case 13: 
+          { yybegin (ITER);
+   return new Symbol(MFinalCoordSym.DASH2);
+          }
+        case 25: break;
+        case 1: 
+          { 
+          }
+        case 26: break;
+        default: 
+          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+            zzAtEOF = true;
+            zzDoEOF();
+              { return new java_cup.runtime.Symbol(MFinalCoordSym.EOF); }
+          } 
+          else {
+            zzScanError(ZZ_NO_MATCH);
+          }
+      }
+    }
+  }
+
+  /**
+   * Converts an int token code into the name of the
+   * token by reflection on the cup symbol class/interface sym
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  private String getTokenName(int token) {
+    try {
+      java.lang.reflect.Field [] classFields = MFinalCoordSym.class.getFields();
+      for (int i = 0; i < classFields.length; i++) {
+        if (classFields[i].getInt(null) == token) {
+          return classFields[i].getName();
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+
+    return "UNKNOWN TOKEN";
+  }
+
+  /**
+   * Same as next_token but also prints the token to standard out
+   * for debugging.
+   *
+   * This code was contributed by Karl Meissner <me...@yahoo.com>
+   */
+  public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+    java_cup.runtime.Symbol s = next_token();
+    System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--");
+    return s;
+  }
+
+  /**
+   * Runs the scanner on input files.
+   *
+   * This is a standalone scanner, it will print any unmatched
+   * text to System.out unchanged.
+   *
+   * @param argv   the command line, contains the filenames to run
+   *               the scanner on.
+   */
+  public static void main(String argv[]) {
+    if (argv.length == 0) {
+      System.out.println("Usage : java MFinalCoordLexer <inputfile>");
+    }
+    else {
+      for (int i = 0; i < argv.length; i++) {
+        MFinalCoordLexer scanner = null;
+        try {
+          scanner = new MFinalCoordLexer( new java.io.FileReader(argv[i]) );
+          while ( !scanner.zzAtEOF ) scanner.next_token();
+        }
+        catch (java.io.FileNotFoundException e) {
+          System.out.println("File not found : \""+argv[i]+"\"");
+        }
+        catch (java.io.IOException e) {
+          System.out.println("IO error scanning file \""+argv[i]+"\"");
+          System.out.println(e);
+        }
+        catch (Exception e) {
+          System.out.println("Unexpected exception:");
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParser.java
new file mode 100644
index 0000000..53db468
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordParser.java
@@ -0,0 +1,408 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mfinalcoord;
+
+
+import java_cup.runtime.lr_parser;
+import org.apache.airavata.datacat.parsers.gridchem.GridChemQueueParser;
+
+import javax.swing.*;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+
+public class MFinalCoordParser extends java_cup.runtime.lr_parser implements GridChemQueueParser {
+
+  /** Default constructor. */
+  public MFinalCoordParser() {super();}
+
+  /** Constructor which sets the default scanner. */
+  public MFinalCoordParser(java_cup.runtime.Scanner s) {super(s);}
+
+    /**
+     * Constructor which uses a file reader.
+     */
+    public MFinalCoordParser(final FileReader fileReader) {
+        super(new MFinalCoordLexer(fileReader));
+    }
+
+
+    /** Production table. */
+  protected static final short _production_table[][] = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\016\000\002\003\005\000\002\002\004\000\002\004" +
+                    "\003\000\002\005\004\000\002\005\003\000\002\006\006" +
+                    "\000\002\017\004\000\002\017\003\000\002\020\010\000" +
+                    "\002\012\003\000\002\013\003\000\002\014\003\000\002" +
+                    "\015\003\000\002\016\003"});
+
+  /** Access to production table. */
+  public short[][] production_table() {return _production_table;}
+
+  /** Parse-action table. */
+  protected static final short[][] _action_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\032\000\004\005\005\001\002\000\004\004\010\001" +
+                    "\002\000\004\004\uffff\001\002\000\004\002\007\001\002" +
+                    "\000\004\002\000\001\002\000\004\007\015\001\002\000" +
+                    "\006\004\010\006\013\001\002\000\006\004\ufffd\006\ufffd" +
+                    "\001\002\000\004\002\001\001\002\000\006\004\ufffe\006" +
+                    "\ufffe\001\002\000\004\011\016\001\002\000\004\012\ufff8" +
+                    "\001\002\000\004\012\025\001\002\000\006\010\ufffa\011" +
+                    "\ufffa\001\002\000\006\010\022\011\016\001\002\000\006" +
+                    "\004\ufffc\006\ufffc\001\002\000\006\010\ufffb\011\ufffb\001" +
+                    "\002\000\004\013\026\001\002\000\004\013\ufff7\001\002" +
+                    "\000\004\016\027\001\002\000\004\017\ufff6\001\002\000" +
+                    "\004\017\031\001\002\000\004\020\ufff5\001\002\000\004" +
+                    "\020\033\001\002\000\006\010\ufff4\011\ufff4\001\002\000" +
+                    "\006\010\ufff9\011\ufff9\001\002"});
+
+  /** Access to parse-action table. */
+  public short[][] action_table() {return _action_table;}
+
+  /** <code>reduce_goto</code> table. */
+  protected static final short[][] _reduce_table = 
+    lr_parser.unpackFromStrings(new String[]{
+            "\000\032\000\006\003\005\004\003\001\001\000\006\005" +
+                    "\010\006\011\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\002\001\001\000\002\001\001\000\004\006\013\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+                    "\000\010\012\016\017\020\020\017\001\001\000\002\001" +
+                    "\001\000\004\013\023\001\001\000\002\001\001\000\006" +
+                    "\012\016\020\022\001\001\000\002\001\001\000\002\001" +
+                    "\001\000\002\001\001\000\002\001\001\000\004\014\027" +
+                    "\001\001\000\002\001\001\000\004\015\031\001\001\000" +
+                    "\002\001\001\000\004\016\033\001\001\000\002\001\001" +
+                    "\000\002\001\001"});
+
+  /** Access to <code>reduce_goto</code> table. */
+  public short[][] reduce_table() {return _reduce_table;}
+
+  /** Instance of action encapsulation class. */
+  protected CUP$parser$actions action_obj;
+
+    //Each string is of the format
+    //center# atomic# x_coord y_coord z_coord
+    private ArrayList<String> result = new ArrayList<String>();
+    private String tempStr = "";
+
+
+
+    public ArrayList<String> getResult() {
+        return result;
+    }
+
+    public void addToResult(String value) {
+        result.add(value);
+    }
+
+    public String getTempStr() {
+        return tempStr;
+    }
+
+    public void setTempStr(String s) {
+        this.tempStr = s;
+    }
+
+    /*Adding the parsed data to the hash map */
+    @Override
+    public HashMap<String, String> getParsedData() throws Exception {
+        parse();
+        HashMap<String,String> results= new HashMap<String,String>();
+        int zCount=0;
+        int xCount=0;
+        int yCount=0;
+        int center=0;
+        int atom=0;
+        for(int i=0;i<result.size();i++) {
+            String singleString = result.get(i);
+            String[] temp = singleString.split(" ");
+            if (temp.length > 1) {
+                String keyElement = temp[0];
+                String dataElement = temp[1];
+                if (keyElement.equals("Z")) {
+                    results.put("FinalCoordParser_Z_coord_" + zCount, dataElement);
+                    zCount++;
+                } else if (keyElement.equals("Y")) {
+                    results.put("FinalCoordParser_Y_coord_" + yCount, dataElement);
+                    yCount++;
+                } else if (keyElement.equals("X")) {
+                    results.put("FinalCoordParser_X_coord_" + xCount, dataElement);
+                    xCount++;
+                } else if (keyElement.equals("Atom")) {
+                    results.put("FinalCoordParser_AtomicNumber_" + atom, dataElement);
+                    atom++;
+                } else if (keyElement.equals("center")) {
+                    results.put("FinalCoordParser_CenterNumber_" + center, dataElement);
+                    center++;
+                }
+            }
+        }
+return results;
+
+
+        }
+
+  /** Action encapsulation object initializer. */
+  protected void init_actions()
+    {
+      action_obj = new CUP$parser$actions(this);
+    }
+
+  /** Invoke a user supplied parse action. */
+  public java_cup.runtime.Symbol do_action(
+    int                        act_num,
+    java_cup.runtime.lr_parser parser,
+    java.util.Stack            stack,
+    int                        top)
+    throws java.lang.Exception
+  {
+    /* call code in generated class */
+    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
+  }
+
+  /** Indicates start state. */
+  public int start_state() {return 0;}
+  /** Indicates start production. */
+  public int start_production() {return 1;}
+
+  /** <code>EOF</code> Symbol index. */
+  public int EOF_sym() {return 0;}
+
+  /** <code>error</code> Symbol index. */
+  public int error_sym() {return 1;}
+
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$parser$actions {
+
+ 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+
+  private final MFinalCoordParser MFinalCoordParser;
+
+  /** Constructor */
+  CUP$parser$actions(MFinalCoordParser MFinalCoordParser) {
+    this.MFinalCoordParser = MFinalCoordParser;
+  }
+
+  /** Method with the actual generated action code. */
+  public final java_cup.runtime.Symbol CUP$parser$do_action(
+    int                        CUP$parser$act_num,
+    java_cup.runtime.lr_parser CUP$parser$parser,
+    java.util.Stack            CUP$parser$stack,
+    int                        CUP$parser$top)
+    throws java.lang.Exception
+    {
+      /* Symbol object for return from actions */
+      java_cup.runtime.Symbol CUP$parser$result;
+
+      /* select the action based on the action number */
+      switch (CUP$parser$act_num)
+        {
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 13: // inp7 ::= INPUT7 
+            {
+              Object RESULT = null;
+		int in7left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in7right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in7 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+                MFinalCoordParser.addToResult("Z "+in7);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(12/*inp7*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 12: // inp6 ::= INPUT6 
+            {
+              Object RESULT = null;
+		int in6left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in6right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in6 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+                MFinalCoordParser.addToResult("Y "+in6);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(11/*inp6*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 11: // inp5 ::= INPUT5 
+            {
+              Object RESULT = null;
+		int in5left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in5right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Float in5 = (Float)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+                MFinalCoordParser.addToResult("X "+in5);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(10/*inp5*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 10: // inp3 ::= INPUT3 
+            {
+              Object RESULT = null;
+		int in3left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in3right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer in3 = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3);
+                MFinalCoordParser.addToResult("Atom "+in3);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(9/*inp3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 9: // inp2 ::= INPUT2 
+            {
+              Object RESULT = null;
+		int in2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
+		int in2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
+		Integer in2 = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
+		 //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  center number "+in2);
+                MFinalCoordParser.addToResult("center "+in2);
+ 
+              CUP$parser$result = new java_cup.runtime.Symbol(8/*inp2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 8: // cycle2 ::= inp2 inp3 INPUT4 inp5 inp6 inp7 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(14/*cycle2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 7: // cycle1 ::= cycle2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*cycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 6: // cycle1 ::= cycle1 cycle2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(13/*cycle1*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 5: // scfcycle ::= INPUT1 DASH1 cycle1 DASH2 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(4/*scfcycle*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 4: // scfpat ::= scfcycle 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 3: // scfpat ::= scfpat scfcycle 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:Input: in scfpat"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(3/*scfpat*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 2: // scfintro ::= FOUNDITER 
+            {
+              Object RESULT = null;
+		 if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); 
+              CUP$parser$result = new java_cup.runtime.Symbol(2/*scfintro*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 1: // $START ::= startpt EOF 
+            {
+              Object RESULT = null;
+		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
+		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
+		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
+		RESULT = start_val;
+              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          /* ACCEPT */
+          CUP$parser$parser.done_parsing();
+          return CUP$parser$result;
+
+          /*. . . . . . . . . . . . . . . . . . . .*/
+          case 0: // startpt ::= scfintro scfpat SCFDONE 
+            {
+              Object RESULT = null;
+
+              CUP$parser$result = new java_cup.runtime.Symbol(1/*startpt*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
+            }
+          return CUP$parser$result;
+
+          /* . . . . . .*/
+          default:
+            throw new Exception(
+               "Invalid action number found in internal parse table");
+
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordSym.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordSym.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordSym.java
new file mode 100644
index 0000000..0f11011
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mfinalcoord/MFinalCoordSym.java
@@ -0,0 +1,46 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mfinalcoord;
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Fri Sep 12 00:01:06 IST 2014
+//----------------------------------------------------
+
+/** CUP generated class containing symbol constants. */
+public class MFinalCoordSym {
+  /* terminals */
+  public static final int ENERGY = 11;
+  public static final int EOF = 0;
+  public static final int ITERATION = 10;
+  public static final int INPUT7 = 14;
+  public static final int error = 1;
+  public static final int INPUT6 = 13;
+  public static final int INPUT5 = 12;
+  public static final int INPUT4 = 9;
+  public static final int SCFDONE = 4;
+  public static final int INPUT3 = 8;
+  public static final int FOUNDITER = 3;
+  public static final int INPUT2 = 7;
+  public static final int DASH2 = 6;
+  public static final int INPUT1 = 2;
+  public static final int DASH1 = 5;
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaLexer.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaLexer.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaLexer.java
new file mode 100644
index 0000000..a7d9f0f
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/gridchem/mopta/MOptaLexer.java
@@ -0,0 +1,830 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers.gridchem.mopta;/* The following code was generated by JFlex 1.4.3 on 9/12/14 12:11 AM */
+
+import java_cup.runtime.Symbol;
+import org.apache.airavata.datacat.parsers.gridchem.Settings;
+
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 9/12/14 12:11 AM from the specification file
+ * <tt>mopta.flex</tt>
+ */
+public class MOptaLexer implements java_cup.runtime.Scanner {
+
+    /**
+     * This character denotes the end of file
+     */
+    public static final int YYEOF = -1;
+    /**
+     * lexical states
+     */
+    public static final int ITER2 = 6;
+    public static final int DASH = 10;
+    public static final int INTVALUE = 12;
+    public static final int SCF1 = 2;
+    public static final int IGNOREALL = 30;
+    public static final int ITER = 4;
+    public static final int YYINITIAL = 0;
+    /**
+     * the current lexical state
+     */
+    private int zzLexicalState = YYINITIAL;
+    public static final int ITER9 = 22;
+    public static final int ITER12 = 28;
+    public static final int ITER8 = 8;
+    public static final int ITER11 = 26;
+    public static final int ITER7 = 20;
+    public static final int ITER10 = 24;
+    public static final int ITER6 = 18;
+    public static final int ITER5 = 16;
+    public static final int ITER4 = 14;
+    /**
+     * initial size of the lookahead buffer
+     */
+    private static final int ZZ_BUFFERSIZE = 16384;
+    /**
+     * this buffer contains the current text to be matched and is
+     * the source of the yytext() string
+     */
+    private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+    /**
+     * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+     * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+     * at the beginning of a line
+     * l is of the form l = 2*k, k a non negative integer
+     */
+    private static final int ZZ_LEXSTATE[] = {
+            0, 0, 1, 1, 2, 2, 1, 1, 3, 3, 4, 4, 1, 1, 5, 5,
+            6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 1, 1
+    };
+    /**
+     * Translates characters to character classes
+     */
+    private static final char[] ZZ_CMAP = {
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 1, 4, 0, 4, 5, 0,
+            2, 38, 3, 3, 3, 3, 3, 41, 3, 3, 0, 0, 0, 0, 0, 0,
+            0, 20, 0, 0, 18, 9, 0, 13, 0, 7, 0, 0, 17, 21, 12, 16,
+            24, 0, 10, 23, 8, 0, 0, 19, 22, 14, 0, 0, 0, 0, 0, 0,
+            0, 0, 34, 36, 40, 25, 39, 0, 0, 32, 0, 37, 35, 27, 33, 26,
+            0, 0, 29, 0, 28, 0, 0, 31, 0, 30, 0, 0, 4, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
+    /**
+     * Translates DFA states to action switch labels.
+     */
+    private static final int[] ZZ_ACTION = zzUnpackAction();
+    private static final String ZZ_ACTION_PACKED_0 =
+            "\15\0\2\1\2\2\24\1\4\0\1\3\3\0\1\4" +
+                    "\2\0\1\5\2\0\1\6\2\0\1\7\2\0\1\10" +
+                    "\2\0\1\11\2\0\1\12\2\0\1\13\70\0\1\14" +
+                    "\51\0\1\15\114\0\1\16";
+    /**
+     * Translates a state to a row index in the transition table
+     */
+    private static final int[] ZZ_ROWMAP = zzUnpackRowMap();
+
+    private static final String ZZ_ROWMAP_PACKED_0 =
+            "\0\0\0\52\0\124\0\176\0\250\0\322\0\374\0\u0126" +
+                    "\0\u0150\0\u017a\0\u01a4\0\u01ce\0\u01f8\0\u0222\0\u024c\0\u0222" +
+                    "\0\u0276\0\u02a0\0\u02ca\0\u02f4\0\u031e\0\u0348\0\u0372\0\u039c" +
+                    "\0\u03c6\0\u03f0\0\u041a\0\u0444\0\u046e\0\u0498\0\u04c2\0\u04ec" +
+                    "\0\u0516\0\u0540\0\u056a\0\u0594\0\u05be\0\u05e8\0\u0612\0\u02ca" +
+                    "\0\u02f4\0\u02f4\0\u063c\0\u0348\0\u0372\0\u0372\0\u039c\0\u03c6" +
+                    "\0\u03c6\0\u03f0\0\u041a\0\u041a\0\u0444\0\u046e\0\u046e\0\u0498" +
+                    "\0\u04c2\0\u04c2\0\u04ec\0\u0516\0\u0516\0\u0540\0\u056a\0\u056a" +
+                    "\0\u0594\0\u05be\0\u05be\0\u0666\0\u0690\0\u06ba\0\u06e4\0\u070e" +
+                    "\0\u0738\0\u0762\0\u078c\0\u07b6\0\u07e0\0\u080a\0\u0834\0\u085e" +
+                    "\0\u0888\0\u08b2\0\u08dc\0\u0906\0\u0930\0\u095a\0\u0984\0\u09ae" +
+                    "\0\u09d8\0\u0a02\0\u0a2c\0\u0a56\0\u0a80\0\u0aaa\0\u0ad4\0\u0afe" +
+                    "\0\u0b28\0\u0b52\0\u0b7c\0\u0ba6\0\u0bd0\0\u0bfa\0\u0c24\0\u0c4e" +
+                    "\0\u0c78\0\u0ca2\0\u0ccc\0\u0cf6\0\u0d20\0\u0d4a\0\u0d74\0\u0d9e" +
+                    "\0\u0dc8\0\u0df2\0\u0e1c\0\u0e46\0\u0e70\0\u0e9a\0\u0ec4\0\u0eee" +
+                    "\0\u0f18\0\u0f42\0\u0f6c\0\u0222\0\u0f96\0\u0fc0\0\u0fea\0\u1014" +
+                    "\0\u103e\0\u1068\0\u1092\0\u10bc\0\u10e6\0\u1110\0\u113a\0\u1164" +
+                    "\0\u118e\0\u11b8\0\u11e2\0\u120c\0\u1236\0\u1260\0\u128a\0\u12b4" +
+                    "\0\u12de\0\u1308\0\u1332\0\u135c\0\u1386\0\u13b0\0\u13da\0\u1404" +
+                    "\0\u142e\0\u1458\0\u1482\0\u14ac\0\u14d6\0\u1500\0\u152a\0\u1554" +
+                    "\0\u157e\0\u15a8\0\u15d2\0\u15fc\0\u1626\0\u0222\0\u1650\0\u167a" +
+                    "\0\u16a4\0\u16ce\0\u16f8\0\u1722\0\u174c\0\u1776\0\u17a0\0\u17ca" +
+                    "\0\u17f4\0\u181e\0\u1848\0\u1872\0\u189c\0\u18c6\0\u18f0\0\u191a" +
+                    "\0\u1944\0\u196e\0\u1998\0\u19c2\0\u19ec\0\u1a16\0\u1a40\0\u1a6a" +
+                    "\0\u1a94\0\u1abe\0\u1ae8\0\u1b12\0\u1b3c\0\u1b66\0\u1b90\0\u1bba" +
+                    "\0\u1be4\0\u1c0e\0\u1c38\0\u1c62\0\u1c8c\0\u1cb6\0\u1ce0\0\u1d0a" +
+                    "\0\u1d34\0\u1d5e\0\u1d88\0\u1db2\0\u1ddc\0\u1e06\0\u1e30\0\u1e5a" +
+                    "\0\u1e84\0\u1eae\0\u1ed8\0\u1f02\0\u1f2c\0\u1f56\0\u1f80\0\u1faa" +
+                    "\0\u1fd4\0\u1ffe\0\u2028\0\u2052\0\u207c\0\u20a6\0\u20d0\0\u20fa" +
+                    "\0\u2124\0\u214e\0\u2178\0\u21a2\0\u21cc\0\u21f6\0\u2220\0\u224a" +
+                    "\0\u2274\0\u229e\0\u0222";
+    /**
+     * The transition table of the DFA
+     */
+    private static final int[] ZZ_TRANS = zzUnpackTrans();
+    private static final String ZZ_TRANS_PACKED_0 =
+            "\7\16\1\17\116\16\1\20\1\21\11\16\1\22\30\16" +
+                    "\1\21\2\16\1\21\2\16\3\23\1\24\40\16\1\23" +
+                    "\2\16\1\23\1\16\1\25\52\16\3\26\1\27\40\16" +
+                    "\1\26\2\16\1\26\2\16\3\30\1\31\40\16\1\30" +
+                    "\2\16\1\30\2\16\3\32\1\33\40\16\1\32\2\16" +
+                    "\1\32\2\16\3\34\1\35\40\16\1\34\2\16\1\34" +
+                    "\2\16\3\36\1\37\40\16\1\36\2\16\1\36\2\16" +
+                    "\3\40\1\41\40\16\1\40\2\16\1\40\2\16\3\42" +
+                    "\1\43\40\16\1\42\2\16\1\42\2\16\3\44\1\45" +
+                    "\40\16\1\44\2\16\1\44\62\0\1\46\43\0\2\21" +
+                    "\42\0\1\21\2\0\1\21\31\0\1\47\22\0\2\50" +
+                    "\1\0\1\51\40\0\1\50\2\0\1\50\2\0\2\52" +
+                    "\42\0\1\52\2\0\1\52\1\0\1\53\52\0\2\54" +
+                    "\1\0\1\55\40\0\1\54\2\0\1\54\2\0\2\56" +
+                    "\42\0\1\56\2\0\1\56\2\0\2\57\1\0\1\60" +
+                    "\40\0\1\57\2\0\1\57\2\0\2\61\42\0\1\61" +
+                    "\2\0\1\61\2\0\2\62\1\0\1\63\40\0\1\62" +
+                    "\2\0\1\62\2\0\2\64\42\0\1\64\2\0\1\64" +
+                    "\2\0\2\65\1\0\1\66\40\0\1\65\2\0\1\65" +
+                    "\2\0\2\67\42\0\1\67\2\0\1\67\2\0\2\70" +
+                    "\1\0\1\71\40\0\1\70\2\0\1\70\2\0\2\72" +
+                    "\42\0\1\72\2\0\1\72\2\0\2\73\1\0\1\74" +
+                    "\40\0\1\73\2\0\1\73\2\0\2\75\42\0\1\75" +
+                    "\2\0\1\75\2\0\2\76\1\0\1\77\40\0\1\76" +
+                    "\2\0\1\76\2\0\2\100\42\0\1\100\2\0\1\100" +
+                    "\2\0\2\101\1\0\1\102\40\0\1\101\2\0\1\101" +
+                    "\2\0\2\103\42\0\1\103\2\0\1\103\11\0\1\104" +
+                    "\72\0\1\105\20\0\1\106\62\0\1\107\72\0\1\110" +
+                    "\17\0\1\111\55\0\1\112\75\0\1\113\21\0\1\114" +
+                    "\63\0\1\115\72\0\1\116\16\0\1\117\63\0\1\120" +
+                    "\73\0\1\121\15\0\1\122\63\0\1\123\74\0\1\124" +
+                    "\14\0\1\125\61\0\1\126\53\0\1\127\37\0\1\130" +
+                    "\64\0\1\131\74\0\1\132\13\0\1\133\61\0\1\134" +
+                    "\75\0\1\135\15\0\1\136\62\0\1\137\77\0\1\140" +
+                    "\12\0\1\141\65\0\1\142\70\0\1\143\16\0\1\144" +
+                    "\66\0\1\145\67\0\1\146\16\0\1\147\67\0\1\150" +
+                    "\63\0\1\151\21\0\1\152\70\0\1\153\72\0\1\154" +
+                    "\11\0\1\155\71\0\1\156\43\0\1\157\37\0\1\160" +
+                    "\72\0\1\161\63\0\1\162\16\0\1\163\56\0\1\164" +
+                    "\75\0\1\165\20\0\1\166\63\0\1\167\51\0\1\170" +
+                    "\37\0\1\171\63\0\1\172\100\0\1\173\10\0\1\174" +
+                    "\63\0\1\175\101\0\1\176\21\0\1\177\70\0\1\200" +
+                    "\30\0\1\201\104\0\1\202\21\0\1\203\102\0\1\204" +
+                    "\15\0\1\205\53\0\1\206\50\0\1\207\52\0\1\210" +
+                    "\53\0\1\211\102\0\1\212\21\0\1\213\46\0\1\214" +
+                    "\55\0\1\215\64\0\1\216\33\0\1\217\104\0\1\220" +
+                    "\13\0\1\221\53\0\1\222\61\0\1\223\63\0\1\224" +
+                    "\22\0\1\225\74\0\1\226\33\0\1\227\102\0\1\230" +
+                    "\20\0\1\231\70\0\1\232\32\0\1\233\73\0\1\234" +
+                    "\27\0\1\235\106\0\1\236\14\0\1\237\51\0\1\240" +
+                    "\51\0\1\241\107\0\1\242\22\0\1\243\31\0\1\244" +
+                    "\60\0\1\245\42\0\1\246\62\0\1\247\51\0\1\250" +
+                    "\51\0\1\251\51\0\1\252\51\0\1\253\51\0\1\254" +
+                    "\51\0\1\255\51\0\1\256\51\0\1\257\51\0\1\260" +
+                    "\53\0\1\261\46\0\1\262\63\0\1\263\47\0\1\264" +
+                    "\54\0\1\265\50\0\1\266\53\0\1\267\36\0\1\270" +
+                    "\51\0\1\271\51\0\1\272\51\0\1\273\51\0\1\274" +
+                    "\53\0\1\275\46\0\1\276\63\0\1\277\47\0\1\300" +
+                    "\43\0\1\301\55\0\1\302\43\0\1\303\64\0\1\304" +
+                    "\37\0\1\305\51\0\1\306\51\0\1\307\51\0\1\310" +
+                    "\53\0\1\311\46\0\1\312\63\0\1\313\47\0\1\314" +
+                    "\41\0\1\315\64\0\1\316\53\0\1\317\35\0\1\320" +
+                    "\51\0\1\321\51\0\1\322\51\0\1\323\51\0\1\324" +
+                    "\65\0\1\325\32\0\1\326\52\0\1\327\70\0\1\330" +
+                    "\46\0\1\331\50\0\1\332\53\0\1\333\36\0\1\334" +
+                    "\51\0\1\335\51\0\1\336\51\0\1\337\51\0\1\340" +
+                    "\65\0\1\341\32\0\1\342\52\0\1\343\70\0\1\344" +
+                    "\42\0\1\345\41\0\1\346\54\0\1\347\50\0\1\350" +
+                    "\51\0\1\351\51\0\1\352\51\0\1\353\51\0\1\354" +
+                    "\65\0\1\355\32\0\1\356\52\0\1\357\70\0\1\360" +
+                    "\33\0\1\361\64\0\1\362\53\0\1\363\22\0";
+    /* error codes */
+    private static final int ZZ_UNKNOWN_ERROR = 0;
+    private static final int ZZ_NO_MATCH = 1;
+    private static final int ZZ_PUSHBACK_2BIG = 2;
+    /* error messages for the codes above */
+    private static final String ZZ_ERROR_MSG[] = {
+            "Unkown internal scanner error",
+            "Error: could not match input",
+            "Error: pushback value was too large"
+    };
+    /**
+     * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+     */
+    private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute();
+    private static final String ZZ_ATTRIBUTE_PACKED_0 =
+            "\15\0\1\11\1\1\1\11\25\1\4\0\1\1\3\0" +
+                    "\1\1\2\0\1\1\2\0\1\1\2\0\1\1\2\0" +
+                    "\1\1\2\0\1\1\2\0\1\1\2\0\1\1\70\0" +
+                    "\1\11\51\0\1\11\114\0\1\11";
+    /* user code: */
+    public static boolean DEBUG = false;
+    /**
+     * the input device
+     */
+    private java.io.Reader zzReader;
+    /**
+     * the current state of the DFA
+     */
+    private int zzState;
+    /**
+     * the textposition at the last accepting state
+     */
+    private int zzMarkedPos;
+    /**
+     * the current text position in the buffer
+     */
+    private int zzCurrentPos;
+    /**
+     * startRead marks the beginning of the yytext() string in the buffer
+     */
+    private int zzStartRead;
+    /**
+     * endRead marks the last character in the buffer, that has been read
+     * from input
+     */
+    private int zzEndRead;
+    /**
+     * number of newlines encountered up to the start of the matched text
+     */
+    private int yyline;
+    /**
+     * the number of characters up to the start of the matched text
+     */
+    private int yychar;
+    /**
+     * the number of characters from the last newline up to the start of the
+     * matched text
+     */
+    private int yycolumn;
+    /**
+     * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+     */
+    private boolean zzAtBOL = true;
+    /**
+     * zzAtEOF == true <=> the scanner is at the EOF
+     */
+    private boolean zzAtEOF;
+    /**
+     * denotes if the user-EOF-code has already been executed
+     */
+    private boolean zzEOFDone;
+
+    /**
+     * Creates a new scanner
+     * There is also a java.io.InputStream version of this constructor.
+     *
+     * @param in the java.io.Reader to read input from.
+     */
+    public MOptaLexer(java.io.Reader in) {
+        this.zzReader = in;
+    }
+
+    /**
+     * Creates a new scanner.
+     * There is also java.io.Reader version of this constructor.
+     *
+     * @param in the java.io.Inputstream to read input from.
+     */
+    public MOptaLexer(java.io.InputStream in) {
+        this(new java.io.InputStreamReader(in));
+    }
+
+    private static int[] zzUnpackAction() {
+        int[] result = new int[243];
+        int offset = 0;
+        offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackAction(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackRowMap() {
+        int[] result = new int[243];
+        int offset = 0;
+        offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackRowMap(String packed, int offset, int[] result) {
+        int i = 0;  /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int high = packed.charAt(i++) << 16;
+            result[j++] = high | packed.charAt(i++);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackTrans() {
+        int[] result = new int[8904];
+        int offset = 0;
+        offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackTrans(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            value--;
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    private static int[] zzUnpackAttribute() {
+        int[] result = new int[243];
+        int offset = 0;
+        offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+        return result;
+    }
+
+    private static int zzUnpackAttribute(String packed, int offset, int[] result) {
+        int i = 0;       /* index in packed string  */
+        int j = offset;  /* index in unpacked array */
+        int l = packed.length();
+        while (i < l) {
+            int count = packed.charAt(i++);
+            int value = packed.charAt(i++);
+            do result[j++] = value; while (--count > 0);
+        }
+        return j;
+    }
+
+    /**
+     * Runs the scanner on input files.
+     * <p/>
+     * This is a standalone scanner, it will print any unmatched
+     * text to System.out unchanged.
+     *
+     * @param argv the command line, contains the filenames to run
+     *             the scanner on.
+     */
+    public static void main(String argv[]) {
+        if (argv.length == 0) {
+            System.out.println("Usage : java MOptaLexer <inputfile>");
+        } else {
+            for (int i = 0; i < argv.length; i++) {
+                MOptaLexer scanner = null;
+                try {
+                    scanner = new MOptaLexer(new java.io.FileReader(argv[i]));
+                    while (!scanner.zzAtEOF) scanner.next_token();
+                } catch (java.io.FileNotFoundException e) {
+                    System.out.println("File not found : \"" + argv[i] + "\"");
+                } catch (java.io.IOException e) {
+                    System.out.println("IO error scanning file \"" + argv[i] + "\"");
+                    System.out.println(e);
+                } catch (Exception e) {
+                    System.out.println("Unexpected exception:");
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+    /**
+     * Refills the input buffer.
+     *
+     * @return <code>false</code>, iff there was new input.
+     * @throws java.io.IOException if any I/O-Error occurs
+     */
+    private boolean zzRefill() throws java.io.IOException {
+
+    /* first: make room (if you can) */
+        if (zzStartRead > 0) {
+            System.arraycopy(zzBuffer, zzStartRead,
+                    zzBuffer, 0,
+                    zzEndRead - zzStartRead);
+
+      /* translate stored positions */
+            zzEndRead -= zzStartRead;
+            zzCurrentPos -= zzStartRead;
+            zzMarkedPos -= zzStartRead;
+            zzStartRead = 0;
+        }
+
+    /* is the buffer big enough? */
+        if (zzCurrentPos >= zzBuffer.length) {
+      /* if not: blow it up */
+            char newBuffer[] = new char[zzCurrentPos * 2];
+            System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+            zzBuffer = newBuffer;
+        }
+
+    /* finally: fill the buffer with new input */
+        int numRead = zzReader.read(zzBuffer, zzEndRead,
+                zzBuffer.length - zzEndRead);
+
+        if (numRead > 0) {
+            zzEndRead += numRead;
+            return false;
+        }
+        // unlikely but not impossible: read 0 characters, but not at end of stream
+        if (numRead == 0) {
+            int c = zzReader.read();
+            if (c == -1) {
+                return true;
+            } else {
+                zzBuffer[zzEndRead++] = (char) c;
+                return false;
+            }
+        }
+
+        // numRead < 0
+        return true;
+    }
+
+    /**
+     * Closes the input stream.
+     */
+    public final void yyclose() throws java.io.IOException {
+        zzAtEOF = true;            /* indicate end of file */
+        zzEndRead = zzStartRead;  /* invalidate buffer    */
+
+        if (zzReader != null)
+            zzReader.close();
+    }
+
+    /**
+     * Resets the scanner to read from a new input stream.
+     * Does not close the old reader.
+     * <p/>
+     * All internal variables are reset, the old input stream
+     * <b>cannot</b> be reused (internal buffer is discarded and lost).
+     * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+     *
+     * @param reader the new input stream
+     */
+    public final void yyreset(java.io.Reader reader) {
+        zzReader = reader;
+        zzAtBOL = true;
+        zzAtEOF = false;
+        zzEOFDone = false;
+        zzEndRead = zzStartRead = 0;
+        zzCurrentPos = zzMarkedPos = 0;
+        yyline = yychar = yycolumn = 0;
+        zzLexicalState = YYINITIAL;
+    }
+
+    /**
+     * Returns the current lexical state.
+     */
+    public final int yystate() {
+        return zzLexicalState;
+    }
+
+    /**
+     * Enters a new lexical state
+     *
+     * @param newState the new lexical state
+     */
+    public final void yybegin(int newState) {
+        zzLexicalState = newState;
+    }
+
+    /**
+     * Returns the text matched by the current regular expression.
+     */
+    public final String yytext() {
+        return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
+    }
+
+    /**
+     * Returns the character at position <tt>pos</tt> from the
+     * matched text.
+     * <p/>
+     * It is equivalent to yytext().charAt(pos), but faster
+     *
+     * @param pos the position of the character to fetch.
+     *            A value from 0 to yylength()-1.
+     * @return the character at position pos
+     */
+    public final char yycharat(int pos) {
+        return zzBuffer[zzStartRead + pos];
+    }
+
+    /**
+     * Returns the length of the matched text region.
+     */
+    public final int yylength() {
+        return zzMarkedPos - zzStartRead;
+    }
+
+    /**
+     * Reports an error that occured while scanning.
+     * <p/>
+     * In a wellformed scanner (no or only correct usage of
+     * yypushback(int) and a match-all fallback rule) this method
+     * will only be called with things that "Can't Possibly Happen".
+     * If this method is called, something is seriously wrong
+     * (e.g. a JFlex bug producing a faulty scanner etc.).
+     * <p/>
+     * Usual syntax/scanner level error handling should be done
+     * in error fallback rules.
+     *
+     * @param errorCode the code of the errormessage to display
+     */
+    private void zzScanError(int errorCode) {
+        String message;
+        try {
+            message = ZZ_ERROR_MSG[errorCode];
+        } catch (ArrayIndexOutOfBoundsException e) {
+            message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+        }
+
+        throw new Error(message);
+    }
+
+    /**
+     * Pushes the specified amount of characters back into the input stream.
+     * <p/>
+     * They will be read again by then next call of the scanning method
+     *
+     * @param number the number of characters to be read again.
+     *               This number must not be greater than yylength()!
+     */
+    public void yypushback(int number) {
+        if (number > yylength())
+            zzScanError(ZZ_PUSHBACK_2BIG);
+
+        zzMarkedPos -= number;
+    }
+
+    /**
+     * Contains user EOF-code, which will be executed exactly once,
+     * when the end of file is reached
+     */
+    private void zzDoEOF() throws java.io.IOException {
+        if (!zzEOFDone) {
+            zzEOFDone = true;
+            yyclose();
+        }
+    }
+
+    /**
+     * Resumes scanning until the next regular expression is matched,
+     * the end of input is encountered or an I/O-Error occurs.
+     *
+     * @return the next token
+     * @throws java.io.IOException if any I/O-Error occurs
+     */
+    public java_cup.runtime.Symbol next_token() throws java.io.IOException {
+        int zzInput;
+        int zzAction;
+
+        // cached fields:
+        int zzCurrentPosL;
+        int zzMarkedPosL;
+        int zzEndReadL = zzEndRead;
+        char[] zzBufferL = zzBuffer;
+        char[] zzCMapL = ZZ_CMAP;
+
+        int[] zzTransL = ZZ_TRANS;
+        int[] zzRowMapL = ZZ_ROWMAP;
+        int[] zzAttrL = ZZ_ATTRIBUTE;
+
+        while (true) {
+            zzMarkedPosL = zzMarkedPos;
+
+            zzAction = -1;
+
+            zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+            zzState = ZZ_LEXSTATE[zzLexicalState];
+
+
+            zzForAction:
+            {
+                while (true) {
+
+                    if (zzCurrentPosL < zzEndReadL)
+                        zzInput = zzBufferL[zzCurrentPosL++];
+                    else if (zzAtEOF) {
+                        zzInput = YYEOF;
+                        break zzForAction;
+                    } else {
+                        // store back cached positions
+                        zzCurrentPos = zzCurrentPosL;
+                        zzMarkedPos = zzMarkedPosL;
+                        boolean eof = zzRefill();
+                        // get translated positions and possibly new buffer
+                        zzCurrentPosL = zzCurrentPos;
+                        zzMarkedPosL = zzMarkedPos;
+                        zzBufferL = zzBuffer;
+                        zzEndReadL = zzEndRead;
+                        if (eof) {
+                            zzInput = YYEOF;
+                            break zzForAction;
+                        } else {
+                            zzInput = zzBufferL[zzCurrentPosL++];
+                        }
+                    }
+                    int zzNext = zzTransL[zzRowMapL[zzState] + zzCMapL[zzInput]];
+                    if (zzNext == -1) break zzForAction;
+                    zzState = zzNext;
+
+                    int zzAttributes = zzAttrL[zzState];
+                    if ((zzAttributes & 1) == 1) {
+                        zzAction = zzState;
+                        zzMarkedPosL = zzCurrentPosL;
+                        if ((zzAttributes & 8) == 8) break zzForAction;
+                    }
+
+                }
+            }
+
+            // store back cached position
+            zzMarkedPos = zzMarkedPosL;
+
+            switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+                case 4: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found the energy");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER5);
+                    return new Symbol(MOptaSym.ENERGY, new Float(yytext()));
+                }
+                case 15:
+                    break;
+                case 7: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float3");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER8);
+                    return new Symbol(MOptaSym.FLOAT3);
+                }
+                case 16:
+                    break;
+                case 8: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float5");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER10);
+                    return new Symbol(MOptaSym.FLOAT5);
+                }
+                case 17:
+                    break;
+                case 3: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float4");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER9);
+                    return new Symbol(MOptaSym.FLOAT4);
+                }
+                case 18:
+                    break;
+                case 12: {
+                    yybegin(IGNOREALL);
+                    return new Symbol(MOptaSym.SCFDONE);
+                }
+                case 19:
+                    break;
+                case 11: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float8");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER);
+                    return new Symbol(MOptaSym.FLOAT8);
+                }
+                case 20:
+                    break;
+                case 10: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float7");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER12);
+                    return new Symbol(MOptaSym.FLOAT7);
+                }
+                case 21:
+                    break;
+                case 6: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float2");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER7);
+                    return new Symbol(MOptaSym.FLOAT2);
+                }
+                case 22:
+                    break;
+                case 2: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found the first integer in the iteration");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER4);
+                    return new Symbol(MOptaSym.INTCycle, new Integer(yytext()));
+                }
+                case 23:
+                    break;
+                case 14: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found START OF");
+                    yybegin(ITER);
+                    return new Symbol(MOptaSym.FOUNDITER);
+                }
+                case 24:
+                    break;
+                case 9: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float6");
+                    if (Settings.DEBUG) System.out.println(yytext());
+                    yybegin(ITER11);
+                    return new Symbol(MOptaSym.FLOAT6);
+                }
+                case 25:
+                    break;
+                case 13: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found the dash");
+                    yybegin(DASH);
+                }
+                case 26:
+                    break;
+                case 1: {
+                }
+                case 27:
+                    break;
+                case 5: {
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: ITER5");
+                    if (Settings.DEBUG) System.out.println("MOptaFlex: Found float1");
+                    System.out.println(yytext());
+                    yybegin(ITER6);
+                    return new Symbol(MOptaSym.FLOAT1);
+                }
+                case 28:
+                    break;
+                default:
+                    if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+                        zzAtEOF = true;
+                        zzDoEOF();
+                        {
+                            return new java_cup.runtime.Symbol(MOptaSym.EOF);
+                        }
+                    } else {
+                        zzScanError(ZZ_NO_MATCH);
+                    }
+            }
+        }
+    }
+
+    /**
+     * Converts an int token code into the name of the
+     * token by reflection on the cup symbol class/interface sym
+     * <p/>
+     * This code was contributed by Karl Meissner <me...@yahoo.com>
+     */
+    private String getTokenName(int token) {
+        try {
+            java.lang.reflect.Field[] classFields = MOptaSym.class.getFields();
+            for (int i = 0; i < classFields.length; i++) {
+                if (classFields[i].getInt(null) == token) {
+                    return classFields[i].getName();
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace(System.err);
+        }
+
+        return "UNKNOWN TOKEN";
+    }
+
+    /**
+     * Same as next_token but also prints the token to standard out
+     * for debugging.
+     * <p/>
+     * This code was contributed by Karl Meissner <me...@yahoo.com>
+     */
+    public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {
+        java_cup.runtime.Symbol s = next_token();
+        System.out.println(" --" + yytext() + "--" + getTokenName(s.sym) + "--");
+        return s;
+    }
+
+
+}


[05/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/scripts/main.js
----------------------------------------------------------------------
diff --git a/datacat/web/portal/scripts/main.js b/datacat/web/portal/scripts/main.js
new file mode 100755
index 0000000..bb50b47
--- /dev/null
+++ b/datacat/web/portal/scripts/main.js
@@ -0,0 +1,610 @@
+var loggedIn;                                                                   // initial user data
+var user = '';
+var allUserGroups;
+
+var selectedDocId;                                                              // initial pagination parameters
+var numberOfFields = 0;
+var resultOffset = 1;
+var numberOfResults = 10;
+var lastData = '';
+var nextDisabled = false;
+var previewDisabled = true;
+
+var fields = ["id", "fileName", "filePath", "ownerName", "generatedApplicationName", "dataArchiveNode", "createdDate"];                     // list of fields common for all data products
+
+var service_url = "http://localhost/datacat/dataStoreService.php";
+
+$(document).ready(function () {
+
+    var loginPopover = $('#login-popover-btn');
+    var logoutButton = $('#logout-btn');
+
+    addFieldedField();                                                          // add one item to the graphical query construct by default
+
+    loginPopover.popover({
+        'placement': 'bottom',
+        'html': true
+    });
+
+    loginPopover.hide();
+    logoutButton.hide();
+    $('#logged-is-as').hide();
+    checkLogin();
+
+    $(document).on("click", "#fielded-add-btn", addField);                      // bind events to dom items
+    $(document).on("click", "#fielded-remove-btn", removeField);
+
+    $(document).on("click", "#logout-btn", logout);
+    $(document).on("click", "#login-btn", login);
+
+    $(document).on("change", ".field-select", fieldChanged);
+    $(document).on("change", ".relation-date", dateRelationChanged);
+
+    $(document).on("click", "#search-btn", search);
+    $('#form-outer-wrapper').keypress(function (e) {                            // trigger search function on pressing
+        if (e.which == 13) {
+            e.preventDefault();
+            search();
+            return false;
+        }
+    });
+
+    $(document).on("click", "#getNext", getNext);
+    $(document).on("click", "#getPrevious", getPrevious);
+
+    $(document).on("click", ".share-btn", showAclList);
+    $(document).on("click", "#update-acl-btn", updateAclList);
+
+    getAllUserGroups();
+});
+
+var getMetadataFieldListCall = function () {                                    // get the full list of searchable/indexed fields
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'getMetadataFieldList'
+        }
+    });
+
+    request.done(function (msg) {
+        var newFields = JSON.parse(msg);
+        for (var i = 0; i < newFields.length; i++) {
+            fields.push(newFields[i]);
+        }
+
+    addFieldedField();                                                          //Adding one field by default
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        $('#results').html("<p style='text-align: center'>GET METADATA FIELD LIST FAILED</p>");
+    });
+};
+
+var getAllUserGroups = function () {                                            // get the full list of user groups for sharing data products
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'getAllUserGroups'
+        }
+    });
+
+    request.done(function (msg) {
+        allUserGroups = JSON.parse(msg);
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        $('#results').html("<p style='text-align: center'>GET ALL USER GROUPS FAILED</p>");
+    });
+};
+
+var login = function () {                                                       // authenticate user
+    var username = $("#username").val();
+    var password = $("#password").val();
+
+    if (username == "") {
+        alert("Please enter a valid username");
+        return;
+    } else if (password == "") {
+        alert("Please enter a valid password");
+        return;
+    }
+
+    var data = {
+        "username": username,
+        "password": password
+    };
+
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'login',
+            'data': data
+        }
+    });
+
+    request.done(function (msg) {
+        if (msg == 'true') {
+            loggedIn = true;
+            user = username;
+            checkLogin();
+            $('#login-popover-btn').popover('hide');
+        } else {
+            alert('The username and password do not match.');
+        }
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        alert('Oops, something went wrong');
+    });
+};
+
+var checkLogin = function () {                                                  //check user logged in and get username
+    var loginPopover = $('#login-popover-btn');
+    var logoutButton = $('#logout-btn');
+    var loggedInAs = $('#logged-is-as');
+
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'checkLogin'
+        }
+    });
+
+    request.done(function (msg) {
+        user = msg;
+        var loginData = '<div id="login-form-wrapper">' +
+            '    <form class="form-horizontal">' +
+            '        <div class="form-group">' +
+            '            <input type="text" placeholder="Username" id="username"/>' +
+            '        </div>' +
+            '        <div class="form-group">' +
+            '            <input type="password" placeholder="Password" id="password"/>' +
+            '        </div>' +
+
+            '        <div class="form-group" id="login-btn-wrapper">' +
+            '            <button type="button" class="btn btn-default col-xs-12" id="login-btn">Login</button>' +
+            '        </div>' +
+            '    </form>' +
+            '</div>';
+
+        if (msg == '%%false%%') {
+            loggedIn = false;
+            loginPopover.text('Log in');
+            loginPopover.attr('data-content', loginData);
+            logoutButton.hide();
+            loginPopover.show();
+            loggedInAs.hide();
+        } else {
+            loggedIn = true;
+            loginPopover.text('Logged in');
+            loginPopover.attr('data-content', '');
+            loginPopover.hide();
+            logoutButton.show();
+            loggedInAs.html('Logged in as <strong>' + user + '</strong>');
+            loggedInAs.show();
+        }
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        alert('Oops, something went wrong');
+    });
+};
+
+var logout = function () {
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'logout'
+        }
+    });
+
+    request.done(function (msg) {
+        if (msg) {
+            loggedIn = false;
+            user = '';
+            checkLogin();
+            $('#login-popover-btn').popover('hide');
+        } else {
+            alert('Logout failed.');
+        }
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        alert('Oops, something went wrong');
+    });
+};
+
+var addField = function () {                                                    // add field to graphical query construct
+    if (numberOfFields < 10) {
+        addFieldedField();
+    } else {
+        alert('Too many fields');
+    }
+};
+
+var addFieldedField = function () {
+    var fieldsHtml = '<option value="id">Document ID</option>' +
+        '<option value="fileName">File Name</option>' +
+        '<option value="filePath">File Path</option>' +
+        '<option value="gatewayId">Gateway ID</option>' +
+        '<option value="applicationName">Application Name</option>' +
+        '<option value="experimentId">Experiment ID</option>' +
+        '<option value="computingResourceName">Computing Resource Name</option>' +
+        '<option value="createdDate">Created Date</option>';
+
+    numberOfFields += 1;
+
+    $('#fielded-fields').append('<div class="form-group fielded-field" id="field-group-' + numberOfFields + '">' +
+        '        <label class="col-xs-12">Field ' + numberOfFields + '</label>' +
+        '        <div class="col-xs-6 col-sm-3">' +
+        '            <select class="field-select form-control" id="field-' + numberOfFields + '">'
+        + fieldsHtml +
+        '            </select>' +
+        '        </div>' +
+        '        <div class="col-xs-6 col-sm-3">' +
+        '            <select class="form-control" id="relation-' + numberOfFields + '">' +
+        '                <option value="WILDCARD">Wildcard</option>' +
+        '                <option value="EQUALS">Equals</option>' +
+        '                <option value="PHRASE">Phrase</option>' +
+        '                <option value="SUBSTRING">Substring</option>' +
+        '            </select>' +
+        '            </div>' +
+        '            <div class="fielded-form-input-wrapper col-xs-12 col-sm-6">' +
+        '                <input type="text" class="form-control" id="value-' + numberOfFields + '">' +
+        '            </div>' +
+        '        </div>');
+};
+
+var removeField = function () {                                                 // remove field from graphical query construct
+    if (numberOfFields > 1) {
+        $('#field-group-' + numberOfFields).remove();
+        numberOfFields -= 1;
+    } else {
+        alert('You cannot remove the last field');
+    }
+};
+
+var fieldChanged = function () {                                                // take action corresponding to selected query field
+    var id = $(this).parent().parent().find('.fielded-form-input-wrapper input:first')[0].id.replace('value-', '');
+    if ($(this).val() == 'createdDate') {
+        $('#relation-' + id).parent().html('            <select class="relation-date form-control" id="relation-' + id + '">' +
+            '                <option value="EQUALS">Equals</option>' +
+            '                <option value="RANGE">Range</option>' +
+            '            </select>');
+
+        var html = '<input type="text" style="display:none;" class="form-control" id="value-' + id + '">' +
+            '        <div class="input-group date datetimepicker">' +
+            '            <input id="date-equals-' + id + '" type="text" class="form-control" />' +
+            '            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' +
+            '        </div>';
+
+        $(this).parent().parent().find('.fielded-form-input-wrapper:first').html(html);
+
+        $('.datetimepicker').datetimepicker({
+            maxDate: moment(),
+            pickTime: false,
+            defaultDate: moment(),
+            format: "MM/DD/YYYY"
+        });
+    } else {
+        $('#relation-' + id).parent().html('            <select class="form-control" id="relation-' + id + '">' +
+            '                <option value="WILDCARD">Wildcard</option>' +
+            '                <option value="EQUALS">Equals</option>' +
+            '                <option value="PHRASE">Phrase</option>' +
+            '                <option value="SUBSTRING">Substring</option>' +
+            '            </select>');
+
+        $(this).parent().parent().find('.fielded-form-input-wrapper:first').html('<input type="text" class="form-control" id="value-' + id + '">');
+    }
+};
+
+var dateRelationChanged = function () {                                         // take action according to the date relation selected (range)
+    var id = $(this).parent().parent().find('.fielded-form-input-wrapper input:first')[0].id.replace('value-', '');
+
+    if ($(this).val() == 'RANGE') {
+        var htmlRange = '<input type="text" style="display:none;" class="form-control" id="value-' + id + '">';
+        htmlRange += '<form class="form-horizontal" role="form">' +
+            '            <div style="margin-right: 0;" class="form-group">' +
+            '            <label for="range-from" class="col-sm-3 col-md-2 control-label">From</label>' +
+            '            <div class="col-sm-6 col-md-10 input-group date datetimepicker datetimepicker-from" id="datetimepicker-from-' + id + '">' +
+            '            <input class="form-control" id="range-from-' + id + '">' +
+            '            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' +
+            '            </div>' +
+            '            </div>' +
+            '        <div style="margin-right: 0;" class="form-group">' +
+            '            <label for="range-to" class="col-sm-3 col-md-2 control-label">To</label>' +
+            '            <div class="col-sm-6 col-md-10 input-group date datetimepicker datetimepicker-to" id="datetimepicker-to-' + id + '">' +
+            '                <input type="text" class="form-control" id="range-to-' + id + '">' +
+            '                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' +
+            '                </div>' +
+            '            </div>' +
+            '        </form>';
+
+        $(this).parent().parent().find('.fielded-form-input-wrapper:first').html(htmlRange);
+
+        $('.datetimepicker-from').datetimepicker({
+            pickTime: false,
+            defaultDate: moment().subtract(1, 'days'),
+            format: "MM/DD/YYYY"
+        });
+        $('.datetimepicker-to').datetimepicker({
+            maxDate: moment(),
+            pickTime: false,
+            defaultDate: moment(),
+            format: "MM/DD/YYYY"
+        });
+
+        $('#datetimepicker-to-' + id).data("DateTimePicker").setMinDate(moment());
+        $('#datetimepicker-from-' + id).data("DateTimePicker").setMaxDate(moment().subtract(1, 'days'));
+
+        $("#datetimepicker-from-" + id).on("dp.change", function (e) {
+            $('#datetimepicker-to-' + id).data("DateTimePicker").setMinDate(e.date);
+        });
+        $("#datetimepicker-to-" + id).on("dp.change", function (e) {
+            $('#datetimepicker-from-' + id).data("DateTimePicker").setMaxDate(e.date);
+        });
+    } else if ($(this).val() == 'EQUALS') {
+        var htmlEquals = '<input type="text" style="display:none;" class="form-control" id="value-' + id + '">' +
+            '        <div class="input-group date datetimepicker">' +
+            '            <input id="date-equals-' + id + '" type="text" class="form-control" />' +
+            '            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' +
+            '        </div>';
+
+        $(this).parent().parent().find('.fielded-form-input-wrapper:first').html(htmlEquals);
+
+        $('.datetimepicker').datetimepicker({
+            maxDate: moment(),
+            pickTime: false,
+            defaultDate: moment(),
+            format: "MM/DD/YYYY"
+        });
+    }
+};
+
+var search = function () {                                                      // search data products
+    var primaryQueryParameterList = [];
+    var allFieldsEmpty = true;
+
+    for (var i = 1; i <= numberOfFields; i++) {
+        if ($('#field-' + i).val() == 'createdDate') {
+            if ($('#relation-' + i).val() == 'EQUALS') {
+                var primaryDateQueryParameter = {
+                    "primaryQueryType": 'EQUALS',
+                    "firstParameter": moment($("#date-equals-" + i).val()).format("YYYY-MM-DD") + "T00:00:00Z",
+                    "secondParameter": null,
+                    "field": $("#field-" + i).val()
+                };
+                primaryQueryParameterList.push(primaryDateQueryParameter);
+                allFieldsEmpty = false;
+            } else {
+                var primaryRangeQueryParameter = {
+                    "primaryQueryType": 'RANGE',
+                    "firstParameter": moment($("#range-from-" + i).val()).format("YYYY-MM-DD") + "T00:00:00Z",
+                    "secondParameter": moment($("#range-to-" + i).val()).format("YYYY-MM-DD") + "T00:00:00Z",
+                    "field": $("#field-" + i).val()
+                };
+                primaryQueryParameterList.push(primaryRangeQueryParameter);
+                allFieldsEmpty = false;
+            }
+        } else {
+            var value = $("#value-" + i).val();
+            if (value !== "") {
+                var primaryQueryParameter = {
+                    "primaryQueryType": $("#relation-" + i).val(),
+                    "firstParameter": value,
+                    "secondParameter": null,
+                    "field": $("#field-" + i).val()
+                };
+                primaryQueryParameterList.push(primaryQueryParameter);
+                allFieldsEmpty = false;
+            }
+        }
+    }
+
+    if (allFieldsEmpty) {
+        alert("Please select some query parameters !!!");
+        return;
+    }
+
+    var data = {
+        "queryStringSet": false,
+
+        "startRow": resultOffset,
+        "numberOfRows": numberOfResults,
+
+        "primaryQueryParameterList": primaryQueryParameterList
+    };
+
+    lastData = data;
+    getResultsCall(data);
+
+};
+
+var getNext = function () {                                                     // get next results set
+    if (!nextDisabled) {
+        resultOffset += numberOfResults;
+        lastData.startRow = resultOffset;
+        previewDisabled = false;
+
+        getResultsCall(lastData);
+    }
+};
+
+var getPrevious = function () {                                                 //get previous results set
+    if (resultOffset != 1) {
+        if ((resultOffset - numberOfResults) == 1) {
+            previewDisabled = true;
+        }
+        resultOffset -= numberOfResults;
+        lastData.startRow = resultOffset;
+        nextDisabled = false;
+
+        getResultsCall(lastData);
+    }
+};
+
+var getResultsCall = function (data) {                                          // common function to het results for searching and pagination
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'getResults',
+            'data': data
+        }
+    });
+
+    request.done(function (msg) {
+        var result = JSON.parse(msg);
+
+        if (result.length == 0) {
+            if (resultOffset == 1) {
+                $('#results').html("<p style='text-align: center'>NO RESULTS TO SHOW</p>");
+            } else {
+                nextDisabled = true;
+                resultOffset -= numberOfResults;
+                lastData.startRow = resultOffset;
+                $('#getNext').addClass('disabled');
+                alert('No more results to show.');
+            }
+        } else {
+            for (var i = 0; i < result.length; i++) {
+                if (result[i].ownerId == user) {
+                    result[i].ownerId += '<br>' +
+                        '<button type="button" class="btn btn-primary btn-sm share-btn" id="share-' + i + '" data-toggle="modal" data-target="#myModal">Share</button>';
+                }
+            }
+
+            // generate table header
+            var htmlTable = '<div class="results-table-wrapper">' +
+                '<table class="table table-striped table-bordered table-hover table-responsive" id="results-table">' +
+                '        <thead>' +
+                '            <th>Document Id</th>' +
+                '            <th>Owner ID</th>' +
+                '            <th>File Name</th>' +
+                '            <th>File Path</th>' +
+                '            <th>Gateway ID</th>' +
+                '            <th>Application Name</th>' +
+                '            <th>Experiment ID</th>' +
+                '            <th>Resource Name</th>' +
+                '            <th>Created Date</th>' +
+                '        </thead>' +
+                '        <tbody>';
+
+            // generate table rows
+            for (var j = 0; j < result.length; j++) {
+                htmlTable += '<tr>' +
+                    '   <td style="max-width: 150px; min-width: 150px; overflow-x: auto">' + result[j].id + '</td>' +
+                    '   <td style="max-width: 100px; min-width: 100px; overflow-x: auto">' + result[j].ownerId + '</td>' +
+                    '   <td style="max-width: 120px; min-width: 120px; overflow-x: auto">' + result[j].fileName + '</td>' +
+                    '   <td style="max-width: 120px; min-width: 120px; overflow-x: auto">' + result[j].filePath + '</td>' +
+                    '   <td style="max-width: 80px; min-width: 80px; overflow-x: auto">' + result[j].gatewayId + '</td>' +
+                    '   <td style="max-width: 80px; min-width: 80px; overflow-x: auto">' + result[j].applicationName + '</td>' +
+                    '   <td style="max-width: 80px; min-width: 80px; overflow-x: auto">' + result[j].experimentId + '</td>' +
+                    '   <td style="max-width: 80px; min-width: 80px; overflow-x: auto">' + result[j].computingResourceName + '</td>' +
+                    '   <td style="max-width: 120px; min-width: 120px; overflow-x: auto">' + moment(result[j].createdDate).format("MMM DD, YYYY") + '</td>' +
+                    '</tr>';
+
+            }
+            htmlTable += '</tbody></table></div>' +
+                '        <ul class="pager">' +
+                '            <li class="previous" id="getPrevious"><a href="javascript:;">&larr; Previous</a></li>' +
+                '            <li class="next" id="getNext"><a href="javascript:;">Next &rarr;</a></li>' +
+                '        </ul>';
+
+            $('#results').html(htmlTable);
+
+            if (previewDisabled) {
+                $('#getPrevious').addClass('disabled');
+            }
+            if (nextDisabled) {
+                $('#getNext').addClass('disabled');
+            }
+
+            $("html, body").animate({ scrollTop: $('#results').offset().top }, 500);
+        }
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        $('#results').html("<p style='text-align: center'>GET RESULTS FAILED</p>");
+    });
+};
+
+var showAclList = function () {                                                 // show the list of available communities to share with
+    var thisId = this.id;
+    var id = $('#' + thisId).parent().parent().find('td:first').text();         // TODO: If you change the table order, use another way to get the document id
+    selectedDocId = id;
+
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'getAclList',
+            'data': {
+                'id': id
+            }
+        }
+    });
+
+    request.done(function (msg) {
+        var aclList = JSON.parse(msg);
+
+        var modalHtml = '<p>Document ID: <strong>' + selectedDocId + '</strong></p>';
+
+        for (var i = 0; i < allUserGroups.length; i++) {
+            modalHtml += '<div class="checkbox">' +
+                '        <label>' +
+                '            <input type="checkbox" id="' + allUserGroups[i] + '" value="' + allUserGroups[i] + '">' + allUserGroups[i] +
+                '        </label>' +
+                '    </div>';
+        }
+
+        $('#modal-body').html(modalHtml);
+
+        for (var j = 0; j < aclList.length; j++) {
+            $("#" + aclList[j]).prop('checked', true);
+        }
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        $('#results').html("<p style='text-align: center'>GET ACL LIST FAILED</p>");
+    });
+
+};
+
+var updateAclList = function () {                                               // update ACL list of a data product
+    var id = selectedDocId;
+    var newAclList = [];
+
+    for (var i = 0; i < allUserGroups.length; i++) {
+        if ($('#' + allUserGroups[i]).prop('checked')) {
+            newAclList.push(allUserGroups[i]);
+        }
+    }
+    newAclList.push(user);
+
+    var request = $.ajax({
+        url: service_url,
+        type: "POST",
+        data: {
+            'call': 'updateAclList',
+            'data': {
+                'id': id,
+                'acl': newAclList
+            }
+        }
+    });
+
+    request.done(function (msg) {
+        alert('Done');
+    });
+
+    request.fail(function (jqXHR, textStatus) {
+        $('#results').html("<p style='text-align: center'>UPDATE ACL LIST FAILED</p>");
+    });
+
+};
\ No newline at end of file


[29/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/method.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/method.flex b/datacat/cup_flex/method.flex
new file mode 100644
index 0000000..81e9c28
--- /dev/null
+++ b/datacat/cup_flex/method.flex
@@ -0,0 +1,171 @@
+import java_cup.runtime.*;
+
+%%
+
+%class MethodLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "----------------------" {
+    if (Settings.DEBUG) System.out.println("MethodFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(MethodSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "opt" {
+   System.out.println("MethodFlex: Found opt ");
+   System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP); 
+    }
+/*
+ "scf" {
+  if  (Settings.DEBUG) System.out.println("MethodFlex: Found scf ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+*/
+
+    "G1" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    } 
+
+    "G2" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found G2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "CBS-Q" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found CBS-Q");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "RUNTYP=ENERGY" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("energy");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "RUNTYP=GRADIENT" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=GRADIENT");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("gradient");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+}
+  
+    "RUNTYP=OPTIMIZE" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("optimize");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+/*
+    "OPTG" {
+    System.out.println("MethodFlex: Molpro OPTG");
+   System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("optimize");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+*/
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/method1.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/method1.flex b/datacat/cup_flex/method1.flex
new file mode 100644
index 0000000..ca0f514
--- /dev/null
+++ b/datacat/cup_flex/method1.flex
@@ -0,0 +1,171 @@
+import java_cup.runtime.*;
+
+%%
+
+%class Method1Lexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "******************************" {
+    if (Settings.DEBUG) System.out.println("MethodFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(MethodSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "OPTG" {
+   System.out.println("MethodFlex: Found opt ");
+   System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP); 
+    }
+/*
+ "scf" {
+  if  (Settings.DEBUG) System.out.println("MethodFlex: Found scf ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+ 
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+*/
+
+    "G1" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    } 
+
+    "G2" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found G2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "CBS-Q" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: Found CBS-Q");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "RUNTYP=ENERGY" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("energy");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+
+    "RUNTYP=GRADIENT" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=GRADIENT");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("gradient");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+}
+  
+    "RUNTYP=OPTIMIZE" {
+   if (Settings.DEBUG) System.out.println("MethodFlex: RUNTYP=ENERGY");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("optimize");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+/*
+    "OPTG" {
+    System.out.println("MethodFlex: Molpro OPTG");
+   System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print("optimize");
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(MethodSym.RUNTYP);
+    }
+*/
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mfinalcoord.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mfinalcoord.cup b/datacat/cup_flex/mfinalcoord.cup
new file mode 100644
index 0000000..12025ec
--- /dev/null
+++ b/datacat/cup_flex/mfinalcoord.cup
@@ -0,0 +1,129 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp2, inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:Input: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= 
+inp2
+inp3 
+INPUT4
+inp5
+inp6
+inp7
+;
+
+
+inp2 ::= INPUT2:in2
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  center number "+in2);
+ :}
+ ;
+
+
+inp3 ::= INPUT3:in3
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3); 
+ :}
+ ;
+
+inp5 ::= INPUT5:in5
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+ :}
+ ;
+
+inp6 ::= INPUT6:in6
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+ :}
+ ;
+
+inp7 ::= INPUT7:in7
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mfinalcoord.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mfinalcoord.flex b/datacat/cup_flex/mfinalcoord.flex
new file mode 100644
index 0000000..81578dc
--- /dev/null
+++ b/datacat/cup_flex/mfinalcoord.flex
@@ -0,0 +1,151 @@
+import java_cup.runtime.*;
+
+%%
+
+%class MFinalCoordLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+MFinalCoordCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {MFinalCoordCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_] | [A-Za-z][0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ATOMIC COORDINATES" {
+	   yybegin(ITER);
+	   return new Symbol(MFinalCoordSym.FOUNDITER); 
+  }
+   "Z-Matrix orientation:" {
+           yybegin(ITER);
+           return new Symbol(MFinalCoordSym.FOUNDITER);
+  }
+}
+
+<ITER>{
+  "NR  ATOM    CHARGE " {
+            yybegin(INPUTF);
+            return new Symbol(MFinalCoordSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(MFinalCoordSym.SCFDONE);}
+
+  "Bond lengths in Bohr" {
+             yybegin(IGNOREALL);
+      return new Symbol(MFinalCoordSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "X              Y              Z"
+   {
+  yybegin (INPUT);
+   return new Symbol(MFinalCoordSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  yybegin (INPUTA);
+   return new Symbol(MFinalCoordSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+  yybegin (ITER);
+   return new Symbol(MFinalCoordSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {dec_int_id} {
+  yybegin (INPUTB);
+   return new Symbol(MFinalCoordSym.INPUT3);
+}
+}
+
+<INPUTB> {
+   {FLOAT} {
+  yybegin (INPUTC);
+   return new Symbol(MFinalCoordSym.INPUT4, new Float(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  yybegin (INPUTD);
+   return new Symbol(MFinalCoordSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  yybegin (INPUTE);
+   return new Symbol(MFinalCoordSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  yybegin (INPUT);
+   return new Symbol(MFinalCoordSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mopt.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mopt.flex b/datacat/cup_flex/mopt.flex
new file mode 100644
index 0000000..16729b5
--- /dev/null
+++ b/datacat/cup_flex/mopt.flex
@@ -0,0 +1,169 @@
+import java_cup.runtime.*;
+
+%%
+
+%class MOptaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER8
+%state DASH
+%state INTVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state ITER8
+%state ITER9
+%state ITER10
+%state ITER11
+%state ITER12
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  " ITER.   ENERGY(OLD)    ENERGY(NEW)      DE          GRADMAX     GRADNORM    GRADRMS     STEPMAX     STEPLEN     STEPRMS" {
+    if (Settings.DEBUG) System.out.println("MOptaFlex: Found START OF");
+	   yybegin(ITER);
+	   return new Symbol(MOptaSym.FOUNDITER); 
+  }
+  .|\n {}
+}
+
+
+<ITER>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("MOptaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+   return new Symbol(MOptaSym.INTCycle, new Integer(yytext()));}
+
+  "Geometry written to block  1 of record 700" {
+       if (Settings.DEBUG) System.out.println("MOptaFlex: Found the dash");
+               yybegin(DASH);}
+
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("MOptaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(MOptaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { if (Settings.DEBUG) System.out.println("MOptaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("MOptaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(MOptaSym.FLOAT1);
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(MOptaSym.FLOAT2);
+}
+}
+
+ 
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float3");
+     yybegin(ITER8);
+      return new Symbol(MOptaSym.FLOAT3);}
+  .|\n {}
+}
+
+
+
+<ITER8>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float4");
+     yybegin(ITER9);
+      return new Symbol(MOptaSym.FLOAT4);}
+  .|\n {}
+}
+
+<ITER9>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float5");
+     yybegin(ITER10);
+      return new Symbol(MOptaSym.FLOAT5);}
+  .|\n {}
+}
+
+<ITER10>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float6");
+     yybegin(ITER11);
+      return new Symbol(MOptaSym.FLOAT6);}
+  .|\n {}
+}
+
+<ITER11>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float7");
+     yybegin(ITER12);
+      return new Symbol(MOptaSym.FLOAT7);}
+  .|\n {}
+}
+
+<ITER12>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float8");
+     yybegin(ITER);
+      return new Symbol(MOptaSym.FLOAT8);}
+  .|\n {}
+}
+
+
+
+<DASH>{
+ "*********************" {
+  yybegin(IGNOREALL);
+  return new Symbol(MOptaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mopta.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mopta.cup b/datacat/cup_flex/mopta.cup
new file mode 100644
index 0000000..27bac86
--- /dev/null
+++ b/datacat/cup_flex/mopta.cup
@@ -0,0 +1,132 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+:}
+
+
+
+
+terminal            FOUNDITER, SCFDONE;
+terminal Integer     INT1, INT2, INT3, INTCycle;
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY, FLOAT4;
+terminal Float FLOAT5, FLOAT6, FLOAT7, FLOAT8;
+non terminal  startpt, scfintro, scfpat, scfcycle, en;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INTCycle:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ :}
+en
+FLOAT1 FLOAT2 FLOAT3 FLOAT4 FLOAT5 FLOAT6 FLOAT7 FLOAT8
+;
+
+
+
+
+en ::= 
+ENERGY:e 
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e); 
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mopta.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mopta.flex b/datacat/cup_flex/mopta.flex
new file mode 100644
index 0000000..749d5f5
--- /dev/null
+++ b/datacat/cup_flex/mopta.flex
@@ -0,0 +1,179 @@
+import java_cup.runtime.*;
+
+%%
+
+%class MOptaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER8
+%state DASH
+%state INTVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state ITER8
+%state ITER9
+%state ITER10
+%state ITER11
+%state ITER12
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          =  [+|-]?"."{DIGIT}+ |  [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ITER.   ENERGY(OLD)    ENERGY(NEW)      DE          GRADMAX     GRADNORM    GRADRMS     STEPMAX     STEPLEN     STEPRMS" {
+    if (Settings.DEBUG) System.out.println("MOptaFlex: Found START OF");
+	   yybegin(ITER);
+	   return new Symbol(MOptaSym.FOUNDITER); 
+  }
+  .|\n {}
+}
+
+
+<ITER>{
+   
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("MOptaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+   return new Symbol(MOptaSym.INTCycle, new Integer(yytext()));}
+
+  "Geometry written to block  1 of record 700" {
+       if (Settings.DEBUG) System.out.println("MOptaFlex: Found the dash");
+               yybegin(DASH);}
+
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("MOptaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(MOptaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { 
+     if (Settings.DEBUG) System.out.println("MOptaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("MOptaFlex: Found float1");
+     System.out.println(yytext());
+   yybegin (ITER6);
+    return new Symbol(MOptaSym.FLOAT1);
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float2");
+  if (Settings.DEBUG) System.out.println(yytext()); 
+  yybegin (ITER7);
+   return new Symbol(MOptaSym.FLOAT2);
+}
+}
+
+ 
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float3");
+     if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER8);
+      return new Symbol(MOptaSym.FLOAT3);}
+  .|\n {}
+}
+
+
+
+<ITER8>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float4");
+     if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER9);
+      return new Symbol(MOptaSym.FLOAT4);}
+  .|\n {}
+}
+
+<ITER9>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float5");
+     if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER10);
+      return new Symbol(MOptaSym.FLOAT5);}
+  .|\n {}
+}
+
+<ITER10>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float6");
+      if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER11);
+      return new Symbol(MOptaSym.FLOAT6);}
+  .|\n {}
+}
+
+<ITER11>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float7");
+      if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER12);
+      return new Symbol(MOptaSym.FLOAT7);}
+  .|\n {}
+}
+
+<ITER12>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("MOptaFlex: Found float8");
+       if (Settings.DEBUG) System.out.println(yytext()); 
+     yybegin(ITER);
+      return new Symbol(MOptaSym.FLOAT8);}
+  .|\n {}
+}
+
+
+
+<DASH>{
+ "*********************" {
+  yybegin(IGNOREALL);
+  return new Symbol(MOptaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5a.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5a.cup b/datacat/cup_flex/mp2to5a.cup
new file mode 100644
index 0000000..238a085
--- /dev/null
+++ b/datacat/cup_flex/mp2to5a.cup
@@ -0,0 +1,27 @@
+import java_cup.runtime.*;
+
+parser code {: ///public static boolean DEBUG = false; :}
+
+init with {: if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  entry"); :};
+
+terminal E2, EUMP2, MP4_T, E3, E4_DQ, E4_SDQ, E4_SDTQ, EUMP3, UMP4_DQ, UMP4_SDQ, UMP4_SDTQ;
+terminal String FCOPT, FCOPT2, ALGOPT, MP2OPT, VAR, LIM, FLOAT;
+non terminal Object startpt, element;
+
+/* ___________
+   The grammer */
+
+startpt ::= startpt element
+            |
+            element
+            ;
+
+element ::=
+	VAR:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  MP2-Specific Option: "+s);
+	   ParseMP2to5.put("Variations of MP4: ", s); :}
+	|
+	LIM:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5a:  MP2-Specific Option: "+s);
+	   ParseMP2to5.put("Limitations to MP5: ", s); :}
+	;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5a.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5a.flex b/datacat/cup_flex/mp2to5a.flex
new file mode 100644
index 0000000..e7884f9
--- /dev/null
+++ b/datacat/cup_flex/mp2to5a.flex
@@ -0,0 +1,172 @@
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.*;
+
+
+ 
+%%
+
+
+
+%class MP2to5aLexer
+%public
+%unicode
+%cup
+%cupdebug
+/* %ignorecase */
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/*
+<YYINITIAL>{
+  [R|U]?"MP5" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+.|\n {}			       
+}
+*/
+
+
+
+<YYINITIAL>{
+/* _________________
+   Variations of MP4 */
+
+  "MP4(DQ)" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     return new Symbol(MP2to5aSym.VAR, yytext());
+  }
+  "MP4(SDQ)" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	      return new Symbol(MP2to5aSym.VAR, yytext());
+  }
+  "MP4(SDTQ)" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       return new Symbol(MP2to5aSym.VAR, yytext());
+  }
+/* __________________
+   Limitations to MP5 */
+
+  "MP5" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 return new Symbol(MP2to5aSym.LIM, yytext());
+  }
+  "UMP5" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5aSym.LIM, yytext());
+  }
+  .|\n {}
+}
+
+<FLOATVAL>{
+  {FLOAT} {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5aSym.FLOAT, yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5b.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5b.cup b/datacat/cup_flex/mp2to5b.cup
new file mode 100644
index 0000000..b07cb70
--- /dev/null
+++ b/datacat/cup_flex/mp2to5b.cup
@@ -0,0 +1,27 @@
+import java_cup.runtime.*;
+
+parser code {: ///public static boolean DEBUG = false; :}
+
+init with {: if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  entry"); :};
+
+terminal E2, EUMP2, MP4_T, E3, E4_DQ, E4_SDQ, E4_SDTQ, EUMP3, UMP4_DQ, UMP4_SDQ, UMP4_SDTQ;
+terminal String FCOPT, FCOPT2, ALGOPT, MP2OPT, VAR, LIM, FLOAT;
+non terminal Object startpt, element;
+
+/* ___________
+   The grammer */
+
+startpt ::= startpt element
+            |
+            element
+            ;
+
+element ::=
+	FCOPT:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  Frozen Core Option:  "+s);
+	   ParseMP2to5.put("Frozen Core Option:  ", s); :}
+	|
+	FCOPT2:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5b:  Frozen Core Option:  "+s);
+	   ParseMP2to5.put("Frozen Core Option?  (Check raw output)  ", s); :}
+	;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5b.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5b.flex b/datacat/cup_flex/mp2to5b.flex
new file mode 100644
index 0000000..13b3697
--- /dev/null
+++ b/datacat/cup_flex/mp2to5b.flex
@@ -0,0 +1,187 @@
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.*;
+
+
+ 
+%%
+
+
+
+%class MP2to5bLexer
+%public
+%unicode
+%cup
+%cupdebug
+/* %ignorecase */
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/*
+<YYINITIAL>{
+  [R|U]?"MP5" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+.|\n {}			       
+}
+*/
+
+
+
+<YYINITIAL>{
+/* ___________________
+   Frozen Core Options */
+
+  "FC" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  "Full" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  "RW" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  "0,0" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 return new Symbol(MP2to5bSym.FCOPT2, yytext());
+  }
+  "5,0" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 return new Symbol(MP2to5bSym.FCOPT2, yytext());
+  }
+  "5,-4" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5bSym.FCOPT2, yytext());
+  }
+  "6,22" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	  return new Symbol(MP2to5bSym.FCOPT2, yytext());
+  }
+  "-6" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	return new Symbol(MP2to5bSym.FCOPT2, yytext());
+  }
+  "ReadWindow" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  "Window=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  "CASSCF" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5bSym.FCOPT, yytext());
+  }
+  .|\n {}
+}
+
+<FLOATVAL>{
+  {FLOAT} {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5bSym.FLOAT, yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5c.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5c.cup b/datacat/cup_flex/mp2to5c.cup
new file mode 100644
index 0000000..2623353
--- /dev/null
+++ b/datacat/cup_flex/mp2to5c.cup
@@ -0,0 +1,27 @@
+import java_cup.runtime.*;
+
+parser code {: ///public static boolean DEBUG = false; :}
+
+init with {: if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  entry"); :};
+
+terminal E2, EUMP2, MP4_T, E3, E4_DQ, E4_SDQ, E4_SDTQ, EUMP3, UMP4_DQ, UMP4_SDQ, UMP4_SDTQ;
+terminal String FCOPT, FCOPT2, ALGOPT, MP2OPT, VAR, LIM, FLOAT;
+non terminal Object startpt, element;
+
+/* ___________
+   The grammer */
+
+startpt ::= startpt element
+            |
+            element
+            ;
+
+element ::=
+	ALGOPT:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  Algorithm Option:  "+s);
+	   ParseMP2to5.put("Algorithm Option:  ", s); :}
+	|
+	MP2OPT:s
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5c:  MP2-Specific Option: "+s);
+	   ParseMP2to5.put("MP2-Specific Option: ", s); :}
+	;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5c.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5c.flex b/datacat/cup_flex/mp2to5c.flex
new file mode 100644
index 0000000..375b2b0
--- /dev/null
+++ b/datacat/cup_flex/mp2to5c.flex
@@ -0,0 +1,174 @@
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.*;
+
+
+ 
+%%
+
+
+
+%class MP2to5cLexer
+%public
+%unicode
+%cup
+%cupdebug
+/* %ignorecase */
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/*
+<YYINITIAL>{
+  [R|U]?"MP5" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+.|\n {}			       
+}
+*/
+
+
+
+<YYINITIAL>{
+/* ___________________________
+   Algorithm Selection Options */
+
+  "FullDirect" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5cSym.ALGOPT, yytext());
+  }
+  "SemiDirect" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5cSym.ALGOPT, yytext());
+  }
+  "Direct" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5cSym.ALGOPT, yytext());
+  }
+  "InCore" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5cSym.ALGOPT, yytext());
+  }
+/* ____________________
+   MP2-Specific Options */
+  "Stingy" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    return new Symbol(MP2to5cSym.MP2OPT, yytext());
+  }
+  "VeryStingy" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		return new Symbol(MP2to5cSym.MP2OPT, yytext());
+  }
+  .|\n {}
+}
+
+<FLOATVAL>{
+  {FLOAT} {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5cSym.FLOAT, yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5d.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5d.cup b/datacat/cup_flex/mp2to5d.cup
new file mode 100644
index 0000000..afc7011
--- /dev/null
+++ b/datacat/cup_flex/mp2to5d.cup
@@ -0,0 +1,63 @@
+import java_cup.runtime.*;
+
+parser code {: ///public static boolean DEBUG = false; :}
+
+init with {: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  entry"); :};
+
+terminal E2, EUMP2, MP4_T, E3, E4_DQ, E4_SDQ, E4_SDTQ, EUMP3, UMP4_DQ, UMP4_SDQ, UMP4_SDTQ;
+terminal String FCOPT, FCOPT2, ALGOPT, MP2OPT, VAR, LIM, FLOAT;
+non terminal Object startpt, element;
+
+/* ___________
+   The grammer */
+
+startpt ::= startpt element
+            |
+            element
+            ;
+
+element ::=
+	E2 FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E2"+f);
+           ParseMP2to5.put("E2", f); :}
+	|
+	EUMP2 FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP2 energy EUMP2"+f);
+           ParseMP2to5.put("MP2 energy EUMP2", f); :}
+	|
+	MP4_T FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4(T)"+f);
+	   ParseMP2to5.put("MP4(T)", f); :}
+	|
+	E3 FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E3"+f);
+	   ParseMP2to5.put("E3", f); :}
+	|
+	E4_DQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(DQ)"+f);
+	   ParseMP2to5.put("E4(DQ)", f); :}
+	|
+	E4_SDQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(SDQ)"+f);
+	   ParseMP2to5.put("E4(SDQ)", f); :}
+	|
+	E4_SDTQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  E4(SDTQ)"+f);
+	   ParseMP2to5.put("E4(SDTQ)", f); :}
+	|
+	EUMP3 FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP3 correction EUMP3"+f);
+	   ParseMP2to5.put("MP3 correction EUMP3", f); :}
+	|
+	UMP4_DQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(DQ)"+f);
+	   ParseMP2to5.put("MP4 correction UMP4(DQ)", f); :}
+	|
+	UMP4_SDQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(SDQ)"+f);
+           ParseMP2to5.put("MP4 correction UMP4(SDQ)", f); :}
+	|
+	UMP4_SDTQ FLOAT:f
+	{: if(Settings.DEBUG) System.out.println("CUP:mp2to5d:  MP4 correction UMP4(SDTQ)"+f);
+           ParseMP2to5.put("MP4 correction UMP4(SDTQ)", f); :}
+	;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/mp2to5d.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/mp2to5d.flex b/datacat/cup_flex/mp2to5d.flex
new file mode 100644
index 0000000..c94c60a
--- /dev/null
+++ b/datacat/cup_flex/mp2to5d.flex
@@ -0,0 +1,198 @@
+/* MP2 to MP5 Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000456.htm
+*/
+
+import java_cup.runtime.*;
+
+
+ 
+%%
+
+
+
+%class MP2to5dLexer
+%public
+%unicode
+%cup
+%cupdebug
+/* %ignorecase */
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/*
+<YYINITIAL>{
+  [R|U]?"MP5" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP5="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SD)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(DQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4(SDTQ)="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ" {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ"{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP4SDTQ="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORD} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+  [R|U]?"MP"{INT}"="{WORDLIST} {if(Settings.DEBUG) System.out.println("JFlex:pound:POUND: "+yytext());
+  }
+.|\n {}			       
+}
+*/
+
+
+
+<YYINITIAL>{
+/* __________________
+   Examples, Energies */
+
+  "E2=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 yybegin(FLOATVAL); 
+	 return new Symbol(MP2to5dSym.E2);
+  }
+  "EUMP2=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    yybegin(FLOATVAL); 
+	    return new Symbol(MP2to5dSym.EUMP2);
+  }
+  "E3=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	 yybegin(FLOATVAL); 
+	 return new Symbol(MP2to5dSym.E3);
+  }
+  "EUMP3=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	    yybegin(FLOATVAL); 
+	    return new Symbol(MP2to5dSym.EUMP3);
+  }
+  "MP4(T)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     yybegin(FLOATVAL); 
+	     return new Symbol(MP2to5dSym.MP4_T);
+  }
+  "E4(DQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	     yybegin(FLOATVAL); 
+	     return new Symbol(MP2to5dSym.E4_DQ);
+  }
+  "E4(SDQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	      yybegin(FLOATVAL); 
+	      return new Symbol(MP2to5dSym.E4_SDQ);
+  }
+  "E4(SDTQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       yybegin(FLOATVAL); 
+	       return new Symbol(MP2to5dSym.E4_SDTQ);
+  }
+  "UMP4(DQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	       yybegin(FLOATVAL); 
+	       return new Symbol(MP2to5dSym.UMP4_DQ);
+  }
+  "UMP4(SDQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		yybegin(FLOATVAL); 
+		return new Symbol(MP2to5dSym.UMP4_SDQ);
+  }
+  "UMP4(SDTQ)=" {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+		 yybegin(FLOATVAL); 
+		 return new Symbol(MP2to5dSym.UMP4_SDTQ);
+  }
+  .|\n {}
+}
+
+<FLOATVAL>{
+  {FLOAT} {if(Settings.DEBUG) System.out.println("JFlex:mp2to5:  "+yytext());
+	   yybegin(YYINITIAL);
+	   return new Symbol(MP2to5dSym.FLOAT, yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/numatom.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/numatom.cup b/datacat/cup_flex/numatom.cup
new file mode 100644
index 0000000..3ad191e
--- /dev/null
+++ b/datacat/cup_flex/numatom.cup
@@ -0,0 +1,99 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:NumAtom:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:NumAtom: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= INPUT2:in2
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:NumAtom: number of atom "+in2);
+ :}
+INPUT3
+INPUT4
+INPUT5
+INPUT6
+INPUT7
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/pound.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/pound.cup b/datacat/cup_flex/pound.cup
new file mode 100644
index 0000000..6b11531
--- /dev/null
+++ b/datacat/cup_flex/pound.cup
@@ -0,0 +1,60 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+
+
+
+
+/*
+MANUALLY ADD TO CUP-GENERATED CLASS IN Pound.java?????????
+
+ //add to CUP$Pound$actions
+ public LexerParserBroker broker;
+
+ //add to the constructor of CUP$Pound$actions
+ broker = new LexerParserBroker();
+
+*/
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+:}
+
+
+
+
+terminal            LINK, PERCENT_SPEC, POUNDLINE;
+non terminal Object startpt, pattern;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= POUNDLINE
+            |
+            POUNDLINE
+            pattern
+            ;
+
+pattern ::= pattern 
+	    LINK
+            POUNDLINE
+            |
+            pattern
+            LINK
+            PERCENT_SPEC
+            POUNDLINE
+            |
+            LINK 
+            POUNDLINE
+            |
+            LINK
+            PERCENT_SPEC
+	    POUNDLINE
+            ;
+
+
+
+


[02/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/styles/bootstrap.css
----------------------------------------------------------------------
diff --git a/datacat/web/portal/styles/bootstrap.css b/datacat/web/portal/styles/bootstrap.css
new file mode 100755
index 0000000..037dd05
--- /dev/null
+++ b/datacat/web/portal/styles/bootstrap.css
@@ -0,0 +1,6203 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
+html {
+  font-family: sans-serif;
+  -webkit-text-size-adjust: 100%;
+      -ms-text-size-adjust: 100%;
+}
+body {
+  margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  vertical-align: baseline;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+[hidden],
+template {
+  display: none;
+}
+a {
+  background: transparent;
+}
+a:active,
+a:hover {
+  outline: 0;
+}
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+b,
+strong {
+  font-weight: bold;
+}
+dfn {
+  font-style: italic;
+}
+h1 {
+  margin: .67em 0;
+  font-size: 2em;
+}
+mark {
+  color: #000;
+  background: #ff0;
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline;
+}
+sup {
+  top: -.5em;
+}
+sub {
+  bottom: -.25em;
+}
+img {
+  border: 0;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+figure {
+  margin: 1em 40px;
+}
+hr {
+  height: 0;
+  -webkit-box-sizing: content-box;
+     -moz-box-sizing: content-box;
+          box-sizing: content-box;
+}
+pre {
+  overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+  margin: 0;
+  font: inherit;
+  color: inherit;
+}
+button {
+  overflow: visible;
+}
+button,
+select {
+  text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+input {
+  line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+     -moz-box-sizing: content-box;
+          box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+fieldset {
+  padding: .35em .625em .75em;
+  margin: 0 2px;
+  border: 1px solid #c0c0c0;
+}
+legend {
+  padding: 0;
+  border: 0;
+}
+textarea {
+  overflow: auto;
+}
+optgroup {
+  font-weight: bold;
+}
+table {
+  border-spacing: 0;
+  border-collapse: collapse;
+}
+td,
+th {
+  padding: 0;
+}
+@media print {
+  * {
+    color: #000 !important;
+    text-shadow: none !important;
+    background: transparent !important;
+    -webkit-box-shadow: none !important;
+            box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+  select {
+    background: #fff !important;
+  }
+  .navbar {
+    display: none;
+  }
+  .table td,
+  .table th {
+    background-color: #fff !important;
+  }
+  .btn > .caret,
+  .dropup > .btn > .caret {
+    border-top-color: #000 !important;
+  }
+  .label {
+    border: 1px solid #000;
+  }
+  .table {
+    border-collapse: collapse !important;
+  }
+  .table-bordered th,
+  .table-bordered td {
+    border: 1px solid #ddd !important;
+  }
+}
+@font-face {
+  font-family: 'Glyphicons Halflings';
+
+  src: url('../fonts/glyphicons-halflings-regular.eot');
+  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+  position: relative;
+  top: 1px;
+  display: inline-block;
+  font-family: 'Glyphicons Halflings';
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1;
+
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+  content: "\2a";
+}
+.glyphicon-plus:before {
+  content: "\2b";
+}
+.glyphicon-euro:before {
+  content: "\20ac";
+}
+.glyphicon-minus:before {
+  content: "\2212";
+}
+.glyphicon-cloud:before {
+  content: "\2601";
+}
+.glyphicon-envelope:before {
+  content: "\2709";
+}
+.glyphicon-pencil:before {
+  content: "\270f";
+}
+.glyphicon-glass:before {
+  content: "\e001";
+}
+.glyphicon-music:before {
+  content: "\e002";
+}
+.glyphicon-search:before {
+  content: "\e003";
+}
+.glyphicon-heart:before {
+  content: "\e005";
+}
+.glyphicon-star:before {
+  content: "\e006";
+}
+.glyphicon-star-empty:before {
+  content: "\e007";
+}
+.glyphicon-user:before {
+  content: "\e008";
+}
+.glyphicon-film:before {
+  content: "\e009";
+}
+.glyphicon-th-large:before {
+  content: "\e010";
+}
+.glyphicon-th:before {
+  content: "\e011";
+}
+.glyphicon-th-list:before {
+  content: "\e012";
+}
+.glyphicon-ok:before {
+  content: "\e013";
+}
+.glyphicon-remove:before {
+  content: "\e014";
+}
+.glyphicon-zoom-in:before {
+  content: "\e015";
+}
+.glyphicon-zoom-out:before {
+  content: "\e016";
+}
+.glyphicon-off:before {
+  content: "\e017";
+}
+.glyphicon-signal:before {
+  content: "\e018";
+}
+.glyphicon-cog:before {
+  content: "\e019";
+}
+.glyphicon-trash:before {
+  content: "\e020";
+}
+.glyphicon-home:before {
+  content: "\e021";
+}
+.glyphicon-file:before {
+  content: "\e022";
+}
+.glyphicon-time:before {
+  content: "\e023";
+}
+.glyphicon-road:before {
+  content: "\e024";
+}
+.glyphicon-download-alt:before {
+  content: "\e025";
+}
+.glyphicon-download:before {
+  content: "\e026";
+}
+.glyphicon-upload:before {
+  content: "\e027";
+}
+.glyphicon-inbox:before {
+  content: "\e028";
+}
+.glyphicon-play-circle:before {
+  content: "\e029";
+}
+.glyphicon-repeat:before {
+  content: "\e030";
+}
+.glyphicon-refresh:before {
+  content: "\e031";
+}
+.glyphicon-list-alt:before {
+  content: "\e032";
+}
+.glyphicon-lock:before {
+  content: "\e033";
+}
+.glyphicon-flag:before {
+  content: "\e034";
+}
+.glyphicon-headphones:before {
+  content: "\e035";
+}
+.glyphicon-volume-off:before {
+  content: "\e036";
+}
+.glyphicon-volume-down:before {
+  content: "\e037";
+}
+.glyphicon-volume-up:before {
+  content: "\e038";
+}
+.glyphicon-qrcode:before {
+  content: "\e039";
+}
+.glyphicon-barcode:before {
+  content: "\e040";
+}
+.glyphicon-tag:before {
+  content: "\e041";
+}
+.glyphicon-tags:before {
+  content: "\e042";
+}
+.glyphicon-book:before {
+  content: "\e043";
+}
+.glyphicon-bookmark:before {
+  content: "\e044";
+}
+.glyphicon-print:before {
+  content: "\e045";
+}
+.glyphicon-camera:before {
+  content: "\e046";
+}
+.glyphicon-font:before {
+  content: "\e047";
+}
+.glyphicon-bold:before {
+  content: "\e048";
+}
+.glyphicon-italic:before {
+  content: "\e049";
+}
+.glyphicon-text-height:before {
+  content: "\e050";
+}
+.glyphicon-text-width:before {
+  content: "\e051";
+}
+.glyphicon-align-left:before {
+  content: "\e052";
+}
+.glyphicon-align-center:before {
+  content: "\e053";
+}
+.glyphicon-align-right:before {
+  content: "\e054";
+}
+.glyphicon-align-justify:before {
+  content: "\e055";
+}
+.glyphicon-list:before {
+  content: "\e056";
+}
+.glyphicon-indent-left:before {
+  content: "\e057";
+}
+.glyphicon-indent-right:before {
+  content: "\e058";
+}
+.glyphicon-facetime-video:before {
+  content: "\e059";
+}
+.glyphicon-picture:before {
+  content: "\e060";
+}
+.glyphicon-map-marker:before {
+  content: "\e062";
+}
+.glyphicon-adjust:before {
+  content: "\e063";
+}
+.glyphicon-tint:before {
+  content: "\e064";
+}
+.glyphicon-edit:before {
+  content: "\e065";
+}
+.glyphicon-share:before {
+  content: "\e066";
+}
+.glyphicon-check:before {
+  content: "\e067";
+}
+.glyphicon-move:before {
+  content: "\e068";
+}
+.glyphicon-step-backward:before {
+  content: "\e069";
+}
+.glyphicon-fast-backward:before {
+  content: "\e070";
+}
+.glyphicon-backward:before {
+  content: "\e071";
+}
+.glyphicon-play:before {
+  content: "\e072";
+}
+.glyphicon-pause:before {
+  content: "\e073";
+}
+.glyphicon-stop:before {
+  content: "\e074";
+}
+.glyphicon-forward:before {
+  content: "\e075";
+}
+.glyphicon-fast-forward:before {
+  content: "\e076";
+}
+.glyphicon-step-forward:before {
+  content: "\e077";
+}
+.glyphicon-eject:before {
+  content: "\e078";
+}
+.glyphicon-chevron-left:before {
+  content: "\e079";
+}
+.glyphicon-chevron-right:before {
+  content: "\e080";
+}
+.glyphicon-plus-sign:before {
+  content: "\e081";
+}
+.glyphicon-minus-sign:before {
+  content: "\e082";
+}
+.glyphicon-remove-sign:before {
+  content: "\e083";
+}
+.glyphicon-ok-sign:before {
+  content: "\e084";
+}
+.glyphicon-question-sign:before {
+  content: "\e085";
+}
+.glyphicon-info-sign:before {
+  content: "\e086";
+}
+.glyphicon-screenshot:before {
+  content: "\e087";
+}
+.glyphicon-remove-circle:before {
+  content: "\e088";
+}
+.glyphicon-ok-circle:before {
+  content: "\e089";
+}
+.glyphicon-ban-circle:before {
+  content: "\e090";
+}
+.glyphicon-arrow-left:before {
+  content: "\e091";
+}
+.glyphicon-arrow-right:before {
+  content: "\e092";
+}
+.glyphicon-arrow-up:before {
+  content: "\e093";
+}
+.glyphicon-arrow-down:before {
+  content: "\e094";
+}
+.glyphicon-share-alt:before {
+  content: "\e095";
+}
+.glyphicon-resize-full:before {
+  content: "\e096";
+}
+.glyphicon-resize-small:before {
+  content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+  content: "\e101";
+}
+.glyphicon-gift:before {
+  content: "\e102";
+}
+.glyphicon-leaf:before {
+  content: "\e103";
+}
+.glyphicon-fire:before {
+  content: "\e104";
+}
+.glyphicon-eye-open:before {
+  content: "\e105";
+}
+.glyphicon-eye-close:before {
+  content: "\e106";
+}
+.glyphicon-warning-sign:before {
+  content: "\e107";
+}
+.glyphicon-plane:before {
+  content: "\e108";
+}
+.glyphicon-calendar:before {
+  content: "\e109";
+}
+.glyphicon-random:before {
+  content: "\e110";
+}
+.glyphicon-comment:before {
+  content: "\e111";
+}
+.glyphicon-magnet:before {
+  content: "\e112";
+}
+.glyphicon-chevron-up:before {
+  content: "\e113";
+}
+.glyphicon-chevron-down:before {
+  content: "\e114";
+}
+.glyphicon-retweet:before {
+  content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+  content: "\e116";
+}
+.glyphicon-folder-close:before {
+  content: "\e117";
+}
+.glyphicon-folder-open:before {
+  content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+  content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+  content: "\e120";
+}
+.glyphicon-hdd:before {
+  content: "\e121";
+}
+.glyphicon-bullhorn:before {
+  content: "\e122";
+}
+.glyphicon-bell:before {
+  content: "\e123";
+}
+.glyphicon-certificate:before {
+  content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+  content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+  content: "\e126";
+}
+.glyphicon-hand-right:before {
+  content: "\e127";
+}
+.glyphicon-hand-left:before {
+  content: "\e128";
+}
+.glyphicon-hand-up:before {
+  content: "\e129";
+}
+.glyphicon-hand-down:before {
+  content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+  content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+  content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+  content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+  content: "\e134";
+}
+.glyphicon-globe:before {
+  content: "\e135";
+}
+.glyphicon-wrench:before {
+  content: "\e136";
+}
+.glyphicon-tasks:before {
+  content: "\e137";
+}
+.glyphicon-filter:before {
+  content: "\e138";
+}
+.glyphicon-briefcase:before {
+  content: "\e139";
+}
+.glyphicon-fullscreen:before {
+  content: "\e140";
+}
+.glyphicon-dashboard:before {
+  content: "\e141";
+}
+.glyphicon-paperclip:before {
+  content: "\e142";
+}
+.glyphicon-heart-empty:before {
+  content: "\e143";
+}
+.glyphicon-link:before {
+  content: "\e144";
+}
+.glyphicon-phone:before {
+  content: "\e145";
+}
+.glyphicon-pushpin:before {
+  content: "\e146";
+}
+.glyphicon-usd:before {
+  content: "\e148";
+}
+.glyphicon-gbp:before {
+  content: "\e149";
+}
+.glyphicon-sort:before {
+  content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+  content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+  content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+  content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+  content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+  content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+  content: "\e156";
+}
+.glyphicon-unchecked:before {
+  content: "\e157";
+}
+.glyphicon-expand:before {
+  content: "\e158";
+}
+.glyphicon-collapse-down:before {
+  content: "\e159";
+}
+.glyphicon-collapse-up:before {
+  content: "\e160";
+}
+.glyphicon-log-in:before {
+  content: "\e161";
+}
+.glyphicon-flash:before {
+  content: "\e162";
+}
+.glyphicon-log-out:before {
+  content: "\e163";
+}
+.glyphicon-new-window:before {
+  content: "\e164";
+}
+.glyphicon-record:before {
+  content: "\e165";
+}
+.glyphicon-save:before {
+  content: "\e166";
+}
+.glyphicon-open:before {
+  content: "\e167";
+}
+.glyphicon-saved:before {
+  content: "\e168";
+}
+.glyphicon-import:before {
+  content: "\e169";
+}
+.glyphicon-export:before {
+  content: "\e170";
+}
+.glyphicon-send:before {
+  content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+  content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+  content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+  content: "\e174";
+}
+.glyphicon-floppy-save:before {
+  content: "\e175";
+}
+.glyphicon-floppy-open:before {
+  content: "\e176";
+}
+.glyphicon-credit-card:before {
+  content: "\e177";
+}
+.glyphicon-transfer:before {
+  content: "\e178";
+}
+.glyphicon-cutlery:before {
+  content: "\e179";
+}
+.glyphicon-header:before {
+  content: "\e180";
+}
+.glyphicon-compressed:before {
+  content: "\e181";
+}
+.glyphicon-earphone:before {
+  content: "\e182";
+}
+.glyphicon-phone-alt:before {
+  content: "\e183";
+}
+.glyphicon-tower:before {
+  content: "\e184";
+}
+.glyphicon-stats:before {
+  content: "\e185";
+}
+.glyphicon-sd-video:before {
+  content: "\e186";
+}
+.glyphicon-hd-video:before {
+  content: "\e187";
+}
+.glyphicon-subtitles:before {
+  content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+  content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+  content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+  content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+  content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+  content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+  content: "\e194";
+}
+.glyphicon-registration-mark:before {
+  content: "\e195";
+}
+.glyphicon-cloud-download:before {
+  content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+  content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+  content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+  content: "\e200";
+}
+* {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+*:before,
+*:after {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+html {
+  font-size: 10px;
+
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #333;
+  background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+  font-family: inherit;
+  font-size: inherit;
+  line-height: inherit;
+}
+a {
+  color: #428bca;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #2a6496;
+  text-decoration: underline;
+}
+a:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+figure {
+  margin: 0;
+}
+img {
+  vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+  display: block;
+  width: 100% \9;
+  max-width: 100%;
+  height: auto;
+}
+.img-rounded {
+  border-radius: 6px;
+}
+.img-thumbnail {
+  display: inline-block;
+  width: 100% \9;
+  max-width: 100%;
+  height: auto;
+  padding: 4px;
+  line-height: 1.42857143;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  -webkit-transition: all .2s ease-in-out;
+       -o-transition: all .2s ease-in-out;
+          transition: all .2s ease-in-out;
+}
+.img-circle {
+  border-radius: 50%;
+}
+hr {
+  margin-top: 20px;
+  margin-bottom: 20px;
+  border: 0;
+  border-top: 1px solid #eee;
+}
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+  position: static;
+  width: auto;
+  height: auto;
+  margin: 0;
+  overflow: visible;
+  clip: auto;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+  font-family: inherit;
+  font-weight: 500;
+  line-height: 1.1;
+  color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+  font-weight: normal;
+  line-height: 1;
+  color: #777;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+  margin-top: 20px;
+  margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+  font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+  font-size: 75%;
+}
+h1,
+.h1 {
+  font-size: 36px;
+}
+h2,
+.h2 {
+  font-size: 30px;
+}
+h3,
+.h3 {
+  font-size: 24px;
+}
+h4,
+.h4 {
+  font-size: 18px;
+}
+h5,
+.h5 {
+  font-size: 14px;
+}
+h6,
+.h6 {
+  font-size: 12px;
+}
+p {
+  margin: 0 0 10px;
+}
+.lead {
+  margin-bottom: 20px;
+  font-size: 16px;
+  font-weight: 300;
+  line-height: 1.4;
+}
+@media (min-width: 768px) {
+  .lead {
+    font-size: 21px;
+  }
+}
+small,
+.small {
+  font-size: 85%;
+}
+cite {
+  font-style: normal;
+}
+mark,
+.mark {
+  padding: .2em;
+  background-color: #fcf8e3;
+}
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+.text-justify {
+  text-align: justify;
+}
+.text-nowrap {
+  white-space: nowrap;
+}
+.text-lowercase {
+  text-transform: lowercase;
+}
+.text-uppercase {
+  text-transform: uppercase;
+}
+.text-capitalize {
+  text-transform: capitalize;
+}
+.text-muted {
+  color: #777;
+}
+.text-primary {
+  color: #428bca;
+}
+a.text-primary:hover {
+  color: #3071a9;
+}
+.text-success {
+  color: #3c763d;
+}
+a.text-success:hover {
+  color: #2b542c;
+}
+.text-info {
+  color: #31708f;
+}
+a.text-info:hover {
+  color: #245269;
+}
+.text-warning {
+  color: #8a6d3b;
+}
+a.text-warning:hover {
+  color: #66512c;
+}
+.text-danger {
+  color: #a94442;
+}
+a.text-danger:hover {
+  color: #843534;
+}
+.bg-primary {
+  color: #fff;
+  background-color: #428bca;
+}
+a.bg-primary:hover {
+  background-color: #3071a9;
+}
+.bg-success {
+  background-color: #dff0d8;
+}
+a.bg-success:hover {
+  background-color: #c1e2b3;
+}
+.bg-info {
+  background-color: #d9edf7;
+}
+a.bg-info:hover {
+  background-color: #afd9ee;
+}
+.bg-warning {
+  background-color: #fcf8e3;
+}
+a.bg-warning:hover {
+  background-color: #f7ecb5;
+}
+.bg-danger {
+  background-color: #f2dede;
+}
+a.bg-danger:hover {
+  background-color: #e4b9b9;
+}
+.page-header {
+  padding-bottom: 9px;
+  margin: 40px 0 20px;
+  border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+  margin-top: 0;
+  margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+  margin-bottom: 0;
+}
+.list-unstyled {
+  padding-left: 0;
+  list-style: none;
+}
+.list-inline {
+  padding-left: 0;
+  margin-left: -5px;
+  list-style: none;
+}
+.list-inline > li {
+  display: inline-block;
+  padding-right: 5px;
+  padding-left: 5px;
+}
+dl {
+  margin-top: 0;
+  margin-bottom: 20px;
+}
+dt,
+dd {
+  line-height: 1.42857143;
+}
+dt {
+  font-weight: bold;
+}
+dd {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .dl-horizontal dt {
+    float: left;
+    width: 160px;
+    overflow: hidden;
+    clear: left;
+    text-align: right;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .dl-horizontal dd {
+    margin-left: 180px;
+  }
+}
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #777;
+}
+.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+blockquote {
+  padding: 10px 20px;
+  margin: 0 0 20px;
+  font-size: 17.5px;
+  border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+  margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+  display: block;
+  font-size: 80%;
+  line-height: 1.42857143;
+  color: #777;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+  content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+  padding-right: 15px;
+  padding-left: 0;
+  text-align: right;
+  border-right: 5px solid #eee;
+  border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+  content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+  content: '\00A0 \2014';
+}
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+address {
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #c7254e;
+  background-color: #f9f2f4;
+  border-radius: 4px;
+}
+kbd {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #fff;
+  background-color: #333;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+kbd kbd {
+  padding: 0;
+  font-size: 100%;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 1.42857143;
+  color: #333;
+  word-break: break-all;
+  word-wrap: break-word;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+pre code {
+  padding: 0;
+  font-size: inherit;
+  color: inherit;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border-radius: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+.container {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-right: auto;
+  margin-left: auto;
+}
+@media (min-width: 768px) {
+  .container {
+    width: 750px;
+  }
+}
+@media (min-width: 992px) {
+  .container {
+    width: 970px;
+  }
+}
+@media (min-width: 1200px) {
+  .container {
+    width: 1170px;
+  }
+}
+.container-fluid {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-right: auto;
+  margin-left: auto;
+}
+.row {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+  position: relative;
+  min-height: 1px;
+  padding-right: 15px;
+  padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+  float: left;
+}
+.col-xs-12 {
+  width: 100%;
+}
+.col-xs-11 {
+  width: 91.66666667%;
+}
+.col-xs-10 {
+  width: 83.33333333%;
+}
+.col-xs-9 {
+  width: 75%;
+}
+.col-xs-8 {
+  width: 66.66666667%;
+}
+.col-xs-7 {
+  width: 58.33333333%;
+}
+.col-xs-6 {
+  width: 50%;
+}
+.col-xs-5 {
+  width: 41.66666667%;
+}
+.col-xs-4 {
+  width: 33.33333333%;
+}
+.col-xs-3 {
+  width: 25%;
+}
+.col-xs-2 {
+  width: 16.66666667%;
+}
+.col-xs-1 {
+  width: 8.33333333%;
+}
+.col-xs-pull-12 {
+  right: 100%;
+}
+.col-xs-pull-11 {
+  right: 91.66666667%;
+}
+.col-xs-pull-10 {
+  right: 83.33333333%;
+}
+.col-xs-pull-9 {
+  right: 75%;
+}
+.col-xs-pull-8 {
+  right: 66.66666667%;
+}
+.col-xs-pull-7 {
+  right: 58.33333333%;
+}
+.col-xs-pull-6 {
+  right: 50%;
+}
+.col-xs-pull-5 {
+  right: 41.66666667%;
+}
+.col-xs-pull-4 {
+  right: 33.33333333%;
+}
+.col-xs-pull-3 {
+  right: 25%;
+}
+.col-xs-pull-2 {
+  right: 16.66666667%;
+}
+.col-xs-pull-1 {
+  right: 8.33333333%;
+}
+.col-xs-pull-0 {
+  right: auto;
+}
+.col-xs-push-12 {
+  left: 100%;
+}
+.col-xs-push-11 {
+  left: 91.66666667%;
+}
+.col-xs-push-10 {
+  left: 83.33333333%;
+}
+.col-xs-push-9 {
+  left: 75%;
+}
+.col-xs-push-8 {
+  left: 66.66666667%;
+}
+.col-xs-push-7 {
+  left: 58.33333333%;
+}
+.col-xs-push-6 {
+  left: 50%;
+}
+.col-xs-push-5 {
+  left: 41.66666667%;
+}
+.col-xs-push-4 {
+  left: 33.33333333%;
+}
+.col-xs-push-3 {
+  left: 25%;
+}
+.col-xs-push-2 {
+  left: 16.66666667%;
+}
+.col-xs-push-1 {
+  left: 8.33333333%;
+}
+.col-xs-push-0 {
+  left: auto;
+}
+.col-xs-offset-12 {
+  margin-left: 100%;
+}
+.col-xs-offset-11 {
+  margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+  margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+  margin-left: 75%;
+}
+.col-xs-offset-8 {
+  margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+  margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+  margin-left: 50%;
+}
+.col-xs-offset-5 {
+  margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+  margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+  margin-left: 25%;
+}
+.col-xs-offset-2 {
+  margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+  margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+    float: left;
+  }
+  .col-sm-12 {
+    width: 100%;
+  }
+  .col-sm-11 {
+    width: 91.66666667%;
+  }
+  .col-sm-10 {
+    width: 83.33333333%;
+  }
+  .col-sm-9 {
+    width: 75%;
+  }
+  .col-sm-8 {
+    width: 66.66666667%;
+  }
+  .col-sm-7 {
+    width: 58.33333333%;
+  }
+  .col-sm-6 {
+    width: 50%;
+  }
+  .col-sm-5 {
+    width: 41.66666667%;
+  }
+  .col-sm-4 {
+    width: 33.33333333%;
+  }
+  .col-sm-3 {
+    width: 25%;
+  }
+  .col-sm-2 {
+    width: 16.66666667%;
+  }
+  .col-sm-1 {
+    width: 8.33333333%;
+  }
+  .col-sm-pull-12 {
+    right: 100%;
+  }
+  .col-sm-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-sm-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-sm-pull-9 {
+    right: 75%;
+  }
+  .col-sm-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-sm-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-sm-pull-6 {
+    right: 50%;
+  }
+  .col-sm-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-sm-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-sm-pull-3 {
+    right: 25%;
+  }
+  .col-sm-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-sm-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-sm-pull-0 {
+    right: auto;
+  }
+  .col-sm-push-12 {
+    left: 100%;
+  }
+  .col-sm-push-11 {
+    left: 91.66666667%;
+  }
+  .col-sm-push-10 {
+    left: 83.33333333%;
+  }
+  .col-sm-push-9 {
+    left: 75%;
+  }
+  .col-sm-push-8 {
+    left: 66.66666667%;
+  }
+  .col-sm-push-7 {
+    left: 58.33333333%;
+  }
+  .col-sm-push-6 {
+    left: 50%;
+  }
+  .col-sm-push-5 {
+    left: 41.66666667%;
+  }
+  .col-sm-push-4 {
+    left: 33.33333333%;
+  }
+  .col-sm-push-3 {
+    left: 25%;
+  }
+  .col-sm-push-2 {
+    left: 16.66666667%;
+  }
+  .col-sm-push-1 {
+    left: 8.33333333%;
+  }
+  .col-sm-push-0 {
+    left: auto;
+  }
+  .col-sm-offset-12 {
+    margin-left: 100%;
+  }
+  .col-sm-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-sm-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-sm-offset-9 {
+    margin-left: 75%;
+  }
+  .col-sm-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-sm-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-sm-offset-6 {
+    margin-left: 50%;
+  }
+  .col-sm-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-sm-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-sm-offset-3 {
+    margin-left: 25%;
+  }
+  .col-sm-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-sm-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-sm-offset-0 {
+    margin-left: 0;
+  }
+}
+@media (min-width: 992px) {
+  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+    float: left;
+  }
+  .col-md-12 {
+    width: 100%;
+  }
+  .col-md-11 {
+    width: 91.66666667%;
+  }
+  .col-md-10 {
+    width: 83.33333333%;
+  }
+  .col-md-9 {
+    width: 75%;
+  }
+  .col-md-8 {
+    width: 66.66666667%;
+  }
+  .col-md-7 {
+    width: 58.33333333%;
+  }
+  .col-md-6 {
+    width: 50%;
+  }
+  .col-md-5 {
+    width: 41.66666667%;
+  }
+  .col-md-4 {
+    width: 33.33333333%;
+  }
+  .col-md-3 {
+    width: 25%;
+  }
+  .col-md-2 {
+    width: 16.66666667%;
+  }
+  .col-md-1 {
+    width: 8.33333333%;
+  }
+  .col-md-pull-12 {
+    right: 100%;
+  }
+  .col-md-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-md-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-md-pull-9 {
+    right: 75%;
+  }
+  .col-md-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-md-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-md-pull-6 {
+    right: 50%;
+  }
+  .col-md-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-md-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-md-pull-3 {
+    right: 25%;
+  }
+  .col-md-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-md-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-md-pull-0 {
+    right: auto;
+  }
+  .col-md-push-12 {
+    left: 100%;
+  }
+  .col-md-push-11 {
+    left: 91.66666667%;
+  }
+  .col-md-push-10 {
+    left: 83.33333333%;
+  }
+  .col-md-push-9 {
+    left: 75%;
+  }
+  .col-md-push-8 {
+    left: 66.66666667%;
+  }
+  .col-md-push-7 {
+    left: 58.33333333%;
+  }
+  .col-md-push-6 {
+    left: 50%;
+  }
+  .col-md-push-5 {
+    left: 41.66666667%;
+  }
+  .col-md-push-4 {
+    left: 33.33333333%;
+  }
+  .col-md-push-3 {
+    left: 25%;
+  }
+  .col-md-push-2 {
+    left: 16.66666667%;
+  }
+  .col-md-push-1 {
+    left: 8.33333333%;
+  }
+  .col-md-push-0 {
+    left: auto;
+  }
+  .col-md-offset-12 {
+    margin-left: 100%;
+  }
+  .col-md-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-md-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-md-offset-9 {
+    margin-left: 75%;
+  }
+  .col-md-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-md-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-md-offset-6 {
+    margin-left: 50%;
+  }
+  .col-md-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-md-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-md-offset-3 {
+    margin-left: 25%;
+  }
+  .col-md-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-md-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-md-offset-0 {
+    margin-left: 0;
+  }
+}
+@media (min-width: 1200px) {
+  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+    float: left;
+  }
+  .col-lg-12 {
+    width: 100%;
+  }
+  .col-lg-11 {
+    width: 91.66666667%;
+  }
+  .col-lg-10 {
+    width: 83.33333333%;
+  }
+  .col-lg-9 {
+    width: 75%;
+  }
+  .col-lg-8 {
+    width: 66.66666667%;
+  }
+  .col-lg-7 {
+    width: 58.33333333%;
+  }
+  .col-lg-6 {
+    width: 50%;
+  }
+  .col-lg-5 {
+    width: 41.66666667%;
+  }
+  .col-lg-4 {
+    width: 33.33333333%;
+  }
+  .col-lg-3 {
+    width: 25%;
+  }
+  .col-lg-2 {
+    width: 16.66666667%;
+  }
+  .col-lg-1 {
+    width: 8.33333333%;
+  }
+  .col-lg-pull-12 {
+    right: 100%;
+  }
+  .col-lg-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-lg-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-lg-pull-9 {
+    right: 75%;
+  }
+  .col-lg-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-lg-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-lg-pull-6 {
+    right: 50%;
+  }
+  .col-lg-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-lg-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-lg-pull-3 {
+    right: 25%;
+  }
+  .col-lg-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-lg-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-lg-pull-0 {
+    right: auto;
+  }
+  .col-lg-push-12 {
+    left: 100%;
+  }
+  .col-lg-push-11 {
+    left: 91.66666667%;
+  }
+  .col-lg-push-10 {
+    left: 83.33333333%;
+  }
+  .col-lg-push-9 {
+    left: 75%;
+  }
+  .col-lg-push-8 {
+    left: 66.66666667%;
+  }
+  .col-lg-push-7 {
+    left: 58.33333333%;
+  }
+  .col-lg-push-6 {
+    left: 50%;
+  }
+  .col-lg-push-5 {
+    left: 41.66666667%;
+  }
+  .col-lg-push-4 {
+    left: 33.33333333%;
+  }
+  .col-lg-push-3 {
+    left: 25%;
+  }
+  .col-lg-push-2 {
+    left: 16.66666667%;
+  }
+  .col-lg-push-1 {
+    left: 8.33333333%;
+  }
+  .col-lg-push-0 {
+    left: auto;
+  }
+  .col-lg-offset-12 {
+    margin-left: 100%;
+  }
+  .col-lg-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-lg-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-lg-offset-9 {
+    margin-left: 75%;
+  }
+  .col-lg-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-lg-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-lg-offset-6 {
+    margin-left: 50%;
+  }
+  .col-lg-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-lg-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-lg-offset-3 {
+    margin-left: 25%;
+  }
+  .col-lg-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-lg-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-lg-offset-0 {
+    margin-left: 0;
+  }
+}
+table {
+  background-color: transparent;
+}
+th {
+  text-align: left;
+}
+.table {
+  width: 100%;
+  max-width: 100%;
+  margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+  padding: 8px;
+  line-height: 1.42857143;
+  vertical-align: top;
+  border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+  vertical-align: bottom;
+  border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+  border-top: 0;
+}
+.table > tbody + tbody {
+  border-top: 2px solid #ddd;
+}
+.table .table {
+  background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+  padding: 5px;
+}
+.table-bordered {
+  border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+  border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+  background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+  position: static;
+  display: table-column;
+  float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+  position: static;
+  display: table-cell;
+  float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+  background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+  background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+  background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+  background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+  background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+  background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+  background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+  background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+  background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+  background-color: #ebcccc;
+}
+@media screen and (max-width: 767px) {
+  .table-responsive {
+    width: 100%;
+    margin-bottom: 15px;
+    overflow-x: auto;
+    overflow-y: hidden;
+    -webkit-overflow-scrolling: touch;
+    -ms-overflow-style: -ms-autohiding-scrollbar;
+    border: 1px solid #ddd;
+  }
+  .table-responsive > .table {
+    margin-bottom: 0;
+  }
+  .table-responsive > .table > thead > tr > th,
+  .table-responsive > .table > tbody > tr > th,
+  .table-responsive > .table > tfoot > tr > th,
+  .table-responsive > .table > thead > tr > td,
+  .table-responsive > .table > tbody > tr > td,
+  .table-responsive > .table > tfoot > tr > td {
+    white-space: nowrap;
+  }
+  .table-responsive > .table-bordered {
+    border: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:first-child,
+  .table-responsive > .table-bordered > tbody > tr > th:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+  .table-responsive > .table-bordered > thead > tr > td:first-child,
+  .table-responsive > .table-bordered > tbody > tr > td:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+    border-left: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:last-child,
+  .table-responsive > .table-bordered > tbody > tr > th:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+  .table-responsive > .table-bordered > thead > tr > td:last-child,
+  .table-responsive > .table-bordered > tbody > tr > td:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+    border-right: 0;
+  }
+  .table-responsive > .table-bordered > tbody > tr:last-child > th,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+  .table-responsive > .table-bordered > tbody > tr:last-child > td,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+    border-bottom: 0;
+  }
+}
+fieldset {
+  min-width: 0;
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: inherit;
+  color: #333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+label {
+  display: inline-block;
+  max-width: 100%;
+  margin-bottom: 5px;
+  font-weight: bold;
+}
+input[type="search"] {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  line-height: normal;
+}
+input[type="file"] {
+  display: block;
+}
+input[type="range"] {
+  display: block;
+  width: 100%;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+output {
+  display: block;
+  padding-top: 7px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555;
+}
+.form-control {
+  display: block;
+  width: 100%;
+  height: 34px;
+  padding: 6px 12px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555;
+  background-color: #fff;
+  background-image: none;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+  border-color: #66afe9;
+  outline: 0;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.form-control::-moz-placeholder {
+  color: #777;
+  opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+  color: #777;
+}
+.form-control::-webkit-input-placeholder {
+  color: #777;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+  cursor: not-allowed;
+  background-color: #eee;
+  opacity: 1;
+}
+textarea.form-control {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-appearance: none;
+}
+input[type="date"],
+input[type="time"],
+input[type="datetime-local"],
+input[type="month"] {
+  line-height: 34px;
+  line-height: 1.42857143 \0;
+}
+input[type="date"].input-sm,
+input[type="time"].input-sm,
+input[type="datetime-local"].input-sm,
+input[type="month"].input-sm {
+  line-height: 30px;
+}
+input[type="date"].input-lg,
+input[type="time"].input-lg,
+input[type="datetime-local"].input-lg,
+input[type="month"].input-lg {
+  line-height: 46px;
+}
+.form-group {
+  margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+  position: relative;
+  display: block;
+  min-height: 20px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+  padding-left: 20px;
+  margin-bottom: 0;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+  position: absolute;
+  margin-top: 4px \9;
+  margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+  margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+  display: inline-block;
+  padding-left: 20px;
+  margin-bottom: 0;
+  font-weight: normal;
+  vertical-align: middle;
+  cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+  margin-top: 0;
+  margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"].disabled,
+input[type="checkbox"].disabled,
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"] {
+  cursor: not-allowed;
+}
+.radio-inline.disabled,
+.checkbox-inline.disabled,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox-inline {
+  cursor: not-allowed;
+}
+.radio.disabled label,
+.checkbox.disabled label,
+fieldset[disabled] .radio label,
+fieldset[disabled] .checkbox label {
+  cursor: not-allowed;
+}
+.form-control-static {
+  padding-top: 7px;
+  padding-bottom: 7px;
+  margin-bottom: 0;
+}
+.form-control-static.input-lg,
+.form-control-static.input-sm {
+  padding-right: 0;
+  padding-left: 0;
+}
+.input-sm,
+.form-horizontal .form-group-sm .form-control {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-sm {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+  height: auto;
+}
+.input-lg,
+.form-horizontal .form-group-lg .form-control {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+select.input-lg {
+  height: 46px;
+  line-height: 46px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+  height: auto;
+}
+.has-feedback {
+  position: relative;
+}
+.has-feedback .form-control {
+  padding-right: 42.5px;
+}
+.form-control-feedback {
+  position: absolute;
+  top: 25px;
+  right: 0;
+  z-index: 2;
+  display: block;
+  width: 34px;
+  height: 34px;
+  line-height: 34px;
+  text-align: center;
+}
+.input-lg + .form-control-feedback {
+  width: 46px;
+  height: 46px;
+  line-height: 46px;
+}
+.input-sm + .form-control-feedback {
+  width: 30px;
+  height: 30px;
+  line-height: 30px;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline {
+  color: #3c763d;
+}
+.has-success .form-control {
+  border-color: #3c763d;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .form-control:focus {
+  border-color: #2b542c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+  color: #3c763d;
+  background-color: #dff0d8;
+  border-color: #3c763d;
+}
+.has-success .form-control-feedback {
+  color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline {
+  color: #8a6d3b;
+}
+.has-warning .form-control {
+  border-color: #8a6d3b;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .form-control:focus {
+  border-color: #66512c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+  color: #8a6d3b;
+  background-color: #fcf8e3;
+  border-color: #8a6d3b;
+}
+.has-warning .form-control-feedback {
+  color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline {
+  color: #a94442;
+}
+.has-error .form-control {
+  border-color: #a94442;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .form-control:focus {
+  border-color: #843534;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+  color: #a94442;
+  background-color: #f2dede;
+  border-color: #a94442;
+}
+.has-error .form-control-feedback {
+  color: #a94442;
+}
+.has-feedback label.sr-only ~ .form-control-feedback {
+  top: 0;
+}
+.help-block {
+  display: block;
+  margin-top: 5px;
+  margin-bottom: 10px;
+  color: #737373;
+}
+@media (min-width: 768px) {
+  .form-inline .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .form-inline .input-group {
+    display: inline-table;
+    vertical-align: middle;
+  }
+  .form-inline .input-group .input-group-addon,
+  .form-inline .input-group .input-group-btn,
+  .form-inline .input-group .form-control {
+    width: auto;
+  }
+  .form-inline .input-group > .form-control {
+    width: 100%;
+  }
+  .form-inline .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio,
+  .form-inline .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio label,
+  .form-inline .checkbox label {
+    padding-left: 0;
+  }
+  .form-inline .radio input[type="radio"],
+  .form-inline .checkbox input[type="checkbox"] {
+    position: relative;
+    margin-left: 0;
+  }
+  .form-inline .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+  padding-top: 7px;
+  margin-top: 0;
+  margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+  min-height: 27px;
+}
+.form-horizontal .form-group {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .control-label {
+    padding-top: 7px;
+    margin-bottom: 0;
+    text-align: right;
+  }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+  top: 0;
+  right: 15px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .form-group-lg .control-label {
+    padding-top: 14.3px;
+  }
+}
+@media (min-width: 768px) {
+  .form-horizontal .form-group-sm .control-label {
+    padding-top: 6px;
+  }
+}
+.btn {
+  display: inline-block;
+  padding: 6px 12px;
+  margin-bottom: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.42857143;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: middle;
+  cursor: pointer;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus {
+  color: #333;
+  text-decoration: none;
+}
+.btn:active,
+.btn.active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+  pointer-events: none;
+  cursor: not-allowed;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  opacity: .65;
+}
+.btn-default {
+  color: #333;
+  background-color: #fff;
+  border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+  color: #333;
+  background-color: #e6e6e6;
+  border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+  background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  background-color: #fff;
+  border-color: #ccc;
+}
+.btn-default .badge {
+  color: #fff;
+  background-color: #333;
+}
+.btn-primary {
+  color: #fff;
+  background-color: #428bca;
+  border-color: #357ebd;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+  color: #fff;
+  background-color: #3071a9;
+  border-color: #285e8e;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+  background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  background-color: #428bca;
+  border-color: #357ebd;
+}
+.btn-primary .badge {
+  color: #428bca;
+  background-color: #fff;
+}
+.btn-success {
+  color: #fff;
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+  color: #fff;
+  background-color: #449d44;
+  border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+  background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success .badge {
+  color: #5cb85c;
+  background-color: #fff;
+}
+.btn-info {
+  color: #fff;
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+  color: #fff;
+  background-color: #31b0d5;
+  border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+  background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-info .badge {
+  color: #5bc0de;
+  background-color: #fff;
+}
+.btn-warning {
+  color: #fff;
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+  color: #fff;
+  background-color: #ec971f;
+  border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+  background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning .badge {
+  color: #f0ad4e;
+  background-color: #fff;
+}
+.btn-danger {
+  color: #fff;
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+  color: #fff;
+  background-color: #c9302c;
+  border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+  background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger .badge {
+  color: #d9534f;
+  background-color: #fff;
+}
+.btn-link {
+  font-weight: normal;
+  color: #428bca;
+  cursor: pointer;
+  border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+  background-color: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+  border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+  color: #2a6496;
+  text-decoration: underline;
+  background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+  color: #777;
+  text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-block {
+  display: block;
+  width: 100%;
+}
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity .15s linear;
+       -o-transition: opacity .15s linear;
+          transition: opacity .15s linear;
+}
+.fade.in {
+  opacity: 1;
+}
+.collapse {
+  display: none;
+}
+.collapse.in {
+  display: block;
+}
+tr.collapse.in {
+  display: table-row;
+}
+tbody.collapse.in {
+  display: table-row-group;
+}
+.collapsing {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height .35s ease;
+       -o-transition: height .35s ease;
+          transition: height .35s ease;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  margin-left: 2px;
+  vertical-align: middle;
+  border-top: 4px solid;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+}
+.dropdown {
+  position: relative;
+}
+.dropdown-toggle:focus {
+  outline: 0;
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  font-size: 14px;
+  text-align: left;
+  list-style: none;
+  background-color: #fff;
+  -webkit-background-clip: padding-box;
+          background-clip: padding-box;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, .15);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 1.42857143;
+  color: #333;
+  white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  color: #262626;
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  color: #fff;
+  text-decoration: none;
+  background-color: #428bca;
+  outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  text-decoration: none;
+  cursor: not-allowed;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+  display: block;
+}
+.open > a {
+  outline: 0;
+}
+.dropdown-menu-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu-left {
+  right: auto;
+  left: 0;
+}
+.dropdown-header {
+  display: block;
+  padding: 3px 20px;
+  font-size: 12px;
+  line-height: 1.42857143;
+  color: #777;
+  white-space: nowrap;
+}
+.dropdown-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 990;
+}
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  content: "";
+  border-top: 0;
+  border-bottom: 4px solid;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+  .navbar-right .dropdown-menu {
+    right: 0;
+    left: auto;
+  }
+  .navbar-right .dropdown-menu-left {
+    right: auto;
+    left: 0;
+  }
+}
+.btn-group,
+.btn-group-vertical {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+  position: relative;
+  float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+  z-index: 2;
+}
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus {
+  outline: 0;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+  margin-left: -1px;
+}
+.btn-toolbar {
+  margin-left: -5px;
+}
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+  float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+  margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+  border-radius: 0;
+}
+.btn-group > .btn:first-child {
+  margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+  float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child > .btn:first-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+  padding-right: 8px;
+  padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+  padding-right: 12px;
+  padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn .caret {
+  margin-left: 0;
+}
+.btn-lg .caret {
+  border-width: 5px 5px 0;
+  border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+  border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+  display: block;
+  float: none;
+  width: 100%;
+  max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+  float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+  margin-top: -1px;
+  margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+  border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group-justified {
+  display: table;
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+  display: table-cell;
+  float: none;
+  width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+  width: 100%;
+}
+.btn-group-justified > .btn-group .dropdown-menu {
+  left: auto;
+}
+[data-toggle="buttons"] > .btn > input[type="radio"],
+[data-toggle="buttons"] > .btn > input[type="checkbox"] {
+  position: absolute;
+  z-index: -1;
+  filter: alpha(opacity=0);
+  opacity: 0;
+}
+.input-group {
+  position: relative;
+  display: table;
+  border-collapse: separate;
+}
+.input-group[class*="col-"] {
+  float: none;
+  padding-right: 0;
+  padding-left: 0;
+}
+.input-group .form-control {
+  position: relative;
+  z-index: 2;
+  float: left;
+  width: 100%;
+  margin-bottom: 0;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+  height: 46px;
+  line-height: 46px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+  display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+  width: 1%;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+.input-group-addon {
+  padding: 6px 12px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1;
+  color: #555;
+  text-align: center;
+  background-color: #eee;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+.input-group-addon.input-sm {
+  padding: 5px 10px;
+  font-size: 12px;
+  border-radius: 3px;
+}
+.input-group-addon.input-lg {
+  padding: 10px 16px;
+  font-size: 18px;
+  border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+  margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+  border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+  border-left: 0;
+}
+.input-group-btn {
+  position: relative;
+  font-size: 0;
+  white-space: nowrap;
+}
+.input-group-btn > .btn {
+  position: relative;
+}
+.input-group-btn > .btn + .btn {
+  margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+  z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+  margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+  margin-left: -1px;
+}
+.nav {
+  padding-left: 0;
+  margin-bottom: 0;
+  list-style: none;
+}
+.nav > li {
+  position: relative;
+  display: block;
+}
+.nav > li > a {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eee;
+}
+.nav > li.disabled > a {
+  color: #777;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+  color: #777;
+  text-decoration: none;
+  cursor: not-allowed;
+  background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+  background-color: #eee;
+  border-color: #428bca;
+}
+.nav .nav-divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.nav > li > a > img {
+  max-width: none;
+}
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+  float: left;
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  margin-right: 2px;
+  line-height: 1.42857143;
+  border: 1px solid transparent;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+  color: #555;
+  cursor: default;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+  width: 100%;
+  border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+  float: none;
+}
+.nav-tabs.nav-justified > li > a {
+  margin-bottom: 5px;
+  text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-tabs.nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs.nav-justified > li > a {
+  margin-right: 0;
+  border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+  border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li > a {
+    border-bottom: 1px solid #ddd;
+    border-radius: 4px 4px 0 0;
+  }
+  .nav-tabs.nav-justified > .active > a,
+  .nav-tabs.nav-justified > .active > a:hover,
+  .nav-tabs.nav-justified > .active > a:focus {
+    border-bottom-color: #fff;
+  }
+}
+.nav-pills > li {
+  float: left;
+}
+.nav-pills > li > a {
+  border-radius: 4px;
+}
+.nav-pills > li + li {
+  margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+  color: #fff;
+  background-color: #428bca;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li + li {
+  margin-top: 2px;
+  margin-left: 0;
+}
+.nav-justified {
+  width: 100%;
+}
+.nav-justified > li {
+  float: none;
+}
+.nav-justified > li > a {
+  margin-bottom: 5px;
+  text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs-justified {
+  border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+  margin-right: 0;
+  border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+  border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs-justified > li > a {
+    border-bottom: 1px solid #ddd;
+    border-radius: 4px 4px 0 0;
+  }
+  .nav-tabs-justified > .active > a,
+  .nav-tabs-justified > .active > a:hover,
+  .nav-tabs-justified > .active > a:focus {
+    border-bottom-color: #fff;
+  }
+}
+.tab-content > .tab-pane {
+  display: none;
+}
+.tab-content > .active {
+  display: block;
+}
+.nav-tabs .dropdown-menu {
+  margin-top: -1px;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.navbar {
+  position: relative;
+  min-height: 50px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+  .navbar {
+    border-radius: 4px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-header {
+    float: left;
+  }
+}
+.navbar-collapse {
+  padding-right: 15px;
+  padding-left: 15px;
+  overflow-x: visible;
+  -webkit-overflow-scrolling: touch;
+  border-top: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+}
+.navbar-collapse.in {
+  overflow-y: auto;
+}
+@media (min-width: 768px) {
+  .navbar-collapse {
+    width: auto;
+    border-top: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+  .navbar-collapse.collapse {
+    display: block !important;
+    height: auto !important;
+    padding-bottom: 0;
+    overflow: visible !important;
+  }
+  .navbar-collapse.in {
+    overflow-y: visible;
+  }
+  .navbar-fixed-top .navbar-collapse,
+  .navbar-static-top .navbar-collapse,
+  .navbar-fixed-bottom .navbar-collapse {
+    padding-right: 0;
+    padding-left: 0;
+  }
+}
+.navbar-fixed-top .navbar-collapse,
+.navbar-fixed-bottom .navbar-collapse {
+  max-height: 340px;
+}
+@media (max-width: 480px) and (orientation: landscape) {
+  .navbar-fixed-top .navbar-collapse,
+  .navbar-fixed-bottom .navbar-collapse {
+    max-height: 200px;
+  }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .container > .navbar-header,
+  .container-fluid > .navbar-header,
+  .container > .navbar-collapse,
+  .container-fluid > .navbar-collapse {
+    margin-right: 0;
+    margin-left: 0;
+  }
+}
+.navbar-static-top {
+  z-index: 1000;
+  border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+  .navbar-static-top {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  -webkit-transform: translate3d(0, 0, 0);
+       -o-transform: translate3d(0, 0, 0);
+          transform: translate3d(0, 0, 0);
+}
+@media (min-width: 768px) {
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top {
+  top: 0;
+  border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+  margin-bottom: 0;
+  border-width: 1px 0 0;
+}
+.navbar-brand {
+  float: left;
+  height: 50px;
+  padding: 15px 15px;
+  font-size: 18px;
+  line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+  text-decoration: none;
+}
+@media (min-width: 768px) {
+  .navbar > .container .navbar-brand,
+  .navbar > .container-fluid .navbar-brand {
+    margin-left: -15px;
+  }
+}
+.navbar-toggle {
+  position: relative;
+  float: right;
+  padding: 9px 10px;
+  margin-top: 8px;
+  margin-right: 15px;
+  margin-bottom: 8px;
+  background-color: transparent;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.navbar-toggle:focus {
+  outline: 0;
+}
+.navbar-toggle .icon-bar {
+  display: block;
+  width: 22px;
+  height: 2px;
+  border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+  margin-top: 4px;
+}
+@media (min-width: 768px) {
+  .navbar-toggle {
+    display: none;
+  }
+}
+.navbar-nav {
+  margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+@media (max-width: 767px) {
+  .navbar-nav .open .dropdown-menu {
+    position: static;
+    float: none;
+    width: auto;
+    margin-top: 0;
+    background-color: transparent;
+    border: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+  .navbar-nav .open .dropdown-menu > li > a,
+  .navbar-nav .open .dropdown-menu .dropdown-header {
+    padding: 5px 15px 5px 25px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a {
+    line-height: 20px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-nav .open .dropdown-menu > li > a:focus {
+    background-image: none;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-nav {
+    float: left;
+    margin: 0;
+  }
+  .navbar-nav > li {
+    float: left;
+  }
+  .navbar-nav > li > a {
+    padding-top: 15px;
+    padding-bottom: 15px;
+  }
+  .navbar-nav.navbar-right:last-child {
+    margin-right: -15px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-left {
+    float: left !important;
+  }
+  .navbar-right {
+    float: right !important;
+  }
+}
+.navbar-form {
+  padding: 10px 15px;
+  margin-top: 8px;
+  margin-right: -15px;
+  margin-bottom: 8px;
+  margin-left: -15px;
+  border-top: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+}
+@media (min-width: 768px) {
+  .navbar-form .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .navbar-form .input-group {
+    display: inline-table;
+    vertical-align: middle;
+  }
+  .navbar-form .input-group .input-group-addon,
+  .navbar-form .input-group .input-group-btn,
+  .navbar-form .input-group .form-control {
+    width: auto;
+  }
+  .navbar-form .input-group > .form-control {
+    width: 100%;
+  }
+  .navbar-form .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio,
+  .navbar-form .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio label,
+  .navbar-form .checkbox label {
+    padding-left: 0;
+  }
+  .navbar-form .radio input[type="radio"],
+  .navbar-form .checkbox input[type="checkbox"] {
+    position: relative;
+    margin-left: 0;
+  }
+  .navbar-form .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+@media (max-width: 767px) {
+  .navbar-form .form-group {
+    margin-bottom: 5px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-form {
+    width: auto;
+    padding-top: 0;
+    padding-bottom: 0;
+    margin-right: 0;
+    margin-left: 0;
+    border: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+  .navbar-form.navbar-right:last-child {
+    margin-right: -15px;
+  }
+}
+.navbar-nav > li > .dropdown-menu {
+  margin-top: 0;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.navbar-btn {
+  margin-top: 8px;
+  margin-bottom: 8px;
+}
+.navbar-btn.btn-sm {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.navbar-btn.btn-xs {
+  margin-top: 14px;
+  margin-bottom: 14px;
+}
+.navbar-text {
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+  .navbar-text {
+    float: left;
+    margin-right: 15px;
+    margin-left: 15px;
+  }
+  .navbar-text.navbar-right:last-child {
+    margin-right: 0;
+  }
+}
+.navbar-default {
+  background-color: #f8f8f8;
+  border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+  color: #777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+  color: #5e5e5e;
+  background-color: transparent;
+}
+.navbar-default .navbar-text {
+  color: #777;
+}
+.navbar-default .navbar-nav > li > a {
+  color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+  color: #333;
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+  color: #555;
+  background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+  color: #ccc;
+  background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+  border-color: #ddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+  background-color: #ddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+  background-color: #888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+  border-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+  color: #555;
+  background-color: #e7e7e7;
+}
+@media (max-width: 767px) {
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+    color: #777;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #333;
+    background-color: transparent;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #555;
+    background-color: #e7e7e7;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #ccc;
+    background-color: transparent;
+  }
+}
+.navbar-default .navbar-link {
+  color: #777;
+}
+.navbar-default .navbar-link:hover {
+  color: #333;
+}
+.navbar-default .btn-link {
+  color: #777;
+}
+.navbar-default .btn-link:hover,
+.navbar-default .btn-link:focus {
+  color: #333;
+}
+.navbar-default .btn-link[disabled]:hover,
+fieldset[disabled] .navbar-default .btn-link:hover,
+.navbar-default .btn-link[disabled]:focus,
+fieldset[disabled] .navbar-default .btn-link:focus {
+  color: #ccc;
+}
+.navbar-inverse {
+  background-color: #222;
+  border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+  color: #777;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+  color: #fff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+  color: #777;
+}
+.navbar-inverse .navbar-nav > li > a {
+  color: #777;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+  color: #fff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+  color: #fff;
+  background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+  color: #444;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+  border-color: #333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+  background-color: #333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+  background-color: #fff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+  border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+  color: #fff;
+  background-color: #080808;
+}
+@media (max-width: 767px) {
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+    border-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
+    background-color: #080808;
+  }
+  .navbar-inv

<TRUNCATED>

[32/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
adding datacat system


Project: http://git-wip-us.apache.org/repos/asf/airavata-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-sandbox/commit/4231ac35
Tree: http://git-wip-us.apache.org/repos/asf/airavata-sandbox/tree/4231ac35
Diff: http://git-wip-us.apache.org/repos/asf/airavata-sandbox/diff/4231ac35

Branch: refs/heads/master
Commit: 4231ac353d5fa5cf25eb434f9fbda1052ff15436
Parents: 5425403
Author: Supun Nakandala <sc...@apache.org>
Authored: Fri Aug 21 17:07:48 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Fri Aug 21 17:07:48 2015 +0530

----------------------------------------------------------------------
 .gitignore                                      |    24 +
 datacat/.gitignore                              |    22 +
 datacat/.gitignore.swp                          |   Bin 0 -> 12288 bytes
 datacat/LICENSE                                 |   201 +
 datacat/README.md                               |    23 +
 datacat/agent/pom.xml                           |   132 +
 .../agent/src/main/assembly/bin-assembly.xml    |    77 +
 .../airavata/datacat/agent/DataCatAgent.java    |    84 +
 .../agent/dispatcher/DispatcherService.java     |    66 +
 .../agent/dispatcher/MetadataDispatcher.java    |   178 +
 .../dispatcher/MetadataDispatcherQueue.java     |    84 +
 .../agent/dispatcher/MonitorDispatcher.java     |   133 +
 .../dispatcher/MonitorDispatcherQueue.java      |    84 +
 .../validators/IMetadataValidator.java          |    27 +
 .../messageBroker/AiravataUpdateListener.java   |   148 +
 .../agent/messageBroker/IMessageBroker.java     |    28 +
 .../agent/messageBroker/RabbitMQProducer.java   |   196 +
 .../agent/messageBroker/RabbitMQPublisher.java  |    81 +
 .../datacat/agent/monitor/IMonitor.java         |    37 +
 .../monitor/impl/LocalFileSystemMonitor.java    |   261 +
 .../datacat/agent/monitor/impl/OutputInfo.java  |    62 +
 .../datacat/agent/util/AgentProperties.java     |    75 +
 .../airavata/datacat/agent/util/Constants.java  |    56 +
 .../datacat/agent/util/ThriftUtils.java         |    37 +
 .../src/main/resources/bin/datacat-agent.sh     |    85 +
 datacat/agent/src/main/resources/bin/setenv.sh  |    65 +
 .../src/main/resources/conf/agent.properties    |    44 +
 .../agent/src/main/resources/log4j.properties   |    16 +
 .../resources/security/client-truststore.jks    |   Bin 0 -> 35240 bytes
 .../src/main/resources/security/keystore.jks    |   Bin 0 -> 33260 bytes
 .../messageBroker/RabbitMQConsumerTest.java     |   124 +
 .../messageBroker/RabbitMQPublisherTest.java    |    78 +
 datacat/cup_flex/B3PW91.cup                     |   166 +
 datacat/cup_flex/B3PW91.flex                    |   204 +
 datacat/cup_flex/Makefile                       |    60 +
 datacat/cup_flex/casscf.flex                    |   237 +
 datacat/cup_flex/cbsQ.cup                       |   166 +
 datacat/cup_flex/cbsQ.flex                      |   204 +
 datacat/cup_flex/ci.flex                        |   134 +
 datacat/cup_flex/cis.flex                       |   328 +
 datacat/cup_flex/conf.flex                      |    66 +
 datacat/cup_flex/dft.flex                       |   229 +
 datacat/cup_flex/finalcoord.cup                 |   129 +
 datacat/cup_flex/finalcoord.flex                |   151 +
 datacat/cup_flex/g1.cup                         |   166 +
 datacat/cup_flex/g1.flex                        |   218 +
 datacat/cup_flex/gaussian.cup                   |    62 +
 datacat/cup_flex/gaussian.flex                  |   267 +
 datacat/cup_flex/gfinalcoord.cup                |   113 +
 datacat/cup_flex/gfinalcoord.flex               |   131 +
 datacat/cup_flex/gmcscfa.cup                    |   131 +
 datacat/cup_flex/gmcscfa.flex                   |   150 +
 datacat/cup_flex/gmp2opt.flex                   |   133 +
 datacat/cup_flex/gnumatom.cup                   |    62 +
 datacat/cup_flex/gnumatom.flex                  |    71 +
 datacat/cup_flex/gopt.cup                       |   120 +
 datacat/cup_flex/gopt.flex                      |   197 +
 datacat/cup_flex/gscfa.cup                      |   132 +
 datacat/cup_flex/gscfa.flex                     |   153 +
 datacat/cup_flex/gvb.cup                        |   132 +
 datacat/cup_flex/gvb.flex                       |   145 +
 datacat/cup_flex/hf.flex                        |   104 +
 datacat/cup_flex/input.cup                      |   123 +
 datacat/cup_flex/input.flex                     |   153 +
 datacat/cup_flex/inputm.flex                    |   153 +
 datacat/cup_flex/method.cup                     |    62 +
 datacat/cup_flex/method.flex                    |   171 +
 datacat/cup_flex/method1.flex                   |   171 +
 datacat/cup_flex/mfinalcoord.cup                |   129 +
 datacat/cup_flex/mfinalcoord.flex               |   151 +
 datacat/cup_flex/mopt.flex                      |   169 +
 datacat/cup_flex/mopta.cup                      |   132 +
 datacat/cup_flex/mopta.flex                     |   179 +
 datacat/cup_flex/mp2to5a.cup                    |    27 +
 datacat/cup_flex/mp2to5a.flex                   |   172 +
 datacat/cup_flex/mp2to5b.cup                    |    27 +
 datacat/cup_flex/mp2to5b.flex                   |   187 +
 datacat/cup_flex/mp2to5c.cup                    |    27 +
 datacat/cup_flex/mp2to5c.flex                   |   174 +
 datacat/cup_flex/mp2to5d.cup                    |    63 +
 datacat/cup_flex/mp2to5d.flex                   |   198 +
 datacat/cup_flex/numatom.cup                    |    99 +
 datacat/cup_flex/pound.cup                      |    60 +
 datacat/cup_flex/pound.flex                     |  1054 ++
 datacat/cup_flex/prepPtplot.flex                |   120 +
 datacat/cup_flex/scfa.cup                       |   102 +
 datacat/cup_flex/scfa.flex                      |   103 +
 datacat/cup_flex/scfb.cup                       |   115 +
 datacat/cup_flex/scfb.flex                      |   156 +
 datacat/cup_flex/transformation.flex            |   124 +
 datacat/cup_flex/wavefunction.cup               |    62 +
 datacat/cup_flex/wavefunction.flex              |   217 +
 datacat/cup_flex/wavefunction1.flex             |   187 +
 datacat/cup_flex/whichProgram.cup               |   116 +
 datacat/cup_flex/whichProgram.flex              |    78 +
 datacat/inchi-1                                 |   Bin 0 -> 1065032 bytes
 datacat/integration-tests/pom.xml               |    33 +
 .../datacat/integration/IntegrationTest.java    |   154 +
 datacat/laravel-pga/vendor/apache/thrift        |     1 +
 datacat/models/pom.xml                          |    46 +
 .../apache/airavata/datacat/models/AclDTO.java  |    53 +
 .../airavata/datacat/models/AclFields.java      |    27 +
 .../Messaging/ExperimentOutputCreatedEvent.java |   981 ++
 .../Messaging/ExperimentOutputParsedEvent.java  |   573 +
 .../datacat/models/Messaging/Message.java       |   814 ++
 .../datacat/models/Messaging/MessageLevel.java  |    66 +
 .../datacat/models/Messaging/MessageType.java   |    53 +
 .../airavata/datacat/models/MetadataFields.java |    33 +
 .../datacat/models/OutputMetadataDTO.java       |   142 +
 .../datacat/models/OutputMonitorMessage.java    |   104 +
 .../models/OutputMonitorMessageType.java        |    29 +
 .../datacat/models/PrimaryQueryParameter.java   |    64 +
 .../datacat/models/PrimaryQueryType.java        |    31 +
 .../airavata/datacat/models/QueryObject.java    |    96 +
 datacat/parsers/pom.xml                         |    40 +
 .../airavata/datacat/parsers/DefaultParser.java |    63 +
 .../airavata/datacat/parsers/IParser.java       |    30 +
 .../parsers/gridchem/B3PW91/B3PW91Lexer.java    |   886 ++
 .../parsers/gridchem/B3PW91/B3PW91Parser.java   |   544 +
 .../parsers/gridchem/B3PW91/B3PW91Sym.java      |    53 +
 .../parsers/gridchem/GridChemDemoParser.java    |    81 +
 .../parsers/gridchem/GridChemParser.java        |   173 +
 .../parsers/gridchem/GridChemQueueParser.java   |    30 +
 .../datacat/parsers/gridchem/Settings.java      |    26 +
 .../parsers/gridchem/cbsQ/CBSQLexer.java        |   879 ++
 .../parsers/gridchem/cbsQ/CbsQParser.java       |   543 +
 .../datacat/parsers/gridchem/cbsQ/CbsQSym.java  |    53 +
 .../gridchem/finalcoord/FinalCoordLexer.java    |   799 ++
 .../gridchem/finalcoord/FinalCoordParser.java   |   466 +
 .../gridchem/finalcoord/FinalCoordSym.java      |    48 +
 .../datacat/parsers/gridchem/g1/G1Lexer.java    |   913 ++
 .../datacat/parsers/gridchem/g1/G1Parser.java   |   539 +
 .../datacat/parsers/gridchem/g1/G1Sym.java      |    54 +
 .../gridchem/gaussian/GaussianLexer.java        |   864 ++
 .../gridchem/gaussian/GaussianParser.java       |   187 +
 .../parsers/gridchem/gaussian/GaussianSym.java  |    37 +
 .../gridchem/gfinalcoord/GFinalCoordLexer.java  |   773 ++
 .../gridchem/gfinalcoord/GFinalCoordParser.java |   339 +
 .../gridchem/gfinalcoord/GFinalCoordSym.java    |    41 +
 .../parsers/gridchem/gmcscfa/GMCSCFaLexer.java  |   782 ++
 .../parsers/gridchem/gmcscfa/GMCSCFaSym.java    |    45 +
 .../parsers/gridchem/gmcscfa/GmcscfaParser.java |   336 +
 .../gridchem/gnumatom/GNumAtomLexer.java        |   672 ++
 .../gridchem/gnumatom/GNumAtomParser.java       |   190 +
 .../parsers/gridchem/gnumatom/GNumAtomSym.java  |    37 +
 .../parsers/gridchem/gopt/GOPTLexer.java        |   797 ++
 .../datacat/parsers/gridchem/gopt/GOPTSym.java  |    45 +
 .../parsers/gridchem/gopt/GoptParser.java       |   435 +
 .../parsers/gridchem/gscfa/GSCFaLexer.java      |   790 ++
 .../parsers/gridchem/gscfa/GSCFaSym.java        |    44 +
 .../parsers/gridchem/gscfa/GscfaParser.java     |   336 +
 .../datacat/parsers/gridchem/gvb/GVBLexer.java  |   777 ++
 .../datacat/parsers/gridchem/gvb/GVBParser.java |   335 +
 .../datacat/parsers/gridchem/gvb/GVBSym.java    |    45 +
 .../datacat/parsers/gridchem/inchi/InChI.java   |    47 +
 .../parsers/gridchem/inchi/InChIGenerator.java  |    95 +
 .../parsers/gridchem/input/InputLexer.java      |   799 ++
 .../parsers/gridchem/input/InputParser.java     |   385 +
 .../parsers/gridchem/input/InputSym.java        |    46 +
 .../parsers/gridchem/method/MethodLexer.java    |   752 ++
 .../parsers/gridchem/method/MethodParser.java   |   185 +
 .../parsers/gridchem/method/MethodSym.java      |    37 +
 .../gridchem/mfinalcoord/MFinalCoordLexer.java  |   793 ++
 .../gridchem/mfinalcoord/MFinalCoordParser.java |   408 +
 .../gridchem/mfinalcoord/MFinalCoordSym.java    |    46 +
 .../parsers/gridchem/mopta/MOptaLexer.java      |   830 ++
 .../parsers/gridchem/mopta/MOptaParser.java     |   388 +
 .../parsers/gridchem/mopta/MOptaSym.java        |    51 +
 .../parsers/gridchem/mp2to5a/MP2to5aLexer.java  |   681 ++
 .../parsers/gridchem/mp2to5a/MP2to5aParser.java |   261 +
 .../parsers/gridchem/mp2to5a/MP2to5aSym.java    |    51 +
 .../parsers/gridchem/mp2to5b/MP2to5bLexer.java  |   687 ++
 .../parsers/gridchem/mp2to5b/MP2to5bParser.java |   263 +
 .../parsers/gridchem/mp2to5b/MP2to5bSym.java    |    51 +
 .../parsers/gridchem/mp2to5c/MP2to5cLexer.java  |   682 ++
 .../parsers/gridchem/mp2to5c/MP2to5cParser.java |   263 +
 .../parsers/gridchem/mp2to5c/MP2to5cSym.java    |    51 +
 .../parsers/gridchem/mp2to5d/MP2to5dLexer.java  |   737 ++
 .../parsers/gridchem/mp2to5d/MP2to5dParser.java |   460 +
 .../parsers/gridchem/mp2to5d/MP2to5dSym.java    |    51 +
 .../parsers/gridchem/scfa/SCFaLexer.java        |   703 ++
 .../parsers/gridchem/scfa/SCFaParser.java       |   322 +
 .../datacat/parsers/gridchem/scfa/SCFaSym.java  |    43 +
 .../parsers/gridchem/scfb/SCFbLexer.java        |   788 ++
 .../parsers/gridchem/scfb/SCFbParser.java       |   580 +
 .../datacat/parsers/gridchem/scfb/SCFbSym.java  |    71 +
 .../parsers/gridchem/util/AccessLevels.java     |    28 +
 .../parsers/gridchem/util/Constants.java        |    39 +
 .../datacat/parsers/gridchem/util/Fields.java   |    26 +
 .../gridchem/util/GridChemProperties.java       |    77 +
 .../whichProgram/WhichProgramLexer.java         |   642 +
 .../whichProgram/WhichProgramParser.java        |   306 +
 .../gridchem/whichProgram/WhichProgramSym.java  |    43 +
 .../src/main/resources/gridchem.properties      |    16 +
 .../src/main/resources/regexParser.properties   |     9 +
 .../gridchem/AbstractGridChemParserTest.java    |    39 +
 .../B3PW91/B3PW91GridChemParserTest.java        |    62 +
 .../gridchem/CbsQ/CbsQGridChemParserTest.java   |    59 +
 .../gridchem/G1/G1GridChemParserTest.java       |    58 +
 .../parsers/gridchem/GridChemParserTest.java    |    61 +
 .../MP2to5a/MP2to5aGridChemParserTest.java      |    60 +
 .../MP2to5b/MP2to5bGridChemParserTest.java      |    58 +
 .../MP2to5c/MP2to5cGridChemParserTest.java      |    58 +
 .../gridchem/ParserParameterizedTest.java       |   461 +
 .../FinalCoordParserGridChemParserTest.java     |    60 +
 .../GFinalCoordGridChemParserTest.java          |    60 +
 .../GaussianParserGridChemParserTest.java       |    57 +
 .../gmcscfa/GMCSCFaGridChemParserTest.java      |    60 +
 .../gridchem/gopt/GoptGridChemParserTest.java   |    58 +
 .../gridchem/gscfa/GscfaGridChemParserTest.java |    59 +
 .../gridchem/gvb/GVBGridChemParserTest.java     |    59 +
 .../inchi/InChIGeneratorGridChemParserTest.java |    68 +
 .../gridchem/input/InputGridChemParserTest.java |    60 +
 .../MFinalCoordParserGridChemParserTest.java    |    60 +
 .../gridchem/mopta/MOptaGridChemParserTest.java |    58 +
 .../mp2to5d/Mp2to5dGridChemParserTest.java      |    60 +
 .../gridchem/scfa/SCFaGridChemParserTest.java   |    60 +
 .../gridchem/scfb/SCFbGridChemParserTest.java   |    60 +
 datacat/pom.xml                                 |   107 +
 datacat/query.json                              |    40 +
 datacat/regexParser/pom.xml                     |    64 +
 .../datacat/regexParser/RegexParser.java        |   114 +
 .../regexParser/RegexParserProperties.java      |    86 +
 .../src/main/resources/regexParser.properties   |     9 +
 .../datacat/regexParser/RegexParserTest.java    |    57 +
 datacat/server/pom.xml                          |   168 +
 .../server/src/main/assembly/bin-assembly.xml   |    77 +
 .../airavata/datacat/server/DataCatServer.java  |   203 +
 .../airavata/datacat/server/db/IDataModel.java  |    48 +
 .../server/db/solr/SolrClientFactory.java       |    49 +
 .../datacat/server/db/solr/SolrDataModel.java   |    83 +
 .../datacat/server/db/solr/SolrIndexer.java     |   107 +
 .../datacat/server/db/solr/SolrQuerier.java     |   133 +
 .../server/db/solr/SolrQueryBuilder.java        |   101 +
 .../datacat/server/services/DataCatService.java |   168 +
 .../server/services/PublisherService.java       |   112 +
 .../server/services/UserStoreService.java       |   109 +
 .../server/userstore/IUserStoreClient.java      |    29 +
 .../server/userstore/WSO2IUserStoreClient.java  |   102 +
 .../airavata/datacat/server/util/Constants.java |    22 +
 .../datacat/server/util/ServerProperties.java   |    55 +
 .../src/main/resources/bin/datacat-server.sh    |    94 +
 datacat/server/src/main/resources/bin/setenv.sh |    65 +
 .../src/main/resources/conf/server.properties   |    34 +
 .../server/src/main/resources/log4j.properties  |    16 +
 .../resources/security/client-truststore.jks    |   Bin 0 -> 35240 bytes
 .../src/main/resources/security/keystore.jks    |   Bin 0 -> 33260 bytes
 .../datacat/server/db/SolrIndexerTest.java      |    62 +
 .../datacat/server/db/SolrQuerierTest.java      |   177 +
 datacat/web/portal/dataStoreService.php         |   181 +
 datacat/web/portal/favicon.ico                  |   Bin 0 -> 318 bytes
 .../fonts/glyphicons-halflings-regular.eot      |   Bin 0 -> 20335 bytes
 .../fonts/glyphicons-halflings-regular.svg      |   229 +
 .../fonts/glyphicons-halflings-regular.ttf      |   Bin 0 -> 41280 bytes
 .../fonts/glyphicons-halflings-regular.woff     |   Bin 0 -> 23320 bytes
 datacat/web/portal/index.php                    |    95 +
 .../portal/scripts/bootstrap-datetimepicker.js  |  1384 +++
 datacat/web/portal/scripts/bootstrap.js         |  2114 ++++
 datacat/web/portal/scripts/jquery-1.11.1.js     | 10308 +++++++++++++++++
 datacat/web/portal/scripts/main.js              |   610 +
 datacat/web/portal/scripts/moment.js            |  2856 +++++
 .../styles/bootstrap-datetimepicker.min.css     |     5 +
 datacat/web/portal/styles/bootstrap-theme.css   |   442 +
 datacat/web/portal/styles/bootstrap.css         |  6203 ++++++++++
 datacat/web/portal/styles/main.css              |   144 +
 datacat/wso2_is.cer                             |    14 +
 266 files changed, 71201 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4a9b5e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+
+target/
+.idea/
+tmp/
+logs/
+gaussian_sample/
+*.ser
+*.iml
+*.gen
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+solr-server/logs/solr.log
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/.gitignore
----------------------------------------------------------------------
diff --git a/datacat/.gitignore b/datacat/.gitignore
new file mode 100644
index 0000000..7481235
--- /dev/null
+++ b/datacat/.gitignore
@@ -0,0 +1,22 @@
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+target/
+.idea/
+tmp/
+logs/
+gaussian_sample/
+*.ser
+*.iml
+*.gen
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+solr-server/logs/solr.log

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/.gitignore.swp
----------------------------------------------------------------------
diff --git a/datacat/.gitignore.swp b/datacat/.gitignore.swp
new file mode 100644
index 0000000..05c65af
Binary files /dev/null and b/datacat/.gitignore.swp differ

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/LICENSE
----------------------------------------------------------------------
diff --git a/datacat/LICENSE b/datacat/LICENSE
new file mode 100644
index 0000000..ad410e1
--- /dev/null
+++ b/datacat/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/README.md
----------------------------------------------------------------------
diff --git a/datacat/README.md b/datacat/README.md
new file mode 100644
index 0000000..23176b8
--- /dev/null
+++ b/datacat/README.md
@@ -0,0 +1,23 @@
+DataCat
+=========
+
+DataCat is a scientific data cataloging system designed for efficient and effective management of scientific data.
+
+This is a project done by students of University of Moratuwa, Sri Lanka as a part of their final year project. The goal is to contribute this code to Apache Airavata project and integrate it with Airavata workflow software and continuing to develop it further.
+
+The project development team:
+  * Supun Nakandala – supun.nakandala@gmail.com
+  * Sachith Withana - swsachith@gmail.com
+  * Dinu Kumarasiri - sandarumk@gmail.com
+  * Hirantha Sankalpa - hiranthasankalpa@gmail.com
+
+Before Running the Program
+==========================
+* Add WSO2 server certificate found in the top level directory to the java key store using the below command 
+    $JAVA_HOME/jre/lib/security$ keytool -import -file wso2_is.cer -keystore cacerts
+
+* Start Solr server using the following command
+    $java -jar SOLR_HOME/start.jar
+    
+* Start WSO2 IS using the following command
+     $sh WSO2_IS_HOME/bin/wso2server.sh

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/agent/pom.xml b/datacat/agent/pom.xml
new file mode 100644
index 0000000..f458d0d
--- /dev/null
+++ b/datacat/agent/pom.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent</artifactId>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                    <compilerArgument>-Xlint:unchecked</compilerArgument>
+                    <optimize>true</optimize>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.airavata.datacat.agent.DataCatAgent</mainClass>
+                            <addClasspath>true</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <executions>
+                    <execution>
+                        <id>distribution-package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${apache-commons.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>parsers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>RegexParser</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${httpclient.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>${httpcore.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>${gson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- RabbitMQ dependencies - For the message-Broker -->
+        <dependency>
+            <groupId>com.rabbitmq</groupId>
+            <artifactId>amqp-client</artifactId>
+            <version>${rabbitmq.version}</version>
+        </dependency>
+
+        <!-- Thrift dependency -->
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+
+    </dependencies>
+
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/assembly/bin-assembly.xml b/datacat/agent/src/main/assembly/bin-assembly.xml
new file mode 100644
index 0000000..3ca8124
--- /dev/null
+++ b/datacat/agent/src/main/assembly/bin-assembly.xml
@@ -0,0 +1,77 @@
+<!--Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>bin</id>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>datacat-agent</baseDirectory>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources/bin</directory>
+            <outputDirectory>bin</outputDirectory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>755</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/conf</directory>
+            <outputDirectory>conf</outputDirectory>
+            <includes>
+                <include>*.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../parsers/src/main/resources</directory>
+            <outputDirectory>conf</outputDirectory>
+            <includes>
+                <include>*.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/security</directory>
+            <outputDirectory>security</outputDirectory>
+            <includes>
+                <include>*.jks</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <outputDirectory>conf</outputDirectory>
+            <includes>
+                <include>log4j.properties</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/lib</outputDirectory>
+            <includes>
+                <include>*:jar:*</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/DataCatAgent.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/DataCatAgent.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/DataCatAgent.java
new file mode 100644
index 0000000..9940c49
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/DataCatAgent.java
@@ -0,0 +1,84 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent;
+
+import org.apache.airavata.datacat.agent.dispatcher.DispatcherService;
+import org.apache.airavata.datacat.agent.messageBroker.AiravataUpdateListener;
+import org.apache.airavata.datacat.agent.messageBroker.IMessageBroker;
+import org.apache.airavata.datacat.agent.monitor.IMonitor;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.nio.file.Paths;
+
+public class DataCatAgent {
+    private static final Logger logger = LogManager.getLogger(DataCatAgent.class);
+    private IMessageBroker messageBroker;
+    private DispatcherService dispatcherService;
+    private IMonitor iMonitor;
+
+    private String monitorType = AgentProperties.getInstance().getProperty(Constants.MONITOR_TYPE,"");
+
+    public DataCatAgent() throws Exception {
+        dispatcherService = DispatcherService.getInstance();
+        if(monitorType.equals("FILE_SYSTEM")){
+            iMonitor = new org.apache.airavata.datacat.agent.monitor.impl.LocalFileSystemMonitor();
+        }else{
+            messageBroker = new AiravataUpdateListener();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        final DataCatAgent dataCatAgent = new DataCatAgent();
+        dataCatAgent.start();
+
+        Runtime.getRuntime().addShutdownHook(new Thread() {
+            public void run() {
+                logger.info("ShutDown called...");
+                dataCatAgent.stop();
+            }
+        });
+    }
+
+    public void start() throws Exception {
+        logger.info("\nStarting DataCat Agent...!\n");
+        dispatcherService.startDispatcher();
+        if(monitorType.equals("FILE_SYSTEM")){
+            String path = AgentProperties.getInstance().getProperty(Constants.DATA_ROOT,"");
+            iMonitor.startMonitor(Paths.get(path));
+        }else{
+            messageBroker.startBroker();
+        }
+    }
+
+    public void stop() {
+        dispatcherService.stopService();
+        if(monitorType.equals("FILE_SYSTEM")){
+            iMonitor.stopMonitor();
+        }else{
+            messageBroker.stopBroker();
+        }
+        logger.info("\nGood bye from DataCat agent...!\n");
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/DispatcherService.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/DispatcherService.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/DispatcherService.java
new file mode 100644
index 0000000..f3b5c4d
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/DispatcherService.java
@@ -0,0 +1,66 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher;
+
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+
+public class DispatcherService {
+    private MetadataDispatcher metadataDispatcher;
+    private MetadataDispatcherQueue metadataDispatcherQueue;
+    private MonitorDispatcher monitorDispatcher;
+    private MonitorDispatcherQueue monitorDispatcherQueue;
+
+    private static DispatcherService instance;
+
+    private DispatcherService() throws Exception {
+        this.metadataDispatcher = MetadataDispatcher.getInstance();
+        this.metadataDispatcherQueue = MetadataDispatcherQueue.getInstance();
+        this.monitorDispatcher = MonitorDispatcher.getInstance();
+        this.monitorDispatcherQueue = MonitorDispatcherQueue.getInstance();
+    }
+
+    public static DispatcherService getInstance() throws Exception {
+        if(DispatcherService.instance==null){
+            DispatcherService.instance = new DispatcherService();
+        }
+
+        return DispatcherService.instance;
+    }
+
+    public void startDispatcher() {
+        metadataDispatcher.startDispatcher();
+        monitorDispatcher.startDispatcher();
+    }
+
+    public void stopService() {
+    }
+
+    public void addFileMetadata(OutputMetadataDTO outputMetadataDTO){
+        this.metadataDispatcherQueue.addMetadataToQueue(outputMetadataDTO);
+    }
+
+    public void addFileMonitorMessage(OutputMonitorMessage outputMonitorMessage){
+        this.monitorDispatcherQueue.addMsgToQueue(outputMonitorMessage);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcher.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcher.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcher.java
new file mode 100644
index 0000000..66804b6
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcher.java
@@ -0,0 +1,178 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher;
+
+import com.google.gson.Gson;
+import org.apache.airavata.datacat.agent.messageBroker.RabbitMQPublisher;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.Messaging.ExperimentOutputParsedEvent;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLContexts;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import javax.net.ssl.SSLContext;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.KeyStore;
+
+public class MetadataDispatcher {
+
+    private final Logger logger = LogManager.getLogger(MetadataDispatcher.class);
+
+    private MetadataDispatcherQueue metadataDispatcherQueue = MetadataDispatcherQueue.getInstance();
+
+    private static MetadataDispatcher instance;
+
+    private SSLConnectionSocketFactory sslsf;
+
+    private RabbitMQPublisher rabbitMQPublisher;
+
+    private MetadataDispatcher() throws Exception {
+        KeyStore keyStore = KeyStore.getInstance("JKS");
+        KeyStore trustStore = KeyStore.getInstance("JKS");
+        // set up security context
+        if (new File("../security/" + AgentProperties.getInstance()
+                .getProperty(Constants.KEYSTORE_FILE, "")).exists()) {
+            keyStore.load(new FileInputStream(new File("../security/" + AgentProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_FILE, ""))),AgentProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_PWD, "").toCharArray());
+        } else {;
+            keyStore.load(ClassLoader.getSystemResourceAsStream("security/" +
+                    AgentProperties.getInstance().getProperty(Constants.KEYSTORE_FILE, "")),
+                    AgentProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_PWD, "").toCharArray());
+        }
+        if (new File("../security/" + AgentProperties.getInstance()
+                .getProperty(Constants.TRUSTSTORE_FILE, "")).exists()) {
+            keyStore.load(new FileInputStream(new File("../security/" + AgentProperties.getInstance()
+                    .getProperty(Constants.TRUSTSTORE_FILE, ""))),AgentProperties.getInstance()
+                    .getProperty(Constants.TRUSTSTORE_PWD, "").toCharArray());
+        } else {
+            keyStore.load(ClassLoader.getSystemResourceAsStream("security/" +
+                    AgentProperties.getInstance().getProperty(Constants.TRUSTSTORE_FILE, "")),
+                    AgentProperties.getInstance()
+                    .getProperty(Constants.TRUSTSTORE_PWD, "").toCharArray());
+        }
+        SSLContext sslContext = SSLContexts.custom()
+            .loadKeyMaterial(keyStore,AgentProperties.getInstance()
+                    .getProperty(Constants.KEYSTORE_PWD, "").toCharArray())
+            .loadTrustMaterial(trustStore, new TrustSelfSignedStrategy())
+            .build();
+
+        sslsf = new SSLConnectionSocketFactory(
+                sslContext, new String[] { "TLSv1" }, null,
+                SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+
+        rabbitMQPublisher = new RabbitMQPublisher();
+    }
+
+
+    public static MetadataDispatcher getInstance() throws Exception {
+        if(MetadataDispatcher.instance==null){
+            MetadataDispatcher.instance = new MetadataDispatcher();
+        }        
+        return MetadataDispatcher.instance;
+    }
+
+    /**
+     * Starts the message dispatcher
+     */
+    public void startDispatcher() {
+        (new Thread(new Runnable() {
+            @Override
+            public void run() {
+                OutputMetadataDTO outputMetadataDTO = null;
+                while (true) {
+                    outputMetadataDTO = metadataDispatcherQueue.getMetadataFromQueue();
+                    if (outputMetadataDTO != null) {
+                        try {
+                            dispatch(outputMetadataDTO);
+                        } catch (Exception e) {
+                            logger.error(e.toString());
+                        }
+                    }
+                }
+            }
+        })).start();
+    }
+
+    /**
+     * Dispatch single file metadata
+     *
+     * @param outputMetadataDTO
+     * @throws Exception
+     */
+    private void dispatch(OutputMetadataDTO outputMetadataDTO) throws IOException {
+        if (outputMetadataDTO != null) {
+            logger.info("Dispatching newly generated file metadata");
+            publishDataToServer(outputMetadataDTO);
+
+            logger.info("Publishing the message to Airavata RabbitMQ Message Broker");
+            ExperimentOutputParsedEvent experimentOutputParsedEvent = new ExperimentOutputParsedEvent();
+            experimentOutputParsedEvent.setExperimentId(outputMetadataDTO.getExperimentId());
+            experimentOutputParsedEvent.setDocumentID(outputMetadataDTO.getId());
+            experimentOutputParsedEvent.setStatus("success");
+            rabbitMQPublisher.publish(experimentOutputParsedEvent);
+        } else {
+            logger.info("Dispatching empty file metadata (doing nothing)");
+        }
+    }
+
+    /**
+     * Method to publish data to the Publisher REST Service
+     * @param outputMetadataDTO
+     */
+    private void publishDataToServer(OutputMetadataDTO outputMetadataDTO){
+        int count = 0;
+        while(count<10){
+            count++;
+            String stringUri = "";
+            try{
+                stringUri = AgentProperties.getInstance().getProperty(Constants.PUBLISHER_ADD_ENDPOINT,"");
+                HttpClient client = HttpClients.custom().setSSLSocketFactory(sslsf).build();
+                HttpPost post = new HttpPost(stringUri);
+                Gson gson = new Gson();
+                StringEntity input = new StringEntity(gson.toJson(outputMetadataDTO));;
+                post.setEntity(input);
+                HttpResponse response = client.execute(post);
+                if (response.getStatusLine().getStatusCode() == 200) {
+                    break;
+                }
+                throw new RuntimeException("Failed : HTTP error code : "
+                        + response.getStatusLine().getStatusCode());
+            }catch (Exception ex){
+                logger.error("Trying to publish (URI:"+stringUri+") for the "+count+" time and failed", ex);
+                ex.printStackTrace();
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcherQueue.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcherQueue.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcherQueue.java
new file mode 100644
index 0000000..35a0745
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MetadataDispatcherQueue.java
@@ -0,0 +1,84 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+
+import java.util.LinkedList;
+
+public class MetadataDispatcherQueue {
+    public static MetadataDispatcherQueue instance;
+    private LinkedList<OutputMetadataDTO> queue;
+
+    private MetadataDispatcherQueue() {
+        queue = new LinkedList<OutputMetadataDTO>();
+    }
+
+    /**
+     * Returns a singleton dispatch queue object
+     *
+     * @return Dispatch queue object
+     */
+    public static MetadataDispatcherQueue getInstance() {
+        if (instance == null) {
+            instance = new MetadataDispatcherQueue();
+        }
+        return instance;
+    }
+
+    /**
+     * Put a message into the dispatch queue
+     *
+     * @param outputMetadataDTO
+     */
+    public synchronized void addMetadataToQueue(OutputMetadataDTO outputMetadataDTO) {
+        queue.add(outputMetadataDTO);
+        notifyAll();
+    }
+
+    /**
+     * Returns a FileMetadata object from the dispatcher queue
+     *
+     * @return FileMetadata object
+     */
+    public synchronized OutputMetadataDTO getMetadataFromQueue() {
+        OutputMetadataDTO outputMetadataDTO = queue.pollFirst();
+        while (outputMetadataDTO == null) {
+
+            try {
+                wait();
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            outputMetadataDTO = queue.pollFirst();
+        }
+        return outputMetadataDTO;
+    }
+
+    /**
+     * Returns dispatch queue size
+     *
+     * @return queue size
+     */
+    public long getQueueSize() {
+        return queue.size();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcher.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcher.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcher.java
new file mode 100644
index 0000000..1666cd4
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcher.java
@@ -0,0 +1,133 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher;
+
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.parsers.IParser;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class MonitorDispatcher {
+
+    private final Logger logger = LogManager.getLogger(MonitorDispatcher.class);
+
+
+    private MonitorDispatcherQueue monitorDispatcherQueue = MonitorDispatcherQueue.getInstance();
+
+
+    private MetadataDispatcherQueue metadataDispatcherQueue = MetadataDispatcherQueue.getInstance();
+
+
+    private ExecutorService exec;
+
+
+    private static MonitorDispatcher instance;
+
+
+    private MonitorDispatcher() {
+        init();
+    }
+
+    public static MonitorDispatcher getInstance(){
+        if(MonitorDispatcher.instance==null){
+            MonitorDispatcher.instance = new MonitorDispatcher();
+        }
+
+        return MonitorDispatcher.instance;
+    }
+
+    private void init() {
+        try {
+            exec = Executors.newFixedThreadPool(Integer.parseInt(AgentProperties.getInstance().getProperty(
+                    Constants.MAX_PARSER_THREADS, "1000")));
+        } catch (Exception e) {
+            logger.error(e.toString());
+            exec = Executors.newFixedThreadPool(100);
+        }
+    }
+
+    /**
+     * Starts the message dispatcher
+     */
+    public void startDispatcher() {
+        (new Thread(new Runnable() {
+            @Override
+            public void run() {
+                OutputMonitorMessage directoryUpdateMessage = null;
+                while (true) {
+                    directoryUpdateMessage = monitorDispatcherQueue.getMsgFromQueue();
+                    if (directoryUpdateMessage != null) {
+                        try {
+                            dispatch(directoryUpdateMessage);
+                        } catch (Exception e) {
+                            logger.error(e.toString());
+                        }
+                    }
+                }
+            }
+        })).start();
+    }
+
+    /**
+     * Dispatch single message
+     *
+     * @param outputMonitorMessage
+     * @throws Exception
+     */
+    private void dispatch(final OutputMonitorMessage outputMonitorMessage) throws Exception {
+        logger.info("Dispatching new message for experiment name: " + outputMonitorMessage.getExperimentName());
+        exec.execute(new Runnable() {
+            @Override
+            public void run() {
+                IParser parser = null;
+                try {
+                    Class c = this.getClass().getClassLoader()
+                            .loadClass(AgentProperties.getInstance().getProperty(
+                            Constants.PARSER_CLASS,""
+                    ));
+                    parser = (IParser)c.newInstance();
+                    OutputMetadataDTO outputMetadataDTO = parser.parse(outputMonitorMessage);
+                    metadataDispatcherQueue.addMetadataToQueue(outputMetadataDTO);
+                    logger.info("Successfully parsed the metadata for experiment name:"+ outputMetadataDTO.getExperimentName());
+                } catch (ClassNotFoundException e) {
+                    e.printStackTrace();
+                    logger.error("Cannot load Parser Class." +
+                            " Please check PARSER_CLASS property in agent.properties.");
+                } catch (InstantiationException e) {
+                    e.printStackTrace();
+                    logger.error("Cannot load Parser Class." +
+                            " Please check PARSER_CLASS property in agent.properties.");
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                    logger.error("Cannot load Parser Class." +
+                            " Please check PARSER_CLASS property in agent.properties.");
+                }
+            }
+        });
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcherQueue.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcherQueue.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcherQueue.java
new file mode 100644
index 0000000..9a3e37b
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/MonitorDispatcherQueue.java
@@ -0,0 +1,84 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher;
+
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+
+import java.util.LinkedList;
+
+public class MonitorDispatcherQueue {
+    public static MonitorDispatcherQueue instance;
+    private LinkedList<OutputMonitorMessage> queue;
+
+    private MonitorDispatcherQueue() {
+        queue = new LinkedList<OutputMonitorMessage>();
+    }
+
+    /**
+     * Returns a singleton dispatch queue object
+     *
+     * @return Dispatch queue object
+     */
+    public static MonitorDispatcherQueue getInstance() {
+        if (instance == null) {
+            instance = new MonitorDispatcherQueue();
+        }
+        return instance;
+    }
+
+    /**
+     * Put a message into the dispatch queue
+     *
+     * @param outputMonitorMessage
+     */
+    public synchronized void addMsgToQueue(OutputMonitorMessage outputMonitorMessage) {
+        queue.add(outputMonitorMessage);
+        notifyAll();
+    }
+
+    /**
+     * Returns a DirectoryUpdateMessage object from the dispatcher queue
+     *
+     * @return DirectoryUpdateMessage object
+     */
+    public synchronized OutputMonitorMessage getMsgFromQueue() {
+        OutputMonitorMessage directoryUpdateMessage = queue.pollFirst();
+        while (directoryUpdateMessage == null) {
+            try {
+                wait();
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            directoryUpdateMessage = queue.pollFirst();
+        }
+        return directoryUpdateMessage;
+    }
+
+    /**
+     * Returns dispatch queue size
+     *
+     * @return queue size
+     */
+    public long getQueueSize() {
+        return queue.size();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/validators/IMetadataValidator.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/validators/IMetadataValidator.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/validators/IMetadataValidator.java
new file mode 100644
index 0000000..505bbb7
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/dispatcher/validators/IMetadataValidator.java
@@ -0,0 +1,27 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.dispatcher.validators;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+
+public interface IMetadataValidator {
+    public boolean validate(OutputMetadataDTO metadataDTO);
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/AiravataUpdateListener.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/AiravataUpdateListener.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/AiravataUpdateListener.java
new file mode 100644
index 0000000..52270bc
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/AiravataUpdateListener.java
@@ -0,0 +1,148 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.messageBroker;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.QueueingConsumer;
+import org.apache.airavata.datacat.agent.dispatcher.MonitorDispatcherQueue;
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.agent.util.ThriftUtils;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.apache.airavata.datacat.models.OutputMonitorMessageType;
+import org.apache.airavata.datacat.models.Messaging.ExperimentOutputCreatedEvent;
+import org.apache.airavata.datacat.models.Messaging.Message;
+import org.apache.airavata.datacat.models.Messaging.MessageType;
+import org.apache.log4j.LogManager;
+import org.apache.thrift.TBase;
+
+public class AiravataUpdateListener implements IMessageBroker {
+    private final org.apache.log4j.Logger logger = LogManager.getLogger(AiravataUpdateListener.class);
+
+    private final String BINDING_KEY;
+    private final String RABBITMQ_HOST;
+    private final String EXCHANGE_NAME;
+
+    private boolean runFileUpdateListener = false;
+    private MonitorDispatcherQueue monitorDispatcherQueue;
+
+    /**
+     * Initializes the attributes
+     */
+    public AiravataUpdateListener() {
+        RABBITMQ_HOST = AgentProperties.getInstance().getProperty(Constants.RABBITMQ_HOST, "");
+        BINDING_KEY = AgentProperties.getInstance().getProperty(Constants.BINDING_KEY, "");
+        EXCHANGE_NAME = AgentProperties.getInstance().getProperty(Constants.EXCHANGE_NAME, "");
+        monitorDispatcherQueue = MonitorDispatcherQueue.getInstance();
+        runFileUpdateListener = true;
+    }
+
+    public void startBroker() {
+        (new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    ConnectionFactory factory = new ConnectionFactory();
+                    factory.setHost(RABBITMQ_HOST);
+
+                    Connection connection = factory.newConnection();
+                    Channel channel = connection.createChannel();
+
+                    channel.exchangeDeclare(EXCHANGE_NAME, "topic");
+                    String queueName = channel.queueDeclare().getQueue();
+
+                    channel.basicQos(1);
+                    channel.queueBind(queueName, EXCHANGE_NAME, BINDING_KEY);
+
+                    logger.debug("Waiting for messages. To exit press CTRL+C");
+
+                    QueueingConsumer consumer = new QueueingConsumer(channel);
+                    channel.basicConsume(queueName, true, consumer);
+
+                    while (runFileUpdateListener) {
+                        QueueingConsumer.Delivery delivery = consumer.nextDelivery();
+
+                        Message message = new Message();
+                        ThriftUtils.createThriftFromBytes(delivery.getBody(), message);
+                        TBase event = null;
+
+                        if (message.getMessageType().equals(MessageType.EXPERIMENT_OUTPUT)) {
+
+                            ExperimentOutputCreatedEvent experimentOutputCreatedEvent = new ExperimentOutputCreatedEvent();
+                            ThriftUtils.createThriftFromBytes(message.getEvent(), experimentOutputCreatedEvent);
+
+                            logger.debug(" Message Received with message id '" + message.getMessageId()
+                                    + "' and with message type '" + message.getMessageType() + "'  with experiment name " +
+                                    experimentOutputCreatedEvent.getExperimentName());
+
+                            event = experimentOutputCreatedEvent;
+
+                            logger.debug(" [x] Received FileInfo Message'");
+                            process(experimentOutputCreatedEvent, message.getUpdatedTime());
+                            logger.debug(" [x] Done Processing FileInfo Message");
+                        } else {
+                            logger.debug("Recieved message of type ..." +message.getMessageType());
+                        }
+                    }
+                } catch (Exception e) {
+                    logger.error(e);
+                }
+            }
+
+
+        })).start();
+
+
+    }
+
+    @Override
+    public void stopBroker() {
+        runFileUpdateListener = false;
+        logger.info("Shutting down FileUpdateListener...");
+    }
+
+    /**
+     * This method processe the Experiment Output Created Event that comes from Airavata
+     * @param experimentOutputCreatedEvent
+     * @param modifiedTime
+     * @throws InterruptedException
+     */
+    private void process(ExperimentOutputCreatedEvent experimentOutputCreatedEvent, long modifiedTime) throws InterruptedException {
+        if (experimentOutputCreatedEvent != null) {
+            //creating the output monitor message
+            OutputMonitorMessage outputMonitorMessage = new OutputMonitorMessage();
+            outputMonitorMessage.setExperimentID(experimentOutputCreatedEvent.getExperimentId());
+            outputMonitorMessage.setExperimentName(experimentOutputCreatedEvent.getExperimentName());
+            outputMonitorMessage.setOutputPath(experimentOutputCreatedEvent.getOutputPath());
+            outputMonitorMessage.setOwnerId(experimentOutputCreatedEvent.getOwnerId());
+            outputMonitorMessage.setGatewayId(experimentOutputCreatedEvent.getGatewayName());
+            outputMonitorMessage.setApplicationName(experimentOutputCreatedEvent.getApplicationName());
+            outputMonitorMessage.setHost(experimentOutputCreatedEvent.getHost());
+            outputMonitorMessage.setFileMonitorMessageType(OutputMonitorMessageType.FILE_CREATED);
+
+            //Dispatching the message to the queue
+            monitorDispatcherQueue.addMsgToQueue(outputMonitorMessage);
+            logger.info("FileMonitor Message Added to the queue output path: " + outputMonitorMessage.getOutputPath());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/IMessageBroker.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/IMessageBroker.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/IMessageBroker.java
new file mode 100644
index 0000000..8c18ee5
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/IMessageBroker.java
@@ -0,0 +1,28 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.agent.messageBroker;
+
+public interface IMessageBroker {
+
+    public void startBroker() throws Exception;
+
+    public void stopBroker();
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQProducer.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQProducer.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQProducer.java
new file mode 100644
index 0000000..4843d1f
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQProducer.java
@@ -0,0 +1,196 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.datacat.agent.messageBroker;
+
+import com.rabbitmq.client.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class RabbitMQProducer {
+    public static final int DEFAULT_PRE_FETCH = 64;
+
+    private static Logger log = LoggerFactory.getLogger(RabbitMQProducer.class);
+
+    private Connection connection;
+
+    private Channel channel;
+
+    private QueueingConsumer consumer;
+
+    private String consumerTag;
+
+    private String exchangeName;
+
+    private int prefetchCount = DEFAULT_PRE_FETCH;
+
+    private boolean isReQueueOnFail = false;
+
+    private String url;
+
+    public RabbitMQProducer(String url, String exchangeName) {
+        this.exchangeName = exchangeName;
+        this.url = url;
+    }
+
+    public void setPrefetchCount(int prefetchCount) {
+        this.prefetchCount = prefetchCount;
+    }
+
+    public void setReQueueOnFail(boolean isReQueueOnFail) {
+        this.isReQueueOnFail = isReQueueOnFail;
+    }
+
+    private void reset() {
+        consumerTag = null;
+    }
+
+    private void reInitIfNecessary() throws Exception {
+        if (consumerTag == null || consumer == null) {
+            close();
+            open();
+        }
+    }
+
+    public void close() {
+        log.info("Closing channel to exchange {}", exchangeName);
+        try {
+            if (channel != null && channel.isOpen()) {
+                if (consumerTag != null) {
+                    channel.basicCancel(consumerTag);
+                }
+                channel.close();
+            }
+        } catch (Exception e) {
+            log.debug("error closing channel and/or cancelling consumer", e);
+        }
+        try {
+            log.info("closing connection to rabbitmq: " + connection);
+            connection.close();
+        } catch (Exception e) {
+            log.debug("error closing connection", e);
+        }
+        consumer = null;
+        consumerTag = null;
+        channel = null;
+        connection = null;
+    }
+
+    public void open() throws Exception {
+        try {
+            connection = createConnection();
+            channel = connection.createChannel();
+            if (prefetchCount > 0) {
+                log.info("setting basic.qos / prefetch count to " + prefetchCount + " for " + exchangeName);
+                channel.basicQos(prefetchCount);
+            }
+            channel.exchangeDeclare(exchangeName, "topic", false);
+        } catch (Exception e) {
+            reset();
+            String msg = "could not open channel for exchange " + exchangeName;
+            log.error(msg);
+            throw new Exception(msg, e);
+        }
+    }
+
+    public void send(byte []message, String routingKey) throws Exception {
+        try {
+            channel.basicPublish(exchangeName, routingKey, null, message);
+        } catch (IOException e) {
+            String msg = "Failed to publish message to exchange: " + exchangeName;
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    private Connection createConnection() throws IOException {
+        try {
+            ConnectionFactory factory = new ConnectionFactory();
+            factory.setHost(url);
+            Connection connection = factory.newConnection();
+
+            connection.addShutdownListener(new ShutdownListener() {
+                public void shutdownCompleted(ShutdownSignalException cause) {
+                }
+            });
+            log.info("connected to rabbitmq: " + connection + " for " + exchangeName);
+            return connection;
+        } catch (Exception e) {
+            log.info("connection failed to rabbitmq: " + connection + " for " + exchangeName);
+            return null;
+        }
+    }
+
+    public void ackMessage(Long msgId) throws Exception {
+        try {
+            channel.basicAck(msgId, false);
+        } catch (ShutdownSignalException sse) {
+            reset();
+            String msg = "shutdown signal received while attempting to ack message";
+            log.error(msg, sse);
+            throw new Exception(msg, sse);
+        } catch (Exception e) {
+            String s = "could not ack for msgId: " + msgId;
+            log.error(s, e);
+            throw new Exception(s, e);
+        }
+    }
+
+    public void failMessage(Long msgId) throws Exception {
+        if (isReQueueOnFail) {
+            failWithRedelivery(msgId);
+        } else {
+            deadLetter(msgId);
+        }
+    }
+
+    public void failWithRedelivery(Long msgId) throws Exception {
+        try {
+            channel.basicReject(msgId, true);
+        } catch (ShutdownSignalException sse) {
+            reset();
+            String msg = "shutdown signal received while attempting to fail with redelivery";
+            log.error(msg, sse);
+            throw new Exception(msg, sse);
+        } catch (Exception e) {
+            String msg = "could not fail with redelivery for msgId: " + msgId;
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    public void deadLetter(Long msgId) throws Exception {
+        try {
+            channel.basicReject(msgId, false);
+        } catch (ShutdownSignalException sse) {
+            reset();
+            String msg = "shutdown signal received while attempting to fail with no redelivery";
+            log.error(msg, sse);
+            throw new Exception(msg, sse);
+        } catch (Exception e) {
+            String msg = "could not fail with dead-lettering (when configured) for msgId: " + msgId;
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisher.java
----------------------------------------------------------------------
diff --git a/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisher.java b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisher.java
new file mode 100644
index 0000000..2a1355e
--- /dev/null
+++ b/datacat/agent/src/main/java/org/apache/airavata/datacat/agent/messageBroker/RabbitMQPublisher.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.datacat.agent.messageBroker;
+
+import org.apache.airavata.datacat.agent.util.AgentProperties;
+import org.apache.airavata.datacat.agent.util.Constants;
+import org.apache.airavata.datacat.agent.util.ThriftUtils;
+import org.apache.airavata.datacat.models.Messaging.ExperimentOutputParsedEvent;
+import org.apache.airavata.datacat.models.Messaging.Message;
+import org.apache.airavata.datacat.models.Messaging.MessageLevel;
+import org.apache.airavata.datacat.models.Messaging.MessageType;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RabbitMQPublisher {
+
+    private static Logger log = LoggerFactory.getLogger(RabbitMQPublisher.class);
+    private final String BINDING_KEY;
+    private final String RABBITMQ_HOST;
+    private final String EXCHANGE_NAME;
+
+    private RabbitMQProducer rabbitMQProducer;
+
+    /**
+     * Initializing the RabbitMQ related attributes
+     * @throws Exception
+     */
+    public RabbitMQPublisher() throws Exception {
+        RABBITMQ_HOST = AgentProperties.getInstance().getProperty(Constants.RABBITMQ_HOST, "");
+        BINDING_KEY = AgentProperties.getInstance().getProperty(Constants.BINDING_KEY, "");
+        EXCHANGE_NAME = AgentProperties.getInstance().getProperty(Constants.EXCHANGE_NAME, "");
+
+        rabbitMQProducer = new RabbitMQProducer(RABBITMQ_HOST, EXCHANGE_NAME);
+        rabbitMQProducer.open();
+    }
+
+    /**
+     * publish the data products to Airavata
+     * @param experimentOutputParsedEvent
+     */
+    public void publish(ExperimentOutputParsedEvent experimentOutputParsedEvent){
+        try {
+            log.info("Publishing status to datacat rabbitmq...");
+            byte[] body = ThriftUtils.serializeThriftObject(experimentOutputParsedEvent);
+            Message message = new Message();
+            message.setEvent(body);
+            message.setMessageId(experimentOutputParsedEvent.getDocumentID());
+            message.setMessageType(MessageType.OUTPUT_PARSED);
+            message.setUpdatedTime(System.currentTimeMillis());
+            String routingKey = experimentOutputParsedEvent.getExperimentId();
+            byte[] messageBody = ThriftUtils.serializeThriftObject(message);
+            rabbitMQProducer.send(messageBody, routingKey);
+        } catch (TException e) {
+            String msg = "Error while deserializing the object";
+            log.error(msg, e);
+        } catch (Exception e) {
+            String msg = "Error while sending to rabbitmq host";
+            log.error(msg, e);
+        }
+    }
+}


[04/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/web/portal/scripts/moment.js
----------------------------------------------------------------------
diff --git a/datacat/web/portal/scripts/moment.js b/datacat/web/portal/scripts/moment.js
new file mode 100755
index 0000000..61734f4
--- /dev/null
+++ b/datacat/web/portal/scripts/moment.js
@@ -0,0 +1,2856 @@
+//! moment.js
+//! version : 2.8.3
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+(function (undefined) {
+    /************************************
+     Constants
+     ************************************/
+
+    var moment,
+        VERSION = '2.8.3',
+    // the global-scope this is NOT the global object in Node.js
+        globalScope = typeof global !== 'undefined' ? global : this,
+        oldGlobalMoment,
+        round = Math.round,
+        hasOwnProperty = Object.prototype.hasOwnProperty,
+        i,
+
+        YEAR = 0,
+        MONTH = 1,
+        DATE = 2,
+        HOUR = 3,
+        MINUTE = 4,
+        SECOND = 5,
+        MILLISECOND = 6,
+
+    // internal storage for locale config files
+        locales = {},
+
+    // extra moment internal properties (plugins register props here)
+        momentProperties = [],
+
+    // check for nodeJS
+        hasModule = (typeof module !== 'undefined' && module.exports),
+
+    // ASP.NET json date format regex
+        aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
+        aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
+
+    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+        isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
+
+    // format tokens
+        formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,
+        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
+
+    // parsing token regexes
+        parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
+        parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
+        parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
+        parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
+        parseTokenDigits = /\d+/, // nonzero number of digits
+        parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
+        parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+        parseTokenT = /T/i, // T (ISO separator)
+        parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+        parseTokenOrdinal = /\d{1,2}/,
+
+    //strict parsing regexes
+        parseTokenOneDigit = /\d/, // 0 - 9
+        parseTokenTwoDigits = /\d\d/, // 00 - 99
+        parseTokenThreeDigits = /\d{3}/, // 000 - 999
+        parseTokenFourDigits = /\d{4}/, // 0000 - 9999
+        parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
+        parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
+
+    // iso 8601 regex
+    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+        isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+
+        isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
+
+        isoDates = [
+            ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],
+            ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/],
+            ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/],
+            ['GGGG-[W]WW', /\d{4}-W\d{2}/],
+            ['YYYY-DDD', /\d{4}-\d{3}/]
+        ],
+
+    // iso time formats and regexes
+        isoTimes = [
+            ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/],
+            ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
+            ['HH:mm', /(T| )\d\d:\d\d/],
+            ['HH', /(T| )\d\d/]
+        ],
+
+    // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30']
+        parseTimezoneChunker = /([\+\-]|\d\d)/gi,
+
+    // getter and setter names
+        proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
+        unitMillisecondFactors = {
+            'Milliseconds' : 1,
+            'Seconds' : 1e3,
+            'Minutes' : 6e4,
+            'Hours' : 36e5,
+            'Days' : 864e5,
+            'Months' : 2592e6,
+            'Years' : 31536e6
+        },
+
+        unitAliases = {
+            ms : 'millisecond',
+            s : 'second',
+            m : 'minute',
+            h : 'hour',
+            d : 'day',
+            D : 'date',
+            w : 'week',
+            W : 'isoWeek',
+            M : 'month',
+            Q : 'quarter',
+            y : 'year',
+            DDD : 'dayOfYear',
+            e : 'weekday',
+            E : 'isoWeekday',
+            gg: 'weekYear',
+            GG: 'isoWeekYear'
+        },
+
+        camelFunctions = {
+            dayofyear : 'dayOfYear',
+            isoweekday : 'isoWeekday',
+            isoweek : 'isoWeek',
+            weekyear : 'weekYear',
+            isoweekyear : 'isoWeekYear'
+        },
+
+    // format function strings
+        formatFunctions = {},
+
+    // default relative time thresholds
+        relativeTimeThresholds = {
+            s: 45,  // seconds to minute
+            m: 45,  // minutes to hour
+            h: 22,  // hours to day
+            d: 26,  // days to month
+            M: 11   // months to year
+        },
+
+    // tokens to ordinalize and pad
+        ordinalizeTokens = 'DDD w W M D d'.split(' '),
+        paddedTokens = 'M D H h m s w W'.split(' '),
+
+        formatTokenFunctions = {
+            M    : function () {
+                return this.month() + 1;
+            },
+            MMM  : function (format) {
+                return this.localeData().monthsShort(this, format);
+            },
+            MMMM : function (format) {
+                return this.localeData().months(this, format);
+            },
+            D    : function () {
+                return this.date();
+            },
+            DDD  : function () {
+                return this.dayOfYear();
+            },
+            d    : function () {
+                return this.day();
+            },
+            dd   : function (format) {
+                return this.localeData().weekdaysMin(this, format);
+            },
+            ddd  : function (format) {
+                return this.localeData().weekdaysShort(this, format);
+            },
+            dddd : function (format) {
+                return this.localeData().weekdays(this, format);
+            },
+            w    : function () {
+                return this.week();
+            },
+            W    : function () {
+                return this.isoWeek();
+            },
+            YY   : function () {
+                return leftZeroFill(this.year() % 100, 2);
+            },
+            YYYY : function () {
+                return leftZeroFill(this.year(), 4);
+            },
+            YYYYY : function () {
+                return leftZeroFill(this.year(), 5);
+            },
+            YYYYYY : function () {
+                var y = this.year(), sign = y >= 0 ? '+' : '-';
+                return sign + leftZeroFill(Math.abs(y), 6);
+            },
+            gg   : function () {
+                return leftZeroFill(this.weekYear() % 100, 2);
+            },
+            gggg : function () {
+                return leftZeroFill(this.weekYear(), 4);
+            },
+            ggggg : function () {
+                return leftZeroFill(this.weekYear(), 5);
+            },
+            GG   : function () {
+                return leftZeroFill(this.isoWeekYear() % 100, 2);
+            },
+            GGGG : function () {
+                return leftZeroFill(this.isoWeekYear(), 4);
+            },
+            GGGGG : function () {
+                return leftZeroFill(this.isoWeekYear(), 5);
+            },
+            e : function () {
+                return this.weekday();
+            },
+            E : function () {
+                return this.isoWeekday();
+            },
+            a    : function () {
+                return this.localeData().meridiem(this.hours(), this.minutes(), true);
+            },
+            A    : function () {
+                return this.localeData().meridiem(this.hours(), this.minutes(), false);
+            },
+            H    : function () {
+                return this.hours();
+            },
+            h    : function () {
+                return this.hours() % 12 || 12;
+            },
+            m    : function () {
+                return this.minutes();
+            },
+            s    : function () {
+                return this.seconds();
+            },
+            S    : function () {
+                return toInt(this.milliseconds() / 100);
+            },
+            SS   : function () {
+                return leftZeroFill(toInt(this.milliseconds() / 10), 2);
+            },
+            SSS  : function () {
+                return leftZeroFill(this.milliseconds(), 3);
+            },
+            SSSS : function () {
+                return leftZeroFill(this.milliseconds(), 3);
+            },
+            Z    : function () {
+                var a = -this.zone(),
+                    b = '+';
+                if (a < 0) {
+                    a = -a;
+                    b = '-';
+                }
+                return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2);
+            },
+            ZZ   : function () {
+                var a = -this.zone(),
+                    b = '+';
+                if (a < 0) {
+                    a = -a;
+                    b = '-';
+                }
+                return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2);
+            },
+            z : function () {
+                return this.zoneAbbr();
+            },
+            zz : function () {
+                return this.zoneName();
+            },
+            X    : function () {
+                return this.unix();
+            },
+            Q : function () {
+                return this.quarter();
+            }
+        },
+
+        deprecations = {},
+
+        lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
+
+    // Pick the first defined of two or three arguments. dfl comes from
+    // default.
+    function dfl(a, b, c) {
+        switch (arguments.length) {
+            case 2: return a != null ? a : b;
+            case 3: return a != null ? a : b != null ? b : c;
+            default: throw new Error('Implement me');
+        }
+    }
+
+    function hasOwnProp(a, b) {
+        return hasOwnProperty.call(a, b);
+    }
+
+    function defaultParsingFlags() {
+        // We need to deep clone this object, and es5 standard is not very
+        // helpful.
+        return {
+            empty : false,
+            unusedTokens : [],
+            unusedInput : [],
+            overflow : -2,
+            charsLeftOver : 0,
+            nullInput : false,
+            invalidMonth : null,
+            invalidFormat : false,
+            userInvalidated : false,
+            iso: false
+        };
+    }
+
+    function printMsg(msg) {
+        if (moment.suppressDeprecationWarnings === false &&
+            typeof console !== 'undefined' && console.warn) {
+            console.warn('Deprecation warning: ' + msg);
+        }
+    }
+
+    function deprecate(msg, fn) {
+        var firstTime = true;
+        return extend(function () {
+            if (firstTime) {
+                printMsg(msg);
+                firstTime = false;
+            }
+            return fn.apply(this, arguments);
+        }, fn);
+    }
+
+    function deprecateSimple(name, msg) {
+        if (!deprecations[name]) {
+            printMsg(msg);
+            deprecations[name] = true;
+        }
+    }
+
+    function padToken(func, count) {
+        return function (a) {
+            return leftZeroFill(func.call(this, a), count);
+        };
+    }
+    function ordinalizeToken(func, period) {
+        return function (a) {
+            return this.localeData().ordinal(func.call(this, a), period);
+        };
+    }
+
+    while (ordinalizeTokens.length) {
+        i = ordinalizeTokens.pop();
+        formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
+    }
+    while (paddedTokens.length) {
+        i = paddedTokens.pop();
+        formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
+    }
+    formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
+
+
+    /************************************
+     Constructors
+     ************************************/
+
+    function Locale() {
+    }
+
+    // Moment prototype object
+    function Moment(config, skipOverflow) {
+        if (skipOverflow !== false) {
+            checkOverflow(config);
+        }
+        copyConfig(this, config);
+        this._d = new Date(+config._d);
+    }
+
+    // Duration Constructor
+    function Duration(duration) {
+        var normalizedInput = normalizeObjectUnits(duration),
+            years = normalizedInput.year || 0,
+            quarters = normalizedInput.quarter || 0,
+            months = normalizedInput.month || 0,
+            weeks = normalizedInput.week || 0,
+            days = normalizedInput.day || 0,
+            hours = normalizedInput.hour || 0,
+            minutes = normalizedInput.minute || 0,
+            seconds = normalizedInput.second || 0,
+            milliseconds = normalizedInput.millisecond || 0;
+
+        // representation for dateAddRemove
+        this._milliseconds = +milliseconds +
+            seconds * 1e3 + // 1000
+            minutes * 6e4 + // 1000 * 60
+            hours * 36e5; // 1000 * 60 * 60
+        // Because of dateAddRemove treats 24 hours as different from a
+        // day when working around DST, we need to store them separately
+        this._days = +days +
+            weeks * 7;
+        // It is impossible translate months into days without knowing
+        // which months you are are talking about, so we have to store
+        // it separately.
+        this._months = +months +
+            quarters * 3 +
+            years * 12;
+
+        this._data = {};
+
+        this._locale = moment.localeData();
+
+        this._bubble();
+    }
+
+    /************************************
+     Helpers
+     ************************************/
+
+
+    function extend(a, b) {
+        for (var i in b) {
+            if (hasOwnProp(b, i)) {
+                a[i] = b[i];
+            }
+        }
+
+        if (hasOwnProp(b, 'toString')) {
+            a.toString = b.toString;
+        }
+
+        if (hasOwnProp(b, 'valueOf')) {
+            a.valueOf = b.valueOf;
+        }
+
+        return a;
+    }
+
+    function copyConfig(to, from) {
+        var i, prop, val;
+
+        if (typeof from._isAMomentObject !== 'undefined') {
+            to._isAMomentObject = from._isAMomentObject;
+        }
+        if (typeof from._i !== 'undefined') {
+            to._i = from._i;
+        }
+        if (typeof from._f !== 'undefined') {
+            to._f = from._f;
+        }
+        if (typeof from._l !== 'undefined') {
+            to._l = from._l;
+        }
+        if (typeof from._strict !== 'undefined') {
+            to._strict = from._strict;
+        }
+        if (typeof from._tzm !== 'undefined') {
+            to._tzm = from._tzm;
+        }
+        if (typeof from._isUTC !== 'undefined') {
+            to._isUTC = from._isUTC;
+        }
+        if (typeof from._offset !== 'undefined') {
+            to._offset = from._offset;
+        }
+        if (typeof from._pf !== 'undefined') {
+            to._pf = from._pf;
+        }
+        if (typeof from._locale !== 'undefined') {
+            to._locale = from._locale;
+        }
+
+        if (momentProperties.length > 0) {
+            for (i in momentProperties) {
+                prop = momentProperties[i];
+                val = from[prop];
+                if (typeof val !== 'undefined') {
+                    to[prop] = val;
+                }
+            }
+        }
+
+        return to;
+    }
+
+    function absRound(number) {
+        if (number < 0) {
+            return Math.ceil(number);
+        } else {
+            return Math.floor(number);
+        }
+    }
+
+    // left zero fill a number
+    // see http://jsperf.com/left-zero-filling for performance comparison
+    function leftZeroFill(number, targetLength, forceSign) {
+        var output = '' + Math.abs(number),
+            sign = number >= 0;
+
+        while (output.length < targetLength) {
+            output = '0' + output;
+        }
+        return (sign ? (forceSign ? '+' : '') : '-') + output;
+    }
+
+    function positiveMomentsDifference(base, other) {
+        var res = {milliseconds: 0, months: 0};
+
+        res.months = other.month() - base.month() +
+            (other.year() - base.year()) * 12;
+        if (base.clone().add(res.months, 'M').isAfter(other)) {
+            --res.months;
+        }
+
+        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
+
+        return res;
+    }
+
+    function momentsDifference(base, other) {
+        var res;
+        other = makeAs(other, base);
+        if (base.isBefore(other)) {
+            res = positiveMomentsDifference(base, other);
+        } else {
+            res = positiveMomentsDifference(other, base);
+            res.milliseconds = -res.milliseconds;
+            res.months = -res.months;
+        }
+
+        return res;
+    }
+
+    // TODO: remove 'name' arg after deprecation is removed
+    function createAdder(direction, name) {
+        return function (val, period) {
+            var dur, tmp;
+            //invert the arguments, but complain about it
+            if (period !== null && !isNaN(+period)) {
+                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
+                tmp = val; val = period; period = tmp;
+            }
+
+            val = typeof val === 'string' ? +val : val;
+            dur = moment.duration(val, period);
+            addOrSubtractDurationFromMoment(this, dur, direction);
+            return this;
+        };
+    }
+
+    function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) {
+        var milliseconds = duration._milliseconds,
+            days = duration._days,
+            months = duration._months;
+        updateOffset = updateOffset == null ? true : updateOffset;
+
+        if (milliseconds) {
+            mom._d.setTime(+mom._d + milliseconds * isAdding);
+        }
+        if (days) {
+            rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding);
+        }
+        if (months) {
+            rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding);
+        }
+        if (updateOffset) {
+            moment.updateOffset(mom, days || months);
+        }
+    }
+
+    // check if is an array
+    function isArray(input) {
+        return Object.prototype.toString.call(input) === '[object Array]';
+    }
+
+    function isDate(input) {
+        return Object.prototype.toString.call(input) === '[object Date]' ||
+            input instanceof Date;
+    }
+
+    // compare two arrays, return the number of differences
+    function compareArrays(array1, array2, dontConvert) {
+        var len = Math.min(array1.length, array2.length),
+            lengthDiff = Math.abs(array1.length - array2.length),
+            diffs = 0,
+            i;
+        for (i = 0; i < len; i++) {
+            if ((dontConvert && array1[i] !== array2[i]) ||
+                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
+                diffs++;
+            }
+        }
+        return diffs + lengthDiff;
+    }
+
+    function normalizeUnits(units) {
+        if (units) {
+            var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
+            units = unitAliases[units] || camelFunctions[lowered] || lowered;
+        }
+        return units;
+    }
+
+    function normalizeObjectUnits(inputObject) {
+        var normalizedInput = {},
+            normalizedProp,
+            prop;
+
+        for (prop in inputObject) {
+            if (hasOwnProp(inputObject, prop)) {
+                normalizedProp = normalizeUnits(prop);
+                if (normalizedProp) {
+                    normalizedInput[normalizedProp] = inputObject[prop];
+                }
+            }
+        }
+
+        return normalizedInput;
+    }
+
+    function makeList(field) {
+        var count, setter;
+
+        if (field.indexOf('week') === 0) {
+            count = 7;
+            setter = 'day';
+        }
+        else if (field.indexOf('month') === 0) {
+            count = 12;
+            setter = 'month';
+        }
+        else {
+            return;
+        }
+
+        moment[field] = function (format, index) {
+            var i, getter,
+                method = moment._locale[field],
+                results = [];
+
+            if (typeof format === 'number') {
+                index = format;
+                format = undefined;
+            }
+
+            getter = function (i) {
+                var m = moment().utc().set(setter, i);
+                return method.call(moment._locale, m, format || '');
+            };
+
+            if (index != null) {
+                return getter(index);
+            }
+            else {
+                for (i = 0; i < count; i++) {
+                    results.push(getter(i));
+                }
+                return results;
+            }
+        };
+    }
+
+    function toInt(argumentForCoercion) {
+        var coercedNumber = +argumentForCoercion,
+            value = 0;
+
+        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+            if (coercedNumber >= 0) {
+                value = Math.floor(coercedNumber);
+            } else {
+                value = Math.ceil(coercedNumber);
+            }
+        }
+
+        return value;
+    }
+
+    function daysInMonth(year, month) {
+        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+    }
+
+    function weeksInYear(year, dow, doy) {
+        return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week;
+    }
+
+    function daysInYear(year) {
+        return isLeapYear(year) ? 366 : 365;
+    }
+
+    function isLeapYear(year) {
+        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+    }
+
+    function checkOverflow(m) {
+        var overflow;
+        if (m._a && m._pf.overflow === -2) {
+            overflow =
+                    m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
+                    m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
+                    m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :
+                    m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
+                    m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
+                    m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
+                -1;
+
+            if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+                overflow = DATE;
+            }
+
+            m._pf.overflow = overflow;
+        }
+    }
+
+    function isValid(m) {
+        if (m._isValid == null) {
+            m._isValid = !isNaN(m._d.getTime()) &&
+                m._pf.overflow < 0 &&
+                !m._pf.empty &&
+                !m._pf.invalidMonth &&
+                !m._pf.nullInput &&
+                !m._pf.invalidFormat &&
+                !m._pf.userInvalidated;
+
+            if (m._strict) {
+                m._isValid = m._isValid &&
+                    m._pf.charsLeftOver === 0 &&
+                    m._pf.unusedTokens.length === 0;
+            }
+        }
+        return m._isValid;
+    }
+
+    function normalizeLocale(key) {
+        return key ? key.toLowerCase().replace('_', '-') : key;
+    }
+
+    // pick the locale from the array
+    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+    function chooseLocale(names) {
+        var i = 0, j, next, locale, split;
+
+        while (i < names.length) {
+            split = normalizeLocale(names[i]).split('-');
+            j = split.length;
+            next = normalizeLocale(names[i + 1]);
+            next = next ? next.split('-') : null;
+            while (j > 0) {
+                locale = loadLocale(split.slice(0, j).join('-'));
+                if (locale) {
+                    return locale;
+                }
+                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
+                    //the next array item is better than a shallower substring of this one
+                    break;
+                }
+                j--;
+            }
+            i++;
+        }
+        return null;
+    }
+
+    function loadLocale(name) {
+        var oldLocale = null;
+        if (!locales[name] && hasModule) {
+            try {
+                oldLocale = moment.locale();
+                require('./locale/' + name);
+                // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales
+                moment.locale(oldLocale);
+            } catch (e) { }
+        }
+        return locales[name];
+    }
+
+    // Return a moment from input, that is local/utc/zone equivalent to model.
+    function makeAs(input, model) {
+        return model._isUTC ? moment(input).zone(model._offset || 0) :
+            moment(input).local();
+    }
+
+    /************************************
+     Locale
+     ************************************/
+
+
+    extend(Locale.prototype, {
+
+        set : function (config) {
+            var prop, i;
+            for (i in config) {
+                prop = config[i];
+                if (typeof prop === 'function') {
+                    this[i] = prop;
+                } else {
+                    this['_' + i] = prop;
+                }
+            }
+        },
+
+        _months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        months : function (m) {
+            return this._months[m.month()];
+        },
+
+        _monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        monthsShort : function (m) {
+            return this._monthsShort[m.month()];
+        },
+
+        monthsParse : function (monthName) {
+            var i, mom, regex;
+
+            if (!this._monthsParse) {
+                this._monthsParse = [];
+            }
+
+            for (i = 0; i < 12; i++) {
+                // make the regex if we don't have it already
+                if (!this._monthsParse[i]) {
+                    mom = moment.utc([2000, i]);
+                    regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+                    this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+                }
+                // test the regex
+                if (this._monthsParse[i].test(monthName)) {
+                    return i;
+                }
+            }
+        },
+
+        _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdays : function (m) {
+            return this._weekdays[m.day()];
+        },
+
+        _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysShort : function (m) {
+            return this._weekdaysShort[m.day()];
+        },
+
+        _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        weekdaysMin : function (m) {
+            return this._weekdaysMin[m.day()];
+        },
+
+        weekdaysParse : function (weekdayName) {
+            var i, mom, regex;
+
+            if (!this._weekdaysParse) {
+                this._weekdaysParse = [];
+            }
+
+            for (i = 0; i < 7; i++) {
+                // make the regex if we don't have it already
+                if (!this._weekdaysParse[i]) {
+                    mom = moment([2000, 1]).day(i);
+                    regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
+                    this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+                }
+                // test the regex
+                if (this._weekdaysParse[i].test(weekdayName)) {
+                    return i;
+                }
+            }
+        },
+
+        _longDateFormat : {
+            LT : 'h:mm A',
+            L : 'MM/DD/YYYY',
+            LL : 'MMMM D, YYYY',
+            LLL : 'MMMM D, YYYY LT',
+            LLLL : 'dddd, MMMM D, YYYY LT'
+        },
+        longDateFormat : function (key) {
+            var output = this._longDateFormat[key];
+            if (!output && this._longDateFormat[key.toUpperCase()]) {
+                output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
+                    return val.slice(1);
+                });
+                this._longDateFormat[key] = output;
+            }
+            return output;
+        },
+
+        isPM : function (input) {
+            // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+            // Using charAt should be more compatible.
+            return ((input + '').toLowerCase().charAt(0) === 'p');
+        },
+
+        _meridiemParse : /[ap]\.?m?\.?/i,
+        meridiem : function (hours, minutes, isLower) {
+            if (hours > 11) {
+                return isLower ? 'pm' : 'PM';
+            } else {
+                return isLower ? 'am' : 'AM';
+            }
+        },
+
+        _calendar : {
+            sameDay : '[Today at] LT',
+            nextDay : '[Tomorrow at] LT',
+            nextWeek : 'dddd [at] LT',
+            lastDay : '[Yesterday at] LT',
+            lastWeek : '[Last] dddd [at] LT',
+            sameElse : 'L'
+        },
+        calendar : function (key, mom) {
+            var output = this._calendar[key];
+            return typeof output === 'function' ? output.apply(mom) : output;
+        },
+
+        _relativeTime : {
+            future : 'in %s',
+            past : '%s ago',
+            s : 'a few seconds',
+            m : 'a minute',
+            mm : '%d minutes',
+            h : 'an hour',
+            hh : '%d hours',
+            d : 'a day',
+            dd : '%d days',
+            M : 'a month',
+            MM : '%d months',
+            y : 'a year',
+            yy : '%d years'
+        },
+
+        relativeTime : function (number, withoutSuffix, string, isFuture) {
+            var output = this._relativeTime[string];
+            return (typeof output === 'function') ?
+                output(number, withoutSuffix, string, isFuture) :
+                output.replace(/%d/i, number);
+        },
+
+        pastFuture : function (diff, output) {
+            var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+            return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
+        },
+
+        ordinal : function (number) {
+            return this._ordinal.replace('%d', number);
+        },
+        _ordinal : '%d',
+
+        preparse : function (string) {
+            return string;
+        },
+
+        postformat : function (string) {
+            return string;
+        },
+
+        week : function (mom) {
+            return weekOfYear(mom, this._week.dow, this._week.doy).week;
+        },
+
+        _week : {
+            dow : 0, // Sunday is the first day of the week.
+            doy : 6  // The week that contains Jan 1st is the first week of the year.
+        },
+
+        _invalidDate: 'Invalid date',
+        invalidDate: function () {
+            return this._invalidDate;
+        }
+    });
+
+    /************************************
+     Formatting
+     ************************************/
+
+
+    function removeFormattingTokens(input) {
+        if (input.match(/\[[\s\S]/)) {
+            return input.replace(/^\[|\]$/g, '');
+        }
+        return input.replace(/\\/g, '');
+    }
+
+    function makeFormatFunction(format) {
+        var array = format.match(formattingTokens), i, length;
+
+        for (i = 0, length = array.length; i < length; i++) {
+            if (formatTokenFunctions[array[i]]) {
+                array[i] = formatTokenFunctions[array[i]];
+            } else {
+                array[i] = removeFormattingTokens(array[i]);
+            }
+        }
+
+        return function (mom) {
+            var output = '';
+            for (i = 0; i < length; i++) {
+                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
+            }
+            return output;
+        };
+    }
+
+    // format date using native date object
+    function formatMoment(m, format) {
+        if (!m.isValid()) {
+            return m.localeData().invalidDate();
+        }
+
+        format = expandFormat(format, m.localeData());
+
+        if (!formatFunctions[format]) {
+            formatFunctions[format] = makeFormatFunction(format);
+        }
+
+        return formatFunctions[format](m);
+    }
+
+    function expandFormat(format, locale) {
+        var i = 5;
+
+        function replaceLongDateFormatTokens(input) {
+            return locale.longDateFormat(input) || input;
+        }
+
+        localFormattingTokens.lastIndex = 0;
+        while (i >= 0 && localFormattingTokens.test(format)) {
+            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
+            localFormattingTokens.lastIndex = 0;
+            i -= 1;
+        }
+
+        return format;
+    }
+
+
+    /************************************
+     Parsing
+     ************************************/
+
+
+        // get the regex to find the next token
+    function getParseRegexForToken(token, config) {
+        var a, strict = config._strict;
+        switch (token) {
+            case 'Q':
+                return parseTokenOneDigit;
+            case 'DDDD':
+                return parseTokenThreeDigits;
+            case 'YYYY':
+            case 'GGGG':
+            case 'gggg':
+                return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
+            case 'Y':
+            case 'G':
+            case 'g':
+                return parseTokenSignedNumber;
+            case 'YYYYYY':
+            case 'YYYYY':
+            case 'GGGGG':
+            case 'ggggg':
+                return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
+            case 'S':
+                if (strict) {
+                    return parseTokenOneDigit;
+                }
+            /* falls through */
+            case 'SS':
+                if (strict) {
+                    return parseTokenTwoDigits;
+                }
+            /* falls through */
+            case 'SSS':
+                if (strict) {
+                    return parseTokenThreeDigits;
+                }
+            /* falls through */
+            case 'DDD':
+                return parseTokenOneToThreeDigits;
+            case 'MMM':
+            case 'MMMM':
+            case 'dd':
+            case 'ddd':
+            case 'dddd':
+                return parseTokenWord;
+            case 'a':
+            case 'A':
+                return config._locale._meridiemParse;
+            case 'X':
+                return parseTokenTimestampMs;
+            case 'Z':
+            case 'ZZ':
+                return parseTokenTimezone;
+            case 'T':
+                return parseTokenT;
+            case 'SSSS':
+                return parseTokenDigits;
+            case 'MM':
+            case 'DD':
+            case 'YY':
+            case 'GG':
+            case 'gg':
+            case 'HH':
+            case 'hh':
+            case 'mm':
+            case 'ss':
+            case 'ww':
+            case 'WW':
+                return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
+            case 'M':
+            case 'D':
+            case 'd':
+            case 'H':
+            case 'h':
+            case 'm':
+            case 's':
+            case 'w':
+            case 'W':
+            case 'e':
+            case 'E':
+                return parseTokenOneOrTwoDigits;
+            case 'Do':
+                return parseTokenOrdinal;
+            default :
+                a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));
+                return a;
+        }
+    }
+
+    function timezoneMinutesFromString(string) {
+        string = string || '';
+        var possibleTzMatches = (string.match(parseTokenTimezone) || []),
+            tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
+            parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
+            minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+        return parts[0] === '+' ? -minutes : minutes;
+    }
+
+    // function to convert string input to date
+    function addTimeToArrayFromToken(token, input, config) {
+        var a, datePartArray = config._a;
+
+        switch (token) {
+            // QUARTER
+            case 'Q':
+                if (input != null) {
+                    datePartArray[MONTH] = (toInt(input) - 1) * 3;
+                }
+                break;
+            // MONTH
+            case 'M' : // fall through to MM
+            case 'MM' :
+                if (input != null) {
+                    datePartArray[MONTH] = toInt(input) - 1;
+                }
+                break;
+            case 'MMM' : // fall through to MMMM
+            case 'MMMM' :
+                a = config._locale.monthsParse(input);
+                // if we didn't find a month name, mark the date as invalid.
+                if (a != null) {
+                    datePartArray[MONTH] = a;
+                } else {
+                    config._pf.invalidMonth = input;
+                }
+                break;
+            // DAY OF MONTH
+            case 'D' : // fall through to DD
+            case 'DD' :
+                if (input != null) {
+                    datePartArray[DATE] = toInt(input);
+                }
+                break;
+            case 'Do' :
+                if (input != null) {
+                    datePartArray[DATE] = toInt(parseInt(input, 10));
+                }
+                break;
+            // DAY OF YEAR
+            case 'DDD' : // fall through to DDDD
+            case 'DDDD' :
+                if (input != null) {
+                    config._dayOfYear = toInt(input);
+                }
+
+                break;
+            // YEAR
+            case 'YY' :
+                datePartArray[YEAR] = moment.parseTwoDigitYear(input);
+                break;
+            case 'YYYY' :
+            case 'YYYYY' :
+            case 'YYYYYY' :
+                datePartArray[YEAR] = toInt(input);
+                break;
+            // AM / PM
+            case 'a' : // fall through to A
+            case 'A' :
+                config._isPm = config._locale.isPM(input);
+                break;
+            // 24 HOUR
+            case 'H' : // fall through to hh
+            case 'HH' : // fall through to hh
+            case 'h' : // fall through to hh
+            case 'hh' :
+                datePartArray[HOUR] = toInt(input);
+                break;
+            // MINUTE
+            case 'm' : // fall through to mm
+            case 'mm' :
+                datePartArray[MINUTE] = toInt(input);
+                break;
+            // SECOND
+            case 's' : // fall through to ss
+            case 'ss' :
+                datePartArray[SECOND] = toInt(input);
+                break;
+            // MILLISECOND
+            case 'S' :
+            case 'SS' :
+            case 'SSS' :
+            case 'SSSS' :
+                datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
+                break;
+            // UNIX TIMESTAMP WITH MS
+            case 'X':
+                config._d = new Date(parseFloat(input) * 1000);
+                break;
+            // TIMEZONE
+            case 'Z' : // fall through to ZZ
+            case 'ZZ' :
+                config._useUTC = true;
+                config._tzm = timezoneMinutesFromString(input);
+                break;
+            // WEEKDAY - human
+            case 'dd':
+            case 'ddd':
+            case 'dddd':
+                a = config._locale.weekdaysParse(input);
+                // if we didn't get a weekday name, mark the date as invalid
+                if (a != null) {
+                    config._w = config._w || {};
+                    config._w['d'] = a;
+                } else {
+                    config._pf.invalidWeekday = input;
+                }
+                break;
+            // WEEK, WEEK DAY - numeric
+            case 'w':
+            case 'ww':
+            case 'W':
+            case 'WW':
+            case 'd':
+            case 'e':
+            case 'E':
+                token = token.substr(0, 1);
+            /* falls through */
+            case 'gggg':
+            case 'GGGG':
+            case 'GGGGG':
+                token = token.substr(0, 2);
+                if (input) {
+                    config._w = config._w || {};
+                    config._w[token] = toInt(input);
+                }
+                break;
+            case 'gg':
+            case 'GG':
+                config._w = config._w || {};
+                config._w[token] = moment.parseTwoDigitYear(input);
+        }
+    }
+
+    function dayOfYearFromWeekInfo(config) {
+        var w, weekYear, week, weekday, dow, doy, temp;
+
+        w = config._w;
+        if (w.GG != null || w.W != null || w.E != null) {
+            dow = 1;
+            doy = 4;
+
+            // TODO: We need to take the current isoWeekYear, but that depends on
+            // how we interpret now (local, utc, fixed offset). So create
+            // a now version of current config (take local/utc/offset flags, and
+            // create now).
+            weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
+            week = dfl(w.W, 1);
+            weekday = dfl(w.E, 1);
+        } else {
+            dow = config._locale._week.dow;
+            doy = config._locale._week.doy;
+
+            weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
+            week = dfl(w.w, 1);
+
+            if (w.d != null) {
+                // weekday -- low day numbers are considered next week
+                weekday = w.d;
+                if (weekday < dow) {
+                    ++week;
+                }
+            } else if (w.e != null) {
+                // local weekday -- counting starts from begining of week
+                weekday = w.e + dow;
+            } else {
+                // default to begining of week
+                weekday = dow;
+            }
+        }
+        temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
+
+        config._a[YEAR] = temp.year;
+        config._dayOfYear = temp.dayOfYear;
+    }
+
+    // convert an array to a date.
+    // the array should mirror the parameters below
+    // note: all values past the year are optional and will default to the lowest possible value.
+    // [year, month, day , hour, minute, second, millisecond]
+    function dateFromConfig(config) {
+        var i, date, input = [], currentDate, yearToUse;
+
+        if (config._d) {
+            return;
+        }
+
+        currentDate = currentDateArray(config);
+
+        //compute day of the year from weeks and weekdays
+        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+            dayOfYearFromWeekInfo(config);
+        }
+
+        //if the day of the year is set, figure out what it is
+        if (config._dayOfYear) {
+            yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
+
+            if (config._dayOfYear > daysInYear(yearToUse)) {
+                config._pf._overflowDayOfYear = true;
+            }
+
+            date = makeUTCDate(yearToUse, 0, config._dayOfYear);
+            config._a[MONTH] = date.getUTCMonth();
+            config._a[DATE] = date.getUTCDate();
+        }
+
+        // Default to current date.
+        // * if no year, month, day of month are given, default to today
+        // * if day of month is given, default month and year
+        // * if month is given, default only year
+        // * if year is given, don't default anything
+        for (i = 0; i < 3 && config._a[i] == null; ++i) {
+            config._a[i] = input[i] = currentDate[i];
+        }
+
+        // Zero out whatever was not defaulted, including time
+        for (; i < 7; i++) {
+            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
+        }
+
+        config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
+        // Apply timezone offset from input. The actual zone can be changed
+        // with parseZone.
+        if (config._tzm != null) {
+            config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
+        }
+    }
+
+    function dateFromObject(config) {
+        var normalizedInput;
+
+        if (config._d) {
+            return;
+        }
+
+        normalizedInput = normalizeObjectUnits(config._i);
+        config._a = [
+            normalizedInput.year,
+            normalizedInput.month,
+            normalizedInput.day,
+            normalizedInput.hour,
+            normalizedInput.minute,
+            normalizedInput.second,
+            normalizedInput.millisecond
+        ];
+
+        dateFromConfig(config);
+    }
+
+    function currentDateArray(config) {
+        var now = new Date();
+        if (config._useUTC) {
+            return [
+                now.getUTCFullYear(),
+                now.getUTCMonth(),
+                now.getUTCDate()
+            ];
+        } else {
+            return [now.getFullYear(), now.getMonth(), now.getDate()];
+        }
+    }
+
+    // date from string and format string
+    function makeDateFromStringAndFormat(config) {
+        if (config._f === moment.ISO_8601) {
+            parseISO(config);
+            return;
+        }
+
+        config._a = [];
+        config._pf.empty = true;
+
+        // This array is used to make a Date, either with `new Date` or `Date.UTC`
+        var string = '' + config._i,
+            i, parsedInput, tokens, token, skipped,
+            stringLength = string.length,
+            totalParsedInputLength = 0;
+
+        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
+
+        for (i = 0; i < tokens.length; i++) {
+            token = tokens[i];
+            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
+            if (parsedInput) {
+                skipped = string.substr(0, string.indexOf(parsedInput));
+                if (skipped.length > 0) {
+                    config._pf.unusedInput.push(skipped);
+                }
+                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
+                totalParsedInputLength += parsedInput.length;
+            }
+            // don't parse if it's not a known token
+            if (formatTokenFunctions[token]) {
+                if (parsedInput) {
+                    config._pf.empty = false;
+                }
+                else {
+                    config._pf.unusedTokens.push(token);
+                }
+                addTimeToArrayFromToken(token, parsedInput, config);
+            }
+            else if (config._strict && !parsedInput) {
+                config._pf.unusedTokens.push(token);
+            }
+        }
+
+        // add remaining unparsed input length to the string
+        config._pf.charsLeftOver = stringLength - totalParsedInputLength;
+        if (string.length > 0) {
+            config._pf.unusedInput.push(string);
+        }
+
+        // handle am pm
+        if (config._isPm && config._a[HOUR] < 12) {
+            config._a[HOUR] += 12;
+        }
+        // if is 12 am, change hours to 0
+        if (config._isPm === false && config._a[HOUR] === 12) {
+            config._a[HOUR] = 0;
+        }
+
+        dateFromConfig(config);
+        checkOverflow(config);
+    }
+
+    function unescapeFormat(s) {
+        return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+            return p1 || p2 || p3 || p4;
+        });
+    }
+
+    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+    function regexpEscape(s) {
+        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+    }
+
+    // date from string and array of format strings
+    function makeDateFromStringAndArray(config) {
+        var tempConfig,
+            bestMoment,
+
+            scoreToBeat,
+            i,
+            currentScore;
+
+        if (config._f.length === 0) {
+            config._pf.invalidFormat = true;
+            config._d = new Date(NaN);
+            return;
+        }
+
+        for (i = 0; i < config._f.length; i++) {
+            currentScore = 0;
+            tempConfig = copyConfig({}, config);
+            if (config._useUTC != null) {
+                tempConfig._useUTC = config._useUTC;
+            }
+            tempConfig._pf = defaultParsingFlags();
+            tempConfig._f = config._f[i];
+            makeDateFromStringAndFormat(tempConfig);
+
+            if (!isValid(tempConfig)) {
+                continue;
+            }
+
+            // if there is any input that was not parsed add a penalty for that format
+            currentScore += tempConfig._pf.charsLeftOver;
+
+            //or tokens
+            currentScore += tempConfig._pf.unusedTokens.length * 10;
+
+            tempConfig._pf.score = currentScore;
+
+            if (scoreToBeat == null || currentScore < scoreToBeat) {
+                scoreToBeat = currentScore;
+                bestMoment = tempConfig;
+            }
+        }
+
+        extend(config, bestMoment || tempConfig);
+    }
+
+    // date from iso format
+    function parseISO(config) {
+        var i, l,
+            string = config._i,
+            match = isoRegex.exec(string);
+
+        if (match) {
+            config._pf.iso = true;
+            for (i = 0, l = isoDates.length; i < l; i++) {
+                if (isoDates[i][1].exec(string)) {
+                    // match[5] should be 'T' or undefined
+                    config._f = isoDates[i][0] + (match[6] || ' ');
+                    break;
+                }
+            }
+            for (i = 0, l = isoTimes.length; i < l; i++) {
+                if (isoTimes[i][1].exec(string)) {
+                    config._f += isoTimes[i][0];
+                    break;
+                }
+            }
+            if (string.match(parseTokenTimezone)) {
+                config._f += 'Z';
+            }
+            makeDateFromStringAndFormat(config);
+        } else {
+            config._isValid = false;
+        }
+    }
+
+    // date from iso format or fallback
+    function makeDateFromString(config) {
+        parseISO(config);
+        if (config._isValid === false) {
+            delete config._isValid;
+            moment.createFromInputFallback(config);
+        }
+    }
+
+    function map(arr, fn) {
+        var res = [], i;
+        for (i = 0; i < arr.length; ++i) {
+            res.push(fn(arr[i], i));
+        }
+        return res;
+    }
+
+    function makeDateFromInput(config) {
+        var input = config._i, matched;
+        if (input === undefined) {
+            config._d = new Date();
+        } else if (isDate(input)) {
+            config._d = new Date(+input);
+        } else if ((matched = aspNetJsonRegex.exec(input)) !== null) {
+            config._d = new Date(+matched[1]);
+        } else if (typeof input === 'string') {
+            makeDateFromString(config);
+        } else if (isArray(input)) {
+            config._a = map(input.slice(0), function (obj) {
+                return parseInt(obj, 10);
+            });
+            dateFromConfig(config);
+        } else if (typeof(input) === 'object') {
+            dateFromObject(config);
+        } else if (typeof(input) === 'number') {
+            // from milliseconds
+            config._d = new Date(input);
+        } else {
+            moment.createFromInputFallback(config);
+        }
+    }
+
+    function makeDate(y, m, d, h, M, s, ms) {
+        //can't just apply() to create a date:
+        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
+        var date = new Date(y, m, d, h, M, s, ms);
+
+        //the date constructor doesn't accept years < 1970
+        if (y < 1970) {
+            date.setFullYear(y);
+        }
+        return date;
+    }
+
+    function makeUTCDate(y) {
+        var date = new Date(Date.UTC.apply(null, arguments));
+        if (y < 1970) {
+            date.setUTCFullYear(y);
+        }
+        return date;
+    }
+
+    function parseWeekday(input, locale) {
+        if (typeof input === 'string') {
+            if (!isNaN(input)) {
+                input = parseInt(input, 10);
+            }
+            else {
+                input = locale.weekdaysParse(input);
+                if (typeof input !== 'number') {
+                    return null;
+                }
+            }
+        }
+        return input;
+    }
+
+    /************************************
+     Relative Time
+     ************************************/
+
+
+        // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+    }
+
+    function relativeTime(posNegDuration, withoutSuffix, locale) {
+        var duration = moment.duration(posNegDuration).abs(),
+            seconds = round(duration.as('s')),
+            minutes = round(duration.as('m')),
+            hours = round(duration.as('h')),
+            days = round(duration.as('d')),
+            months = round(duration.as('M')),
+            years = round(duration.as('y')),
+
+            args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
+                minutes === 1 && ['m'] ||
+                minutes < relativeTimeThresholds.m && ['mm', minutes] ||
+                hours === 1 && ['h'] ||
+                hours < relativeTimeThresholds.h && ['hh', hours] ||
+                days === 1 && ['d'] ||
+                days < relativeTimeThresholds.d && ['dd', days] ||
+                months === 1 && ['M'] ||
+                months < relativeTimeThresholds.M && ['MM', months] ||
+                years === 1 && ['y'] || ['yy', years];
+
+        args[2] = withoutSuffix;
+        args[3] = +posNegDuration > 0;
+        args[4] = locale;
+        return substituteTimeAgo.apply({}, args);
+    }
+
+
+    /************************************
+     Week of Year
+     ************************************/
+
+
+        // firstDayOfWeek       0 = sun, 6 = sat
+        //                      the day of the week that starts the week
+        //                      (usually sunday or monday)
+        // firstDayOfWeekOfYear 0 = sun, 6 = sat
+        //                      the first week is the week that contains the first
+        //                      of this day of the week
+        //                      (eg. ISO weeks use thursday (4))
+    function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
+        var end = firstDayOfWeekOfYear - firstDayOfWeek,
+            daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
+            adjustedMoment;
+
+
+        if (daysToDayOfWeek > end) {
+            daysToDayOfWeek -= 7;
+        }
+
+        if (daysToDayOfWeek < end - 7) {
+            daysToDayOfWeek += 7;
+        }
+
+        adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd');
+        return {
+            week: Math.ceil(adjustedMoment.dayOfYear() / 7),
+            year: adjustedMoment.year()
+        };
+    }
+
+    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+    function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
+        var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
+
+        d = d === 0 ? 7 : d;
+        weekday = weekday != null ? weekday : firstDayOfWeek;
+        daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
+        dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
+
+        return {
+            year: dayOfYear > 0 ? year : year - 1,
+            dayOfYear: dayOfYear > 0 ?  dayOfYear : daysInYear(year - 1) + dayOfYear
+        };
+    }
+
+    /************************************
+     Top Level Functions
+     ************************************/
+
+    function makeMoment(config) {
+        var input = config._i,
+            format = config._f;
+
+        config._locale = config._locale || moment.localeData(config._l);
+
+        if (input === null || (format === undefined && input === '')) {
+            return moment.invalid({nullInput: true});
+        }
+
+        if (typeof input === 'string') {
+            config._i = input = config._locale.preparse(input);
+        }
+
+        if (moment.isMoment(input)) {
+            return new Moment(input, true);
+        } else if (format) {
+            if (isArray(format)) {
+                makeDateFromStringAndArray(config);
+            } else {
+                makeDateFromStringAndFormat(config);
+            }
+        } else {
+            makeDateFromInput(config);
+        }
+
+        return new Moment(config);
+    }
+
+    moment = function (input, format, locale, strict) {
+        var c;
+
+        if (typeof(locale) === 'boolean') {
+            strict = locale;
+            locale = undefined;
+        }
+        // object construction must be done this way.
+        // https://github.com/moment/moment/issues/1423
+        c = {};
+        c._isAMomentObject = true;
+        c._i = input;
+        c._f = format;
+        c._l = locale;
+        c._strict = strict;
+        c._isUTC = false;
+        c._pf = defaultParsingFlags();
+
+        return makeMoment(c);
+    };
+
+    moment.suppressDeprecationWarnings = false;
+
+    moment.createFromInputFallback = deprecate(
+            'moment construction falls back to js Date. This is ' +
+            'discouraged and will be removed in upcoming major ' +
+            'release. Please refer to ' +
+            'https://github.com/moment/moment/issues/1407 for more info.',
+        function (config) {
+            config._d = new Date(config._i);
+        }
+    );
+
+    // Pick a moment m from moments so that m[fn](other) is true for all
+    // other. This relies on the function fn to be transitive.
+    //
+    // moments should either be an array of moment objects or an array, whose
+    // first element is an array of moment objects.
+    function pickBy(fn, moments) {
+        var res, i;
+        if (moments.length === 1 && isArray(moments[0])) {
+            moments = moments[0];
+        }
+        if (!moments.length) {
+            return moment();
+        }
+        res = moments[0];
+        for (i = 1; i < moments.length; ++i) {
+            if (moments[i][fn](res)) {
+                res = moments[i];
+            }
+        }
+        return res;
+    }
+
+    moment.min = function () {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isBefore', args);
+    };
+
+    moment.max = function () {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isAfter', args);
+    };
+
+    // creating with utc
+    moment.utc = function (input, format, locale, strict) {
+        var c;
+
+        if (typeof(locale) === 'boolean') {
+            strict = locale;
+            locale = undefined;
+        }
+        // object construction must be done this way.
+        // https://github.com/moment/moment/issues/1423
+        c = {};
+        c._isAMomentObject = true;
+        c._useUTC = true;
+        c._isUTC = true;
+        c._l = locale;
+        c._i = input;
+        c._f = format;
+        c._strict = strict;
+        c._pf = defaultParsingFlags();
+
+        return makeMoment(c).utc();
+    };
+
+    // creating with unix timestamp (in seconds)
+    moment.unix = function (input) {
+        return moment(input * 1000);
+    };
+
+    // duration
+    moment.duration = function (input, key) {
+        var duration = input,
+        // matching against regexp is expensive, do it on demand
+            match = null,
+            sign,
+            ret,
+            parseIso,
+            diffRes;
+
+        if (moment.isDuration(input)) {
+            duration = {
+                ms: input._milliseconds,
+                d: input._days,
+                M: input._months
+            };
+        } else if (typeof input === 'number') {
+            duration = {};
+            if (key) {
+                duration[key] = input;
+            } else {
+                duration.milliseconds = input;
+            }
+        } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            duration = {
+                y: 0,
+                d: toInt(match[DATE]) * sign,
+                h: toInt(match[HOUR]) * sign,
+                m: toInt(match[MINUTE]) * sign,
+                s: toInt(match[SECOND]) * sign,
+                ms: toInt(match[MILLISECOND]) * sign
+            };
+        } else if (!!(match = isoDurationRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            parseIso = function (inp) {
+                // We'd normally use ~~inp for this, but unfortunately it also
+                // converts floats to ints.
+                // inp may be undefined, so careful calling replace on it.
+                var res = inp && parseFloat(inp.replace(',', '.'));
+                // apply sign while we're at it
+                return (isNaN(res) ? 0 : res) * sign;
+            };
+            duration = {
+                y: parseIso(match[2]),
+                M: parseIso(match[3]),
+                d: parseIso(match[4]),
+                h: parseIso(match[5]),
+                m: parseIso(match[6]),
+                s: parseIso(match[7]),
+                w: parseIso(match[8])
+            };
+        } else if (typeof duration === 'object' &&
+            ('from' in duration || 'to' in duration)) {
+            diffRes = momentsDifference(moment(duration.from), moment(duration.to));
+
+            duration = {};
+            duration.ms = diffRes.milliseconds;
+            duration.M = diffRes.months;
+        }
+
+        ret = new Duration(duration);
+
+        if (moment.isDuration(input) && hasOwnProp(input, '_locale')) {
+            ret._locale = input._locale;
+        }
+
+        return ret;
+    };
+
+    // version number
+    moment.version = VERSION;
+
+    // default format
+    moment.defaultFormat = isoFormat;
+
+    // constant that refers to the ISO standard
+    moment.ISO_8601 = function () {};
+
+    // Plugins that add properties should also add the key here (null value),
+    // so we can properly clone ourselves.
+    moment.momentProperties = momentProperties;
+
+    // This function will be called whenever a moment is mutated.
+    // It is intended to keep the offset in sync with the timezone.
+    moment.updateOffset = function () {};
+
+    // This function allows you to set a threshold for relative time strings
+    moment.relativeTimeThreshold = function (threshold, limit) {
+        if (relativeTimeThresholds[threshold] === undefined) {
+            return false;
+        }
+        if (limit === undefined) {
+            return relativeTimeThresholds[threshold];
+        }
+        relativeTimeThresholds[threshold] = limit;
+        return true;
+    };
+
+    moment.lang = deprecate(
+        'moment.lang is deprecated. Use moment.locale instead.',
+        function (key, value) {
+            return moment.locale(key, value);
+        }
+    );
+
+    // This function will load locale and then set the global locale.  If
+    // no arguments are passed in, it will simply return the current global
+    // locale key.
+    moment.locale = function (key, values) {
+        var data;
+        if (key) {
+            if (typeof(values) !== 'undefined') {
+                data = moment.defineLocale(key, values);
+            }
+            else {
+                data = moment.localeData(key);
+            }
+
+            if (data) {
+                moment.duration._locale = moment._locale = data;
+            }
+        }
+
+        return moment._locale._abbr;
+    };
+
+    moment.defineLocale = function (name, values) {
+        if (values !== null) {
+            values.abbr = name;
+            if (!locales[name]) {
+                locales[name] = new Locale();
+            }
+            locales[name].set(values);
+
+            // backwards compat for now: also set the locale
+            moment.locale(name);
+
+            return locales[name];
+        } else {
+            // useful for testing
+            delete locales[name];
+            return null;
+        }
+    };
+
+    moment.langData = deprecate(
+        'moment.langData is deprecated. Use moment.localeData instead.',
+        function (key) {
+            return moment.localeData(key);
+        }
+    );
+
+    // returns locale data
+    moment.localeData = function (key) {
+        var locale;
+
+        if (key && key._locale && key._locale._abbr) {
+            key = key._locale._abbr;
+        }
+
+        if (!key) {
+            return moment._locale;
+        }
+
+        if (!isArray(key)) {
+            //short-circuit everything else
+            locale = loadLocale(key);
+            if (locale) {
+                return locale;
+            }
+            key = [key];
+        }
+
+        return chooseLocale(key);
+    };
+
+    // compare moment object
+    moment.isMoment = function (obj) {
+        return obj instanceof Moment ||
+            (obj != null && hasOwnProp(obj, '_isAMomentObject'));
+    };
+
+    // for typechecking Duration objects
+    moment.isDuration = function (obj) {
+        return obj instanceof Duration;
+    };
+
+    for (i = lists.length - 1; i >= 0; --i) {
+        makeList(lists[i]);
+    }
+
+    moment.normalizeUnits = function (units) {
+        return normalizeUnits(units);
+    };
+
+    moment.invalid = function (flags) {
+        var m = moment.utc(NaN);
+        if (flags != null) {
+            extend(m._pf, flags);
+        }
+        else {
+            m._pf.userInvalidated = true;
+        }
+
+        return m;
+    };
+
+    moment.parseZone = function () {
+        return moment.apply(null, arguments).parseZone();
+    };
+
+    moment.parseTwoDigitYear = function (input) {
+        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+    };
+
+    /************************************
+     Moment Prototype
+     ************************************/
+
+
+    extend(moment.fn = Moment.prototype, {
+
+        clone : function () {
+            return moment(this);
+        },
+
+        valueOf : function () {
+            return +this._d + ((this._offset || 0) * 60000);
+        },
+
+        unix : function () {
+            return Math.floor(+this / 1000);
+        },
+
+        toString : function () {
+            return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+        },
+
+        toDate : function () {
+            return this._offset ? new Date(+this) : this._d;
+        },
+
+        toISOString : function () {
+            var m = moment(this).utc();
+            if (0 < m.year() && m.year() <= 9999) {
+                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+            } else {
+                return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+            }
+        },
+
+        toArray : function () {
+            var m = this;
+            return [
+                m.year(),
+                m.month(),
+                m.date(),
+                m.hours(),
+                m.minutes(),
+                m.seconds(),
+                m.milliseconds()
+            ];
+        },
+
+        isValid : function () {
+            return isValid(this);
+        },
+
+        isDSTShifted : function () {
+            if (this._a) {
+                return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
+            }
+
+            return false;
+        },
+
+        parsingFlags : function () {
+            return extend({}, this._pf);
+        },
+
+        invalidAt: function () {
+            return this._pf.overflow;
+        },
+
+        utc : function (keepLocalTime) {
+            return this.zone(0, keepLocalTime);
+        },
+
+        local : function (keepLocalTime) {
+            if (this._isUTC) {
+                this.zone(0, keepLocalTime);
+                this._isUTC = false;
+
+                if (keepLocalTime) {
+                    this.add(this._dateTzOffset(), 'm');
+                }
+            }
+            return this;
+        },
+
+        format : function (inputString) {
+            var output = formatMoment(this, inputString || moment.defaultFormat);
+            return this.localeData().postformat(output);
+        },
+
+        add : createAdder(1, 'add'),
+
+        subtract : createAdder(-1, 'subtract'),
+
+        diff : function (input, units, asFloat) {
+            var that = makeAs(input, this),
+                zoneDiff = (this.zone() - that.zone()) * 6e4,
+                diff, output, daysAdjust;
+
+            units = normalizeUnits(units);
+
+            if (units === 'year' || units === 'month') {
+                // average number of days in the months in the given dates
+                diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
+                // difference in months
+                output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
+                // adjust by taking difference in days, average number of days
+                // and dst in the given months.
+                daysAdjust = (this - moment(this).startOf('month')) -
+                    (that - moment(that).startOf('month'));
+                // same as above but with zones, to negate all dst
+                daysAdjust -= ((this.zone() - moment(this).startOf('month').zone()) -
+                    (that.zone() - moment(that).startOf('month').zone())) * 6e4;
+                output += daysAdjust / diff;
+                if (units === 'year') {
+                    output = output / 12;
+                }
+            } else {
+                diff = (this - that);
+                output = units === 'second' ? diff / 1e3 : // 1000
+                        units === 'minute' ? diff / 6e4 : // 1000 * 60
+                        units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
+                        units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
+                        units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
+                    diff;
+            }
+            return asFloat ? output : absRound(output);
+        },
+
+        from : function (time, withoutSuffix) {
+            return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
+        },
+
+        fromNow : function (withoutSuffix) {
+            return this.from(moment(), withoutSuffix);
+        },
+
+        calendar : function (time) {
+            // We want to compare the start of today, vs this.
+            // Getting start-of-today depends on whether we're zone'd or not.
+            var now = time || moment(),
+                sod = makeAs(now, this).startOf('day'),
+                diff = this.diff(sod, 'days', true),
+                format = diff < -6 ? 'sameElse' :
+                        diff < -1 ? 'lastWeek' :
+                        diff < 0 ? 'lastDay' :
+                        diff < 1 ? 'sameDay' :
+                        diff < 2 ? 'nextDay' :
+                        diff < 7 ? 'nextWeek' : 'sameElse';
+            return this.format(this.localeData().calendar(format, this));
+        },
+
+        isLeapYear : function () {
+            return isLeapYear(this.year());
+        },
+
+        isDST : function () {
+            return (this.zone() < this.clone().month(0).zone() ||
+                this.zone() < this.clone().month(5).zone());
+        },
+
+        day : function (input) {
+            var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+            if (input != null) {
+                input = parseWeekday(input, this.localeData());
+                return this.add(input - day, 'd');
+            } else {
+                return day;
+            }
+        },
+
+        month : makeAccessor('Month', true),
+
+        startOf : function (units) {
+            units = normalizeUnits(units);
+            // the following switch intentionally omits break keywords
+            // to utilize falling through the cases.
+            switch (units) {
+                case 'year':
+                    this.month(0);
+                /* falls through */
+                case 'quarter':
+                case 'month':
+                    this.date(1);
+                /* falls through */
+                case 'week':
+                case 'isoWeek':
+                case 'day':
+                    this.hours(0);
+                /* falls through */
+                case 'hour':
+                    this.minutes(0);
+                /* falls through */
+                case 'minute':
+                    this.seconds(0);
+                /* falls through */
+                case 'second':
+                    this.milliseconds(0);
+                /* falls through */
+            }
+
+            // weeks are a special case
+            if (units === 'week') {
+                this.weekday(0);
+            } else if (units === 'isoWeek') {
+                this.isoWeekday(1);
+            }
+
+            // quarters are also special
+            if (units === 'quarter') {
+                this.month(Math.floor(this.month() / 3) * 3);
+            }
+
+            return this;
+        },
+
+        endOf: function (units) {
+            units = normalizeUnits(units);
+            return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
+        },
+
+        isAfter: function (input, units) {
+            units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
+            if (units === 'millisecond') {
+                input = moment.isMoment(input) ? input : moment(input);
+                return +this > +input;
+            } else {
+                return +this.clone().startOf(units) > +moment(input).startOf(units);
+            }
+        },
+
+        isBefore: function (input, units) {
+            units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
+            if (units === 'millisecond') {
+                input = moment.isMoment(input) ? input : moment(input);
+                return +this < +input;
+            } else {
+                return +this.clone().startOf(units) < +moment(input).startOf(units);
+            }
+        },
+
+        isSame: function (input, units) {
+            units = normalizeUnits(units || 'millisecond');
+            if (units === 'millisecond') {
+                input = moment.isMoment(input) ? input : moment(input);
+                return +this === +input;
+            } else {
+                return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);
+            }
+        },
+
+        min: deprecate(
+            'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
+            function (other) {
+                other = moment.apply(null, arguments);
+                return other < this ? this : other;
+            }
+        ),
+
+        max: deprecate(
+            'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
+            function (other) {
+                other = moment.apply(null, arguments);
+                return other > this ? this : other;
+            }
+        ),
+
+        // keepLocalTime = true means only change the timezone, without
+        // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]-->
+        // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone
+        // +0200, so we adjust the time as needed, to be valid.
+        //
+        // Keeping the time actually adds/subtracts (one hour)
+        // from the actual represented time. That is why we call updateOffset
+        // a second time. In case it wants us to change the offset again
+        // _changeInProgress == true case, then we have to adjust, because
+        // there is no such time in the given timezone.
+        zone : function (input, keepLocalTime) {
+            var offset = this._offset || 0,
+                localAdjust;
+            if (input != null) {
+                if (typeof input === 'string') {
+                    input = timezoneMinutesFromString(input);
+                }
+                if (Math.abs(input) < 16) {
+                    input = input * 60;
+                }
+                if (!this._isUTC && keepLocalTime) {
+                    localAdjust = this._dateTzOffset();
+                }
+                this._offset = input;
+                this._isUTC = true;
+                if (localAdjust != null) {
+                    this.subtract(localAdjust, 'm');
+                }
+                if (offset !== input) {
+                    if (!keepLocalTime || this._changeInProgress) {
+                        addOrSubtractDurationFromMoment(this,
+                            moment.duration(offset - input, 'm'), 1, false);
+                    } else if (!this._changeInProgress) {
+                        this._changeInProgress = true;
+                        moment.updateOffset(this, true);
+                        this._changeInProgress = null;
+                    }
+                }
+            } else {
+                return this._isUTC ? offset : this._dateTzOffset();
+            }
+            return this;
+        },
+
+        zoneAbbr : function () {
+            return this._isUTC ? 'UTC' : '';
+        },
+
+        zoneName : function () {
+            return this._isUTC ? 'Coordinated Universal Time' : '';
+        },
+
+        parseZone : function () {
+            if (this._tzm) {
+                this.zone(this._tzm);
+            } else if (typeof this._i === 'string') {
+                this.zone(this._i);
+            }
+            return this;
+        },
+
+        hasAlignedHourOffset : function (input) {
+            if (!input) {
+                input = 0;
+            }
+            else {
+                input = moment(input).zone();
+            }
+
+            return (this.zone() - input) % 60 === 0;
+        },
+
+        daysInMonth : function () {
+            return daysInMonth(this.year(), this.month());
+        },
+
+        dayOfYear : function (input) {
+            var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
+            return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
+        },
+
+        quarter : function (input) {
+            return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
+        },
+
+        weekYear : function (input) {
+            var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
+            return input == null ? year : this.add((input - year), 'y');
+        },
+
+        isoWeekYear : function (input) {
+            var year = weekOfYear(this, 1, 4).year;
+            return input == null ? year : this.add((input - year), 'y');
+        },
+
+        week : function (input) {
+            var week = this.localeData().week(this);
+            return input == null ? week : this.add((input - week) * 7, 'd');
+        },
+
+        isoWeek : function (input) {
+            var week = weekOfYear(this, 1, 4).week;
+            return input == null ? week : this.add((input - week) * 7, 'd');
+        },
+
+        weekday : function (input) {
+            var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+            return input == null ? weekday : this.add(input - weekday, 'd');
+        },
+
+        isoWeekday : function (input) {
+            // behaves the same as moment#day except
+            // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+            // as a setter, sunday should belong to the previous week.
+            return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
+        },
+
+        isoWeeksInYear : function () {
+            return weeksInYear(this.year(), 1, 4);
+        },
+
+        weeksInYear : function () {
+            var weekInfo = this.localeData()._week;
+            return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+        },
+
+        get : function (units) {
+            units = normalizeUnits(units);
+            return this[units]();
+        },
+
+        set : function (units, value) {
+            units = normalizeUnits(units);
+            if (typeof this[units] === 'function') {
+                this[units](value);
+            }
+            return this;
+        },
+
+        // If passed a locale key, it will set the locale for this
+        // instance.  Otherwise, it will return the locale configuration
+        // variables for this instance.
+        locale : function (key) {
+            var newLocaleData;
+
+            if (key === undefined) {
+                return this._locale._abbr;
+            } else {
+                newLocaleData = moment.localeData(key);
+                if (newLocaleData != null) {
+                    this._locale = newLocaleData;
+                }
+                return this;
+            }
+        },
+
+        lang : deprecate(
+            'moment().lang() is deprecated. Use moment().localeData() instead.',
+            function (key) {
+                if (key === undefined) {
+                    return this.localeData();
+                } else {
+                    return this.locale(key);
+                }
+            }
+        ),
+
+        localeData : function () {
+            return this._locale;
+        },
+
+        _dateTzOffset : function () {
+            // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+            // https://github.com/moment/moment/pull/1871
+            return Math.round(this._d.getTimezoneOffset() / 15) * 15;
+        }
+    });
+
+    function rawMonthSetter(mom, value) {
+        var dayOfMonth;
+
+        // TODO: Move this out of here!
+        if (typeof value === 'string') {
+            value = mom.localeData().monthsParse(value);
+            // TODO: Another silent failure?
+            if (typeof value !== 'number') {
+                return mom;
+            }
+        }
+
+        dayOfMonth = Math.min(mom.date(),
+            daysInMonth(mom.year(), value));
+        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+        return mom;
+    }
+
+    function rawGetter(mom, unit) {
+        return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();
+    }
+
+    function rawSetter(mom, unit, value) {
+        if (unit === 'Month') {
+            return rawMonthSetter(mom, value);
+        } else {
+            return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+        }
+    }
+
+    function makeAccessor(unit, keepTime) {
+        return function (value) {
+            if (value != null) {
+                rawSetter(this, unit, value);
+                moment.updateOffset(this, keepTime);
+                return this;
+            } else {
+                return rawGetter(this, unit);
+            }
+        };
+    }
+
+    moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false);
+    moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false);
+    moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false);
+    // Setting the hour should keep the time, because the user explicitly
+    // specified which hour he wants. So trying to maintain the same hour (in
+    // a new timezone) makes sense. Adding/subtracting hours does not follow
+    // this rule.
+    moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true);
+    // moment.fn.month is defined separately
+    moment.fn.date = makeAccessor('Date', true);
+    moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true));
+    moment.fn.year = makeAccessor('FullYear', true);
+    moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true));
+
+    // add plural methods
+    moment.fn.days = moment.fn.day;
+    moment.fn.months = moment.fn.month;
+    moment.fn.weeks = moment.fn.week;
+    moment.fn.isoWeeks = moment.fn.isoWeek;
+    moment.fn.quarters = moment.fn.quarter;
+
+    // add aliased format methods
+    moment.fn.toJSON = moment.fn.toISOString;
+
+    /************************************
+     Duration Prototype
+     ************************************/
+
+
+    function daysToYears (days) {
+        // 400 years have 146097 days (taking into account leap year rules)
+        return days * 400 / 146097;
+    }
+
+    function yearsToDays (years) {
+        // years * 365 + absRound(years / 4) -
+        //     absRound(years / 100) + absRound(years / 400);
+        return years * 146097 / 400;
+    }
+
+    extend(moment.duration.fn = Duration.prototype, {
+
+        _bubble : function () {
+            var milliseconds = this._milliseconds,
+                days = this._days,
+                months = this._months,
+                data = this._data,
+                seconds, minutes, hours, years = 0;
+
+            // The following code bubbles up values, see the tests for
+            // examples of what that means.
+            data.milliseconds = milliseconds % 1000;
+
+            seconds = absRound(milliseconds / 1000);
+            data.seconds = seconds % 60;
+
+            minutes = absRound(seconds / 60);
+            data.minutes = minutes % 60;
+
+            hours = absRound(minutes / 60);
+            data.hours = hours % 24;
+
+            days += absRound(hours / 24);
+
+            // Accurately convert days to years, assume start from year 0.
+            years = absRound(daysToYears(days));
+            days -= absRound(yearsToDays(years));
+
+            // 30 days to a month
+            // TODO (iskren): Use anchor date (like 1st Jan) to compute this.
+            months += absRound(days / 30);
+            days %= 30;
+
+            // 12 months -> 1 year
+            years += absRound(months / 12);
+            months %= 12;
+
+            data.days = days;
+            data.months = months;
+            data.years = years;
+        },
+
+        abs : function () {
+            this._milliseconds = Math.abs(this._milliseconds);
+            this._days = Math.abs(this._days);
+            this._months = Math.abs(this._months);
+
+            this._data.milliseconds = Math.abs(this._data.milliseconds);
+            this._data.seconds = Math.abs(this._data.seconds);
+            this._data.minutes = Math.abs(this._data.minutes);
+            this._data.hours = Math.abs(this._data.hours);
+            this._

<TRUNCATED>

[26/32] airavata-sandbox git commit: adding datacat system

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputParsedEvent.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputParsedEvent.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputParsedEvent.java
new file mode 100644
index 0000000..c841b3a
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/ExperimentOutputParsedEvent.java
@@ -0,0 +1,573 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.datacat.models.Messaging;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentOutputParsedEvent implements org.apache.thrift.TBase<ExperimentOutputParsedEvent, ExperimentOutputParsedEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentOutputParsedEvent> {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentOutputParsedEvent");
+
+    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField DOCUMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("documentID", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+        schemes.put(StandardScheme.class, new ExperimentOutputParsedEventStandardSchemeFactory());
+        schemes.put(TupleScheme.class, new ExperimentOutputParsedEventTupleSchemeFactory());
+    }
+
+    public String experimentId; // required
+    public String documentID; // required
+    public String status; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+        EXPERIMENT_ID((short)1, "experimentId"),
+        DOCUMENT_ID((short)2, "documentID"),
+        STATUS((short)3, "status");
+
+        private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+        static {
+            for (_Fields field : EnumSet.allOf(_Fields.class)) {
+                byName.put(field.getFieldName(), field);
+            }
+        }
+
+        /**
+         * Find the _Fields constant that matches fieldId, or null if its not found.
+         */
+        public static _Fields findByThriftId(int fieldId) {
+            switch(fieldId) {
+                case 1: // EXPERIMENT_ID
+                    return EXPERIMENT_ID;
+                case 2: // DOCUMENT_ID
+                    return DOCUMENT_ID;
+                case 3: // STATUS
+                    return STATUS;
+                default:
+                    return null;
+            }
+        }
+
+        /**
+         * Find the _Fields constant that matches fieldId, throwing an exception
+         * if it is not found.
+         */
+        public static _Fields findByThriftIdOrThrow(int fieldId) {
+            _Fields fields = findByThriftId(fieldId);
+            if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+            return fields;
+        }
+
+        /**
+         * Find the _Fields constant that matches name, or null if its not found.
+         */
+        public static _Fields findByName(String name) {
+            return byName.get(name);
+        }
+
+        private final short _thriftId;
+        private final String _fieldName;
+
+        _Fields(short thriftId, String fieldName) {
+            _thriftId = thriftId;
+            _fieldName = fieldName;
+        }
+
+        public short getThriftFieldId() {
+            return _thriftId;
+        }
+
+        public String getFieldName() {
+            return _fieldName;
+        }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+        tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.DOCUMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("documentID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        metaDataMap = Collections.unmodifiableMap(tmpMap);
+        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentOutputParsedEvent.class, metaDataMap);
+    }
+
+    public ExperimentOutputParsedEvent() {
+    }
+
+    public ExperimentOutputParsedEvent(
+            String experimentId,
+            String documentID,
+            String status)
+    {
+        this();
+        this.experimentId = experimentId;
+        this.documentID = documentID;
+        this.status = status;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public ExperimentOutputParsedEvent(ExperimentOutputParsedEvent other) {
+        if (other.isSetExperimentId()) {
+            this.experimentId = other.experimentId;
+        }
+        if (other.isSetDocumentID()) {
+            this.documentID = other.documentID;
+        }
+        if (other.isSetStatus()) {
+            this.status = other.status;
+        }
+    }
+
+    public ExperimentOutputParsedEvent deepCopy() {
+        return new ExperimentOutputParsedEvent(this);
+    }
+
+    @Override
+    public void clear() {
+        this.experimentId = null;
+        this.documentID = null;
+        this.status = null;
+    }
+
+    public String getExperimentId() {
+        return this.experimentId;
+    }
+
+    public ExperimentOutputParsedEvent setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+        return this;
+    }
+
+    public void unsetExperimentId() {
+        this.experimentId = null;
+    }
+
+    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetExperimentId() {
+        return this.experimentId != null;
+    }
+
+    public void setExperimentIdIsSet(boolean value) {
+        if (!value) {
+            this.experimentId = null;
+        }
+    }
+
+    public String getDocumentID() {
+        return this.documentID;
+    }
+
+    public ExperimentOutputParsedEvent setDocumentID(String documentID) {
+        this.documentID = documentID;
+        return this;
+    }
+
+    public void unsetDocumentID() {
+        this.documentID = null;
+    }
+
+    /** Returns true if field documentID is set (has been assigned a value) and false otherwise */
+    public boolean isSetDocumentID() {
+        return this.documentID != null;
+    }
+
+    public void setDocumentIDIsSet(boolean value) {
+        if (!value) {
+            this.documentID = null;
+        }
+    }
+
+    public String getStatus() {
+        return this.status;
+    }
+
+    public ExperimentOutputParsedEvent setStatus(String status) {
+        this.status = status;
+        return this;
+    }
+
+    public void unsetStatus() {
+        this.status = null;
+    }
+
+    /** Returns true if field status is set (has been assigned a value) and false otherwise */
+    public boolean isSetStatus() {
+        return this.status != null;
+    }
+
+    public void setStatusIsSet(boolean value) {
+        if (!value) {
+            this.status = null;
+        }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+        switch (field) {
+            case EXPERIMENT_ID:
+                if (value == null) {
+                    unsetExperimentId();
+                } else {
+                    setExperimentId((String)value);
+                }
+                break;
+
+            case DOCUMENT_ID:
+                if (value == null) {
+                    unsetDocumentID();
+                } else {
+                    setDocumentID((String)value);
+                }
+                break;
+
+            case STATUS:
+                if (value == null) {
+                    unsetStatus();
+                } else {
+                    setStatus((String)value);
+                }
+                break;
+
+        }
+    }
+
+    public Object getFieldValue(_Fields field) {
+        switch (field) {
+            case EXPERIMENT_ID:
+                return getExperimentId();
+
+            case DOCUMENT_ID:
+                return getDocumentID();
+
+            case STATUS:
+                return getStatus();
+
+        }
+        throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+        if (field == null) {
+            throw new IllegalArgumentException();
+        }
+
+        switch (field) {
+            case EXPERIMENT_ID:
+                return isSetExperimentId();
+            case DOCUMENT_ID:
+                return isSetDocumentID();
+            case STATUS:
+                return isSetStatus();
+        }
+        throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (that == null)
+            return false;
+        if (that instanceof ExperimentOutputParsedEvent)
+            return this.equals((ExperimentOutputParsedEvent)that);
+        return false;
+    }
+
+    public boolean equals(ExperimentOutputParsedEvent that) {
+        if (that == null)
+            return false;
+
+        boolean this_present_experimentId = true && this.isSetExperimentId();
+        boolean that_present_experimentId = true && that.isSetExperimentId();
+        if (this_present_experimentId || that_present_experimentId) {
+            if (!(this_present_experimentId && that_present_experimentId))
+                return false;
+            if (!this.experimentId.equals(that.experimentId))
+                return false;
+        }
+
+        boolean this_present_documentID = true && this.isSetDocumentID();
+        boolean that_present_documentID = true && that.isSetDocumentID();
+        if (this_present_documentID || that_present_documentID) {
+            if (!(this_present_documentID && that_present_documentID))
+                return false;
+            if (!this.documentID.equals(that.documentID))
+                return false;
+        }
+
+        boolean this_present_status = true && this.isSetStatus();
+        boolean that_present_status = true && that.isSetStatus();
+        if (this_present_status || that_present_status) {
+            if (!(this_present_status && that_present_status))
+                return false;
+            if (!this.status.equals(that.status))
+                return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        return 0;
+    }
+
+    @Override
+    public int compareTo(ExperimentOutputParsedEvent other) {
+        if (!getClass().equals(other.getClass())) {
+            return getClass().getName().compareTo(other.getClass().getName());
+        }
+
+        int lastComparison = 0;
+
+        lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetExperimentId()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetDocumentID()).compareTo(other.isSetDocumentID());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetDocumentID()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentID, other.documentID);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetStatus()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+        return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+        schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+        schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("ExperimentOutputParsedEvent(");
+        boolean first = true;
+
+        sb.append("experimentId:");
+        if (this.experimentId == null) {
+            sb.append("null");
+        } else {
+            sb.append(this.experimentId);
+        }
+        first = false;
+        if (!first) sb.append(", ");
+        sb.append("documentID:");
+        if (this.documentID == null) {
+            sb.append("null");
+        } else {
+            sb.append(this.documentID);
+        }
+        first = false;
+        if (!first) sb.append(", ");
+        sb.append("status:");
+        if (this.status == null) {
+            sb.append("null");
+        } else {
+            sb.append(this.status);
+        }
+        first = false;
+        sb.append(")");
+        return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+        // check for required fields
+        if (experimentId == null) {
+            throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
+        }
+        if (documentID == null) {
+            throw new org.apache.thrift.protocol.TProtocolException("Required field 'documentID' was not present! Struct: " + toString());
+        }
+        if (status == null) {
+            throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
+        }
+        // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+        try {
+            write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+        try {
+            read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private static class ExperimentOutputParsedEventStandardSchemeFactory implements SchemeFactory {
+        public ExperimentOutputParsedEventStandardScheme getScheme() {
+            return new ExperimentOutputParsedEventStandardScheme();
+        }
+    }
+
+    private static class ExperimentOutputParsedEventStandardScheme extends StandardScheme<ExperimentOutputParsedEvent> {
+
+        public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentOutputParsedEvent struct) throws org.apache.thrift.TException {
+            org.apache.thrift.protocol.TField schemeField;
+            iprot.readStructBegin();
+            while (true)
+            {
+                schemeField = iprot.readFieldBegin();
+                if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+                    break;
+                }
+                switch (schemeField.id) {
+                    case 1: // EXPERIMENT_ID
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.experimentId = iprot.readString();
+                            struct.setExperimentIdIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 2: // DOCUMENT_ID
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.documentID = iprot.readString();
+                            struct.setDocumentIDIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 3: // STATUS
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.status = iprot.readString();
+                            struct.setStatusIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    default:
+                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                }
+                iprot.readFieldEnd();
+            }
+            iprot.readStructEnd();
+
+            // check for required fields of primitive type, which can't be checked in the validate method
+            struct.validate();
+        }
+
+        public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentOutputParsedEvent struct) throws org.apache.thrift.TException {
+            struct.validate();
+
+            oprot.writeStructBegin(STRUCT_DESC);
+            if (struct.experimentId != null) {
+                oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+                oprot.writeString(struct.experimentId);
+                oprot.writeFieldEnd();
+            }
+            if (struct.documentID != null) {
+                oprot.writeFieldBegin(DOCUMENT_ID_FIELD_DESC);
+                oprot.writeString(struct.documentID);
+                oprot.writeFieldEnd();
+            }
+            if (struct.status != null) {
+                oprot.writeFieldBegin(STATUS_FIELD_DESC);
+                oprot.writeString(struct.status);
+                oprot.writeFieldEnd();
+            }
+            oprot.writeFieldStop();
+            oprot.writeStructEnd();
+        }
+
+    }
+
+    private static class ExperimentOutputParsedEventTupleSchemeFactory implements SchemeFactory {
+        public ExperimentOutputParsedEventTupleScheme getScheme() {
+            return new ExperimentOutputParsedEventTupleScheme();
+        }
+    }
+
+    private static class ExperimentOutputParsedEventTupleScheme extends TupleScheme<ExperimentOutputParsedEvent> {
+
+        @Override
+        public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentOutputParsedEvent struct) throws org.apache.thrift.TException {
+            TTupleProtocol oprot = (TTupleProtocol) prot;
+            oprot.writeString(struct.experimentId);
+            oprot.writeString(struct.documentID);
+            oprot.writeString(struct.status);
+        }
+
+        @Override
+        public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentOutputParsedEvent struct) throws org.apache.thrift.TException {
+            TTupleProtocol iprot = (TTupleProtocol) prot;
+            struct.experimentId = iprot.readString();
+            struct.setExperimentIdIsSet(true);
+            struct.documentID = iprot.readString();
+            struct.setDocumentIDIsSet(true);
+            struct.status = iprot.readString();
+            struct.setStatusIsSet(true);
+        }
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/Message.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/Message.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/Message.java
new file mode 100644
index 0000000..cdf11e9
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/Message.java
@@ -0,0 +1,814 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.datacat.models.Messaging;
+
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+import org.apache.thrift.scheme.TupleScheme;
+
+import java.nio.ByteBuffer;
+import java.util.*;
+
+@SuppressWarnings("all") public class Message implements org.apache.thrift.TBase<Message, Message._Fields>, java.io.Serializable, Cloneable, Comparable<Message> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Message");
+
+  private static final org.apache.thrift.protocol.TField EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("event", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField MESSAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("messageId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField MESSAGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("messageType", org.apache.thrift.protocol.TType.I32, (short)3);
+  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)4);
+  private static final org.apache.thrift.protocol.TField MESSAGE_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("messageLevel", org.apache.thrift.protocol.TType.I32, (short)5);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new MessageStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new MessageTupleSchemeFactory());
+  }
+
+  private ByteBuffer event; // required
+  private String messageId; // required
+  private MessageType messageType; // required
+  private long updatedTime; // optional
+  private MessageLevel messageLevel; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    EVENT((short)1, "event"),
+    MESSAGE_ID((short)2, "messageId"),
+    /**
+     * 
+     * @see MessageType
+     */
+    MESSAGE_TYPE((short)3, "messageType"),
+    UPDATED_TIME((short)4, "updatedTime"),
+    /**
+     * 
+     * @see MessageLevel
+     */
+    MESSAGE_LEVEL((short)5, "messageLevel");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // EVENT
+          return EVENT;
+        case 2: // MESSAGE_ID
+          return MESSAGE_ID;
+        case 3: // MESSAGE_TYPE
+          return MESSAGE_TYPE;
+        case 4: // UPDATED_TIME
+          return UPDATED_TIME;
+        case 5: // MESSAGE_LEVEL
+          return MESSAGE_LEVEL;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __UPDATEDTIME_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.UPDATED_TIME, _Fields.MESSAGE_LEVEL};
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.EVENT, new org.apache.thrift.meta_data.FieldMetaData("event", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.MESSAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("messageId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.MESSAGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("messageType", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MessageType.class)));
+    tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.MESSAGE_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("messageLevel", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MessageLevel.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Message.class, metaDataMap);
+  }
+
+  public Message() {
+    this.messageId = "DO_NOT_SET_AT_CLIENTS";
+
+  }
+
+  public Message(
+    ByteBuffer event,
+    String messageId,
+    MessageType messageType)
+  {
+    this();
+    this.event = event;
+    this.messageId = messageId;
+    this.messageType = messageType;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Message(Message other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetEvent()) {
+      this.event = org.apache.thrift.TBaseHelper.copyBinary(other.event);
+;
+    }
+    if (other.isSetMessageId()) {
+      this.messageId = other.messageId;
+    }
+    if (other.isSetMessageType()) {
+      this.messageType = other.messageType;
+    }
+    this.updatedTime = other.updatedTime;
+    if (other.isSetMessageLevel()) {
+      this.messageLevel = other.messageLevel;
+    }
+  }
+
+  public Message deepCopy() {
+    return new Message(this);
+  }
+
+  @Override
+  public void clear() {
+    this.event = null;
+    this.messageId = "DO_NOT_SET_AT_CLIENTS";
+
+    this.messageType = null;
+    setUpdatedTimeIsSet(false);
+    this.updatedTime = 0;
+    this.messageLevel = null;
+  }
+
+  public byte[] getEvent() {
+    setEvent(org.apache.thrift.TBaseHelper.rightSize(event));
+    return event == null ? null : event.array();
+  }
+
+  public ByteBuffer bufferForEvent() {
+    return event;
+  }
+
+  public void setEvent(byte[] event) {
+    setEvent(event == null ? (ByteBuffer)null : ByteBuffer.wrap(event));
+  }
+
+  public void setEvent(ByteBuffer event) {
+    this.event = event;
+  }
+
+  public void unsetEvent() {
+    this.event = null;
+  }
+
+  /** Returns true if field event is set (has been assigned a value) and false otherwise */
+  public boolean isSetEvent() {
+    return this.event != null;
+  }
+
+  public void setEventIsSet(boolean value) {
+    if (!value) {
+      this.event = null;
+    }
+  }
+
+  public String getMessageId() {
+    return this.messageId;
+  }
+
+  public void setMessageId(String messageId) {
+    this.messageId = messageId;
+  }
+
+  public void unsetMessageId() {
+    this.messageId = null;
+  }
+
+  /** Returns true if field messageId is set (has been assigned a value) and false otherwise */
+  public boolean isSetMessageId() {
+    return this.messageId != null;
+  }
+
+  public void setMessageIdIsSet(boolean value) {
+    if (!value) {
+      this.messageId = null;
+    }
+  }
+
+  /**
+   * 
+   * @see MessageType
+   */
+  public MessageType getMessageType() {
+    return this.messageType;
+  }
+
+  /**
+   * 
+   * @see MessageType
+   */
+  public void setMessageType(MessageType messageType) {
+    this.messageType = messageType;
+  }
+
+  public void unsetMessageType() {
+    this.messageType = null;
+  }
+
+  /** Returns true if field messageType is set (has been assigned a value) and false otherwise */
+  public boolean isSetMessageType() {
+    return this.messageType != null;
+  }
+
+  public void setMessageTypeIsSet(boolean value) {
+    if (!value) {
+      this.messageType = null;
+    }
+  }
+
+  public long getUpdatedTime() {
+    return this.updatedTime;
+  }
+
+  public void setUpdatedTime(long updatedTime) {
+    this.updatedTime = updatedTime;
+    setUpdatedTimeIsSet(true);
+  }
+
+  public void unsetUpdatedTime() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+  }
+
+  /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+  public boolean isSetUpdatedTime() {
+    return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+  }
+
+  public void setUpdatedTimeIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   * @see MessageLevel
+   */
+  public MessageLevel getMessageLevel() {
+    return this.messageLevel;
+  }
+
+  /**
+   * 
+   * @see MessageLevel
+   */
+  public void setMessageLevel(MessageLevel messageLevel) {
+    this.messageLevel = messageLevel;
+  }
+
+  public void unsetMessageLevel() {
+    this.messageLevel = null;
+  }
+
+  /** Returns true if field messageLevel is set (has been assigned a value) and false otherwise */
+  public boolean isSetMessageLevel() {
+    return this.messageLevel != null;
+  }
+
+  public void setMessageLevelIsSet(boolean value) {
+    if (!value) {
+      this.messageLevel = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EVENT:
+      if (value == null) {
+        unsetEvent();
+      } else {
+        setEvent((ByteBuffer)value);
+      }
+      break;
+
+    case MESSAGE_ID:
+      if (value == null) {
+        unsetMessageId();
+      } else {
+        setMessageId((String)value);
+      }
+      break;
+
+    case MESSAGE_TYPE:
+      if (value == null) {
+        unsetMessageType();
+      } else {
+        setMessageType((MessageType)value);
+      }
+      break;
+
+    case UPDATED_TIME:
+      if (value == null) {
+        unsetUpdatedTime();
+      } else {
+        setUpdatedTime((Long)value);
+      }
+      break;
+
+    case MESSAGE_LEVEL:
+      if (value == null) {
+        unsetMessageLevel();
+      } else {
+        setMessageLevel((MessageLevel)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EVENT:
+      return getEvent();
+
+    case MESSAGE_ID:
+      return getMessageId();
+
+    case MESSAGE_TYPE:
+      return getMessageType();
+
+    case UPDATED_TIME:
+      return Long.valueOf(getUpdatedTime());
+
+    case MESSAGE_LEVEL:
+      return getMessageLevel();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case EVENT:
+      return isSetEvent();
+    case MESSAGE_ID:
+      return isSetMessageId();
+    case MESSAGE_TYPE:
+      return isSetMessageType();
+    case UPDATED_TIME:
+      return isSetUpdatedTime();
+    case MESSAGE_LEVEL:
+      return isSetMessageLevel();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Message)
+      return this.equals((Message)that);
+    return false;
+  }
+
+  public boolean equals(Message that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_event = true && this.isSetEvent();
+    boolean that_present_event = true && that.isSetEvent();
+    if (this_present_event || that_present_event) {
+      if (!(this_present_event && that_present_event))
+        return false;
+      if (!this.event.equals(that.event))
+        return false;
+    }
+
+    boolean this_present_messageId = true && this.isSetMessageId();
+    boolean that_present_messageId = true && that.isSetMessageId();
+    if (this_present_messageId || that_present_messageId) {
+      if (!(this_present_messageId && that_present_messageId))
+        return false;
+      if (!this.messageId.equals(that.messageId))
+        return false;
+    }
+
+    boolean this_present_messageType = true && this.isSetMessageType();
+    boolean that_present_messageType = true && that.isSetMessageType();
+    if (this_present_messageType || that_present_messageType) {
+      if (!(this_present_messageType && that_present_messageType))
+        return false;
+      if (!this.messageType.equals(that.messageType))
+        return false;
+    }
+
+    boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+    boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+    if (this_present_updatedTime || that_present_updatedTime) {
+      if (!(this_present_updatedTime && that_present_updatedTime))
+        return false;
+      if (this.updatedTime != that.updatedTime)
+        return false;
+    }
+
+    boolean this_present_messageLevel = true && this.isSetMessageLevel();
+    boolean that_present_messageLevel = true && that.isSetMessageLevel();
+    if (this_present_messageLevel || that_present_messageLevel) {
+      if (!(this_present_messageLevel && that_present_messageLevel))
+        return false;
+      if (!this.messageLevel.equals(that.messageLevel))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(Message other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetEvent()).compareTo(other.isSetEvent());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetEvent()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.event, other.event);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMessageId()).compareTo(other.isSetMessageId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMessageId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageId, other.messageId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMessageType()).compareTo(other.isSetMessageType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMessageType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageType, other.messageType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUpdatedTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMessageLevel()).compareTo(other.isSetMessageLevel());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMessageLevel()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageLevel, other.messageLevel);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Message(");
+    boolean first = true;
+
+    sb.append("event:");
+    if (this.event == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.event, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("messageId:");
+    if (this.messageId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.messageId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("messageType:");
+    if (this.messageType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.messageType);
+    }
+    first = false;
+    if (isSetUpdatedTime()) {
+      if (!first) sb.append(", ");
+      sb.append("updatedTime:");
+      sb.append(this.updatedTime);
+      first = false;
+    }
+    if (isSetMessageLevel()) {
+      if (!first) sb.append(", ");
+      sb.append("messageLevel:");
+      if (this.messageLevel == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.messageLevel);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    if (!isSetEvent()) {
+      throw new TProtocolException("Required field 'event' is unset! Struct:" + toString());
+    }
+
+    if (!isSetMessageId()) {
+      throw new TProtocolException("Required field 'messageId' is unset! Struct:" + toString());
+    }
+
+    if (!isSetMessageType()) {
+      throw new TProtocolException("Required field 'messageType' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class MessageStandardSchemeFactory implements SchemeFactory {
+    public MessageStandardScheme getScheme() {
+      return new MessageStandardScheme();
+    }
+  }
+
+  private static class MessageStandardScheme extends StandardScheme<Message> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Message struct) throws TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // EVENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.event = iprot.readBinary();
+              struct.setEventIsSet(true);
+            } else {
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // MESSAGE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.messageId = iprot.readString();
+              struct.setMessageIdIsSet(true);
+            } else {
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // MESSAGE_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.messageType = MessageType.findByValue(iprot.readI32());
+              struct.setMessageTypeIsSet(true);
+            } else {
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // UPDATED_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.updatedTime = iprot.readI64();
+              struct.setUpdatedTimeIsSet(true);
+            } else {
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // MESSAGE_LEVEL
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.messageLevel = MessageLevel.findByValue(iprot.readI32());
+              struct.setMessageLevelIsSet(true);
+            } else {
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, Message struct) throws TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.event != null) {
+        oprot.writeFieldBegin(EVENT_FIELD_DESC);
+        oprot.writeBinary(struct.event);
+        oprot.writeFieldEnd();
+      }
+      if (struct.messageId != null) {
+        oprot.writeFieldBegin(MESSAGE_ID_FIELD_DESC);
+        oprot.writeString(struct.messageId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.messageType != null) {
+        oprot.writeFieldBegin(MESSAGE_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.messageType.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetUpdatedTime()) {
+        oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+        oprot.writeI64(struct.updatedTime);
+        oprot.writeFieldEnd();
+      }
+      if (struct.messageLevel != null) {
+        if (struct.isSetMessageLevel()) {
+          oprot.writeFieldBegin(MESSAGE_LEVEL_FIELD_DESC);
+          oprot.writeI32(struct.messageLevel.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class MessageTupleSchemeFactory implements SchemeFactory {
+    public MessageTupleScheme getScheme() {
+      return new MessageTupleScheme();
+    }
+  }
+
+  private static class MessageTupleScheme extends TupleScheme<Message> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Message struct) throws TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.event);
+      oprot.writeString(struct.messageId);
+      oprot.writeI32(struct.messageType.getValue());
+      BitSet optionals = new BitSet();
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(0);
+      }
+      if (struct.isSetMessageLevel()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetUpdatedTime()) {
+        oprot.writeI64(struct.updatedTime);
+      }
+      if (struct.isSetMessageLevel()) {
+        oprot.writeI32(struct.messageLevel.getValue());
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Message struct) throws TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.event = iprot.readBinary();
+      struct.setEventIsSet(true);
+      struct.messageId = iprot.readString();
+      struct.setMessageIdIsSet(true);
+      struct.messageType = MessageType.findByValue(iprot.readI32());
+      struct.setMessageTypeIsSet(true);
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.updatedTime = iprot.readI64();
+        struct.setUpdatedTimeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.messageLevel = MessageLevel.findByValue(iprot.readI32());
+        struct.setMessageLevelIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageLevel.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageLevel.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageLevel.java
new file mode 100644
index 0000000..96ae0bf
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageLevel.java
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.datacat.models.Messaging;
+
+
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum MessageLevel implements TEnum {
+  INFO(0),
+  DEBUG(1),
+  ERROR(2),
+  ACK(3);
+
+  private final int value;
+
+  private MessageLevel(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static MessageLevel findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return INFO;
+      case 1:
+        return DEBUG;
+      case 2:
+        return ERROR;
+      case 3:
+        return ACK;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageType.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageType.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageType.java
new file mode 100644
index 0000000..d1993e9
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/Messaging/MessageType.java
@@ -0,0 +1,53 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.datacat.models.Messaging;
+
+
+public enum MessageType implements org.apache.thrift.TEnum {
+    EXPERIMENT(0),
+    TASK(1),
+    WORKFLOWNODE(2),
+    JOB(3),
+    EXPERIMENT_OUTPUT(4),
+    OUTPUT_PARSED(5);
+
+    private final int value;
+
+    private MessageType(int value) {
+        this.value = value;
+    }
+
+    /**
+     * Get the integer value of this enum value, as defined in the Thrift IDL.
+     */
+    public int getValue() {
+        return value;
+    }
+
+    /**
+     * Find a the enum type by its integer value, as defined in the Thrift IDL.
+     * @return null if the value is not found.
+     */
+    public static MessageType findByValue(int value) {
+        switch (value) {
+            case 0:
+                return EXPERIMENT;
+            case 1:
+                return TASK;
+            case 2:
+                return WORKFLOWNODE;
+            case 3:
+                return JOB;
+            case 4:
+                return EXPERIMENT_OUTPUT;
+            case 5:
+                return OUTPUT_PARSED;
+            default:
+                return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/MetadataFields.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/MetadataFields.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/MetadataFields.java
new file mode 100644
index 0000000..8450d22
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/MetadataFields.java
@@ -0,0 +1,33 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public class MetadataFields {
+    public static final String ID = "id";
+    public static final String EXPERIMENT_NAME = "experimentName";
+    public static final String EXPERIMENT_ID = "experimentId";
+    public static final String OUTPUT_PATH = "outputPath";
+    public static final String OWNER_ID = "ownerId";
+    public static final String GATEWAY_ID = "gatewayId";
+    public static final String APPLICATION_NAME = "applicationName";
+    public static final String HOST = "host";
+    public static final String CREATED_DATE = "createdDate";
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMetadataDTO.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMetadataDTO.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMetadataDTO.java
new file mode 100644
index 0000000..53b1c57
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMetadataDTO.java
@@ -0,0 +1,142 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+import java.util.Map;
+
+public class OutputMetadataDTO {
+
+    private String id = "";
+
+    private String experimentName = "";
+
+    private String outputPath = "";
+
+    private String ownerId = "";
+
+    public String gatewayId = "";
+
+    private String applicationName = "";
+
+    private String experimentId = "";
+
+    private String createdDate = "";
+
+    private String host = "";
+
+    //This field is added for the requirements of Solr (it is easy to encode json to object when this field
+    // is present).
+    private String _version_ = "";
+
+    //Custom Metadata fields
+    //The content of this field depends on the parsers
+    //The relevant parsers populate this data entity
+    private Map<String, String> customMetaData;
+
+    public String getOutputPath() {
+        return outputPath;
+    }
+
+    public void setOutputPath(String outputPath) {
+        this.outputPath = outputPath;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getExperimentName() {
+        return experimentName;
+    }
+
+    public void setExperimentName(String experimentName) {
+        this.experimentName = experimentName;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getApplicationName() {
+        return applicationName;
+    }
+
+    public void setApplicationName(String applicationName) {
+        this.applicationName = applicationName;
+    }
+
+    public String getCreatedDate() {
+        return createdDate;
+    }
+
+    public void setCreatedDate(String createdDate) {
+        this.createdDate = createdDate;
+    }
+
+    public String getOwnerId() {
+        return ownerId;
+    }
+
+    public void setOwnerId(String ownerId) {
+        this.ownerId = ownerId;
+    }
+
+    public String get_version_() {
+        return _version_;
+    }
+
+    public void set_version_(String _version_) {
+        this._version_ = _version_;
+    }
+
+    public Map<String, String> getCustomMetaData() {
+        return customMetaData;
+    }
+
+    public void setCustomMetaData(Map<String, String> customMetaData) {
+        this.customMetaData = customMetaData;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessage.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessage.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessage.java
new file mode 100644
index 0000000..ee1ac49
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessage.java
@@ -0,0 +1,104 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public class OutputMonitorMessage {
+
+    private String experimentID;
+
+    private String experimentName;
+
+    private String ownerId;
+
+    private String gatewayId;
+
+    private String outputPath;
+
+    private String applicationName;
+
+    private String host;
+
+    private String fileMonitorMessageType;
+
+    public String getExperimentID() {
+        return experimentID;
+    }
+
+    public void setExperimentID(String experimentID) {
+        this.experimentID = experimentID;
+    }
+
+    public String getOutputPath() {
+        return outputPath;
+    }
+
+    public void setOutputPath(String outputPath) {
+        this.outputPath = outputPath;
+    }
+
+    public String getFileMonitorMessageType() {
+        return fileMonitorMessageType;
+    }
+
+    public void setFileMonitorMessageType(String fileMonitorMessageType) {
+        this.fileMonitorMessageType = fileMonitorMessageType;
+    }
+
+    public String getExperimentName() {
+        return experimentName;
+    }
+
+    public void setExperimentName(String experimentName) {
+        this.experimentName = experimentName;
+    }
+
+    public String getOwnerId() {
+        return ownerId;
+    }
+
+    public void setOwnerId(String ownerId) {
+        this.ownerId = ownerId;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getApplicationName() {
+        return applicationName;
+    }
+
+    public void setApplicationName(String applicationName) {
+        this.applicationName = applicationName;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessageType.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessageType.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessageType.java
new file mode 100644
index 0000000..2563822
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/OutputMonitorMessageType.java
@@ -0,0 +1,29 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public class OutputMonitorMessageType {
+    public static final String FILE_CREATED = "FILE_CREATED";
+
+    public static final String FILE_MODIFIED = "FILE_MODIFIED";
+
+    public static final String FILE_DELETED = "FILE_DELETED";
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryParameter.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryParameter.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryParameter.java
new file mode 100644
index 0000000..8b7716d
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryParameter.java
@@ -0,0 +1,64 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+import java.io.Serializable;
+
+public class PrimaryQueryParameter implements Serializable {
+
+    private String field;
+    private String firstParameter;
+    //In some cases we need a second parameter e.g. range query
+    private String secondParameter;
+    private PrimaryQueryType primaryQueryType;
+
+    public String getField() {
+        return field;
+    }
+
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    public String getFirstParameter() {
+        return firstParameter;
+    }
+
+    public void setFirstParameter(String firstParameter) {
+        this.firstParameter = firstParameter;
+    }
+
+    public String getSecondParameter() {
+        return secondParameter;
+    }
+
+    public void setSecondParameter(String secondParameter) {
+        this.secondParameter = secondParameter;
+    }
+
+    public PrimaryQueryType getPrimaryQueryType() {
+        return primaryQueryType;
+    }
+
+    public void setPrimaryQueryType(PrimaryQueryType primaryQueryType) {
+        this.primaryQueryType = primaryQueryType;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryType.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryType.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryType.java
new file mode 100644
index 0000000..5ef1827
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/PrimaryQueryType.java
@@ -0,0 +1,31 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+public enum PrimaryQueryType {
+    EQUALS,
+    PHRASE,
+    WILDCARD,
+    SUBSTRING,
+    RANGE,
+    FULL_TEXT
+}
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/models/src/main/java/org/apache/airavata/datacat/models/QueryObject.java
----------------------------------------------------------------------
diff --git a/datacat/models/src/main/java/org/apache/airavata/datacat/models/QueryObject.java b/datacat/models/src/main/java/org/apache/airavata/datacat/models/QueryObject.java
new file mode 100644
index 0000000..eaaf329
--- /dev/null
+++ b/datacat/models/src/main/java/org/apache/airavata/datacat/models/QueryObject.java
@@ -0,0 +1,96 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.models;
+
+import java.util.List;
+
+public class QueryObject {
+
+    private String username;
+
+    private boolean queryStringSet =false;
+
+    private String queryString;
+
+    private String[] userGroups;
+
+    private List<PrimaryQueryParameter> primaryQueryParameterList;
+
+    private int startRow=0;
+
+    private int numberOfRows =0;
+
+    public String getQueryString() {
+        return queryString;
+    }
+
+    public void setQueryString(String queryString) {
+        this.queryString = queryString;
+    }
+
+    public boolean isQueryStringSet() {
+        return queryStringSet;
+    }
+
+    public void setQueryStringSet(boolean stringQuery) {
+        this.queryStringSet = stringQuery;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String[] getUserGroups() {
+        return userGroups;
+    }
+
+    public void setUserGroups(String[] userGroups) {
+        this.userGroups = userGroups;
+    }
+
+    public List<PrimaryQueryParameter> getPrimaryQueryParameterList() {
+        return primaryQueryParameterList;
+    }
+
+    public void setPrimaryQueryParameterList(List<PrimaryQueryParameter> primaryQueryParameterList) {
+        this.primaryQueryParameterList = primaryQueryParameterList;
+    }
+
+    public int getStartRow() {
+        return startRow;
+    }
+
+    public void setStartRow(int startRow) {
+        this.startRow = startRow;
+    }
+
+    public int getNumberOfRows() {
+        return numberOfRows;
+    }
+
+    public void setNumberOfRows(int numberOfRows) {
+        this.numberOfRows = numberOfRows;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/pom.xml
----------------------------------------------------------------------
diff --git a/datacat/parsers/pom.xml b/datacat/parsers/pom.xml
new file mode 100644
index 0000000..97b0fb5
--- /dev/null
+++ b/datacat/parsers/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>datacat</artifactId>
+        <groupId>org.apache.airavata.datacat</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>parsers</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>edu.princeton.cup</groupId>
+            <artifactId>java-cup</artifactId>
+            <version>${java-cup.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata.datacat</groupId>
+            <artifactId>models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${apache-commons.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/DefaultParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/DefaultParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/DefaultParser.java
new file mode 100644
index 0000000..fae872d
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/DefaultParser.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.datacat.parsers;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+
+/**
+ * This is a test parser to to work with PHP Reference Gateway.
+ */
+public class DefaultParser implements IParser {
+    private final static Logger logger = LoggerFactory.getLogger(DefaultParser.class);
+
+    @Override
+    public OutputMetadataDTO parse(OutputMonitorMessage outputMonitorMessage) {
+        //only a sample set of metadata is set.
+        OutputMetadataDTO outputMetadataDTO = new OutputMetadataDTO();
+        outputMetadataDTO.setExperimentId(outputMonitorMessage.getExperimentID());
+        outputMetadataDTO.setExperimentName(outputMonitorMessage.getExperimentName());
+        outputMetadataDTO.setOutputPath(outputMonitorMessage.getOutputPath());
+        outputMetadataDTO.setOwnerId(outputMonitorMessage.getOwnerId());
+        outputMetadataDTO.setGatewayId(outputMonitorMessage.getGatewayId());
+        outputMetadataDTO.setApplicationName(outputMonitorMessage.getApplicationName());
+        outputMetadataDTO.setHost(outputMonitorMessage.getHost());
+
+        //For Solr requirement date is in the format of yyyy-MM-ddTHH:mm:ssZ
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date now = new Date();
+        //rounding off the day
+        String date = dateFormat.format(now).split(" ")[0] + "T" + dateFormat.format(now).split(" ")[1] + "Z/DAY";
+        outputMetadataDTO.setCreatedDate(date);
+
+        HashMap<String, String> customMetadata = new HashMap<>();
+        outputMetadataDTO.setCustomMetaData(customMetadata);
+
+        return outputMetadataDTO;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/IParser.java
----------------------------------------------------------------------
diff --git a/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/IParser.java b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/IParser.java
new file mode 100644
index 0000000..8bf534d
--- /dev/null
+++ b/datacat/parsers/src/main/java/org/apache/airavata/datacat/parsers/IParser.java
@@ -0,0 +1,30 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.airavata.datacat.parsers;
+
+import org.apache.airavata.datacat.models.OutputMetadataDTO;
+import org.apache.airavata.datacat.models.OutputMonitorMessage;
+
+public interface IParser {
+
+    public OutputMetadataDTO parse(OutputMonitorMessage outputMonitorMessage);
+
+}