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

org.odftoolkit.odfdom.dom.element.text.TextObjectIndexSourceElement 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.

The 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.text;

import org.odftoolkit.odfdom.pkg.OdfElement;
import org.odftoolkit.odfdom.pkg.ElementVisitor;
import org.odftoolkit.odfdom.pkg.OdfFileDom;
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
import org.odftoolkit.odfdom.dom.attribute.text.TextIndexScopeAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextRelativeTabStopPositionAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextUseChartObjectsAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextUseDrawObjectsAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextUseMathObjectsAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextUseOtherObjectsAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextUseSpreadsheetObjectsAttribute;

/**
 * DOM implementation of OpenDocument element  {@odf.element text:object-index-source}.
 *
 */
public class TextObjectIndexSourceElement extends OdfElement {

	public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.TEXT, "object-index-source");

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

	/**
	 * Get the element name
	 *
	 * @return  return   OdfName the name of element {@odf.element text:object-index-source}.
	 */
	public OdfName getOdfName() {
		return ELEMENT_NAME;
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextIndexScopeAttribute , See {@odf.attribute text:index-scope}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getTextIndexScopeAttribute() {
		TextIndexScopeAttribute attr = (TextIndexScopeAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "index-scope");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return TextIndexScopeAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextIndexScopeAttribute , See {@odf.attribute text:index-scope}
	 *
	 * @param textIndexScopeValue   The type is String
	 */
	public void setTextIndexScopeAttribute(String textIndexScopeValue) {
		TextIndexScopeAttribute attr = new TextIndexScopeAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(textIndexScopeValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextRelativeTabStopPositionAttribute , See {@odf.attribute text:relative-tab-stop-position}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextRelativeTabStopPositionAttribute() {
		TextRelativeTabStopPositionAttribute attr = (TextRelativeTabStopPositionAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "relative-tab-stop-position");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextRelativeTabStopPositionAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextRelativeTabStopPositionAttribute , See {@odf.attribute text:relative-tab-stop-position}
	 *
	 * @param textRelativeTabStopPositionValue   The type is Boolean
	 */
	public void setTextRelativeTabStopPositionAttribute(Boolean textRelativeTabStopPositionValue) {
		TextRelativeTabStopPositionAttribute attr = new TextRelativeTabStopPositionAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textRelativeTabStopPositionValue.booleanValue());
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextUseChartObjectsAttribute , See {@odf.attribute text:use-chart-objects}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextUseChartObjectsAttribute() {
		TextUseChartObjectsAttribute attr = (TextUseChartObjectsAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "use-chart-objects");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextUseChartObjectsAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextUseChartObjectsAttribute , See {@odf.attribute text:use-chart-objects}
	 *
	 * @param textUseChartObjectsValue   The type is Boolean
	 */
	public void setTextUseChartObjectsAttribute(Boolean textUseChartObjectsValue) {
		TextUseChartObjectsAttribute attr = new TextUseChartObjectsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textUseChartObjectsValue.booleanValue());
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextUseDrawObjectsAttribute , See {@odf.attribute text:use-draw-objects}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextUseDrawObjectsAttribute() {
		TextUseDrawObjectsAttribute attr = (TextUseDrawObjectsAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "use-draw-objects");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextUseDrawObjectsAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextUseDrawObjectsAttribute , See {@odf.attribute text:use-draw-objects}
	 *
	 * @param textUseDrawObjectsValue   The type is Boolean
	 */
	public void setTextUseDrawObjectsAttribute(Boolean textUseDrawObjectsValue) {
		TextUseDrawObjectsAttribute attr = new TextUseDrawObjectsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textUseDrawObjectsValue.booleanValue());
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextUseMathObjectsAttribute , See {@odf.attribute text:use-math-objects}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextUseMathObjectsAttribute() {
		TextUseMathObjectsAttribute attr = (TextUseMathObjectsAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "use-math-objects");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextUseMathObjectsAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextUseMathObjectsAttribute , See {@odf.attribute text:use-math-objects}
	 *
	 * @param textUseMathObjectsValue   The type is Boolean
	 */
	public void setTextUseMathObjectsAttribute(Boolean textUseMathObjectsValue) {
		TextUseMathObjectsAttribute attr = new TextUseMathObjectsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textUseMathObjectsValue.booleanValue());
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextUseOtherObjectsAttribute , See {@odf.attribute text:use-other-objects}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextUseOtherObjectsAttribute() {
		TextUseOtherObjectsAttribute attr = (TextUseOtherObjectsAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "use-other-objects");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextUseOtherObjectsAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextUseOtherObjectsAttribute , See {@odf.attribute text:use-other-objects}
	 *
	 * @param textUseOtherObjectsValue   The type is Boolean
	 */
	public void setTextUseOtherObjectsAttribute(Boolean textUseOtherObjectsValue) {
		TextUseOtherObjectsAttribute attr = new TextUseOtherObjectsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textUseOtherObjectsValue.booleanValue());
	}

	/**
	 * Receives the value of the ODFDOM attribute representation TextUseSpreadsheetObjectsAttribute , See {@odf.attribute text:use-spreadsheet-objects}
	 *
	 * @return - the Boolean , the value or null, if the attribute is not set and no default value defined.
	 */
	public Boolean getTextUseSpreadsheetObjectsAttribute() {
		TextUseSpreadsheetObjectsAttribute attr = (TextUseSpreadsheetObjectsAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "use-spreadsheet-objects");
		if (attr != null) {
			return Boolean.valueOf(attr.booleanValue());
		}
		return Boolean.valueOf(TextUseSpreadsheetObjectsAttribute.DEFAULT_VALUE);
	}

	/**
	 * Sets the value of ODFDOM attribute representation TextUseSpreadsheetObjectsAttribute , See {@odf.attribute text:use-spreadsheet-objects}
	 *
	 * @param textUseSpreadsheetObjectsValue   The type is Boolean
	 */
	public void setTextUseSpreadsheetObjectsAttribute(Boolean textUseSpreadsheetObjectsValue) {
		TextUseSpreadsheetObjectsAttribute attr = new TextUseSpreadsheetObjectsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setBooleanValue(textUseSpreadsheetObjectsValue.booleanValue());
	}

	/**
	 * Create child element {@odf.element text:index-title-template}.
	 *
	 * @return the element {@odf.element text:index-title-template}
	 */
	public TextIndexTitleTemplateElement newTextIndexTitleTemplateElement() {
		TextIndexTitleTemplateElement textIndexTitleTemplate = ((OdfFileDom) this.ownerDocument).newOdfElement(TextIndexTitleTemplateElement.class);
		this.appendChild(textIndexTitleTemplate);
		return textIndexTitleTemplate;
	}

	/**
	 * Create child element {@odf.element text:object-index-entry-template}.
	 *
	 * @param textStyleNameValue  the String value of TextStyleNameAttribute, see {@odf.attribute  text:style-name} at specification
	 * @return the element {@odf.element text:object-index-entry-template}
	 */
	 public TextObjectIndexEntryTemplateElement newTextObjectIndexEntryTemplateElement(String textStyleNameValue) {
		TextObjectIndexEntryTemplateElement textObjectIndexEntryTemplate = ((OdfFileDom) this.ownerDocument).newOdfElement(TextObjectIndexEntryTemplateElement.class);
		textObjectIndexEntryTemplate.setTextStyleNameAttribute(textStyleNameValue);
		this.appendChild(textObjectIndexEntryTemplate);
		return textObjectIndexEntryTemplate;
	}

	@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