notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1764 - trunk/main/transit/core/src/main/net/dpml/transit
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1764 - trunk/main/transit/core/src/main/net/dpml/transit
- Date: Sat, 23 Sep 2006 08:45:26 +0200
Author: mcconnell
Date: 2006-09-23 08:45:26 +0200 (Sat, 23 Sep 2006)
New Revision: 1764
Modified:
trunk/main/transit/core/src/main/net/dpml/transit/Artifact.java
Log:
clean-up processing of the composite path construction
Modified: trunk/main/transit/core/src/main/net/dpml/transit/Artifact.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/Artifact.java
2006-09-19 21:44:42 UTC (rev 1763)
+++ trunk/main/transit/core/src/main/net/dpml/transit/Artifact.java
2006-09-23 06:45:26 UTC (rev 1764)
@@ -218,30 +218,33 @@
}
}
- private static String buildComposite( String scheme, String group,
String name, String version, String type )
+ private static String buildComposite(
+ final String scheme, final String group, final String name,
+ final String version, final String type )
{
- if( null == group )
+ StringBuffer buffer = new StringBuffer();
+ buffer.append( scheme );
+ buffer.append( ":" );
+ buffer.append( type );
+ buffer.append( ":" );
+ if( null != group )
{
- if( null == version )
- {
- return scheme + ":" + type + ":" + name;
- }
- else
- {
- return scheme + ":" + type + ":" + name + "#" + version;
- }
+ buffer.append( group );
+ buffer.append( "/" );
}
- else
+ buffer.append( name );
+ //if( null != query )
+ //{
+ // buffer.append( "?" );
+ // buffer.append( query );
+ //}
+ if( null != version )
{
- if( null == version )
- {
- return scheme + ":" + type + ":" + group + "/" + name;
- }
- else
- {
- return scheme + ":" + type + ":" + group + "/" + name + "#"
+ version;
- }
+ buffer.append( "#" );
+ buffer.append( version );
}
+ String spec = buffer.toString();
+ return spec;
}
/**
- r1764 - trunk/main/transit/core/src/main/net/dpml/transit, mcconnell at BerliOS, 09/23/2006
Archive powered by MHonArc 2.6.24.