Home » xmlbeans-2.5.0-src » org.apache.xmlbeans.samples » validation » todolist » impl » [javadoc | source]

    1   /*
    2    * XML Type:  itemType
    3    * Namespace: http://xmlbeans.apache.org/samples/validation/todolist
    4    * Java type: org.apache.xmlbeans.samples.validation.todolist.ItemType
    5    *
    6    * Automatically generated - do not modify.
    7    */
    8   package org.apache.xmlbeans.samples.validation.todolist.impl;
    9   /**
   10    * An XML itemType(@http://xmlbeans.apache.org/samples/validation/todolist).
   11    *
   12    * This is a complex type.
   13    */
   14   public class ItemTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.xmlbeans.samples.validation.todolist.ItemType
   15   {
   16       
   17       public ItemTypeImpl(org.apache.xmlbeans.SchemaType sType)
   18       {
   19           super(sType);
   20       }
   21       
   22       private static final javax.xml.namespace.QName NAME$0 = 
   23           new javax.xml.namespace.QName("http://xmlbeans.apache.org/samples/validation/todolist", "name");
   24       private static final javax.xml.namespace.QName DESCRIPTION$2 = 
   25           new javax.xml.namespace.QName("http://xmlbeans.apache.org/samples/validation/todolist", "description");
   26       private static final javax.xml.namespace.QName DUEBY$4 = 
   27           new javax.xml.namespace.QName("http://xmlbeans.apache.org/samples/validation/todolist", "due_by");
   28       private static final javax.xml.namespace.QName ACTION$6 = 
   29           new javax.xml.namespace.QName("http://xmlbeans.apache.org/samples/validation/todolist", "action");
   30       private static final javax.xml.namespace.QName ID$8 = 
   31           new javax.xml.namespace.QName("", "id");
   32       
   33       
   34       /**
   35        * Gets the "name" element
   36        */
   37       public java.lang.String getName()
   38       {
   39           synchronized (monitor())
   40           {
   41               check_orphaned();
   42               org.apache.xmlbeans.SimpleValue target = null;
   43               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);
   44               if (target == null)
   45               {
   46                   return null;
   47               }
   48               return target.getStringValue();
   49           }
   50       }
   51       
   52       /**
   53        * Gets (as xml) the "name" element
   54        */
   55       public org.apache.xmlbeans.XmlString xgetName()
   56       {
   57           synchronized (monitor())
   58           {
   59               check_orphaned();
   60               org.apache.xmlbeans.XmlString target = null;
   61               target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$0, 0);
   62               return target;
   63           }
   64       }
   65       
   66       /**
   67        * Sets the "name" element
   68        */
   69       public void setName(java.lang.String name)
   70       {
   71           synchronized (monitor())
   72           {
   73               check_orphaned();
   74               org.apache.xmlbeans.SimpleValue target = null;
   75               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);
   76               if (target == null)
   77               {
   78                   target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);
   79               }
   80               target.setStringValue(name);
   81           }
   82       }
   83       
   84       /**
   85        * Sets (as xml) the "name" element
   86        */
   87       public void xsetName(org.apache.xmlbeans.XmlString name)
   88       {
   89           synchronized (monitor())
   90           {
   91               check_orphaned();
   92               org.apache.xmlbeans.XmlString target = null;
   93               target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$0, 0);
   94               if (target == null)
   95               {
   96                   target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(NAME$0);
   97               }
   98               target.set(name);
   99           }
  100       }
  101       
  102       /**
  103        * Gets the "description" element
  104        */
  105       public java.lang.String getDescription()
  106       {
  107           synchronized (monitor())
  108           {
  109               check_orphaned();
  110               org.apache.xmlbeans.SimpleValue target = null;
  111               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESCRIPTION$2, 0);
  112               if (target == null)
  113               {
  114                   return null;
  115               }
  116               return target.getStringValue();
  117           }
  118       }
  119       
  120       /**
  121        * Gets (as xml) the "description" element
  122        */
  123       public org.apache.xmlbeans.XmlString xgetDescription()
  124       {
  125           synchronized (monitor())
  126           {
  127               check_orphaned();
  128               org.apache.xmlbeans.XmlString target = null;
  129               target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DESCRIPTION$2, 0);
  130               return target;
  131           }
  132       }
  133       
  134       /**
  135        * True if has "description" element
  136        */
  137       public boolean isSetDescription()
  138       {
  139           synchronized (monitor())
  140           {
  141               check_orphaned();
  142               return get_store().count_elements(DESCRIPTION$2) != 0;
  143           }
  144       }
  145       
  146       /**
  147        * Sets the "description" element
  148        */
  149       public void setDescription(java.lang.String description)
  150       {
  151           synchronized (monitor())
  152           {
  153               check_orphaned();
  154               org.apache.xmlbeans.SimpleValue target = null;
  155               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESCRIPTION$2, 0);
  156               if (target == null)
  157               {
  158                   target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DESCRIPTION$2);
  159               }
  160               target.setStringValue(description);
  161           }
  162       }
  163       
  164       /**
  165        * Sets (as xml) the "description" element
  166        */
  167       public void xsetDescription(org.apache.xmlbeans.XmlString description)
  168       {
  169           synchronized (monitor())
  170           {
  171               check_orphaned();
  172               org.apache.xmlbeans.XmlString target = null;
  173               target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DESCRIPTION$2, 0);
  174               if (target == null)
  175               {
  176                   target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(DESCRIPTION$2);
  177               }
  178               target.set(description);
  179           }
  180       }
  181       
  182       /**
  183        * Unsets the "description" element
  184        */
  185       public void unsetDescription()
  186       {
  187           synchronized (monitor())
  188           {
  189               check_orphaned();
  190               get_store().remove_element(DESCRIPTION$2, 0);
  191           }
  192       }
  193       
  194       /**
  195        * Gets the "due_by" element
  196        */
  197       public java.util.Calendar getDueBy()
  198       {
  199           synchronized (monitor())
  200           {
  201               check_orphaned();
  202               org.apache.xmlbeans.SimpleValue target = null;
  203               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DUEBY$4, 0);
  204               if (target == null)
  205               {
  206                   return null;
  207               }
  208               return target.getCalendarValue();
  209           }
  210       }
  211       
  212       /**
  213        * Gets (as xml) the "due_by" element
  214        */
  215       public org.apache.xmlbeans.XmlDateTime xgetDueBy()
  216       {
  217           synchronized (monitor())
  218           {
  219               check_orphaned();
  220               org.apache.xmlbeans.XmlDateTime target = null;
  221               target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(DUEBY$4, 0);
  222               return target;
  223           }
  224       }
  225       
  226       /**
  227        * True if has "due_by" element
  228        */
  229       public boolean isSetDueBy()
  230       {
  231           synchronized (monitor())
  232           {
  233               check_orphaned();
  234               return get_store().count_elements(DUEBY$4) != 0;
  235           }
  236       }
  237       
  238       /**
  239        * Sets the "due_by" element
  240        */
  241       public void setDueBy(java.util.Calendar dueBy)
  242       {
  243           synchronized (monitor())
  244           {
  245               check_orphaned();
  246               org.apache.xmlbeans.SimpleValue target = null;
  247               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DUEBY$4, 0);
  248               if (target == null)
  249               {
  250                   target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DUEBY$4);
  251               }
  252               target.setCalendarValue(dueBy);
  253           }
  254       }
  255       
  256       /**
  257        * Sets (as xml) the "due_by" element
  258        */
  259       public void xsetDueBy(org.apache.xmlbeans.XmlDateTime dueBy)
  260       {
  261           synchronized (monitor())
  262           {
  263               check_orphaned();
  264               org.apache.xmlbeans.XmlDateTime target = null;
  265               target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(DUEBY$4, 0);
  266               if (target == null)
  267               {
  268                   target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(DUEBY$4);
  269               }
  270               target.set(dueBy);
  271           }
  272       }
  273       
  274       /**
  275        * Unsets the "due_by" element
  276        */
  277       public void unsetDueBy()
  278       {
  279           synchronized (monitor())
  280           {
  281               check_orphaned();
  282               get_store().remove_element(DUEBY$4, 0);
  283           }
  284       }
  285       
  286       /**
  287        * Gets the "action" element
  288        */
  289       public org.apache.xmlbeans.samples.validation.todolist.ActionType.Enum getAction()
  290       {
  291           synchronized (monitor())
  292           {
  293               check_orphaned();
  294               org.apache.xmlbeans.SimpleValue target = null;
  295               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACTION$6, 0);
  296               if (target == null)
  297               {
  298                   return null;
  299               }
  300               return (org.apache.xmlbeans.samples.validation.todolist.ActionType.Enum)target.getEnumValue();
  301           }
  302       }
  303       
  304       /**
  305        * Gets (as xml) the "action" element
  306        */
  307       public org.apache.xmlbeans.samples.validation.todolist.ActionType xgetAction()
  308       {
  309           synchronized (monitor())
  310           {
  311               check_orphaned();
  312               org.apache.xmlbeans.samples.validation.todolist.ActionType target = null;
  313               target = (org.apache.xmlbeans.samples.validation.todolist.ActionType)get_store().find_element_user(ACTION$6, 0);
  314               return target;
  315           }
  316       }
  317       
  318       /**
  319        * Sets the "action" element
  320        */
  321       public void setAction(org.apache.xmlbeans.samples.validation.todolist.ActionType.Enum action)
  322       {
  323           synchronized (monitor())
  324           {
  325               check_orphaned();
  326               org.apache.xmlbeans.SimpleValue target = null;
  327               target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACTION$6, 0);
  328               if (target == null)
  329               {
  330                   target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACTION$6);
  331               }
  332               target.setEnumValue(action);
  333           }
  334       }
  335       
  336       /**
  337        * Sets (as xml) the "action" element
  338        */
  339       public void xsetAction(org.apache.xmlbeans.samples.validation.todolist.ActionType action)
  340       {
  341           synchronized (monitor())
  342           {
  343               check_orphaned();
  344               org.apache.xmlbeans.samples.validation.todolist.ActionType target = null;
  345               target = (org.apache.xmlbeans.samples.validation.todolist.ActionType)get_store().find_element_user(ACTION$6, 0);
  346               if (target == null)
  347               {
  348                   target = (org.apache.xmlbeans.samples.validation.todolist.ActionType)get_store().add_element_user(ACTION$6);
  349               }
  350               target.set(action);
  351           }
  352       }
  353       
  354       /**
  355        * Gets the "id" attribute
  356        */
  357       public int getId()
  358       {
  359           synchronized (monitor())
  360           {
  361               check_orphaned();
  362               org.apache.xmlbeans.SimpleValue target = null;
  363               target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$8);
  364               if (target == null)
  365               {
  366                   return 0;
  367               }
  368               return target.getIntValue();
  369           }
  370       }
  371       
  372       /**
  373        * Gets (as xml) the "id" attribute
  374        */
  375       public org.apache.xmlbeans.samples.validation.todolist.IdType xgetId()
  376       {
  377           synchronized (monitor())
  378           {
  379               check_orphaned();
  380               org.apache.xmlbeans.samples.validation.todolist.IdType target = null;
  381               target = (org.apache.xmlbeans.samples.validation.todolist.IdType)get_store().find_attribute_user(ID$8);
  382               return target;
  383           }
  384       }
  385       
  386       /**
  387        * True if has "id" attribute
  388        */
  389       public boolean isSetId()
  390       {
  391           synchronized (monitor())
  392           {
  393               check_orphaned();
  394               return get_store().find_attribute_user(ID$8) != null;
  395           }
  396       }
  397       
  398       /**
  399        * Sets the "id" attribute
  400        */
  401       public void setId(int id)
  402       {
  403           synchronized (monitor())
  404           {
  405               check_orphaned();
  406               org.apache.xmlbeans.SimpleValue target = null;
  407               target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$8);
  408               if (target == null)
  409               {
  410                   target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ID$8);
  411               }
  412               target.setIntValue(id);
  413           }
  414       }
  415       
  416       /**
  417        * Sets (as xml) the "id" attribute
  418        */
  419       public void xsetId(org.apache.xmlbeans.samples.validation.todolist.IdType id)
  420       {
  421           synchronized (monitor())
  422           {
  423               check_orphaned();
  424               org.apache.xmlbeans.samples.validation.todolist.IdType target = null;
  425               target = (org.apache.xmlbeans.samples.validation.todolist.IdType)get_store().find_attribute_user(ID$8);
  426               if (target == null)
  427               {
  428                   target = (org.apache.xmlbeans.samples.validation.todolist.IdType)get_store().add_attribute_user(ID$8);
  429               }
  430               target.set(id);
  431           }
  432       }
  433       
  434       /**
  435        * Unsets the "id" attribute
  436        */
  437       public void unsetId()
  438       {
  439           synchronized (monitor())
  440           {
  441               check_orphaned();
  442               get_store().remove_attribute(ID$8);
  443           }
  444       }
  445   }

Home » xmlbeans-2.5.0-src » org.apache.xmlbeans.samples » validation » todolist » impl » [javadoc | source]