|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.dpml.library.impl.DefaultDictionary net.dpml.library.impl.DefaultResource
public class DefaultResource
Implementation of a resource.
Field Summary | |
---|---|
static String |
ANONYMOUS
Constant ANONYMOUS version symbol. |
static String |
BOOTSTRAP
Constant BOOTSTRAP symbol. |
static String |
RELEASE
Constant RELEASE symbol. |
static String |
SNAPSHOT
Constant SNAPSHOT symbol. |
static String |
TIMESTAMP
Timestamp. |
Fields inherited from interface net.dpml.library.Resource |
---|
DECIMAL_VERSIONING_KEY |
Method Summary | |
---|---|
int |
compareTo(Object other)
Compare this object with another. |
Resource[] |
getAggregatedProviders(Scope scope,
boolean expand,
boolean sort)
Return an array of resource that are providers to this resource. |
Artifact |
getArtifact(String id)
Construct an artifact for the supplied type. |
File |
getBaseDir()
Return the basedir for this resource. |
ResourceDirective.Classifier |
getClassifier()
Return the resource classifier. |
Resource[] |
getClasspathProviders(Category category)
Return an array of runtime providers filtered relative to a supplied classloading category. |
Resource[] |
getClasspathProviders(Scope scope)
Return a sorted and filtered array of providers. |
Resource[] |
getConsumers(boolean expand,
boolean sort)
Return an array of resources that are consumers of this resource. |
Data[] |
getData()
Return a data directives. |
Version |
getDecimalVersion()
Return the decimal version. |
Filter[] |
getFilters()
Return an array of filters associated with the resource. |
Info |
getInfo()
Return the info block. |
String |
getLayoutPath(String id)
Return a filename using the layout strategy employed by the cache. |
Library |
getLibrary()
Return the singleton library. |
Artifact |
getLinkArtifact(String id)
Construct an link artifact for the supplied type. |
String |
getName()
Return the name of the resource. |
Module |
getParent()
Return the enclosing parent module. |
Resource[] |
getProviders(Scope scope,
boolean expand,
boolean sort)
Return an array of resource that are providers to this resource. |
ResourceDirective |
getResourceDirective()
Return the underlying resource defintion. |
String |
getResourcePath()
Return the fully qualified path to the resource. |
String |
getStatutoryVersion()
Return the declard resource version. |
static String |
getTimestamp()
Return the UTC YYMMDD.HHMMSSS signature of a date. |
static String |
getTimestamp(Date date)
Return the UTC YYMMDD.HHMMSSS signature of a date. |
Type |
getType(String id)
Return a resource type relative to a supplied type id. |
Type[] |
getTypes()
Return the expanded array of types associated with the resource. |
String |
getVersion()
Return the resource version. |
boolean |
isa(String type)
Test if this resource is associated with a type of the supplied name. |
String |
toString()
Return a string representation of the resource in the form 'resource:[path]'. |
URI |
toURI(String ref)
Utility function supporting resolution of uris containing 'resource' or 'alias' schemes. |
Methods inherited from class net.dpml.library.impl.DefaultDictionary |
---|
getBooleanProperty, getIntegerProperty, getLocalPropertyNames, getProperty, getProperty, getPropertyNames, resolve |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Field Detail |
---|
public static final String TIMESTAMP
public static final String SNAPSHOT
public static final String BOOTSTRAP
public static final String RELEASE
public static final String ANONYMOUS
Method Detail |
---|
public Data[] getData()
getData
in interface Resource
public Library getLibrary()
getLibrary
in interface Resource
public String getName()
getName
in interface Resource
public String getVersion()
getVersion
in interface Resource
public String getStatutoryVersion()
getStatutoryVersion
in interface Resource
public Version getDecimalVersion()
getDecimalVersion
in interface Resource
public String getResourcePath()
getResourcePath
in interface Resource
public File getBaseDir()
getBaseDir
in interface Resource
public ResourceDirective.Classifier getClassifier()
getClassifier
in interface Resource
public Info getInfo()
getInfo
in interface Resource
public Type[] getTypes()
getTypes
in interface Resource
public boolean isa(String type)
isa
in interface Resource
type
- the type id
public Type getType(String id) throws IllegalArgumentException
getType
in interface Resource
id
- the type name to retrieve
IllegalArgumentException
- if the id value does not match
a type produced by the resource.public Artifact getLinkArtifact(String id)
getLinkArtifact
in interface Resource
id
- the resource type id
public Artifact getArtifact(String id)
getArtifact
in interface Resource
id
- the resource type identifier
public Module getParent()
getParent
in interface Resource
public Filter[] getFilters()
getFilters
in interface Resource
public URI toURI(String ref) throws URISyntaxException
toURI
in interface Resolver
ref
- the uri argument
URISyntaxException
- if an error occurs during uri creationpublic Resource[] getProviders(Scope scope, boolean expand, boolean sort)
getProviders
in interface Resource
scope
- the operational scopeexpand
- if true include transitive dependenciessort
- if true the array will sorted relative to dependencies
public Resource[] getAggregatedProviders(Scope scope, boolean expand, boolean sort)
getAggregatedProviders
in interface Resource
scope
- the scope of aggregation to be applied to the selectionexpand
- if TRUE include transitive dependenciessort
- if true the array will sorted relative to dependencies
public Resource[] getClasspathProviders(Scope scope)
getClasspathProviders
in interface Resource
scope
- the aggregation scope
public Resource[] getClasspathProviders(Category category)
getClasspathProviders
in interface Resource
category
- the classloader category
public Resource[] getConsumers(boolean expand, boolean sort)
getConsumers
in interface Resource
expand
- if true the returned array includes consumers associated
through transitive dependency relationships, otherwise the array is
limited to direct consumerssort
- if true the array is sorted relative to depenency relationships
public ResourceDirective getResourceDirective()
public String getLayoutPath(String id)
getLayoutPath
in interface Resource
id
- the artifact type
public String toString()
toString
in class Object
public int compareTo(Object other)
compareTo
in interface Comparable
other
- the other object
public static String getTimestamp()
public static String getTimestamp(Date date)
date
- the date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |