org.apache.avalon.tools.model
Class Resource

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

public class Resource
extends Object

Defintion of a resource.

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

Constructor Summary
Resource(Home home, Info info)
           
Resource(Home home, String key, Info info, Gump gump, ResourceRef[] resources)
           
 
Method Summary
 boolean equals(Object other)
           
 File getArtifact(org.apache.tools.ant.Project project)
           
 File getArtifact(org.apache.tools.ant.Project project, boolean resolve)
           
 String getFilename()
           
 String getFilename(String type)
           
 Gump getGump()
           
protected  Home getHome()
           
 Info getInfo()
           
 String getKey()
           
static String getKeyForResource(Resource resource)
          Return the gump key for the resource taking into consideration any alias declared under the resource definition.
 org.apache.tools.ant.types.Path getPath(org.apache.tools.ant.Project project, int mode)
          Returns a path of artifact filenames relative to the supplied scope.
 ResourceRef[] getQualifiedRefs(org.apache.tools.ant.Project project, List visited, int category)
           
 ResourceRef[] getResourceRefs()
           
 ResourceRef[] getResourceRefs(org.apache.tools.ant.Project project, int mode, int tag, boolean flag)
           
protected  void getResourceRefs(org.apache.tools.ant.Project project, List list, int mode, int tag, boolean flag)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource(Home home,
                Info info)

Resource

public Resource(Home home,
                String key,
                Info info,
                Gump gump,
                ResourceRef[] resources)
Method Detail

getKeyForResource

public static String getKeyForResource(Resource resource)
Return the gump key for the resource taking into consideration any alias declared under the resource definition.

Parameters:
resource - the resource from which to return the key
Returns:
the resource key

getGump

public Gump getGump()

getKey

public String getKey()

getInfo

public Info getInfo()

getResourceRefs

public ResourceRef[] getResourceRefs()

getHome

protected Home getHome()

getResourceRefs

public ResourceRef[] getResourceRefs(org.apache.tools.ant.Project project,
                                     int mode,
                                     int tag,
                                     boolean flag)

getResourceRefs

protected void getResourceRefs(org.apache.tools.ant.Project project,
                               List list,
                               int mode,
                               int tag,
                               boolean flag)

getPath

public org.apache.tools.ant.types.Path getPath(org.apache.tools.ant.Project project,
                                               int mode)
Returns a path of artifact filenames relative to the supplied scope. The mode may be one of ANY, BUILD, TEST or RUNTIME.


getQualifiedRefs

public ResourceRef[] getQualifiedRefs(org.apache.tools.ant.Project project,
                                      List visited,
                                      int category)

getArtifact

public File getArtifact(org.apache.tools.ant.Project project)

getArtifact

public File getArtifact(org.apache.tools.ant.Project project,
                        boolean resolve)

getFilename

public String getFilename()

getFilename

public String getFilename(String type)

toString

public String toString()

equals

public boolean equals(Object other)