+
+ protected SessionUrn(String type, URI uri) {
+ if (!TYPES.containsKey(type.toLowerCase()))
+ throw new Error("Unknown "+this.getClass().getName()+" type '"+type+"' for URI '"+uri+"'");
+ try {
+ // this.setURN(type+"://"+uri.getPath());
+ //bad hack but should do the trick
+ this.setURN(type+"://"+uri.getRawPath());
+ } catch (Exception e) {
+ // TODO: something better than throwing an error should be done here.
+ e.printStackTrace(System.err);
+ throw new Error(e);
+ }
+ }
+