KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ischema > ISchemaRestriction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.ischema;
12
13 /**
14  * Simple schema types can optionally have a restriction
15  * objects that narrows the value space for the type.
16  * The restrictions introduce additional requirements
17  * for the value to be considered valid for the type.
18  * For example, enumeration restriction defines
19  * a closed set of values that are legal for the type.
20  */

21 public interface ISchemaRestriction extends ISchemaObject {
22 /**
23  * Returns the simple type to which this restriction applies.
24  * @return simple type to which this restriciton applies
25  */

26 public ISchemaSimpleType getBaseType();
27 /**
28  * Returns children of this restriction. Actual types
29  * of the children depend on the restriction itself.
30  * @return restriction children objects
31  */

32 public Object JavaDoc[] getChildren();
33 /**
34  * Tests if the provided value belongs to
35  * the value set defined by this restriction.
36  * @return true if the provided value
37  * is valid for this restriction
38  */

39 boolean isValueValid(Object JavaDoc value);
40 /**
41  * Associates this restriction with the simple type object.
42  *
43  * @param baseType type object that owns this restriction
44  */

45 public void setBaseType(ISchemaSimpleType baseType);
46 }
47
Popular Tags