pnever 2003/12/27 06:52:32
Modified: src/share/org/apache/slide/common Uri.java
Log:
Removed final modifier to allow to be extended by ResourceId.
Added method getRoot
Revision Changes Path
1.16 +19 -6 jakarta-slide/src/share/org/apache/slide/common/Uri.java
Index: Uri.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Uri.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Uri.java 15 Dec 2003 12:42:40 -0000 1.15
+++ Uri.java 27 Dec 2003 14:52:32 -0000 1.16
@@ -75,7 +75,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
* @version $Revision$
*/
-public final class Uri implements Cloneable, java.io.Serializable {
+public class Uri implements Cloneable, java.io.Serializable {
// ----------------------------------------------------------- Constructors
@@ -130,7 +130,7 @@
/**
* FIXME : Is that still used ?
*/
- private transient Scope scope;
+ protected transient Scope scope;
/**
@@ -163,6 +163,19 @@
parseUri(uri);
}
+
+ /**
+ * Method getRoot
+ *
+ * @param uri an Uri
+ *
+ * @return an Uri
+ *
+ */
+ public static Uri getRoot(Uri uri) {
+ return new Uri(uri.getToken(), uri.getNamespace(),
uri.getScope().toString());
+ }
+
/**
* Scope accessor.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]