KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Classes that implement this interface store information
15  * about objects that carry cardinality information.
16  * In DTDs, cardinality is defined using special characters
17  * ('?' for "0 to 1", '+' for "1 or more" and '*' for "0 or more".
18  * XML Schema allows precise definition of the cardinality
19  * by using minimum and maximum of occurences in the
20  * instance document. This is one of the reasons why
21  * it is not possible to create exact DTD representation
22  * of XML Schema grammar.
23  */

24 public interface ISchemaRepeatable {
25 /**
26  * Returns maximal number of occurences of the object in the
27  * instance document.
28  *
29  *@return maximal number of occurences in the document
30  */

31 public int getMaxOccurs();
32 /**
33  * Returns minimal number of occurences of the object in the
34  * instance document.
35  *
36  *@return minimal number of occurences in the document
37  */

38 public int getMinOccurs();
39 }
40
Popular Tags