Single Constraint per Definition: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Current, a constraint expression is provided per container specified in a definition. For example:
Current, a constraint expression is provided per container specified in a definition. For example (cedar constraint):
 
This is available in Hyrax 1.7


<pre>
<pre>
Line 5: Line 7:
<request reqID="some_unique_value" >
<request reqID="some_unique_value" >
     <define name="d">
     <define name="d">
<container name="mfp920504a">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
<container name="mfp920504b">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
<container name="mfp920504c">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
    </define>
    <get type="tab" definition="d" />
</request>
</pre>
Notice that the constraints are the same for each container. In an xml document, this isn't too much of a problem. But with the current apache module for the CEDAR project that constraint is repeated for each container in the string request. This string request eventually gets translated into an xml request document. For simplicity sake, we would like to have the following:
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<request reqID="some_unique_value" >
    <define name="d">
        <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
<container name="mfp920504a" />
<container name="mfp920504a" />
<container name="mfp920504b" />
        <container name="mfp920504c" />
     </define>
     </define>
     <get type="tab" definition="d" />
     <get type="tab" definition="d" />
</request>
</request>
</pre>
</pre>
In this example, there is a single constraint for all of the containers.
here's the rules:
# If there is a single constraint defined in the definition, as in the example above, then the constraint gets applied to each of the containers.
# If there is a constraint defined within the container element, then that constraint is used for that container, overriding the constraint for the definition if it exists.
# If there is an empty constraint for a container, where there is a constraint for the definition, this means that there is no constraint for that container.


[[Category:Development|Single Constraint per Definition]][[Category:Hyrax Development|Single Constraint per Definition]]
[[Category:Development|Single Constraint per Definition]][[Category:Hyrax Development|Single Constraint per Definition]]

Latest revision as of 17:53, 21 March 2010

Current, a constraint expression is provided per container specified in a definition. For example (cedar constraint):

This is available in Hyrax 1.7

<?xml version="1.0" encoding="UTF-8"?>
<request reqID="some_unique_value" >
    <define name="d">
	<container name="mfp920504a">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
	<container name="mfp920504b">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
	<container name="mfp920504c">
            <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
        </container>
    </define>
    <get type="tab" definition="d" />
</request>

Notice that the constraints are the same for each container. In an xml document, this isn't too much of a problem. But with the current apache module for the CEDAR project that constraint is repeated for each container in the string request. This string request eventually gets translated into an xml request document. For simplicity sake, we would like to have the following:

<?xml version="1.0" encoding="UTF-8"?>
<request reqID="some_unique_value" >
    <define name="d">
        <constraint>date(2002,110,0,0,2002,120,2359,5999)</constraint>
	<container name="mfp920504a" />
	<container name="mfp920504b" />
        <container name="mfp920504c" />
    </define>
    <get type="tab" definition="d" />
</request>

In this example, there is a single constraint for all of the containers.

here's the rules:

  1. If there is a single constraint defined in the definition, as in the example above, then the constraint gets applied to each of the containers.
  2. If there is a constraint defined within the container element, then that constraint is used for that container, overriding the constraint for the definition if it exists.
  3. If there is an empty constraint for a container, where there is a constraint for the definition, this means that there is no constraint for that container.