fr.ove.openmath.jome.ctrl.mml
Class Tag

java.lang.Object
  extended byfr.ove.openmath.jome.ctrl.mml.Tag

public class Tag
extends java.lang.Object

A class for the representation of an tag element (XML element).
By default, the class represents a start empty tag.

Version:
1.0 25/05/2000
Author:
© 2000 DIRAT Laurent

Constructor Summary
Tag()
          The default constructor.
Tag(java.lang.String name)
          The constructor.
Tag(java.lang.String name, boolean isStart, boolean isEmpty)
          The constructor.
 
Method Summary
 void addAttribute(Attribute att)
          Adds an attribute to the element.
 java.lang.String getName()
          Returns the name of the element.
 boolean isEmpty()
          Returns true if the element is an empty one.
 boolean isEndTag(Tag start)
          Returns true if the instance if the end tag of the specified one.
 boolean isStart()
          Returns true if the tag is an start one.
 void setIsEmpty(boolean isEmpty)
          Sets the element as empty.
 void setIsStart(boolean isStart)
          Sets the element as start element.
 void setName(java.lang.String name)
          Sets the name of the element.
 java.lang.String toString()
          Returns the string representation of the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag()
The default constructor.
The default is an empty element, with "name" name and no attributes


Tag

public Tag(java.lang.String name)
The constructor. Constructs an empty element with the specified name.

Parameters:
name - the name of the element

Tag

public Tag(java.lang.String name,
           boolean isStart,
           boolean isEmpty)
The constructor.

Parameters:
name - the name of the element
isStart - true if the tag is an start one. false otherwise.
isEmpty - true if the element is an empty one. false otherwise.
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the element.

Parameters:
name - the name of the element.

getName

public java.lang.String getName()
Returns the name of the element.


addAttribute

public void addAttribute(Attribute att)
Adds an attribute to the element.

Parameters:
att - the attribute to add.

isEmpty

public boolean isEmpty()
Returns true if the element is an empty one. false otherwise.


setIsEmpty

public void setIsEmpty(boolean isEmpty)
Sets the element as empty.

Parameters:
isEmpty - true if the element is an empty one. false otherwise.

isStart

public boolean isStart()
Returns true if the tag is an start one. false otherwise.


setIsStart

public void setIsStart(boolean isStart)
Sets the element as start element.

Parameters:
isStart - true if the element is an start one. false otherwise.

isEndTag

public boolean isEndTag(Tag start)
Returns true if the instance if the end tag of the specified one. false otherwise.


toString

public java.lang.String toString()
Returns the string representation of the element.



Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.