blob: 53d706b5405c790ba96fa4a212b973cc3797307e [file] [log] [blame]
<?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="joinToDefault" join="id" tofld="id" />
<table name="joinToExtraDefault" join="id" to="extraDefault" tofld="id" />
<table name="joinToExtraJoin" join="id" to="joinToExtraDefault" tofld="id"/>
<table name="joinToExtraOther" join="id" to="extraOther" tofld="id"/>
<table name="extraDefault" join="id" tofld="id"/>
<table name="extraOther" join="id" to="other" tofld="id"/>
<table name="other" join="id" tofld="id" />
<table name="another" 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 &quot;query&quot;, which signifies that the field is only applicable when
translating queries: and &quot;return&quot;, which signifies the field is only
applicable as a return field when converting database results into CDEResults.
-->
<field type="dynamic" name="id" dbname="id" table="defaultTable"/>
<field type="dynamic" name="id_1" dbname="id" table="joinToDefault"/>
<field type="dynamic" name="id_2" dbname="id" table="joinToExtraDefault"/>
<field type="dynamic" name="id_3" dbname="id" table="joinToExtraJoin"/>
<field type="dynamic" name="id_4" dbname="id" table="joinToExtraOther"/>
</oodt:xmlps>