net.dpml.library
Interface Module

All Superinterfaces:
Dictionary, Resolver, Resource
All Known Implementing Classes:
DefaultModule

public interface Module
extends Resource

The Modele interface defines a node within a module hierachy.

Version:
1.1.0
Author:
Digital Product Meta Library

Field Summary
 
Fields inherited from interface net.dpml.library.Resource
DECIMAL_VERSIONING_KEY
 
Method Summary
 ModuleDirective export()
          Return a directive suitable for publication as an external description.
 Module[] getAllModules()
          Return the array of modules that are descendants of this module.
 Module getModule(String ref)
          Return a module using a supplied reference.
 Module[] getModules()
          Return the array of modules that are direct children of this module.
 Resource getResource(String ref)
          Return a resource using a supplied name.
 Resource[] getResources()
          Return an array of immediate resources contained within the module.
 Resource[] select(String criteria, boolean local, boolean sort)
          Select a set of resource matching a supplied a resource selection constraint.
 
Methods inherited from interface net.dpml.library.Resource
getAggregatedProviders, getArtifact, getBaseDir, getClassifier, getClasspathProviders, getClasspathProviders, getConsumers, getData, getDecimalVersion, getFilters, getInfo, getLayoutPath, getLibrary, getLinkArtifact, getName, getParent, getProviders, getResourcePath, getStatutoryVersion, getType, getTypes, getVersion, isa
 
Methods inherited from interface net.dpml.library.Dictionary
getBooleanProperty, getIntegerProperty, getLocalPropertyNames, getProperty, getProperty, getPropertyNames, resolve
 
Methods inherited from interface net.dpml.util.Resolver
getProperty, getProperty, resolve, toURI
 

Method Detail

getResources

public Resource[] getResources()
Return an array of immediate resources contained within the module.

Returns:
the resource array

getResource

public Resource getResource(String ref)
                     throws ResourceNotFoundException
Return a resource using a supplied name.

Parameters:
ref - a path relative to the module
Returns:
the resource array
Throws:
ResourceNotFoundException - if the ref value is not recognized

getModules

public Module[] getModules()
Return the array of modules that are direct children of this module.

Returns:
the child modules

getAllModules

public Module[] getAllModules()
Return the array of modules that are descendants of this module.

Returns:
the descendants module array

getModule

public Module getModule(String ref)
                 throws ModuleNotFoundException
Return a module using a supplied reference.

Parameters:
ref - a path relative to the module
Returns:
the module array
Throws:
ModuleNotFoundException - if the ref value is not recognized

select

public Resource[] select(String criteria,
                         boolean local,
                         boolean sort)

Select a set of resource matching a supplied a resource selection constraint. The constraint may contain the wildcards '**' and '*'.

Parameters:
local - if true limit the selection to local projects
criteria - the selection criteria
sort - if true the returned array will be sorted relative to dependencies otherwise the array will be sorted alphanumerically with respect to the resource path
Returns:
an array of resources matching the selction criteria

export

public ModuleDirective export()
Return a directive suitable for publication as an external description.

Returns:
the module directive