01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the "License"). You may not use this file except
05: * in compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://jwsdp.dev.java.net/CDDLv1.0.html
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * HEADER in each file and include the License file at
14: * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
15: * add the following below this CDDL HEADER, with the
16: * fields enclosed by brackets "[]" replaced with your
17: * own identifying information: Portions Copyright [yyyy]
18: * [name of copyright owner]
19: */
20: package com.sun.xml.xsom;
21:
22: import java.util.Iterator;
23: import java.util.Collection;
24: import java.util.List;
25:
26: /**
27: * Restriction simple type.
28: *
29: * @author
30: * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
31: */
32: public interface XSRestrictionSimpleType extends XSSimpleType {
33: // TODO
34:
35: /** Iterates facets that are specified in this step of derivation. */
36: public Iterator<XSFacet> iterateDeclaredFacets();
37:
38: public Collection<? extends XSFacet> getDeclaredFacets();
39:
40: /**
41: * Gets the declared facet object of the given name.
42: *
43: * <p>
44: * This method returns a facet object that is added in this
45: * type and does not recursively check the ancestors.
46: *
47: * <p>
48: * For those facets that can have multiple values
49: * (pattern facets and enumeration facets), this method
50: * will return only the first one.
51: *
52: * @return
53: * Null if the facet is not specified in the last step
54: * of derivation.
55: */
56: XSFacet getDeclaredFacet(String name);
57:
58: /**
59: * Gets the declared facets of the given name.
60: *
61: * This method is for those facets (such as 'pattern') that
62: * can be specified multiple times on a simple type.
63: *
64: * @return
65: * can be empty but never be null.
66: */
67: List<XSFacet> getDeclaredFacets(String name);
68: }
|