You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2007/08/30 02:22:39 UTC
svn commit: r570998 -
/forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java
Author: rgardler
Date: Wed Aug 29 17:22:39 2007
New Revision: 570998
URL: http://svn.apache.org/viewvc?rev=570998&view=rev
Log:
Javadoc and logging info
Modified:
forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java
Modified: forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java?rev=570998&r1=570997&r2=570998&view=diff
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java (original)
+++ forrest/trunk/whiteboard/forrest2/core/src/main/org/apache/forrest/core/locationMap/AbstractSourceNode.java Wed Aug 29 17:22:39 2007
@@ -48,12 +48,12 @@
private URI sourceURI;
/**
- * Construct a new LocationNode from an XML node.
- *
- * @param element
- * @throws URISyntaxException
- * @throws IOException
- */
+ * Construct a new LocationNode from an XML node.
+ *
+ * @param element
+ * @throws URISyntaxException
+ * @throws IOException
+ */
public AbstractSourceNode(final Node element) throws URISyntaxException,
IOException {
final NamedNodeMap atts = element.getAttributes();
@@ -81,19 +81,20 @@
}
/**
- *
- * @param sourceURI
- * @return
- * @throws ProcessingException -
- * if the path to the resource cannot be resolved
- */
+ *
+ * @param sourceURI
+ * @return
+ * @throws ProcessingException -
+ * if the path to the resource cannot be resolved
+ */
private URL resolveClasspathURI(final URI sourceURI)
throws ProcessingException {
- URL resourceURL;
- resourceURL = this.getClass().getResource(sourceURI.getSchemeSpecificPart());
- if (resourceURL == null)
- throw new ProcessingException(
- "Cannot find the classpath resource: " + sourceURI);
+ log.debug("Resolving classpath URI: " + sourceURI);
+ URL resourceURL = resourceURL = this.getClass().getResource(sourceURI.getSchemeSpecificPart());
+ if (resourceURL == null) {
+ throw new ProcessingException(
+ "Cannot find the classpath resource: " + sourceURI);
+ }
return resourceURL;
}
@@ -110,16 +111,16 @@
}
/**
- * Resolve the supplied URI and return a URL that can be used to attempt to
- * retrieve the resource. A resolved uri has all variables substituted with
- * their values.
- *
- * @param requestURI -
- * the full request URI
- * @return
- * @throws MalformedURLException
- * @throws ProcessingException
- */
+ * Resolve the supplied URI and return a URL that can be used to attempt to
+ * retrieve the resource. A resolved uri has all variables substituted with
+ * their values.
+ *
+ * @param requestURI -
+ * the full request URI
+ * @return
+ * @throws MalformedURLException
+ * @throws ProcessingException
+ */
public URL resolveURL(AbstractMatcher matcher, URI requestURI)
throws MalformedURLException, ProcessingException {
URI uri = matcher.substituteVariables(requestURI, getSourceURI());