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

org.odftoolkit.odfdom.dom.element.anim.AnimCommandElement 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: 0.8.11-incubating
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.anim;

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.anim.AnimCommandAttribute;
import org.odftoolkit.odfdom.dom.attribute.anim.AnimIdAttribute;
import org.odftoolkit.odfdom.dom.attribute.anim.AnimSubItemAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationGroupIdAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationMasterElementAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationNodeTypeAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationPresetClassAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationPresetIdAttribute;
import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationPresetSubTypeAttribute;
import org.odftoolkit.odfdom.dom.attribute.smil.SmilBeginAttribute;
import org.odftoolkit.odfdom.dom.attribute.smil.SmilEndAttribute;
import org.odftoolkit.odfdom.dom.attribute.smil.SmilTargetElementAttribute;
import org.odftoolkit.odfdom.dom.attribute.xml.XmlIdAttribute;

/**
 * DOM implementation of OpenDocument element  {@odf.element anim:command}.
 *
 */
public class AnimCommandElement extends OdfElement {

	public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.ANIM, "command");

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

	/**
	 * Get the element name
	 *
	 * @return  return   OdfName the name of element {@odf.element anim:command}.
	 */
	public OdfName getOdfName() {
		return ELEMENT_NAME;
	}

	/**
	 * Receives the value of the ODFDOM attribute representation AnimCommandAttribute , See {@odf.attribute anim:command}
	 *
	 * Attribute is mandatory.
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getAnimCommandAttribute() {
		AnimCommandAttribute attr = (AnimCommandAttribute) getOdfAttribute(OdfDocumentNamespace.ANIM, "command");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation AnimCommandAttribute , See {@odf.attribute anim:command}
	 *
	 * @param animCommandValue   The type is String
	 */
	public void setAnimCommandAttribute(String animCommandValue) {
		AnimCommandAttribute attr = new AnimCommandAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(animCommandValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation AnimIdAttribute , See {@odf.attribute anim:id}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getAnimIdAttribute() {
		AnimIdAttribute attr = (AnimIdAttribute) getOdfAttribute(OdfDocumentNamespace.ANIM, "id");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation AnimIdAttribute , See {@odf.attribute anim:id}
	 *
	 * @param animIdValue   The type is String
	 */
	public void setAnimIdAttribute(String animIdValue) {
		AnimIdAttribute attr = new AnimIdAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(animIdValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation AnimSubItemAttribute , See {@odf.attribute anim:sub-item}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getAnimSubItemAttribute() {
		AnimSubItemAttribute attr = (AnimSubItemAttribute) getOdfAttribute(OdfDocumentNamespace.ANIM, "sub-item");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation AnimSubItemAttribute , See {@odf.attribute anim:sub-item}
	 *
	 * @param animSubItemValue   The type is String
	 */
	public void setAnimSubItemAttribute(String animSubItemValue) {
		AnimSubItemAttribute attr = new AnimSubItemAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(animSubItemValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationGroupIdAttribute , See {@odf.attribute presentation:group-id}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationGroupIdAttribute() {
		PresentationGroupIdAttribute attr = (PresentationGroupIdAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "group-id");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationGroupIdAttribute , See {@odf.attribute presentation:group-id}
	 *
	 * @param presentationGroupIdValue   The type is String
	 */
	public void setPresentationGroupIdAttribute(String presentationGroupIdValue) {
		PresentationGroupIdAttribute attr = new PresentationGroupIdAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationGroupIdValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationMasterElementAttribute , See {@odf.attribute presentation:master-element}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationMasterElementAttribute() {
		PresentationMasterElementAttribute attr = (PresentationMasterElementAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "master-element");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationMasterElementAttribute , See {@odf.attribute presentation:master-element}
	 *
	 * @param presentationMasterElementValue   The type is String
	 */
	public void setPresentationMasterElementAttribute(String presentationMasterElementValue) {
		PresentationMasterElementAttribute attr = new PresentationMasterElementAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationMasterElementValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationNodeTypeAttribute , See {@odf.attribute presentation:node-type}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationNodeTypeAttribute() {
		PresentationNodeTypeAttribute attr = (PresentationNodeTypeAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "node-type");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return PresentationNodeTypeAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationNodeTypeAttribute , See {@odf.attribute presentation:node-type}
	 *
	 * @param presentationNodeTypeValue   The type is String
	 */
	public void setPresentationNodeTypeAttribute(String presentationNodeTypeValue) {
		PresentationNodeTypeAttribute attr = new PresentationNodeTypeAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationNodeTypeValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationPresetClassAttribute , See {@odf.attribute presentation:preset-class}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationPresetClassAttribute() {
		PresentationPresetClassAttribute attr = (PresentationPresetClassAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "preset-class");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return PresentationPresetClassAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationPresetClassAttribute , See {@odf.attribute presentation:preset-class}
	 *
	 * @param presentationPresetClassValue   The type is String
	 */
	public void setPresentationPresetClassAttribute(String presentationPresetClassValue) {
		PresentationPresetClassAttribute attr = new PresentationPresetClassAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationPresetClassValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationPresetIdAttribute , See {@odf.attribute presentation:preset-id}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationPresetIdAttribute() {
		PresentationPresetIdAttribute attr = (PresentationPresetIdAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "preset-id");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationPresetIdAttribute , See {@odf.attribute presentation:preset-id}
	 *
	 * @param presentationPresetIdValue   The type is String
	 */
	public void setPresentationPresetIdAttribute(String presentationPresetIdValue) {
		PresentationPresetIdAttribute attr = new PresentationPresetIdAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationPresetIdValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation PresentationPresetSubTypeAttribute , See {@odf.attribute presentation:preset-sub-type}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getPresentationPresetSubTypeAttribute() {
		PresentationPresetSubTypeAttribute attr = (PresentationPresetSubTypeAttribute) getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "preset-sub-type");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation PresentationPresetSubTypeAttribute , See {@odf.attribute presentation:preset-sub-type}
	 *
	 * @param presentationPresetSubTypeValue   The type is String
	 */
	public void setPresentationPresetSubTypeAttribute(String presentationPresetSubTypeValue) {
		PresentationPresetSubTypeAttribute attr = new PresentationPresetSubTypeAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(presentationPresetSubTypeValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SmilBeginAttribute , See {@odf.attribute smil:begin}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSmilBeginAttribute() {
		SmilBeginAttribute attr = (SmilBeginAttribute) getOdfAttribute(OdfDocumentNamespace.SMIL, "begin");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SmilBeginAttribute , See {@odf.attribute smil:begin}
	 *
	 * @param smilBeginValue   The type is String
	 */
	public void setSmilBeginAttribute(String smilBeginValue) {
		SmilBeginAttribute attr = new SmilBeginAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(smilBeginValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SmilEndAttribute , See {@odf.attribute smil:end}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSmilEndAttribute() {
		SmilEndAttribute attr = (SmilEndAttribute) getOdfAttribute(OdfDocumentNamespace.SMIL, "end");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SmilEndAttribute , See {@odf.attribute smil:end}
	 *
	 * @param smilEndValue   The type is String
	 */
	public void setSmilEndAttribute(String smilEndValue) {
		SmilEndAttribute attr = new SmilEndAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(smilEndValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SmilTargetElementAttribute , See {@odf.attribute smil:targetElement}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSmilTargetElementAttribute() {
		SmilTargetElementAttribute attr = (SmilTargetElementAttribute) getOdfAttribute(OdfDocumentNamespace.SMIL, "targetElement");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SmilTargetElementAttribute , See {@odf.attribute smil:targetElement}
	 *
	 * @param smilTargetElementValue   The type is String
	 */
	public void setSmilTargetElementAttribute(String smilTargetElementValue) {
		SmilTargetElementAttribute attr = new SmilTargetElementAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(smilTargetElementValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation XmlIdAttribute , See {@odf.attribute xml:id}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getXmlIdAttribute() {
		XmlIdAttribute attr = (XmlIdAttribute) getOdfAttribute(OdfDocumentNamespace.XML, "id");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation XmlIdAttribute , See {@odf.attribute xml:id}
	 *
	 * @param xmlIdValue   The type is String
	 */
	public void setXmlIdAttribute(String xmlIdValue) {
		XmlIdAttribute attr = new XmlIdAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(xmlIdValue);
	}

	/**
	 * Create child element {@odf.element anim:param}.
	 *
	 * @param animNameValue  the String value of AnimNameAttribute, see {@odf.attribute  anim:name} at specification
	 * @param animValueValue  the String value of AnimValueAttribute, see {@odf.attribute  anim:value} at specification
	 * @return the element {@odf.element anim:param}
	 */
	 public AnimParamElement newAnimParamElement(String animNameValue, String animValueValue) {
		AnimParamElement animParam = ((OdfFileDom) this.ownerDocument).newOdfElement(AnimParamElement.class);
		animParam.setAnimNameAttribute(animNameValue);
		animParam.setAnimValueAttribute(animValueValue);
		this.appendChild(animParam);
		return animParam;
	}

	@Override
	public void accept(ElementVisitor visitor) {
		if (visitor instanceof DefaultElementVisitor) {
			DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
			defaultVisitor.visit(this);
		} else {
			visitor.visit(this);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy