KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > XSIdentityConstraint


1 /*
2  * Copyright 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.xs;
18
19
20
21 /**
22  * An identity constraint restricts the contents of an elements children.
23  * An XSElement may have one or more constraints associated with it that
24  * restrict the values that can be stored in an XML file that is described
25  * by this schema. For more information read into xs:key, xs:key-ref and
26  * xs:unique.
27  *
28  * @see XSElement
29  *
30  * @author <a HREF="mailto:mrck1996@yahoo.co.uk">Chris Kirk</a>
31  */

32 public interface XSIdentityConstraint extends XSOpenAttrs {
33   /**
34    * Returns the array of annotations.
35    */

36   public XSAnnotation[] getAnnotations();
37
38   /**
39    * Returns the name of this constraint.
40    */

41   public String JavaDoc getName();
42
43   /**
44    * Return true if every element of the key is required when matching a
45    * node.
46    */

47   public boolean isUnique();
48
49   /**
50    * Returns an array of references to element and attributes. All references
51    * are relative to the element that owns this constraint. <p>
52    *
53    * The result is a two dimensional array, the first dimension corresponds to
54    * each xs:field used to declare the constraint. The second dimension is
55    * for each 'or' used within the fields xpath query. <p>
56    *
57    * Only tags and attributes that were matched by the xpath will be in the
58    * result, any xpath that fails to match anything will not be stored
59    * in this array.<p>
60    */

61   public XSElementOrAttrRef[][] getMatchCriteria();
62 }
63
Popular Tags