org.apache.maven.project
Class Resource

java.lang.Object
  extended byorg.apache.maven.project.BaseObject
      extended byorg.apache.maven.project.Resource
Direct Known Subclasses:
SourceModification

public class Resource
extends BaseObject

Represents a set of files in a single directory.

Author:
James Taylor, Brett Porter

Field Summary
 
Fields inherited from class org.apache.maven.project.BaseObject
id
 
Constructor Summary
Resource()
           
 
Method Summary
 void addExclude(java.lang.String pattern)
          Add an exclude pattern.
 void addInclude(java.lang.String pattern)
          Add an include pattern.
 java.lang.String getDirectory()
          Get the directory where resources are located.
 java.util.List getExcludes()
          Retrieve a list of exclude patterns.
 boolean getFiltering()
           
 java.util.List getIncludes()
          Retrieve a list of include patterns.
 java.lang.String getTargetPath()
          Get the directory where resources are placed
 void resolveDirectory(java.io.File basedir)
          Resolve directory against a base directory if it is not already absolute.
 void setDirectory(java.lang.String dir)
          Set the directory where resources are located.
 void setFiltering(boolean isFiltering)
           
 void setTargetPath(java.lang.String targetPath)
          Set the target directory where resources are placed.
 java.lang.String toString()
          Return a string suitable for display/debugging
 
Methods inherited from class org.apache.maven.project.BaseObject
addProperty, equals, getId, getName, getProperties, getProperty, hashCode, isValid, resolvedProperties, setId, setName, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

addInclude

public void addInclude(java.lang.String pattern)
Add an include pattern.

Parameters:
pattern - Add an include pattern.

addExclude

public void addExclude(java.lang.String pattern)
Add an exclude pattern.

Parameters:
pattern - Add an exlude pattern.

getIncludes

public java.util.List getIncludes()
Retrieve a list of include patterns.

Returns:
List of include patterns.

getExcludes

public java.util.List getExcludes()
Retrieve a list of exclude patterns.

Returns:
List of exclude patterns.

setDirectory

public void setDirectory(java.lang.String dir)
Set the directory where resources are located.

Parameters:
dir - The directory where resources are located.

getDirectory

public java.lang.String getDirectory()
Get the directory where resources are located.

Returns:
The directory where resources are located.

setTargetPath

public void setTargetPath(java.lang.String targetPath)
Set the target directory where resources are placed.

Parameters:
targetPath - The directory where resources are placed.

getTargetPath

public java.lang.String getTargetPath()
Get the directory where resources are placed

Returns:
The directory where resources are placed.

toString

public java.lang.String toString()
Description copied from class: BaseObject
Return a string suitable for display/debugging

Overrides:
toString in class BaseObject
Returns:
the name attribute as a default

setFiltering

public void setFiltering(boolean isFiltering)
Parameters:
isFiltering - specifies whether filtering is active or not

getFiltering

public boolean getFiltering()
Returns:
whether filtering is on or off

resolveDirectory

public void resolveDirectory(java.io.File basedir)
                      throws java.io.IOException
Resolve directory against a base directory if it is not already absolute.

Parameters:
basedir - the base directory for relative paths
Throws:
java.io.IOException - if canonical path fails


Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.