| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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. |
| --> |
| <!-- Example XML mapping configuration file --> |
| <oodt:xmlps xmlns:oodt="http://incubator.apache.org/oodt/0.1-incubating" |
| name="Example Query Handler" id="project:subproject:exampleps"> |
| <tables default="defaultTable"> |
| <table name="joinTable" join="id" tofld="id" /> |
| </tables> |
| <!-- |
| field: |
| |
| type (required): dynamic or constant. If you choose dynamic, then the field |
| value is read from the row in the ResultSet returned |
| from the database. If constant, then each returned row |
| from the ResultSet is annotated with the value specified |
| in the 'value' attribute. |
| |
| name (required): the name of the attribute that you want returned |
| in the product server. |
| |
| string (optional): whether or not the internal db representation at the local |
| site for this field is a STRING, or something else (e.g., a number, etc.). Possible |
| values for this attribute are "true", to indicate that the field is a string, or |
| "false", to indicate that it is something else. If this attribute is omitted, a value |
| of "false" is assumed, and the attribute will not be quoted in the where clause of |
| the underlying SQL statement generated. |
| |
| dbname (optional): the name of the field within the underlying db. If not |
| specified, then assumed to be name |
| |
| table (optional): if provided, then the attribute a is selected as |
| 'table'.'a',and then returned. If omitted, the attribute |
| is assumed to come from the default table returned from the |
| PS query. |
| |
| value (optional): is necessary to provide if type='constant' is selected. |
| |
| scope (optional): limits the scope of a field's existence: acceptable values |
| are "query", which signifies that the field is only applicable when |
| translating queries: and "return", which signifies the field is only |
| applicable as a return field when converting database results into CDEResults. |
| |
| --> |
| <field type="dynamic" name="id_xmlps" dbname="id" table="defaultTable"/> |
| <field type="dynamic" name="field_only"/> |
| <field type="dynamic" name="field_with_table" dbname="field_db" table="anotherTable"/> |
| <field type="dynamic" name="field_use_default" dbname="field_db"/> |
| </oodt:xmlps> |