blob: 5a57ebb64d177d4cb9ffa5ee8b56e800bc6c210b [file] [log] [blame]
/************************************************************************
*
* 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.draw;
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.element.dr3d.Dr3dSceneElement;
import org.odftoolkit.odfdom.dom.attribute.office.OfficeNameAttribute;
import org.odftoolkit.odfdom.dom.attribute.office.OfficeServerMapAttribute;
import org.odftoolkit.odfdom.dom.attribute.office.OfficeTargetFrameNameAttribute;
import org.odftoolkit.odfdom.dom.attribute.office.OfficeTitleAttribute;
import org.odftoolkit.odfdom.dom.attribute.xlink.XlinkActuateAttribute;
import org.odftoolkit.odfdom.dom.attribute.xlink.XlinkHrefAttribute;
import org.odftoolkit.odfdom.dom.attribute.xlink.XlinkShowAttribute;
import org.odftoolkit.odfdom.dom.attribute.xlink.XlinkTypeAttribute;
import org.odftoolkit.odfdom.dom.attribute.xml.XmlIdAttribute;
/**
* DOM implementation of OpenDocument element {@odf.element draw:a}.
*
*/
public class DrawAElement extends OdfElement {
public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.DRAW, "a");
/**
* Create the instance of <code>DrawAElement</code>
*
* @param ownerDoc The type is <code>OdfFileDom</code>
*/
public DrawAElement(OdfFileDom ownerDoc) {
super(ownerDoc, ELEMENT_NAME);
}
/**
* Get the element name
*
* @return return <code>OdfName</code> the name of element {@odf.element draw:a}.
*/
public OdfName getOdfName() {
return ELEMENT_NAME;
}
/**
* Receives the value of the ODFDOM attribute representation <code>OfficeNameAttribute</code> , See {@odf.attribute office: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 getOfficeNameAttribute() {
OfficeNameAttribute attr = (OfficeNameAttribute) getOdfAttribute(OdfDocumentNamespace.OFFICE, "name");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>OfficeNameAttribute</code> , See {@odf.attribute office:name}
*
* @param officeNameValue The type is <code>String</code>
*/
public void setOfficeNameAttribute(String officeNameValue) {
OfficeNameAttribute attr = new OfficeNameAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(officeNameValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>OfficeServerMapAttribute</code> , See {@odf.attribute office:server-map}
*
* @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public Boolean getOfficeServerMapAttribute() {
OfficeServerMapAttribute attr = (OfficeServerMapAttribute) getOdfAttribute(OdfDocumentNamespace.OFFICE, "server-map");
if (attr != null) {
return Boolean.valueOf(attr.booleanValue());
}
return Boolean.valueOf(OfficeServerMapAttribute.DEFAULT_VALUE);
}
/**
* Sets the value of ODFDOM attribute representation <code>OfficeServerMapAttribute</code> , See {@odf.attribute office:server-map}
*
* @param officeServerMapValue The type is <code>Boolean</code>
*/
public void setOfficeServerMapAttribute(Boolean officeServerMapValue) {
OfficeServerMapAttribute attr = new OfficeServerMapAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setBooleanValue(officeServerMapValue.booleanValue());
}
/**
* Receives the value of the ODFDOM attribute representation <code>OfficeTargetFrameNameAttribute</code> , See {@odf.attribute office:target-frame-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 getOfficeTargetFrameNameAttribute() {
OfficeTargetFrameNameAttribute attr = (OfficeTargetFrameNameAttribute) getOdfAttribute(OdfDocumentNamespace.OFFICE, "target-frame-name");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>OfficeTargetFrameNameAttribute</code> , See {@odf.attribute office:target-frame-name}
*
* @param officeTargetFrameNameValue The type is <code>String</code>
*/
public void setOfficeTargetFrameNameAttribute(String officeTargetFrameNameValue) {
OfficeTargetFrameNameAttribute attr = new OfficeTargetFrameNameAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(officeTargetFrameNameValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>OfficeTitleAttribute</code> , See {@odf.attribute office:title}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getOfficeTitleAttribute() {
OfficeTitleAttribute attr = (OfficeTitleAttribute) getOdfAttribute(OdfDocumentNamespace.OFFICE, "title");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>OfficeTitleAttribute</code> , See {@odf.attribute office:title}
*
* @param officeTitleValue The type is <code>String</code>
*/
public void setOfficeTitleAttribute(String officeTitleValue) {
OfficeTitleAttribute attr = new OfficeTitleAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(officeTitleValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>XlinkActuateAttribute</code> , See {@odf.attribute xlink:actuate}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getXlinkActuateAttribute() {
XlinkActuateAttribute attr = (XlinkActuateAttribute) getOdfAttribute(OdfDocumentNamespace.XLINK, "actuate");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return XlinkActuateAttribute.DEFAULT_VALUE_ONREQUEST;
}
/**
* Sets the value of ODFDOM attribute representation <code>XlinkActuateAttribute</code> , See {@odf.attribute xlink:actuate}
*
* @param xlinkActuateValue The type is <code>String</code>
*/
public void setXlinkActuateAttribute(String xlinkActuateValue) {
XlinkActuateAttribute attr = new XlinkActuateAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(xlinkActuateValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>XlinkHrefAttribute</code> , See {@odf.attribute xlink:href}
*
* Attribute is mandatory.
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getXlinkHrefAttribute() {
XlinkHrefAttribute attr = (XlinkHrefAttribute) getOdfAttribute(OdfDocumentNamespace.XLINK, "href");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>XlinkHrefAttribute</code> , See {@odf.attribute xlink:href}
*
* @param xlinkHrefValue The type is <code>String</code>
*/
public void setXlinkHrefAttribute(String xlinkHrefValue) {
XlinkHrefAttribute attr = new XlinkHrefAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(xlinkHrefValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>XlinkShowAttribute</code> , See {@odf.attribute xlink:show}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getXlinkShowAttribute() {
XlinkShowAttribute attr = (XlinkShowAttribute) getOdfAttribute(OdfDocumentNamespace.XLINK, "show");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>XlinkShowAttribute</code> , See {@odf.attribute xlink:show}
*
* @param xlinkShowValue The type is <code>String</code>
*/
public void setXlinkShowAttribute(String xlinkShowValue) {
XlinkShowAttribute attr = new XlinkShowAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(xlinkShowValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>XlinkTypeAttribute</code> , See {@odf.attribute xlink:type}
*
* Attribute is mandatory.
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getXlinkTypeAttribute() {
XlinkTypeAttribute attr = (XlinkTypeAttribute) getOdfAttribute(OdfDocumentNamespace.XLINK, "type");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return XlinkTypeAttribute.DEFAULT_VALUE;
}
/**
* Sets the value of ODFDOM attribute representation <code>XlinkTypeAttribute</code> , See {@odf.attribute xlink:type}
*
* @param xlinkTypeValue The type is <code>String</code>
*/
public void setXlinkTypeAttribute(String xlinkTypeValue) {
XlinkTypeAttribute attr = new XlinkTypeAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(xlinkTypeValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>XmlIdAttribute</code> , See {@odf.attribute xml: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 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 <code>XmlIdAttribute</code> , See {@odf.attribute xml:id}
*
* @param xmlIdValue The type is <code>String</code>
*/
public void setXmlIdAttribute(String xmlIdValue) {
XmlIdAttribute attr = new XmlIdAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(xmlIdValue);
}
/**
* Create child element {@odf.element dr3d:scene}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element dr3d:scene}
*/
public Dr3dSceneElement newDr3dSceneElement() {
Dr3dSceneElement dr3dScene = ((OdfFileDom) this.ownerDocument).newOdfElement(Dr3dSceneElement.class);
this.appendChild(dr3dScene);
return dr3dScene;
}
/**
* Create child element {@odf.element draw:caption}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:caption}
*/
public DrawCaptionElement newDrawCaptionElement() {
DrawCaptionElement drawCaption = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCaptionElement.class);
this.appendChild(drawCaption);
return drawCaption;
}
/**
* Create child element {@odf.element draw:circle}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:circle}
*/
public DrawCircleElement newDrawCircleElement() {
DrawCircleElement drawCircle = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCircleElement.class);
this.appendChild(drawCircle);
return drawCircle;
}
/**
* Create child element {@odf.element draw:connector}.
*
* @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute svg:viewBox} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:connector}
*/
public DrawConnectorElement newDrawConnectorElement(int svgViewBoxValue) {
DrawConnectorElement drawConnector = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawConnectorElement.class);
drawConnector.setSvgViewBoxAttribute(svgViewBoxValue);
this.appendChild(drawConnector);
return drawConnector;
}
/**
* Create child element {@odf.element draw:control}.
*
* @param drawControlValue the <code>String</code> value of <code>DrawControlAttribute</code>, see {@odf.attribute draw:control} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:control}
*/
public DrawControlElement newDrawControlElement(String drawControlValue) {
DrawControlElement drawControl = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawControlElement.class);
drawControl.setDrawControlAttribute(drawControlValue);
this.appendChild(drawControl);
return drawControl;
}
/**
* Create child element {@odf.element draw:custom-shape}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:custom-shape}
*/
public DrawCustomShapeElement newDrawCustomShapeElement() {
DrawCustomShapeElement drawCustomShape = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCustomShapeElement.class);
this.appendChild(drawCustomShape);
return drawCustomShape;
}
/**
* Create child element {@odf.element draw:ellipse}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:ellipse}
*/
public DrawEllipseElement newDrawEllipseElement() {
DrawEllipseElement drawEllipse = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawEllipseElement.class);
this.appendChild(drawEllipse);
return drawEllipse;
}
/**
* Create child element {@odf.element draw:frame}.
*
* @return the element {@odf.element draw:frame}
*/
public DrawFrameElement newDrawFrameElement() {
DrawFrameElement drawFrame = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawFrameElement.class);
this.appendChild(drawFrame);
return drawFrame;
}
/**
* Create child element {@odf.element draw:g}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:g}
*/
public DrawGElement newDrawGElement() {
DrawGElement drawG = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawGElement.class);
this.appendChild(drawG);
return drawG;
}
/**
* Create child element {@odf.element draw:line}.
*
* @param svgX1Value the <code>String</code> value of <code>SvgX1Attribute</code>, see {@odf.attribute svg:x1} at specification
* @param svgX2Value the <code>String</code> value of <code>SvgX2Attribute</code>, see {@odf.attribute svg:x2} at specification
* @param svgY1Value the <code>String</code> value of <code>SvgY1Attribute</code>, see {@odf.attribute svg:y1} at specification
* @param svgY2Value the <code>String</code> value of <code>SvgY2Attribute</code>, see {@odf.attribute svg:y2} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:line}
*/
public DrawLineElement newDrawLineElement(String svgX1Value, String svgX2Value, String svgY1Value, String svgY2Value) {
DrawLineElement drawLine = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawLineElement.class);
drawLine.setSvgX1Attribute(svgX1Value);
drawLine.setSvgX2Attribute(svgX2Value);
drawLine.setSvgY1Attribute(svgY1Value);
drawLine.setSvgY2Attribute(svgY2Value);
this.appendChild(drawLine);
return drawLine;
}
/**
* Create child element {@odf.element draw:measure}.
*
* @param svgX1Value the <code>String</code> value of <code>SvgX1Attribute</code>, see {@odf.attribute svg:x1} at specification
* @param svgX2Value the <code>String</code> value of <code>SvgX2Attribute</code>, see {@odf.attribute svg:x2} at specification
* @param svgY1Value the <code>String</code> value of <code>SvgY1Attribute</code>, see {@odf.attribute svg:y1} at specification
* @param svgY2Value the <code>String</code> value of <code>SvgY2Attribute</code>, see {@odf.attribute svg:y2} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:measure}
*/
public DrawMeasureElement newDrawMeasureElement(String svgX1Value, String svgX2Value, String svgY1Value, String svgY2Value) {
DrawMeasureElement drawMeasure = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawMeasureElement.class);
drawMeasure.setSvgX1Attribute(svgX1Value);
drawMeasure.setSvgX2Attribute(svgX2Value);
drawMeasure.setSvgY1Attribute(svgY1Value);
drawMeasure.setSvgY2Attribute(svgY2Value);
this.appendChild(drawMeasure);
return drawMeasure;
}
/**
* Create child element {@odf.element draw:page-thumbnail}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:page-thumbnail}
*/
public DrawPageThumbnailElement newDrawPageThumbnailElement() {
DrawPageThumbnailElement drawPageThumbnail = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPageThumbnailElement.class);
this.appendChild(drawPageThumbnail);
return drawPageThumbnail;
}
/**
* Create child element {@odf.element draw:path}.
*
* @param svgDValue the <code>String</code> value of <code>SvgDAttribute</code>, see {@odf.attribute svg:d} at specification
* @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute svg:viewBox} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:path}
*/
public DrawPathElement newDrawPathElement(String svgDValue, int svgViewBoxValue) {
DrawPathElement drawPath = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPathElement.class);
drawPath.setSvgDAttribute(svgDValue);
drawPath.setSvgViewBoxAttribute(svgViewBoxValue);
this.appendChild(drawPath);
return drawPath;
}
/**
* Create child element {@odf.element draw:polygon}.
*
* @param drawPointsValue the <code>String</code> value of <code>DrawPointsAttribute</code>, see {@odf.attribute draw:points} at specification
* @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute svg:viewBox} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:polygon}
*/
public DrawPolygonElement newDrawPolygonElement(String drawPointsValue, int svgViewBoxValue) {
DrawPolygonElement drawPolygon = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolygonElement.class);
drawPolygon.setDrawPointsAttribute(drawPointsValue);
drawPolygon.setSvgViewBoxAttribute(svgViewBoxValue);
this.appendChild(drawPolygon);
return drawPolygon;
}
/**
* Create child element {@odf.element draw:polyline}.
*
* @param drawPointsValue the <code>String</code> value of <code>DrawPointsAttribute</code>, see {@odf.attribute draw:points} at specification
* @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute svg:viewBox} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:polyline}
*/
public DrawPolylineElement newDrawPolylineElement(String drawPointsValue, int svgViewBoxValue) {
DrawPolylineElement drawPolyline = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolylineElement.class);
drawPolyline.setDrawPointsAttribute(drawPointsValue);
drawPolyline.setSvgViewBoxAttribute(svgViewBoxValue);
this.appendChild(drawPolyline);
return drawPolyline;
}
/**
* Create child element {@odf.element draw:rect}.
*
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:rect}
*/
public DrawRectElement newDrawRectElement() {
DrawRectElement drawRect = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawRectElement.class);
this.appendChild(drawRect);
return drawRect;
}
/**
* Create child element {@odf.element draw:regular-polygon}.
*
* @param drawConcaveValue the <code>Boolean</code> value of <code>DrawConcaveAttribute</code>, see {@odf.attribute draw:concave} at specification
* @param drawCornersValue the <code>Integer</code> value of <code>DrawCornersAttribute</code>, see {@odf.attribute draw:corners} at specification
* Child element is new in Odf 1.2
*
* @return the element {@odf.element draw:regular-polygon}
*/
public DrawRegularPolygonElement newDrawRegularPolygonElement(boolean drawConcaveValue, int drawCornersValue) {
DrawRegularPolygonElement drawRegularPolygon = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawRegularPolygonElement.class);
drawRegularPolygon.setDrawConcaveAttribute(drawConcaveValue);
drawRegularPolygon.setDrawCornersAttribute(drawCornersValue);
this.appendChild(drawRegularPolygon);
return drawRegularPolygon;
}
@Override
public void accept(ElementVisitor visitor) {
if (visitor instanceof DefaultElementVisitor) {
DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
defaultVisitor.visit(this);
} else {
visitor.visit(this);
}
}
}