
org.apache.ws.jaxme.xs.XSModelGroup Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2003, 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ws.jaxme.xs;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
/** Interface of a model group. A model group is, for example,
* defined by an xs:group
element, or by a complex type
* without simpleContent or complexContent.
*
* @author Jochen Wiedmann
*/
public interface XSModelGroup {
public class Compositor {
private String name;
Compositor(String pName) {
name = pName;
}
public String toString() { return name; }
public boolean equals(Object o) {
return o != null && o instanceof Compositor && ((Compositor) o).name.equals(name);
}
public int hashCode() { return name.hashCode(); }
}
/** The sequence compositor.
*/
public static final Compositor SEQUENCE = new Compositor("sequence");
/** The choice compositor.
*/
public static final Compositor CHOICE = new Compositor("choice");
/** The all compositor.
*/
public static final Compositor ALL = new Compositor("all");
/** Returns the model groups compositor.
*/
public Compositor getCompositor();
/** Shortcut for getCompositor().equals(SEQUENCE)
.
* @see #getCompositor()
* @see #SEQUENCE
*/
public boolean isSequence();
/** Shortcut for getCompositor().equals(CHOICE)
.
* @see #getCompositor()
* @see #CHOICE
*/
public boolean isChoice();
/** Shortcut for getCompositor().equals(ALL)
.
* @see #getCompositor()
* @see #ALL
*/
public boolean isAll();
/** Returns the model groups particles.
*/
public XSParticle[] getParticles();
/** Returns the model groups locator.
*/
public Locator getLocator();
/** Validates the particles contents.
*/
public void validate() throws SAXException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy