antsnest.datastructure
Class DefaultAntProject

java.lang.Object
  extended by antsnest.datastructure.DefaultAntNode
      extended by antsnest.datastructure.DefaultAntProject
All Implemented Interfaces:
AntNode, AntProject, Serializable

public class DefaultAntProject
extends DefaultAntNode
implements AntProject

Implementation of AntProject

Author:
Chris Clohosy
See Also:
AntProject, Serialized Form

Constructor Summary
DefaultAntProject()
          Constructs a new project
 
Method Summary
 AntNode cloneNode(IDPool idPool)
          Gets a clone of this node
 String getBaseDir()
          Gets the base directory this project is working from
 String getDefault()
          Gets the default target to execute in this project
 AntComment getHigherComment()
          Gets the comment that would be above this project node
 String getName()
          Gets the name of this node
 void removeNode(AntNode node)
          Removes a node from this node
 void setBaseDir(String basedir)
          Sets the base directory this project is working from
 void setDefault(String targetName)
          Sets the default target to execute in this project
 void setHigherComment(AntComment newComment)
          Sets the comment that would be above this project node
 void setName(String name)
          Sets the name of this node
 String toString()
          Provides a string representation of this project
 
Methods inherited from class antsnest.datastructure.DefaultAntNode
addAttribute, addAttribute, addNode, addNode, changeAttribute, equals, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, removeNode, setData, setDescription, setIDPool, setNodeID, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface antsnest.datastructure.AntNode
addAttribute, addAttribute, addNode, addNode, changeAttribute, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, removeNode, setData, setDescription, setIDPool, setNodeID, setParent
 

Constructor Detail

DefaultAntProject

public DefaultAntProject()
Constructs a new project

Method Detail

getName

public String getName()
Gets the name of this node

Specified by:
getName in interface AntNode
Overrides:
getName in class DefaultAntNode
Returns:
a String, the name

setName

public void setName(String name)
Sets the name of this node

Specified by:
setName in interface AntNode
Overrides:
setName in class DefaultAntNode
Parameters:
name - the new name

getDefault

public String getDefault()
Gets the default target to execute in this project

Specified by:
getDefault in interface AntProject
Returns:
a String, the default target name

setDefault

public void setDefault(String targetName)
Sets the default target to execute in this project

Specified by:
setDefault in interface AntProject
Parameters:
targetName - the new default target name

getBaseDir

public String getBaseDir()
Gets the base directory this project is working from

Specified by:
getBaseDir in interface AntProject
Returns:
a String, the base directory

setBaseDir

public void setBaseDir(String basedir)
Sets the base directory this project is working from

Specified by:
setBaseDir in interface AntProject
Parameters:
basedir - the new base directory

toString

public String toString()
Provides a string representation of this project

Overrides:
toString in class Object
Returns:
a String, the string representation

cloneNode

public AntNode cloneNode(IDPool idPool)
Gets a clone of this node

Specified by:
cloneNode in interface AntNode
Specified by:
cloneNode in class DefaultAntNode
Parameters:
idPool - an ID pool to use
Returns:
an AntNode, the cloned node

setHigherComment

public void setHigherComment(AntComment newComment)
Sets the comment that would be above this project node

Specified by:
setHigherComment in interface AntProject
Parameters:
newComment - the new comment

getHigherComment

public AntComment getHigherComment()
Gets the comment that would be above this project node

Specified by:
getHigherComment in interface AntProject
Returns:
an AntComment, the comment

removeNode

public void removeNode(AntNode node)
Removes a node from this node

Specified by:
removeNode in interface AntNode
Overrides:
removeNode in class DefaultAntNode
Parameters:
node - the node to remove