예제 #1
0
 /**
  * Create the instance of <code>ChartAxisElement</code>
  *
  * @param ownerDoc The type is <code>OdfFileDom</code>
  */
 public ChartAxisElement(OdfFileDom ownerDoc) {
   super(
       ownerDoc,
       ELEMENT_NAME,
       OdfStyleFamily.Chart,
       OdfName.get(OdfNamespace.get(OdfNamespaceNames.CHART), "style-name"));
 }
예제 #2
0
/** DOM implementation of OpenDocument element {@odf.element style:region-left}. */
public abstract class StyleRegionLeftElement extends OdfElement {
  public static final OdfName ELEMENT_NAME =
      OdfName.get(OdfNamespace.get(OdfNamespaceNames.STYLE), "region-left");

  /**
   * Create the instance of <code>StyleRegionLeftElement</code>
   *
   * @param ownerDoc The type is <code>OdfFileDom</code>
   */
  public StyleRegionLeftElement(OdfFileDom ownerDoc) {
    super(ownerDoc, ELEMENT_NAME);
  }

  /**
   * Get the element name
   *
   * @return return <code>OdfName</code> the name of element {@odf.element style:region-left}.
   */
  public OdfName getOdfName() {
    return ELEMENT_NAME;
  }

  /**
   * Create child element {@odf.element text:p}.
   *
   * @return return the element {@odf.element text:p} DifferentQName
   */
  public TextPElement newTextPElement() {
    TextPElement textP = ((OdfFileDom) this.ownerDocument).newOdfElement(TextPElement.class);
    this.appendChild(textP);
    return textP;
  }
}
예제 #3
0
 /**
  * Create the instance of <code>StyleDropCapElement</code>
  *
  * @param ownerDoc The type is <code>OdfFileDom</code>
  */
 public StyleDropCapElement(OdfFileDom ownerDoc) {
   super(
       ownerDoc,
       ELEMENT_NAME,
       OdfStyleFamily.Text,
       OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "style-name"));
 }
예제 #4
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>SvgYAttribute</code> , See
  * {@odf.attribute svg:y}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getSvgYAttribute() {
   SvgYAttribute attr =
       (SvgYAttribute) getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.SVG), "y"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #5
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>TextTabRefAttribute</code> ,
  * See {@odf.attribute text:tab-ref}
  *
  * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Integer getTextTabRefAttribute() {
   TextTabRefAttribute attr =
       (TextTabRefAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "tab-ref"));
   if (attr != null) {
     return Integer.valueOf(attr.intValue());
   }
   return null;
 }
예제 #6
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>StyleStyleNameAttribute</code>
  * , See {@odf.attribute style:style-name}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getStyleStyleNameAttribute() {
   StyleStyleNameAttribute attr =
       (StyleStyleNameAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.STYLE), "style-name"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #7
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>ChartDimensionAttribute</code>
  * , See {@odf.attribute chart:dimension}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getChartDimensionAttribute() {
   ChartDimensionAttribute attr =
       (ChartDimensionAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.CHART), "dimension"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #8
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>ChartStyleNameAttribute</code>
  * , See {@odf.attribute chart:style-name}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getChartStyleNameAttribute() {
   ChartStyleNameAttribute attr =
       (ChartStyleNameAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.CHART), "style-name"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
 /**
  * Receives the value of the ODFDOM attribute representation <code>MetaPageCountAttribute</code> ,
  * See {@odf.attribute meta:page-count}
  *
  * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Integer getMetaPageCountAttribute() {
   MetaPageCountAttribute attr =
       (MetaPageCountAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.META), "page-count"));
   if (attr != null) {
     return Integer.valueOf(attr.intValue());
   }
   return null;
 }
예제 #10
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>StyleLinesAttribute</code> ,
  * See {@odf.attribute style:lines}
  *
  * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Integer getStyleLinesAttribute() {
   StyleLinesAttribute attr =
       (StyleLinesAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.STYLE), "lines"));
   if (attr != null) {
     return Integer.valueOf(attr.intValue());
   }
   return Integer.valueOf(StyleLinesAttribute.DEFAULT_VALUE);
 }
예제 #11
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DbBaseDnAttribute</code> , See
  * {@odf.attribute db:base-dn}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getDbBaseDnAttribute() {
   DbBaseDnAttribute attr =
       (DbBaseDnAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.DB), "base-dn"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #12
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DrawLayerAttribute</code> , See
  * {@odf.attribute draw:layer}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getDrawLayerAttribute() {
   DrawLayerAttribute attr =
       (DrawLayerAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.DRAW), "layer"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #13
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>PresentationClassAttribute
  * </code> , See {@odf.attribute presentation:class}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getPresentationClassAttribute() {
   PresentationClassAttribute attr =
       (PresentationClassAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.PRESENTATION), "class"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #14
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>StyleLengthAttribute</code> ,
  * See {@odf.attribute style:length}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getStyleLengthAttribute() {
   StyleLengthAttribute attr =
       (StyleLengthAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.STYLE), "length"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return StyleLengthAttribute.DEFAULT_VALUE;
 }
예제 #15
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>StyleRelHeightAttribute</code>
  * , See {@odf.attribute style:rel-height}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getStyleRelHeightAttribute() {
   StyleRelHeightAttribute attr =
       (StyleRelHeightAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.STYLE), "rel-height"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #16
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DrawCaptionIdAttribute</code> ,
  * See {@odf.attribute draw:caption-id}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getDrawCaptionIdAttribute() {
   DrawCaptionIdAttribute attr =
       (DrawCaptionIdAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.DRAW), "caption-id"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
 /**
  * Receives the value of the ODFDOM attribute representation <code>TextFixedAttribute</code> , See
  * {@odf.attribute text:fixed}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getTextFixedAttribute() {
   TextFixedAttribute attr =
       (TextFixedAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "fixed"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return null;
 }
예제 #18
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DbShowDeletedAttribute</code> ,
  * See {@odf.attribute db:show-deleted}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getDbShowDeletedAttribute() {
   DbShowDeletedAttribute attr =
       (DbShowDeletedAttribute)
           getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.DB), "show-deleted"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return Boolean.valueOf(DbShowDeletedAttribute.DEFAULT_VALUE);
 }
예제 #19
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>
  * PresentationUserTransformedAttribute</code> , See {@odf.attribute
  * presentation:user-transformed}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getPresentationUserTransformedAttribute() {
   PresentationUserTransformedAttribute attr =
       (PresentationUserTransformedAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.PRESENTATION), "user-transformed"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return null;
 }
예제 #20
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>
  * PresentationPlaceholderAttribute</code> , See {@odf.attribute presentation:placeholder}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getPresentationPlaceholderAttribute() {
   PresentationPlaceholderAttribute attr =
       (PresentationPlaceholderAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.PRESENTATION), "placeholder"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return null;
 }
예제 #21
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>TextConnectionNameAttribute
  * </code> , See {@odf.attribute text:connection-name}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getTextConnectionNameAttribute() {
   TextConnectionNameAttribute attr =
       (TextConnectionNameAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "connection-name"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #22
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DbSystemDriverSettingsAttribute
  * </code> , See {@odf.attribute db:system-driver-settings}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getDbSystemDriverSettingsAttribute() {
   DbSystemDriverSettingsAttribute attr =
       (DbSystemDriverSettingsAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.DB), "system-driver-settings"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
예제 #23
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DbIsFirstRowHeaderLineAttribute
  * </code> , See {@odf.attribute db:is-first-row-header-line}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getDbIsFirstRowHeaderLineAttribute() {
   DbIsFirstRowHeaderLineAttribute attr =
       (DbIsFirstRowHeaderLineAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.DB), "is-first-row-header-line"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return Boolean.valueOf(DbIsFirstRowHeaderLineAttribute.DEFAULT_VALUE);
 }
예제 #24
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>
  * DbParameterNameSubstitutionAttribute</code> , See {@odf.attribute
  * db:parameter-name-substitution}
  *
  * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Boolean getDbParameterNameSubstitutionAttribute() {
   DbParameterNameSubstitutionAttribute attr =
       (DbParameterNameSubstitutionAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.DB), "parameter-name-substitution"));
   if (attr != null) {
     return Boolean.valueOf(attr.booleanValue());
   }
   return Boolean.valueOf(DbParameterNameSubstitutionAttribute.DEFAULT_VALUE);
 }
예제 #25
0
 /**
  * Receives the value of the ODFDOM attribute representation <code>DrawTextStyleNameAttribute
  * </code> , See {@odf.attribute draw:text-style-name}
  *
  * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  *     and no default value defined.
  */
 public String getDrawTextStyleNameAttribute() {
   DrawTextStyleNameAttribute attr =
       (DrawTextStyleNameAttribute)
           getOdfAttribute(
               OdfName.get(OdfNamespace.get(OdfNamespaceNames.DRAW), "text-style-name"));
   if (attr != null) {
     return String.valueOf(attr.getValue());
   }
   return null;
 }
 /**
  * Receives the value of the ODFDOM attribute representation <code>
  * MetaNonWhitespaceCharacterCountAttribute</code> , See {@odf.attribute
  * meta:non-whitespace-character-count}
  *
  * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  *     set and no default value defined.
  */
 public Integer getMetaNonWhitespaceCharacterCountAttribute() {
   MetaNonWhitespaceCharacterCountAttribute attr =
       (MetaNonWhitespaceCharacterCountAttribute)
           getOdfAttribute(
               OdfName.get(
                   OdfNamespace.get(OdfNamespaceNames.META), "non-whitespace-character-count"));
   if (attr != null) {
     return Integer.valueOf(attr.intValue());
   }
   return null;
 }
예제 #27
0
/** DOM implementation of OpenDocument element {@odf.element text:tab}. */
public abstract class TextTabElement extends OdfElement {
  public static final OdfName ELEMENT_NAME =
      OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "tab");

  /**
   * Create the instance of <code>TextTabElement</code>
   *
   * @param ownerDoc The type is <code>OdfFileDom</code>
   */
  public TextTabElement(OdfFileDom ownerDoc) {
    super(ownerDoc, ELEMENT_NAME);
  }

  /**
   * Get the element name
   *
   * @return return <code>OdfName</code> the name of element {@odf.element text:tab}.
   */
  public OdfName getOdfName() {
    return ELEMENT_NAME;
  }

  /**
   * Receives the value of the ODFDOM attribute representation <code>TextTabRefAttribute</code> ,
   * See {@odf.attribute text:tab-ref}
   *
   * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
   *     set and no default value defined.
   */
  public Integer getTextTabRefAttribute() {
    TextTabRefAttribute attr =
        (TextTabRefAttribute)
            getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "tab-ref"));
    if (attr != null) {
      return Integer.valueOf(attr.intValue());
    }
    return null;
  }

  /**
   * Sets the value of ODFDOM attribute representation <code>TextTabRefAttribute</code> , See
   * {@odf.attribute text:tab-ref}
   *
   * @param textTabRefValue The type is <code>Integer</code>
   */
  public void setTextTabRefAttribute(Integer textTabRefValue) {
    TextTabRefAttribute attr = new TextTabRefAttribute((OdfFileDom) this.ownerDocument);
    setOdfAttribute(attr);
    attr.setIntValue(textTabRefValue.intValue());
  }
}
/** DOM implementation of OpenDocument element {@odf.element text:sender-lastname}. */
public abstract class TextSenderLastnameElement extends OdfElement {
  public static final OdfName ELEMENT_NAME =
      OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "sender-lastname");

  /**
   * Create the instance of <code>TextSenderLastnameElement</code>
   *
   * @param ownerDoc The type is <code>OdfFileDom</code>
   */
  public TextSenderLastnameElement(OdfFileDom ownerDoc) {
    super(ownerDoc, ELEMENT_NAME);
  }

  /**
   * Get the element name
   *
   * @return return <code>OdfName</code> the name of element {@odf.element text:sender-lastname}.
   */
  public OdfName getOdfName() {
    return ELEMENT_NAME;
  }

  /**
   * Receives the value of the ODFDOM attribute representation <code>TextFixedAttribute</code> , See
   * {@odf.attribute text:fixed}
   *
   * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not
   *     set and no default value defined.
   */
  public Boolean getTextFixedAttribute() {
    TextFixedAttribute attr =
        (TextFixedAttribute)
            getOdfAttribute(OdfName.get(OdfNamespace.get(OdfNamespaceNames.TEXT), "fixed"));
    if (attr != null) {
      return Boolean.valueOf(attr.booleanValue());
    }
    return null;
  }

  /**
   * Sets the value of ODFDOM attribute representation <code>TextFixedAttribute</code> , See
   * {@odf.attribute text:fixed}
   *
   * @param textFixedValue The type is <code>Boolean</code>
   */
  public void setTextFixedAttribute(Boolean textFixedValue) {
    TextFixedAttribute attr = new TextFixedAttribute((OdfFileDom) this.ownerDocument);
    setOdfAttribute(attr);
    attr.setBooleanValue(textFixedValue.booleanValue());
  }
}
/**
 * DOM implementation of OpenDocument attribute {@odf.attribute draw:handle-radius-range-maximum}.
 */
public class DrawHandleRadiusRangeMaximumAttribute extends OdfAttribute {

  public static final OdfName ATTRIBUTE_NAME =
      OdfName.get(OdfNamespace.get(OdfNamespaceNames.DRAW), "handle-radius-range-maximum");

  /**
   * Create the instance of OpenDocument attribute {@odf.attribute
   * draw:handle-radius-range-maximum}.
   *
   * @param ownerDocument The type is <code>OdfFileDom</code>
   */
  public DrawHandleRadiusRangeMaximumAttribute(OdfFileDom ownerDocument) {
    super(ownerDocument, ATTRIBUTE_NAME);
  }

  /**
   * Returns the attribute name.
   *
   * @return the <code>OdfName</code> for {@odf.attribute draw:handle-radius-range-maximum}.
   */
  @Override
  public OdfName getOdfName() {
    return ATTRIBUTE_NAME;
  }

  /** @return Returns the name of this attribute. */
  @Override
  public String getName() {
    return ATTRIBUTE_NAME.getLocalName();
  }

  /**
   * @param attrValue The <code>String</code> value of the attribute.
   * @throws IllegalArgumentException If the provided attribute value is invalid
   */
  @Override
  public void setValue(String attrValue) {
    try {
      super.setValue(attrValue);
    } catch (NullPointerException e) {
      // TODO: validation handling/logging
      throw new IllegalArgumentException(e);
    } catch (IllegalArgumentException e) {
      // TODO: validation handling/logging
      throw (e);
    }
  }

  /** @return Returns the <code>String</code> value of the attribute */
  @Override
  public String getValue() {
    try {
      return super.getValue();
    } catch (IllegalArgumentException e) {
      // TODO: validation handling/logging
      throw new NumberFormatException("the value of draw:handle-radius-range-maximum is not valid");
    }
  }

  /**
   * Returns the default value of {@odf.attribute draw:handle-radius-range-maximum}.
   *
   * @return the default value as <code>String</code> dependent of its element name return <code>
   *     null</code> if the default value does not exist
   */
  @Override
  public String getDefault() {
    return null;
  }

  /**
   * Default value indicator. As the attribute default value is dependent from its element, the
   * attribute has only a default, when a parent element exists.
   *
   * @return <code>true</code> if {@odf.attribute draw:handle-radius-range-maximum} has an element
   *     parent otherwise return <code>false</code> as undefined.
   */
  @Override
  public boolean hasDefault() {
    return false;
  }

  /** @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?) */
  @Override
  public boolean isId() {
    return false;
  }
}
예제 #30
0
/** DOM implementation of OpenDocument attribute {@odf.attribute form:min-value}. */
public class FormMinValueAttribute extends OdfAttribute {

  public static final OdfName ATTRIBUTE_NAME =
      OdfName.get(OdfNamespace.get(OdfNamespaceNames.FORM), "min-value");

  /**
   * Create the instance of OpenDocument attribute {@odf.attribute form:min-value}.
   *
   * @param ownerDocument The type is <code>OdfFileDom</code>
   */
  public FormMinValueAttribute(OdfFileDom ownerDocument) {
    super(ownerDocument, ATTRIBUTE_NAME);
  }

  /**
   * Returns the attribute name.
   *
   * @return the <code>OdfName</code> for {@odf.attribute form:min-value}.
   */
  @Override
  public OdfName getOdfName() {
    return ATTRIBUTE_NAME;
  }

  /** @return Returns the name of this attribute. */
  @Override
  public String getName() {
    return ATTRIBUTE_NAME.getLocalName();
  }

  /**
   * @param attrValue The <code>String</code> value of the attribute.
   * @throws IllegalArgumentException If the provided attribute value is invalid
   */
  @Override
  public void setValue(String attrValue) {
    OdfElement parentElement = (OdfElement) getOwnerElement();
    if (parentElement != null) {
      try {
        if (parentElement instanceof FormDateElement) {
          // 2DO: need validate value against Date
          super.setValue(attrValue);
        } else if (parentElement instanceof FormFormattedTextElement) {
          super.setValue(attrValue);
        } else if (parentElement instanceof FormNumberElement) {
          super.setValue(Double.toString(Double.parseDouble(attrValue)));
        } else if (parentElement instanceof FormTimeElement) {
          // 2DO: need validate value against Time
          super.setValue(attrValue);
        } else if (parentElement instanceof FormValueRangeElement) {
          super.setValue(Integer.toString(Integer.parseInt(attrValue)));
        }
      } catch (NullPointerException e) {
        // TODO: validation handling/logging
        throw new IllegalArgumentException(e);
      } catch (IllegalArgumentException e) {
        // TODO: validation handling/logging
        throw (e);
      }
    } else {
      // 2DO:what should do when the owner element is null?
      super.setValue(attrValue);
    }
  }

  /** @return Returns the <code>String</code> value of the attribute */
  @Override
  public String getValue() {
    OdfElement parentElement = (OdfElement) getOwnerElement();
    if (parentElement != null) {
      try {
        if (parentElement instanceof FormDateElement) {
          // 2DO: need validate value against Date
          return super.getValue();
        } else if (parentElement instanceof FormFormattedTextElement) {
          return super.getValue();
        } else if (parentElement instanceof FormNumberElement) {
          return String.valueOf(Double.parseDouble(super.getValue()));
        } else if (parentElement instanceof FormTimeElement) {
          // 2DO: need validate value against Time
          return super.getValue();
        } else if (parentElement instanceof FormValueRangeElement) {
          return String.valueOf(Integer.parseInt(super.getValue()));
        }
      } catch (IllegalArgumentException e) {
        // TODO: validation handling/logging
        throw new NumberFormatException("the value of form:min-value is not valid");
      }
    } else {
      // 2DO:what should do when the owner element is null?
      return super.getValue();
    }
    return null;
  }

  /**
   * Returns the default value of {@odf.attribute form:min-value}.
   *
   * @return the default value as <code>String</code> dependent of its element name return <code>
   *     null</code> if the default value does not exist
   */
  @Override
  public String getDefault() {
    return null;
  }

  /**
   * Default value indicator. As the attribute default value is dependent from its element, the
   * attribute has only a default, when a parent element exists.
   *
   * @return <code>true</code> if {@odf.attribute form:min-value} has an element parent otherwise
   *     return <code>false</code> as undefined.
   */
  @Override
  public boolean hasDefault() {
    return false;
  }

  /** @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?) */
  @Override
  public boolean isId() {
    return false;
  }
}