001: /*
002: * An XML attribute type.
003: * Localname: required
004: * Namespace: http://www.w3.org/ns/wsdl
005: * Java type: org.w3.ns.wsdl.RequiredAttribute
006: *
007: * Automatically generated - do not modify.
008: */
009: package org.w3.ns.wsdl.impl;
010:
011: /**
012: * A document containing one required(@http://www.w3.org/ns/wsdl) attribute.
013: *
014: * This is a complex type.
015: */
016: public class RequiredAttributeImpl extends
017: org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
018: org.w3.ns.wsdl.RequiredAttribute {
019:
020: public RequiredAttributeImpl(org.apache.xmlbeans.SchemaType sType) {
021: super (sType);
022: }
023:
024: private static final javax.xml.namespace.QName REQUIRED$0 = new javax.xml.namespace.QName(
025: "http://www.w3.org/ns/wsdl", "required");
026:
027: /**
028: * Gets the "required" attribute
029: */
030: public boolean getRequired() {
031: synchronized (monitor()) {
032: check_orphaned();
033: org.apache.xmlbeans.SimpleValue target = null;
034: target = (org.apache.xmlbeans.SimpleValue) get_store()
035: .find_attribute_user(REQUIRED$0);
036: if (target == null) {
037: return false;
038: }
039: return target.getBooleanValue();
040: }
041: }
042:
043: /**
044: * Gets (as xml) the "required" attribute
045: */
046: public org.apache.xmlbeans.XmlBoolean xgetRequired() {
047: synchronized (monitor()) {
048: check_orphaned();
049: org.apache.xmlbeans.XmlBoolean target = null;
050: target = (org.apache.xmlbeans.XmlBoolean) get_store()
051: .find_attribute_user(REQUIRED$0);
052: return target;
053: }
054: }
055:
056: /**
057: * True if has "required" attribute
058: */
059: public boolean isSetRequired() {
060: synchronized (monitor()) {
061: check_orphaned();
062: return get_store().find_attribute_user(REQUIRED$0) != null;
063: }
064: }
065:
066: /**
067: * Sets the "required" attribute
068: */
069: public void setRequired(boolean required) {
070: synchronized (monitor()) {
071: check_orphaned();
072: org.apache.xmlbeans.SimpleValue target = null;
073: target = (org.apache.xmlbeans.SimpleValue) get_store()
074: .find_attribute_user(REQUIRED$0);
075: if (target == null) {
076: target = (org.apache.xmlbeans.SimpleValue) get_store()
077: .add_attribute_user(REQUIRED$0);
078: }
079: target.setBooleanValue(required);
080: }
081: }
082:
083: /**
084: * Sets (as xml) the "required" attribute
085: */
086: public void xsetRequired(org.apache.xmlbeans.XmlBoolean required) {
087: synchronized (monitor()) {
088: check_orphaned();
089: org.apache.xmlbeans.XmlBoolean target = null;
090: target = (org.apache.xmlbeans.XmlBoolean) get_store()
091: .find_attribute_user(REQUIRED$0);
092: if (target == null) {
093: target = (org.apache.xmlbeans.XmlBoolean) get_store()
094: .add_attribute_user(REQUIRED$0);
095: }
096: target.set(required);
097: }
098: }
099:
100: /**
101: * Unsets the "required" attribute
102: */
103: public void unsetRequired() {
104: synchronized (monitor()) {
105: check_orphaned();
106: get_store().remove_attribute(REQUIRED$0);
107: }
108: }
109: }
|