ISchemaRestriction.java :  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » core » ischema » Java Open Source

Java Open Source » IDE Eclipse » Eclipse plug in development 
Eclipse plug in development » org » eclipse » pde » internal » core » ischema » ISchemaRestriction.java
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.pde.internal.core.ischema;

/**
 * Simple schema types can optionally have a restriction
 * objects that narrows the value space for the type.
 * The restrictions introduce additional requirements
 * for the value to be considered valid for the type.
 * For example, enumeration restriction defines
 * a closed set of values that are legal for the type.
 */
public interface ISchemaRestriction extends ISchemaObject {
/**
 * Returns the simple type to which this restriction applies.
 * @return simple type to which this restriciton applies
 */
public ISchemaSimpleType getBaseType();
/**
 * Returns children of this restriction. Actual types
 * of the children depend on the restriction itself.
 * @return restriction children objects
 */
public Object[] getChildren();
/**
 * Tests if the provided value belongs to
 * the value set defined by this restriction.
 * @return true if the provided value
 * is valid for this restriction
 */
boolean isValueValid(Object value);
/**
 * Associates this restriction with the simple type object.
 *
 * @param baseType type object that owns this restriction
 */
public void setBaseType(ISchemaSimpleType baseType);
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.