notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1344 - trunk/main/depot/library/src/main/net/dpml/library/info
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1344 - trunk/main/depot/library/src/main/net/dpml/library/info
- Date: Sat, 8 Apr 2006 20:12:42 +0200
Author: mcconnell
Date: 2006-04-08 20:12:41 +0200 (Sat, 08 Apr 2006)
New Revision: 1344
Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
Log:
housekeeping
Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
2006-04-08 18:07:00 UTC (rev 1343)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
2006-04-08 18:12:41 UTC (rev 1344)
@@ -73,17 +73,17 @@
* @param resource the enclosing resource
* @return the resolved value
*/
- public String getValue( Resource enclosing ) throws
ResourceNotFoundException
+ public String getValue( Resource resource ) throws
ResourceNotFoundException
{
- Resource resource = getReferenceResource( enclosing );
+ Resource r = getReferenceResource( resource );
- if( null != m_type && !resource.isa( m_type ) )
+ if( null != m_type && !r.isa( m_type ) )
{
final String error =
"The feature request for the type ["
+ m_type
+ "] from the resource ["
- + resource
+ + r
+ "] cannot be fullfilled because the resource does not
declare "
+ "production of the requested type.";
throw new FeatureRuntimeException( error );
@@ -91,15 +91,15 @@
if( m_feature.equals( Feature.NAME ) )
{
- return resource.getName();
+ return r.getName();
}
else if( m_feature.equals( Feature.GROUP ) )
{
- return resource.getParent().getResourcePath();
+ return r.getParent().getResourcePath();
}
else if( m_feature.equals( Feature.VERSION ) )
{
- String version = resource.getVersion();
+ String version = r.getVersion();
if( null == version )
{
return "";
@@ -121,10 +121,10 @@
{
if( m_alias )
{
- Type type = resource.getType( m_type );
+ Type type = r.getType( m_type );
if( type.getAlias() )
{
- Artifact artifact = resource.getArtifact( m_type );
+ Artifact artifact = r.getArtifact( m_type );
String group = artifact.getGroup();
String name = artifact.getName();
return "link:" + m_type + ":" + group + "/" + name;
@@ -133,7 +133,7 @@
{
final String error =
"Cannot resolve link from resource ["
- + resource
+ + r
+ "] because the resource does not declare
production of an alias for the type ["
+ type.getID()
+ "].";
@@ -142,15 +142,15 @@
}
else
{
- Artifact artifact = resource.getArtifact( m_type );
+ Artifact artifact = r.getArtifact( m_type );
return artifact.toURI().toASCIIString();
}
}
}
else if( m_feature.equals( Feature.SPEC ) )
{
- String path = resource.getResourcePath();
- String version = resource.getVersion();
+ String path = r.getResourcePath();
+ String version = r.getVersion();
if( null == version )
{
return path;
@@ -170,7 +170,7 @@
}
else
{
- Artifact artifact = resource.getArtifact( m_type );
+ Artifact artifact = r.getArtifact( m_type );
try
{
File cached =
@@ -193,7 +193,7 @@
"Type attribute must be supplied in conjuction with the
filename attribute.";
throw new IllegalArgumentException( error );
}
- return resource.getLayoutPath( m_type );
+ return r.getLayoutPath( m_type );
}
else
{
Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
2006-04-08 18:07:00 UTC (rev 1343)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
2006-04-08 18:12:41 UTC (rev 1344)
@@ -59,7 +59,7 @@
* @param resource the enclosing resource
* @return the resolved value
*/
- public abstract String getValue( Resource enclosing ) throws
ResourceNotFoundException;
+ public abstract String getValue( Resource resource ) throws
ResourceNotFoundException;
/**
* Compare this object with another for equality.
- r1344 - trunk/main/depot/library/src/main/net/dpml/library/info, mcconnell at BerliOS, 04/08/2006
Archive powered by MHonArc 2.6.24.