Revision 5311
Added by daigle about 14 years ago
searchWorkflow.js | ||
---|---|---|
35 | 35 |
function setWorkflowQueryFormField(formId) { |
36 | 36 |
var queryString = ""; |
37 | 37 |
queryString += "<pathquery version='1.2'>"; |
38 |
queryString += "<returndoctype>entity</returndoctype>"; |
|
38 |
/*queryString += "<returndoctype>entity</returndoctype>";
|
|
39 | 39 |
queryString += "<returndoctype>-//UC Berkeley//DTD MoML 1//EN</returndoctype>"; |
40 | 40 |
queryString += "<returnfield>/entity/@name</returnfield>"; |
41 | 41 |
queryString += "<returnfield>/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'author\']/configure</returnfield>"; |
... | ... | |
43 | 43 |
queryString += "<returnfield>/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'createDate\']/configure</returnfield>"; |
44 | 44 |
queryString += "<returnfield>/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'workflowId\']/configure</returnfield>"; |
45 | 45 |
queryString += "<returnfield>/entity/property[@name=\'karLSID\']/@value</returnfield>"; |
46 |
queryString += "<returnfield>/entity/property[@name=\'entityId\']/@value</returnfield>"; |
|
47 |
|
|
46 |
queryString += "<returnfield>/entity/property[@name=\'entityId\']/@value</returnfield>";*/ |
|
47 |
queryString += "<returndoctype>kar</returndoctype>"; |
|
48 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/@name</returnfield>"; |
|
49 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'author\']/configure</returnfield>"; |
|
50 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'description\']/configure</returnfield>"; |
|
51 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'createDate\']/configure</returnfield>"; |
|
52 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/property[@name=\'KeplerDocumentation\']/property[@name=\'workflowId\']/configure</returnfield>"; |
|
53 |
queryString += "<returnfield>/kar/mainAttributes/lsid</returnfield>"; |
|
54 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/entity/property[@name=\'entityId\']/@value</returnfield>"; |
|
55 |
queryString += "<returnfield>/kar/karEntry/karEntryXML/property[@name=\'WorkflowRun\']/@class</returnfield>"; |
|
48 | 56 |
queryString += "<querygroup operator='INTERSECT'>"; |
49 | 57 |
|
50 | 58 |
var elementList = document.getElementById(formId).elements; |
... | ... | |
86 | 94 |
if (sfElement.name == 'name') { |
87 | 95 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
88 | 96 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
89 |
pathExpr += "<pathexpr>entity/@name</pathexpr>"; |
|
97 |
/*pathExpr += "<pathexpr>entity/@name</pathexpr>";*/ |
|
98 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/@name</pathexpr>"; |
|
90 | 99 |
pathExpr += "</queryterm>"; |
91 | 100 |
} else if (sfElement.name == 'keyword') { |
92 | 101 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
93 | 102 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
94 |
pathExpr += "<pathexpr>property/@value</pathexpr>"; |
|
103 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/@value</pathexpr>";
|
|
95 | 104 |
pathExpr += "</queryterm>"; |
96 | 105 |
} else if (sfElement.name == 'creator') { |
97 | 106 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
98 | 107 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
99 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
108 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
100 | 109 |
pathExpr += "</queryterm>"; |
101 | 110 |
} else if (sfElement.name == 'description') { |
102 | 111 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
103 | 112 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
104 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
113 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
105 | 114 |
pathExpr += "</queryterm>"; |
106 | 115 |
} else if (sfElement.name == 'date-created') { |
107 | 116 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
108 | 117 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
109 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
118 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
110 | 119 |
pathExpr += "</queryterm>"; |
111 |
} else if (sfElement.name == 'date-executed') { |
|
120 |
} /*else if (sfElement.name == 'date-executed') {
|
|
112 | 121 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
113 | 122 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
114 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
123 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
115 | 124 |
pathExpr += "</queryterm>"; |
116 |
} else if (sfElement.name == 'workflow-id') {
|
|
125 |
} */ else if (sfElement.name == 'workflow-lsid') {
|
|
117 | 126 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
118 | 127 |
pathExpr += "<value>entityId</value>"; |
119 |
pathExpr += "<pathexpr>/entity/property/@name</pathexpr>"; |
|
128 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/@name</pathexpr>";
|
|
120 | 129 |
pathExpr += "</queryterm>"; |
121 | 130 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
122 | 131 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
123 |
pathExpr += "<pathexpr>/entity/property/@value</pathexpr>"; |
|
132 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/@value</pathexpr>";
|
|
124 | 133 |
pathExpr += "</queryterm>"; |
125 |
} else if (sfElement.name == 'workflow-run-id') { |
|
134 |
}/* else if (sfElement.name == 'workflow-run-id') {
|
|
126 | 135 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
127 | 136 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
128 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
137 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
129 | 138 |
pathExpr += "</queryterm>"; |
130 | 139 |
} else if (sfElement.name == 'status') { |
131 | 140 |
pathExpr += "<queryterm casesensitive='false' searchmode='" + searchMode + "'>"; |
132 | 141 |
pathExpr += "<value>" + sfElement.value + "</value>"; |
133 |
pathExpr += "<pathexpr>property/property/configure</pathexpr>"; |
|
142 |
pathExpr += "<pathexpr>/kar/karEntry/karEntryXML/entity/property/property/configure</pathexpr>";
|
|
134 | 143 |
pathExpr += "</queryterm>"; |
135 |
}
|
|
144 |
}*/
|
|
136 | 145 |
|
137 | 146 |
//alert("returning path expression: " + pathExpr); |
138 | 147 |
return pathExpr; |
Also available in: Unified diff
Merge 1.9.2 changes back into the trunk