001: /**
002: * JOnAS: Java(TM) Open Application Server Copyright (C) 2005 Bull S.A. Contact:
003: * jonas-team@objectweb.org
004: *
005: * This library is free software; you can redistribute it and/or modify it under
006: * the terms of the GNU Lesser General Public License as published by the Free
007: * Software Foundation; either version 2.1 of the License, or any later version.
008: *
009: * This library is distributed in the hope that it will be useful, but WITHOUT
010: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011: * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012: * details.
013: *
014: * You should have received a copy of the GNU Lesser General Public License
015: * along with this library; if not, write to the Free Software Foundation, Inc.,
016: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017: *
018: * --------------------------------------------------------------------------
019: * $Id: ElementRestrictions.java 7521 2005-10-19 02:14:21Z pasmith $
020: * --------------------------------------------------------------------------
021: */package org.objectweb.jonas.webapp.jonasadmin.xml.xs;
022:
023: import java.util.List;
024:
025: /**
026: * An interface to represent the element restrictions of a schema.
027: *
028: * @author Gregory Lapouchnian
029: * @author Patrick Smith
030: */
031: public interface ElementRestrictions {
032:
033: /**
034: * Return if this element is simple with no attributes
035: * @return true if this element is a simple element and has no attributes.
036: */
037: boolean isSimpleAndNoAttributes();
038:
039: /**
040: * Returns the list of children
041: * @return the list of children.
042: */
043: List getChildren();
044:
045: /**
046: * Sets the list of children to the given list.
047: * @param children the list of children.
048: */
049: void setChildren(List children);
050:
051: /**
052: * Is this element a sequence?
053: * @return true if this element is a sequence.
054: */
055: boolean isSequence();
056:
057: /**
058: * Sets if this element is a sequence.
059: * @param isSequence the value to set.
060: */
061: void setSequence(boolean isSequence);
062:
063: /**
064: * Returns if this element is complex.
065: * @return true if this element is complex.
066: */
067: boolean isComplex();
068:
069: /**
070: * sets if this element is complex.
071: * @param isComplex the value to set.
072: */
073: void setComplex(boolean isComplex);
074:
075: /**
076: * Gets the name of this element
077: * @return the name of this element.
078: */
079: String getName();
080:
081: /**
082: * sets the name of this element
083: * @param name the value to set.
084: */
085: void setName(String name);
086:
087: /**
088: * Return the list of attributes for this element.
089: * @return the list of attributes for this element.
090: */
091: List getAttributes();
092:
093: /**
094: * Sets the list of attributes for this element.
095: * @param attributes the value to set.
096: */
097: void setAttributes(List attributes);
098:
099: /**
100: * Get the min occurances of this element.
101: * @return the min occurances of this element.
102: */
103: int getMinOccurs();
104:
105: /**
106: * Sets the min occurrances for this element.
107: * @param min the min occurrances for this element.
108: */
109: void setMinOccurs(int min);
110:
111: /**
112: * return the max occurrances for this element.
113: * @return the max occurances for this element.
114: */
115: int getMaxOccurs();
116:
117: /**
118: * Sets the max occurances for this element.
119: * @param min the value to set.
120: */
121: void setMaxOccurs(int min);
122: }
|