Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,92 @@ +/*
+ * Copyright 2004,2005 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.commons.schema; + +import org.w3c.dom.Element; + +/** + * Abstract class for all facets that are used when simple types are + * derived by restriction. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation +// Vidyanand - 17th Oct - added the construct method +// Vidyanand - 6th Dec - changed RuntimeExceptions thrown to XmlSchemaExceptions + +public abstract class XmlSchemaFacet extends XmlSchemaAnnotated { + + /** + * Creates new XmlSchemaFacet + */ + + + protected XmlSchemaFacet() { + } + + protected XmlSchemaFacet(Object value, boolean fixed) { + this.value = value; + this.fixed = fixed; + } + + boolean fixed; + + Object value; + + public boolean isFixed() { + return fixed; + } + + public void setFixed(boolean fixed) { + this.fixed = fixed; + } + + public Object getValue() { + return value; + } + + public void setValue(Object value) { + this.value = value; + } + + public static XmlSchemaFacet construct(Element el) { + String name = el.getLocalName(); + boolean fixed = false; + if (el.getAttribute("fixed").equals("true")) { + fixed = true; + } + try { + // TODO : move this from reflection to a if condition and avoid cost + // of reflection + Class facetClass = Class.forName("org.apache.ws.commons.schema.XmlSchema" + + Character.toUpperCase(name.charAt(0)) + + name.substring(1) + "Facet"); + XmlSchemaFacet facet = (XmlSchemaFacet) facetClass.newInstance(); + facet.setFixed(fixed); + facet.setValue(el.getAttribute("value")); + return facet; + } catch (ClassNotFoundException e) { + throw new XmlSchemaException(e.getMessage()); + } catch (InstantiationException e) { + throw new XmlSchemaException(e.getMessage()); + } catch (IllegalAccessException e) { + throw new XmlSchemaException(e.getMessage()); + } + + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaForm.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaForm.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaForm.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaForm.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,54 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +import org.apache.ws.commons.schema.constants.Enum; + +/** + * Indicates if attributes or elements need to be qualified or left unqualified. + * + * @author mukund + */ + +// October 15th - momo - initial implementation +// Jan 16th - Vidyanand - changed Quailified to qualified and Unqualified to unqualified +// Feb 12th - Joni change qualified to Qualified and unqualified to Unqualified + +public class XmlSchemaForm extends Enum { + + public static final String QUALIFIED = "qualified"; + public static final String UNQUALIFIED = "unqualified"; + public static final String NONE = "none"; + + static String[] members = new String[]{NONE, QUALIFIED, UNQUALIFIED}; + + /** + * Creates new XmlSchemaForm + */ + public XmlSchemaForm() { + super(); + } + + public XmlSchemaForm(String value) { + super(value); + } + + public String[] getValues() { + return members; + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,40 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining fractionDigits facets. Represents the World Wide + * Web Consortium (W3C) fractionDigits facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaFractionDigitsFacet extends XmlSchemaNumericFacet { + + /** + * Creates new XmlSchemaFractionDigitsFacet + */ + public XmlSchemaFractionDigitsFacet() { + } + + public XmlSchemaFractionDigitsFacet(Object value, boolean fixed) { + super(value, fixed); + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroup.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroup.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroup.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroup.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,55 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class that defines groups at the schema level that are referenced + * from the complex types. Groups a set of element declarations so that + * they can be incorporated as a group into complex type definitions. + * Represents the World Wide Web Consortium (W3C) group element. + * + * @author mukund + */ + +public class XmlSchemaGroup extends XmlSchemaAnnotated { + + /** + * Creates new XmlSchemaGroup + */ + public XmlSchemaGroup() { + } + + String name; + XmlSchemaGroupBase particle; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public XmlSchemaGroupBase getParticle() { + return particle; + } + + public void setParticle(XmlSchemaGroupBase particle) { + this.particle = particle; + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupBase.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupBase.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupBase.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupBase.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,36 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * An abstract class for XmlSchemaChoice, XmlSchemaAll, or XmlSchemaSequence. + * + * @author mukund + */ + +public abstract class XmlSchemaGroupBase extends XmlSchemaParticle { + XmlSchemaObjectCollection items; + + /** + * Creates new XmlSchemaGroupBase + */ + public XmlSchemaGroupBase() { + items = new XmlSchemaObjectCollection(); + } + + public abstract XmlSchemaObjectCollection getItems(); +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupRef.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupRef.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupRef.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaGroupRef.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,55 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +import javax.xml.namespace.QName; + + +/** + * Class used within complex types that defines the reference to + * groups defined at the schema level. Represents the World Wide + * Web Consortium (W3C) group element with ref attribute. + * + * @author mukund + */ + +public class XmlSchemaGroupRef extends XmlSchemaParticle { + + /** + * Creates new XmlSchemaGroupRef + */ + public XmlSchemaGroupRef() { + } + + XmlSchemaGroupBase particle; + + public XmlSchemaGroupBase getParticle() { + return this.particle; + } + + QName refName; + + public QName getRefName() { + return this.refName; + } + + public void setRefName(QName refName) { + this.refName = refName; + } + + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,63 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for the identity constraints: key, keyref, and unique elements. + * + * @author mukund + */ + +// Vidyanand - should this be an abstract class ??? + +public class XmlSchemaIdentityConstraint extends XmlSchemaAnnotated { + + /** + * Creates new XmlSchemaIdentityConstraint + */ + public XmlSchemaIdentityConstraint() { + fields = new XmlSchemaObjectCollection(); + } + + XmlSchemaObjectCollection fields; + + public XmlSchemaObjectCollection getFields() { + return fields; + } + + String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + XmlSchemaXPath selector; + + public XmlSchemaXPath getSelector() { + return selector; + } + + public void setSelector(XmlSchemaXPath selector) { + this.selector = selector; + } + + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaImport.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaImport.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaImport.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaImport.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,46 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * The class to import schema components from any schema. + * Represents the World Wide Web Consortium (W3C) import element. + * + * @author mukund + */ + +public class XmlSchemaImport extends XmlSchemaExternal { + + /** + * Creates new XmlSchemaImport + */ + public XmlSchemaImport() { + super(); + } + + String namespace; + + public String getNamespace() { + return this.namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaInclude.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaInclude.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaInclude.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaInclude.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,36 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class to include declarations and definitions from an external schema. + * Allows them to be available for processing in the containing schema. + * Represents the World Wide Web Consortium (W3C) include element. + * + * @author mukund + */ + +public class XmlSchemaInclude extends XmlSchemaExternal { + + /** + * Creates new XmlSchemaInclude + */ + public XmlSchemaInclude() { + super(); + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKey.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKey.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKey.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKey.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,33 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Identifies a key constraint. Represents the World Wide Web Consortium + * (W3C) key element. + * + * @author mukund + */ + +public class XmlSchemaKey extends XmlSchemaIdentityConstraint { + + /** + * Creates new XmlSchemaKey + */ + public XmlSchemaKey() { + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKeyref.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKeyref.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKeyref.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaKeyref.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,46 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +import javax.xml.namespace.QName; + + +/** + * Identifies a keyref constraint. Represents the World Wide Web + * Consortium (W3C) keyref element. + * + * @author mukund + */ + +public class XmlSchemaKeyref extends XmlSchemaIdentityConstraint { + + /** + * Creates new XmlSchemaKeyref + */ + public XmlSchemaKeyref() { + } + + QName refer; + + public QName getRefer() { + return refer; + } + + public void setRefer(QName refer) { + this.refer = refer; + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining length facets. Represents the World Wide Web + * Consortium (W3C) length facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaLengthFacet extends XmlSchemaNumericFacet { + + /** + * Creates new XmlSchemaLengthFacet + */ + public XmlSchemaLengthFacet() { + } + + public XmlSchemaLengthFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining maxExclusive facets. Represents the World Wide + * Web Consortium (W3C) maxExclusive facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMaxExclusiveFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaMaxExclusiveFacet + */ + public XmlSchemaMaxExclusiveFacet() { + } + + public XmlSchemaMaxExclusiveFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining maxInclusive facets. Represents the World + * Wide Web Consortium (W3C) maxInclusive facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMaxInclusiveFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaMaxInclusiveFacet + */ + public XmlSchemaMaxInclusiveFacet() { + } + + public XmlSchemaMaxInclusiveFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining maxLength facets. Represents the World Wide + * Web Consortium (W3C) maxLength facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMaxLengthFacet extends XmlSchemaNumericFacet { + + /** + * Creates new XmlSchemaMaxLengthFacet + */ + public XmlSchemaMaxLengthFacet() { + } + + public XmlSchemaMaxLengthFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,40 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining minExclusive facets. Represents the World + * Wide Web Consortium (W3C) minExclusive facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMinExclusiveFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaMinExclusive + */ + public XmlSchemaMinExclusiveFacet() { + } + + public XmlSchemaMinExclusiveFacet(Object value, boolean fixed) { + super(value, fixed); + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining minInclusive facets. Represents the World Wide + * Web Consortium (W3C) minInclusive facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMinInclusiveFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaMinInclusive + */ + public XmlSchemaMinInclusiveFacet() { + } + + public XmlSchemaMinInclusiveFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining minLength facets. Represents the World Wide + * Web Consortium (W3C) minLength facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaMinLengthFacet extends XmlSchemaNumericFacet { + + /** + * Creates new XmlSchemaMinLengthFacet + */ + public XmlSchemaMinLengthFacet() { + } + + public XmlSchemaMinLengthFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNotation.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNotation.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNotation.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNotation.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,64 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class represents a notation. An XML Schema definition language (XSD) + * notation declaration is a reconstruction of XML 1.0 NOTATION + * declarations. The purpose of notations is to describe the format of + * non-XML data within an XML document. Represents the World Wide Web Consortium + * (W3C) notation element. + * + * @author mukund + */ + +public class XmlSchemaNotation extends XmlSchemaAnnotated { + + String name, system, publicNotation; + + /** + * Creates new XmlSchemaNotation + */ + public XmlSchemaNotation() { + } + + public String getName() { + return name; + } + + public void setString(String name) { + this.name = name; + } + + public String getPublic() { + return publicNotation; + } + + public void setPublic(String publicNotation) { + this.publicNotation = publicNotation; + } + + public String getSystem() { + return system; + } + + public void setSystem(String system) { + this.system = system; + } + + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,40 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Abstract class for defining numeric facets. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public abstract class XmlSchemaNumericFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaNumericFacet + */ + protected XmlSchemaNumericFacet() { + } + + protected XmlSchemaNumericFacet(Object value, boolean fixed) { + super(value, fixed); + } + + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObject.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObject.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObject.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObject.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,73 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * @author mukund + */ + +// October 15th - momo - initial implementation + +public abstract class XmlSchemaObject { + int lineNumber; + int linePosition; + String sourceURI; + + /** + * Creates new XmlSchemaObject + */ + protected XmlSchemaObject() { + } + + public int getLineNumber() { + return lineNumber; + } + + public void setLineNumber(int lineNumber) { + this.lineNumber = lineNumber; + } + + public int getLinePosition() { + return linePosition; + } + + public void setLinePosition(int linePosition) { + this.linePosition = linePosition; + } + + public String getSourceURI() { + return sourceURI; + } + + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; + } + + public boolean equals(Object what) { + // toDO : implement this once everything completed + return true; + } + + public String toString(String prefix, int tab) { + String xml = new String(); + for (int i = 0; i < tab; i++) + xml += "\t"; + + xml += this.getClass().toString() + "\n"; + return xml; + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,86 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +import java.util.Iterator; +import java.util.Vector; + +/** + * An object collection class to handle XmlSchemaObjects when collections + * are returned from method calls. + * + * @author mukund + */ +public class XmlSchemaObjectCollection { + + Vector objects; + + /** + * Creates new XmlSchemaObjectCollection + */ + public XmlSchemaObjectCollection() { + objects = new Vector(); + } + + public int getCount() { + return objects.size(); + } + + public XmlSchemaObject getItem(int i) { + return (XmlSchemaObject) objects.elementAt(i); + } + + public void setItem(int i, XmlSchemaObject item) { + objects.insertElementAt(item, i); + } + + public void add(XmlSchemaObject item) { + objects.addElement(item); + } + + public boolean contains(XmlSchemaObject item) { + return objects.contains(item); + } + + public int indexOf(XmlSchemaObject item) { + return objects.indexOf(item); + } + + public void remove(XmlSchemaObject item) { + objects.remove(item); + } + + public void removeAt(int index) { + objects.removeElementAt(index); + } + + public Iterator getIterator() { + return objects.iterator(); + } + + public String toString(String prefix, int tab) { + String xml = new String(); + + for (int i = 0; i < getCount(); i++) { + xml += getItem(i).toString(prefix, tab); + } + + + return xml; + + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,32 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * An enumerator class to walk the XmlSchemaObjectCollection collections. + * + * @author mukund + */ +public class XmlSchemaObjectEnumerator { + + /** + * Creates new XmlSchemaObjectEnumerator + */ + public XmlSchemaObjectEnumerator() { + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectTable.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectTable.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectTable.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaObjectTable.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,69 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +import javax.xml.namespace.QName; +import java.util.HashMap; +import java.util.Iterator; + +/** + * A collection class that provides read-only helpers for XmlSchemaObject + * objects. This class is used to provide the collections for contained + * elements that are within the schema as collections that are accessed + * from the XmlSchema class (for example, Attributes, AttributeGroups, + * Elements, and so on). + * + * @author mukund + */ + +// Vidyanand - 17th Oct - initial implementation + +public class XmlSchemaObjectTable { + + HashMap collection; + + /** + * Creates new XmlSchemaObjectTable + */ + public XmlSchemaObjectTable() { + this.collection = new HashMap(); + } + + public int getCount() { + return this.collection.size(); + } + + public XmlSchemaObject getItem(QName name) { + return (XmlSchemaObject) collection.get(name); + } + + public Iterator getNames() { + return collection.keySet().iterator(); + } + + public Iterator getValues() { + return collection.values().iterator(); + } + + public boolean contains(QName name) { + return collection.containsKey(name); + } + + public void add(QName name, XmlSchemaObject value) { + collection.put(name, value); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaParticle.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaParticle.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaParticle.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaParticle.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,59 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Base class for all particle types. + * + * @author mukund + */ + +// October 15th - momo - initial implementation + +public class XmlSchemaParticle extends XmlSchemaAnnotated { + + long maxOccurs = 1; + String maxOccursString; + long minOccurs = 1; + String minOccursString; + + /** + * Creates new XmlSchemaParticle + * Particle types are usually interchangeable. + * A local element declaration or reference to a global element + * declaration (element), a compositor ( sequence, choice, or all), + * a reference to a named content model group (group), or an element wildcard (any). + */ + public XmlSchemaParticle() { + } + + public void setMaxOccurs(long maxOccurs) { + this.maxOccurs = maxOccurs; + } + + public long getMaxOccurs() { + return maxOccurs; + } + + public void setMinOccurs(long minOccurs) { + this.minOccurs = minOccurs; + } + + public long getMinOccurs() { + return minOccurs; + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,39 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Class for defining pattern facets. Represents the World Wide + * Web Consortium (W3C) pattern facet. + * + * @author mukund + */ + +// Vidyanand - 16th Oct - initial implementation + +public class XmlSchemaPatternFacet extends XmlSchemaFacet { + + /** + * Creates new XmlSchemaPatternFacet + */ + public XmlSchemaPatternFacet() { + } + + public XmlSchemaPatternFacet(Object value, boolean fixed) { + super(value, fixed); + } +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaRedefine.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaRedefine.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaRedefine.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaRedefine.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,57 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Allows simple and complex types, groups, and attribute groups from + * external schema files to be redefined in the current schema. This + * class provides versioning for the schema elements. Represents the + * World Wide Web Consortium (W3C) redefine element. + * + * @author mukund + */ + +public class XmlSchemaRedefine extends XmlSchemaExternal { + + /** + * Creates new XmlSchemaRedefine + */ + public XmlSchemaRedefine() { + items = new XmlSchemaObjectCollection(); + } + + XmlSchemaObjectTable attributeGroups, groups, schemaTypes; + + public XmlSchemaObjectTable getAttributeGroup() { + return attributeGroups; + } + + public XmlSchemaObjectTable getGroup() { + return groups; + } + + XmlSchemaObjectCollection items; + + public XmlSchemaObjectCollection getItems() { + return items; + } + + public XmlSchemaObjectTable getSchemaTypes() { + return schemaTypes; + } + +} Added: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSequence.java URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSequence.java?rev=290580&view=auto ============================================================================== --- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSequence.java (added) +++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSequence.java Tue Sep 20 15:55:02 2005 @@ -0,0 +1,62 @@ +/* + * Copyright 2004,2005 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.commons.schema; + +/** + * Requires the elements in the group to appear in the specified sequence + * within the containing element. Represents the World Wide Web Consortium + * (W3C) sequence (compositor) element. + * + * @author mukund + */ + +public class XmlSchemaSequence extends XmlSchemaGroupBase { + + /** + * Creates new XmlSchemaSequence + */ + public XmlSchemaSequence() { + } + + /** + * The elements contained within the compositor. + * Collection of XmlSchemaElement, XmlSchemaGroupRef, + * XmlSchemaChoice, XmlSchemaSequence, or XmlSchemaAny. + */ + public XmlSchemaObjectCollection getItems() { + return items; + } + + public String toString(String prefix, int tab) { + String xml = new String(); + for (int i = 0; i < tab; i++) + xml += "\t"; + if (!prefix.equals("") && prefix.indexOf(":") == -1) + prefix += ":"; + + xml += "<" + prefix + "sequence>\n"; + for (int i = 0; i < items.getCount(); i++) { + xml += items.getItem(i).toString(prefix, (tab + 1)); + } + + for (int i = 0; i < tab; i++) + xml += "\t"; + + xml += "</" + prefix + "sequence>\n"; + return xml; + } +}
