jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r420473 - in /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name: NameFormat.java Path.java PathFormat.java QName.java
Date Mon, 10 Jul 2006 10:05:44 GMT
Author: angela
Date: Mon Jul 10 03:05:39 2006
New Revision: 420473

URL: http://svn.apache.org/viewvc?rev=420473&view=rev
Log:
- more javadoc
- consistent naming of params in NameFormat

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/NameFormat.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/Path.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/PathFormat.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/QName.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/NameFormat.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/NameFormat.java?rev=420473&r1=420472&r2=420473&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/NameFormat.java (original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/NameFormat.java Mon
Jul 10 03:05:39 2006
@@ -53,20 +53,20 @@
     };
 
     /**
-     * Parses the <code>jcrName</code> and returns an array of two strings:
-     * the first array element contains the prefix (or empty string),
-     * the second the local name.
+     * Parses the <code>jcrName</code> and returns a new <code>QName</code>.
      *
      * @param jcrName the name to be parsed
+     * @param resolver <code>NamespaceResolver</code> use to retrieve the
+     * namespace URI from the prefix contained in the given JCR name.
      * @return qName the new <code>QName</code>
      * @throws IllegalNameException If <code>jcrName</code> is not a valid
-     *                              JCR-style name.
+     * JCR-style name.
      */
-    public static QName parse(String jcrName, NamespaceResolver nsResolver) throws IllegalNameException,
UnknownPrefixException {
+    public static QName parse(String jcrName, NamespaceResolver resolver) throws IllegalNameException,
UnknownPrefixException {
         String[] parts = parse(jcrName);
         String uri;
         try {
-            uri = nsResolver.getURI(parts[0]);
+            uri = resolver.getURI(parts[0]);
         } catch (NamespaceException nse) {
             throw new UnknownPrefixException(parts[0]);
         }
@@ -162,7 +162,6 @@
      * @param qName the qualified name to resolve.
      * @param resolver the namespace resolver.
      * @param buffer StringBuffer where the prefixed JCR name should be appended to.
-     * @return JCR the formatted path.
      * @throws NoPrefixDeclaredException if a namespace can not be resolved
      * @see #format(QName, NamespaceResolver)
      */

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/Path.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/Path.java?rev=420473&r1=420472&r2=420473&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/Path.java (original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/Path.java Mon Jul
10 03:05:39 2006
@@ -161,7 +161,7 @@
     //------------------------------------------------------< factory methods >
     /**
      * @param elements
-     * @return
+     * @return the new <code>Path</code>
      */
     public static Path create(PathElement[] elements) {
         // Path constructor uses elements array as is
@@ -205,7 +205,7 @@
      * @param canonicalize
      * @return
      * @throws MalformedPathException
-     * @deprecated Use {@link PathFormat#create(Path, String, NamespaceResolver)} instead.
+     * @deprecated Use {@link PathFormat#parse(Path, String, NamespaceResolver)} instead.
      */
     public static Path create(Path parent, String relJCRPath,
                               NamespaceResolver resolver, boolean canonicalize)
@@ -327,7 +327,7 @@
      * @param resolver
      * @return
      * @throws MalformedPathException
-     * @deprecated use {@link PathFormat#parse(Path, String, NamespaceResolver)} instead.
+     * @deprecated Use {@link PathFormat#parse(Path, String, NamespaceResolver)} instead.
      */
     private static Path parse(String jcrPath, Path master, NamespaceResolver resolver)
             throws MalformedPathException {
@@ -714,7 +714,7 @@
      * @param resolver namespace resolver
      * @return JCR path
      * @throws NoPrefixDeclaredException if a namespace can not be resolved
-     * @deprecated Use {@link PathFormat#format(Path, NamespaceResolver} instead.
+     * @deprecated Use {@link PathFormat#format(Path, NamespaceResolver)} instead.
      */
     public String toJCRPath(NamespaceResolver resolver) throws NoPrefixDeclaredException
{
         return PathFormat.format(this, resolver);
@@ -1258,7 +1258,7 @@
 
         /**
          * Returns the normalized index of this path element, i.e. the index
-         * is always equals or greater that {@link #INDEX_DEFAULT}.
+         * is always equals or greater that {@link Path#INDEX_DEFAULT}.
          */
         public int getNormalizedIndex() {
             if (index == INDEX_UNDEFINED) {

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/PathFormat.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/PathFormat.java?rev=420473&r1=420472&r2=420473&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/PathFormat.java (original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/PathFormat.java Mon
Jul 10 03:05:39 2006
@@ -267,5 +267,4 @@
             buf.append(']');
         }
     }
-
 }

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/QName.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/QName.java?rev=420473&r1=420472&r2=420473&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/QName.java (original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/name/QName.java Mon Jul
10 03:05:39 2006
@@ -552,7 +552,7 @@
      * @return qualified name
      * @throws IllegalNameException if the given name is not a valid JCR name
      * @throws UnknownPrefixException if the JCR name prefix does not resolve
-     * @deprecated Use {@link NameFormat#parse(String, NamespaceResolver)} instead
+     * @deprecated Use {@link NameFormat#parse(String, NamespaceResolver)} instead.
      */
     public static QName fromJCRName(String rawName, NamespaceResolver resolver)
             throws IllegalNameException, UnknownPrefixException {
@@ -601,7 +601,8 @@
      *
      * @param jcrName the name to be checked
      * @throws IllegalNameException If <code>jcrName</code> is not a valid
-     *                              JCR-style name.
+     * JCR-style name.
+     * @deprecated Use {@link NameFormat#checkFormat(String)} instead.
      */
     public static void checkFormat(String jcrName) throws IllegalNameException {
         parse(jcrName);



Mime
View raw message