All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.odftoolkit.odfdom.dom.element.number.NumberTimeStyleElement Maven / Gradle / Ivy

Go to download

ODFDOM is an OpenDocument Format (ODF) framework. Its purpose is to provide an easy common way to create, access and manipulate ODF files, without requiring detailed knowledge of the ODF specification. It is designed to provide the ODF developer community with an easy lightwork programming API portable to any object-oriented language. The current reference implementation is written in Java.

There is a newer version: 1.0.0-BETA1
Show newest version
/**
 * **********************************************************************
 *
 * 

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * *

Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved. * *

Use is subject to license terms. * *

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. You can also obtain a copy of the License at * http://odftoolkit.org/docs/license.txt * *

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. * *

********************************************************************** */ /* * This file is automatically generated. * Don't edit manually. */ package org.odftoolkit.odfdom.dom.element.number; import org.odftoolkit.odfdom.dom.DefaultElementVisitor; import org.odftoolkit.odfdom.dom.OdfDocumentNamespace; import org.odftoolkit.odfdom.dom.attribute.number.NumberCountryAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberFormatSourceAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberLanguageAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberRfcLanguageTagAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberScriptAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTitleAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTransliterationCountryAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTransliterationFormatAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTransliterationLanguageAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTransliterationStyleAttribute; import org.odftoolkit.odfdom.dom.attribute.number.NumberTruncateOnOverflowAttribute; import org.odftoolkit.odfdom.dom.attribute.style.StyleDisplayNameAttribute; import org.odftoolkit.odfdom.dom.attribute.style.StyleNameAttribute; import org.odftoolkit.odfdom.dom.attribute.style.StyleVolatileAttribute; import org.odftoolkit.odfdom.dom.element.style.StyleMapElement; import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; import org.odftoolkit.odfdom.pkg.ElementVisitor; import org.odftoolkit.odfdom.pkg.OdfElement; import org.odftoolkit.odfdom.pkg.OdfFileDom; import org.odftoolkit.odfdom.pkg.OdfName; /** DOM implementation of OpenDocument element {@odf.element number:time-style}. */ public class NumberTimeStyleElement extends OdfElement { public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.NUMBER, "time-style"); /** * Create the instance of NumberTimeStyleElement * * @param ownerDoc The type is OdfFileDom */ public NumberTimeStyleElement(OdfFileDom ownerDoc) { super(ownerDoc, ELEMENT_NAME); } /** * Get the element name * * @return return OdfName the name of element {@odf.element number:time-style}. */ public OdfName getOdfName() { return ELEMENT_NAME; } /** * Receives the value of the ODFDOM attribute representation NumberCountryAttribute , * See {@odf.attribute number:country} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberCountryAttribute() { NumberCountryAttribute attr = (NumberCountryAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "country"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberCountryAttribute , See * {@odf.attribute number:country} * * @param numberCountryValue The type is String */ public void setNumberCountryAttribute(String numberCountryValue) { NumberCountryAttribute attr = new NumberCountryAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberCountryValue); } /** * Receives the value of the ODFDOM attribute representation NumberFormatSourceAttribute * , See {@odf.attribute number:format-source} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberFormatSourceAttribute() { NumberFormatSourceAttribute attr = (NumberFormatSourceAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "format-source"); if (attr != null) { return String.valueOf(attr.getValue()); } return NumberFormatSourceAttribute.DEFAULT_VALUE; } /** * Sets the value of ODFDOM attribute representation NumberFormatSourceAttribute , * See {@odf.attribute number:format-source} * * @param numberFormatSourceValue The type is String */ public void setNumberFormatSourceAttribute(String numberFormatSourceValue) { NumberFormatSourceAttribute attr = new NumberFormatSourceAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberFormatSourceValue); } /** * Receives the value of the ODFDOM attribute representation NumberLanguageAttribute * , See {@odf.attribute number:language} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberLanguageAttribute() { NumberLanguageAttribute attr = (NumberLanguageAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "language"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberLanguageAttribute , See * {@odf.attribute number:language} * * @param numberLanguageValue The type is String */ public void setNumberLanguageAttribute(String numberLanguageValue) { NumberLanguageAttribute attr = new NumberLanguageAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberLanguageValue); } /** * Receives the value of the ODFDOM attribute representation NumberRfcLanguageTagAttribute * , See {@odf.attribute number:rfc-language-tag} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberRfcLanguageTagAttribute() { NumberRfcLanguageTagAttribute attr = (NumberRfcLanguageTagAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "rfc-language-tag"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberRfcLanguageTagAttribute , * See {@odf.attribute number:rfc-language-tag} * * @param numberRfcLanguageTagValue The type is String */ public void setNumberRfcLanguageTagAttribute(String numberRfcLanguageTagValue) { NumberRfcLanguageTagAttribute attr = new NumberRfcLanguageTagAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberRfcLanguageTagValue); } /** * Receives the value of the ODFDOM attribute representation NumberScriptAttribute , * See {@odf.attribute number:script} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberScriptAttribute() { NumberScriptAttribute attr = (NumberScriptAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "script"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberScriptAttribute , See * {@odf.attribute number:script} * * @param numberScriptValue The type is String */ public void setNumberScriptAttribute(String numberScriptValue) { NumberScriptAttribute attr = new NumberScriptAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberScriptValue); } /** * Receives the value of the ODFDOM attribute representation NumberTitleAttribute , * See {@odf.attribute number:title} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberTitleAttribute() { NumberTitleAttribute attr = (NumberTitleAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "title"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberTitleAttribute , See * {@odf.attribute number:title} * * @param numberTitleValue The type is String */ public void setNumberTitleAttribute(String numberTitleValue) { NumberTitleAttribute attr = new NumberTitleAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberTitleValue); } /** * Receives the value of the ODFDOM attribute representation * NumberTransliterationCountryAttribute , See {@odf.attribute * number:transliteration-country} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberTransliterationCountryAttribute() { NumberTransliterationCountryAttribute attr = (NumberTransliterationCountryAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "transliteration-country"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberTransliterationCountryAttribute * , See {@odf.attribute number:transliteration-country} * * @param numberTransliterationCountryValue The type is String */ public void setNumberTransliterationCountryAttribute(String numberTransliterationCountryValue) { NumberTransliterationCountryAttribute attr = new NumberTransliterationCountryAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberTransliterationCountryValue); } /** * Receives the value of the ODFDOM attribute representation * NumberTransliterationFormatAttribute , See {@odf.attribute * number:transliteration-format} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberTransliterationFormatAttribute() { NumberTransliterationFormatAttribute attr = (NumberTransliterationFormatAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "transliteration-format"); if (attr != null) { return String.valueOf(attr.getValue()); } return NumberTransliterationFormatAttribute.DEFAULT_VALUE; } /** * Sets the value of ODFDOM attribute representation NumberTransliterationFormatAttribute * , See {@odf.attribute number:transliteration-format} * * @param numberTransliterationFormatValue The type is String */ public void setNumberTransliterationFormatAttribute(String numberTransliterationFormatValue) { NumberTransliterationFormatAttribute attr = new NumberTransliterationFormatAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberTransliterationFormatValue); } /** * Receives the value of the ODFDOM attribute representation * NumberTransliterationLanguageAttribute , See {@odf.attribute * number:transliteration-language} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberTransliterationLanguageAttribute() { NumberTransliterationLanguageAttribute attr = (NumberTransliterationLanguageAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "transliteration-language"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation NumberTransliterationLanguageAttribute * , See {@odf.attribute number:transliteration-language} * * @param numberTransliterationLanguageValue The type is String */ public void setNumberTransliterationLanguageAttribute(String numberTransliterationLanguageValue) { NumberTransliterationLanguageAttribute attr = new NumberTransliterationLanguageAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberTransliterationLanguageValue); } /** * Receives the value of the ODFDOM attribute representation * NumberTransliterationStyleAttribute , See {@odf.attribute number:transliteration-style} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getNumberTransliterationStyleAttribute() { NumberTransliterationStyleAttribute attr = (NumberTransliterationStyleAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "transliteration-style"); if (attr != null) { return String.valueOf(attr.getValue()); } return NumberTransliterationStyleAttribute.DEFAULT_VALUE; } /** * Sets the value of ODFDOM attribute representation NumberTransliterationStyleAttribute * , See {@odf.attribute number:transliteration-style} * * @param numberTransliterationStyleValue The type is String */ public void setNumberTransliterationStyleAttribute(String numberTransliterationStyleValue) { NumberTransliterationStyleAttribute attr = new NumberTransliterationStyleAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(numberTransliterationStyleValue); } /** * Receives the value of the ODFDOM attribute representation * NumberTruncateOnOverflowAttribute , See {@odf.attribute number:truncate-on-overflow} * * @return - the Boolean , the value or null, if the attribute is not * set and no default value defined. */ public Boolean getNumberTruncateOnOverflowAttribute() { NumberTruncateOnOverflowAttribute attr = (NumberTruncateOnOverflowAttribute) getOdfAttribute(OdfDocumentNamespace.NUMBER, "truncate-on-overflow"); if (attr != null) { return Boolean.valueOf(attr.booleanValue()); } return Boolean.valueOf(NumberTruncateOnOverflowAttribute.DEFAULT_VALUE); } /** * Sets the value of ODFDOM attribute representation NumberTruncateOnOverflowAttribute * , See {@odf.attribute number:truncate-on-overflow} * * @param numberTruncateOnOverflowValue The type is Boolean */ public void setNumberTruncateOnOverflowAttribute(Boolean numberTruncateOnOverflowValue) { NumberTruncateOnOverflowAttribute attr = new NumberTruncateOnOverflowAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setBooleanValue(numberTruncateOnOverflowValue.booleanValue()); } /** * Receives the value of the ODFDOM attribute representation StyleDisplayNameAttribute * , See {@odf.attribute style:display-name} * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getStyleDisplayNameAttribute() { StyleDisplayNameAttribute attr = (StyleDisplayNameAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "display-name"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation StyleDisplayNameAttribute , See * {@odf.attribute style:display-name} * * @param styleDisplayNameValue The type is String */ public void setStyleDisplayNameAttribute(String styleDisplayNameValue) { StyleDisplayNameAttribute attr = new StyleDisplayNameAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(styleDisplayNameValue); } /** * Receives the value of the ODFDOM attribute representation StyleNameAttribute , See * {@odf.attribute style:name} * *

Attribute is mandatory. * * @return - the String , the value or null, if the attribute is not set * and no default value defined. */ public String getStyleNameAttribute() { StyleNameAttribute attr = (StyleNameAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "name"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; } /** * Sets the value of ODFDOM attribute representation StyleNameAttribute , See * {@odf.attribute style:name} * * @param styleNameValue The type is String */ public void setStyleNameAttribute(String styleNameValue) { StyleNameAttribute attr = new StyleNameAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(styleNameValue); } /** * Receives the value of the ODFDOM attribute representation StyleVolatileAttribute , * See {@odf.attribute style:volatile} * * @return - the Boolean , the value or null, if the attribute is not * set and no default value defined. */ public Boolean getStyleVolatileAttribute() { StyleVolatileAttribute attr = (StyleVolatileAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "volatile"); if (attr != null) { return Boolean.valueOf(attr.booleanValue()); } return null; } /** * Sets the value of ODFDOM attribute representation StyleVolatileAttribute , See * {@odf.attribute style:volatile} * * @param styleVolatileValue The type is Boolean */ public void setStyleVolatileAttribute(Boolean styleVolatileValue) { StyleVolatileAttribute attr = new StyleVolatileAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setBooleanValue(styleVolatileValue.booleanValue()); } /** * Create child element {@odf.element number:am-pm}. * * @return the element {@odf.element number:am-pm} */ public NumberAmPmElement newNumberAmPmElement() { NumberAmPmElement numberAmPm = ((OdfFileDom) this.ownerDocument).newOdfElement(NumberAmPmElement.class); this.appendChild(numberAmPm); return numberAmPm; } /** * Create child element {@odf.element number:hours}. * * @return the element {@odf.element number:hours} */ public NumberHoursElement newNumberHoursElement() { NumberHoursElement numberHours = ((OdfFileDom) this.ownerDocument).newOdfElement(NumberHoursElement.class); this.appendChild(numberHours); return numberHours; } /** * Create child element {@odf.element number:minutes}. * * @return the element {@odf.element number:minutes} */ public NumberMinutesElement newNumberMinutesElement() { NumberMinutesElement numberMinutes = ((OdfFileDom) this.ownerDocument).newOdfElement(NumberMinutesElement.class); this.appendChild(numberMinutes); return numberMinutes; } /** * Create child element {@odf.element number:seconds}. * * @return the element {@odf.element number:seconds} */ public NumberSecondsElement newNumberSecondsElement() { NumberSecondsElement numberSeconds = ((OdfFileDom) this.ownerDocument).newOdfElement(NumberSecondsElement.class); this.appendChild(numberSeconds); return numberSeconds; } /** * Create child element {@odf.element number:text}. * * @return the element {@odf.element number:text} */ public NumberTextElement newNumberTextElement() { NumberTextElement numberText = ((OdfFileDom) this.ownerDocument).newOdfElement(NumberTextElement.class); this.appendChild(numberText); return numberText; } /** * Create child element {@odf.element style:map}. * * @param styleApplyStyleNameValue the String value of * StyleApplyStyleNameAttribute, see {@odf.attribute style:apply-style-name} at * specification * @param styleConditionValue the String value of StyleConditionAttribute * , see {@odf.attribute style:condition} at specification * @return the element {@odf.element style:map} */ public StyleMapElement newStyleMapElement( String styleApplyStyleNameValue, String styleConditionValue) { StyleMapElement styleMap = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleMapElement.class); styleMap.setStyleApplyStyleNameAttribute(styleApplyStyleNameValue); styleMap.setStyleConditionAttribute(styleConditionValue); this.appendChild(styleMap); return styleMap; } /** * Create child element {@odf.element style:text-properties}. * * @param textDisplayValue the String value of TextDisplayAttribute, see * {@odf.attribute text:display} at specification * @return the element {@odf.element style:text-properties} */ public StyleTextPropertiesElement newStyleTextPropertiesElement(String textDisplayValue) { StyleTextPropertiesElement styleTextProperties = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleTextPropertiesElement.class); styleTextProperties.setTextDisplayAttribute(textDisplayValue); this.appendChild(styleTextProperties); return styleTextProperties; } @Override public void accept(ElementVisitor visitor) { if (visitor instanceof DefaultElementVisitor) { DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor; defaultVisitor.visit(this); } else { visitor.visit(this); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy