View Javadoc

1   /*
2    * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  /* $Id: Maligngroup.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */
18  
19  package net.sourceforge.jeuclid.elements.presentation.table;
20  
21  import net.sourceforge.jeuclid.elements.AbstractInvisibleJEuclidElement;
22  
23  import org.apache.batik.dom.AbstractDocument;
24  import org.w3c.dom.Node;
25  import org.w3c.dom.mathml.MathMLAlignGroupElement;
26  
27  /**
28   * This class represents the maligngroup tag.
29   * 
30   * @version $Revision: bc1d5fde7b73 $
31   */
32  
33  public final class Maligngroup extends AbstractInvisibleJEuclidElement
34          implements MathMLAlignGroupElement {
35  
36      /**
37       * The XML element from this class.
38       */
39      public static final String ELEMENT = "maligngroup";
40  
41      /** The groupalign attribute. */
42      public static final String ATTR_GROUPALIGN = "groupalign";
43  
44      private static final long serialVersionUID = 1L;
45  
46      /**
47       * Default constructor. Sets MathML Namespace.
48       * 
49       * @param qname
50       *            Qualified name.
51       * @param odoc
52       *            Owner Document.
53       */
54      public Maligngroup(final String qname, final AbstractDocument odoc) {
55          super(qname, odoc);
56      }
57  
58      /** {@inheritDoc} */
59      @Override
60      protected Node newNode() {
61          return new Maligngroup(this.nodeName, this.ownerDocument);
62      }
63  
64      /** {@inheritDoc} */
65      public String getGroupalign() {
66          return this.getMathAttribute(Maligngroup.ATTR_GROUPALIGN);
67      }
68  
69      /** {@inheritDoc} */
70      public void setGroupalign(final String groupalign) {
71          this.setAttribute(Maligngroup.ATTR_GROUPALIGN, groupalign);
72      }
73  }