org.bibalex.daf.entities.phase
Class PhaseDef

java.lang.Object
  extended by org.bibalex.daf.entities.phase.PhaseDef

public class PhaseDef
extends java.lang.Object

Represents the complete phase definition with its pre-phase and post-phase specifications.

Author:
Shehab.Kamal

Field Summary
 SemiPhaseDef[] definition
          An array of 2 elements of type SemiPhaseDef.
 java.lang.String name
          The 'Name' property of the element.
 
Constructor Summary
PhaseDef(org.w3c.dom.Node node)
          Creates a new instance of PhaseDef.
PhaseDef(java.lang.String nodeRep)
          Creates a new instance of PhaseDef.
 
Method Summary
private  void createElementFromNode(org.w3c.dom.Node node)
          Creates the PhaseDef element by supplying its XmlNode represenation.
 java.lang.String toString()
          Returns the string representation of this object.
 java.lang.String toXmlString()
          Returns a String representing the PhaseDef in xml format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The 'Name' property of the element.


definition

public SemiPhaseDef[] definition
An array of 2 elements of type SemiPhaseDef. The first element defines the PrePhase and the second defines the PostPhase. Array elements might be null.

Constructor Detail

PhaseDef

public PhaseDef(org.w3c.dom.Node node)
         throws PhaseDefinitionException
Creates a new instance of PhaseDef.

Parameters:
node - The Xml node that representd the element.
Throws:
PhaseDefinitionException - If the given node couldn't be parsed.

PhaseDef

public PhaseDef(java.lang.String nodeRep)
         throws PhaseDefinitionException
Creates a new instance of PhaseDef.

Parameters:
nodeRep - The Xml String representing this element.
Throws:
PhaseDefinitionException - If the given String couldn't be parsed.
Method Detail

createElementFromNode

private void createElementFromNode(org.w3c.dom.Node node)
                            throws PhaseDefinitionException
Creates the PhaseDef element by supplying its XmlNode represenation.

Parameters:
node - The Xml Node representing this element.
Throws:
PhaseDefinitionException - If the node name is not 'Phase' or children couldn't be created.

toString

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

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this object.

toXmlString

public java.lang.String toXmlString()
Returns a String representing the PhaseDef in xml format.

Returns:
A String representing the PhaseDef in xml format.