notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1469 - trunk/main/transit/core/src/main/net/dpml/lang
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1469 - trunk/main/transit/core/src/main/net/dpml/lang
- Date: Mon, 29 May 2006 14:52:33 +0200
Author: mcconnell
Date: 2006-05-29 14:52:31 +0200 (Mon, 29 May 2006)
New Revision: 1469
Modified:
trunk/main/transit/core/src/main/net/dpml/lang/PartDecoder.java
Log:
add support for the dereferencing of link uris when established cached
classloader keys
Modified: trunk/main/transit/core/src/main/net/dpml/lang/PartDecoder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/PartDecoder.java
2006-05-29 08:43:46 UTC (rev 1468)
+++ trunk/main/transit/core/src/main/net/dpml/lang/PartDecoder.java
2006-05-29 12:52:31 UTC (rev 1469)
@@ -24,6 +24,8 @@
import java.util.Hashtable;
import java.lang.ref.WeakReference;
+import net.dpml.transit.link.ArtifactLinkManager;
+
import net.dpml.util.Logger;
import net.dpml.util.DefaultLogger;
import net.dpml.util.ElementHelper;
@@ -42,7 +44,7 @@
public final class PartDecoder implements Decoder
{
/**
- * Part ZSD uri.
+ * Part XSD uri.
*/
public static final String PART_XSD_URI = "@PART-XSD-URI@";
@@ -128,13 +130,26 @@
}
}
- private String buildKey( URI uri )
+ private String buildKey( URI uri ) throws IOException
{
ClassLoader classloader = getAnchorClassLoader();
int n = System.identityHashCode( classloader );
- return "" + n + "#" + uri.toASCIIString();
+ return "" + n + "#" + getRealURI( uri ).toASCIIString();
}
+ private URI getRealURI( URI uri ) throws IOException
+ {
+ if( "link".equals( uri.getScheme() ) )
+ {
+ ArtifactLinkManager manager = new ArtifactLinkManager();
+ return manager.getTargetURI( uri );
+ }
+ else
+ {
+ return uri;
+ }
+ }
+
/**
* Resolve a object from a DOM element.
* @param element the dom element
- r1469 - trunk/main/transit/core/src/main/net/dpml/lang, mcconnell at BerliOS, 05/29/2006
Archive powered by MHonArc 2.6.24.