01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.xs;
19:
20: /**
21: * This interface represents the Wildcard schema component.
22: */
23: public interface XSWildcard extends XSTerm {
24: // Namespace Constraint
25: /**
26: * Namespace Constraint: any namespace is allowed.
27: */
28: public static final short NSCONSTRAINT_ANY = 1;
29: /**
30: * Namespace Constraint: namespaces in the list are not allowed.
31: */
32: public static final short NSCONSTRAINT_NOT = 2;
33: /**
34: * Namespace Constraint: namespaces in the list are allowed.
35: */
36: public static final short NSCONSTRAINT_LIST = 3;
37:
38: // Process contents
39: /**
40: * There must be a top-level declaration for the item available, or the
41: * item must have an xsi:type, and the item must be valid as appropriate.
42: */
43: public static final short PC_STRICT = 1;
44: /**
45: * No constraints at all: the item must simply be well-formed XML.
46: */
47: public static final short PC_SKIP = 2;
48: /**
49: * If the item, or any items among its [children] is an element
50: * information item, has a uniquely determined declaration available, it
51: * must be valid with respect to that definition, that is, validate
52: * where you can and do not worry when you cannot.
53: */
54: public static final short PC_LAX = 3;
55:
56: /**
57: * Namespace constraint: A constraint type: any, not, list.
58: */
59: public short getConstraintType();
60:
61: /**
62: * Namespace constraint: For <code>constraintType</code>
63: * <code>NSCONSTRAINT_LIST</code>, the list contains allowed namespaces.
64: * For <code>constraintType</code> <code>NSCONSTRAINT_NOT</code>, the
65: * list contains disallowed namespaces. For <code>constraintType</code>
66: * <code>NSCONSTRAINT_ANY</code>, the <code>StringList</code> is empty.
67: */
68: public StringList getNsConstraintList();
69:
70: /**
71: * [process contents]: one of skip, lax or strict. Valid constants values
72: * are: <code>PC_LAX</code>, <code>PC_SKIP</code> and
73: * <code>PC_STRICT</code>.
74: */
75: public short getProcessContents();
76:
77: /**
78: * An annotation if it exists, otherwise <code>null</code>. If not null
79: * then the first [annotation] from the sequence of annotations.
80: */
81: public XSAnnotation getAnnotation();
82:
83: /**
84: * A sequence of [annotations] or an empty <code>XSObjectList</code>.
85: */
86: public XSObjectList getAnnotations();
87: }
|