org.apache.avalon.tools.model
Class Definition

java.lang.Object
  extended byorg.apache.avalon.tools.model.Resource
      extended byorg.apache.avalon.tools.model.Definition
Direct Known Subclasses:
Plugin

public class Definition
extends Resource

A definition is an immutable description of a project including its name, group, version, structrual dependencies, plugin dependecies, and gump idiosyncrasies.

Version:
$Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
Author:
Avalon Development Team

Constructor Summary
Definition(Home home, String key, File basedir, String path, Info info, Gump gump, ResourceRef[] resources, ResourceRef[] plugins)
          Creation of a new definition relative to a supplied home, a unique project key, project base directory and path, statatory info, gump extras, depednecies and plugin assumptions.
 
Method Summary
 boolean equals(Object other)
          Return TRUE is this defintionj is equal to a supplied defintion
 File getBaseDir()
          Return the base directory as an absolute file
 String getBasePath()
          Return the base directory relative to main index file that this defintion is established within.
 File getDocDirectory()
          Return the filename of the documentation directory relative to the common magic dumumentation cache for this project.
 ResourceRef[] getPluginRefs()
          Return the set of plugin references that this defintion declares
 String toString()
          Return the string representation of this defintion.
 
Methods inherited from class org.apache.avalon.tools.model.Resource
getArtifact, getArtifact, getFilename, getFilename, getGump, getHome, getInfo, getKey, getKeyForResource, getPath, getQualifiedRefs, getResourceRefs, getResourceRefs, getResourceRefs
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Definition

public Definition(Home home,
                  String key,
                  File basedir,
                  String path,
                  Info info,
                  Gump gump,
                  ResourceRef[] resources,
                  ResourceRef[] plugins)
Creation of a new definition relative to a supplied home, a unique project key, project base directory and path, statatory info, gump extras, depednecies and plugin assumptions.

Parameters:
home - the home into whjich this project is bound
key - a key unique with the home that identifies this project
basedir - the base directory relative to the index file that this project is defined
path - the basedir as a relative path
info - a descriptor of the name, grolup, version and delivery status
gump - addition gump idiosyncracies
resources - the set of resource dependencies
plugins - the set of plugin dependencies
Method Detail

getBasePath

public String getBasePath()
Return the base directory relative to main index file that this defintion is established within.

Returns:
the relative base directory path

getBaseDir

public File getBaseDir()
Return the base directory as an absolute file

Returns:
the relative base directory

getPluginRefs

public ResourceRef[] getPluginRefs()
Return the set of plugin references that this defintion declares

Returns:
the set of plugin references referencing plugins needed as part of the project build

getDocDirectory

public File getDocDirectory()
Return the filename of the documentation directory relative to the common magic dumumentation cache for this project.

Returns:
the projects doc destination directory

toString

public String toString()
Return the string representation of this defintion.

Overrides:
toString in class Resource
Returns:
the string representation

equals

public boolean equals(Object other)
Return TRUE is this defintionj is equal to a supplied defintion

Overrides:
equals in class Resource
Returns:
the equality status