jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1166138 [7/12] - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ jackrabbit-spi-commons/src/main/ja...
Date Wed, 07 Sep 2011 12:00:20 GMT
Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java Wed Sep  7 12:00:14 2011
@@ -31,15 +31,12 @@ import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.ConstraintViolationException;
 
 /**
- * A <code>NodeDefinitionTemplateImpl</code> ...
+ * A {@code NodeDefinitionTemplateImpl} ...
  */
-class NodeDefinitionTemplateImpl
-        extends AbstractItemDefinitionTemplate
-        implements NodeDefinitionTemplate {
-
+class NodeDefinitionTemplateImpl extends AbstractItemDefinitionTemplate implements NodeDefinitionTemplate {
     private static final Logger log = LoggerFactory.getLogger(NodeDefinitionTemplateImpl.class);
 
-    private NodeType[] requiredPrimaryTypes;
+    private final NodeType[] requiredPrimaryTypes;
     private Name[] requiredPrimaryTypeNames;
     private Name defaultPrimaryTypeName;
     private boolean allowSameNameSiblings;
@@ -50,7 +47,7 @@ class NodeDefinitionTemplateImpl
      * @param resolver
      * @throws RepositoryException
      */
-    NodeDefinitionTemplateImpl(NamePathResolver resolver) throws RepositoryException {
+    NodeDefinitionTemplateImpl(NamePathResolver resolver) {
         super(resolver);
         requiredPrimaryTypes = null;
         requiredPrimaryTypeNames = null;
@@ -79,9 +76,8 @@ class NodeDefinitionTemplateImpl
     }
 
     //-----------------------------------------------< NodeDefinitionTemplate >
-    /**
-     * {@inheritDoc}
-     */
+
+    @Override
     public void setRequiredPrimaryTypeNames(String[] requiredPrimaryTypeNames) throws ConstraintViolationException {
         if (requiredPrimaryTypeNames == null) {
             throw new ConstraintViolationException("null isn't a valid array of JCR names.");
@@ -97,12 +93,10 @@ class NodeDefinitionTemplateImpl
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setDefaultPrimaryTypeName(String defaultPrimaryType) throws ConstraintViolationException {
         try {
-            this.defaultPrimaryTypeName = defaultPrimaryType == null
+            defaultPrimaryTypeName = defaultPrimaryType == null
                     ? null
                     : resolver.getQName(defaultPrimaryType);
         } catch (RepositoryException e) {
@@ -110,24 +104,18 @@ class NodeDefinitionTemplateImpl
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setSameNameSiblings(boolean allowSameNameSiblings) {
         this.allowSameNameSiblings = allowSameNameSiblings;
     }
 
     //-------------------------------------------------------< NodeDefinition >
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public NodeType[] getRequiredPrimaryTypes() {
         return requiredPrimaryTypes;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String[] getRequiredPrimaryTypeNames() {
         if (requiredPrimaryTypeNames == null) {
             return null;
@@ -146,16 +134,12 @@ class NodeDefinitionTemplateImpl
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public NodeType getDefaultPrimaryType() {
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getDefaultPrimaryTypeName() {
         if (defaultPrimaryTypeName == null) {
             return null;
@@ -170,10 +154,7 @@ class NodeDefinitionTemplateImpl
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
-
+    @Override
     public boolean allowsSameNameSiblings() {
         return allowSameNameSiblings;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeConflictException.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeConflictException.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeConflictException.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeConflictException.java Wed Sep  7 12:00:14 2011
@@ -19,7 +19,7 @@ package org.apache.jackrabbit.spi.common
 import javax.jcr.RepositoryException;
 
 /**
- * The <code>NodeTypeConflictException</code> ...
+ * The {@code NodeTypeConflictException} ...
  */
 public class NodeTypeConflictException extends RepositoryException {
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java Wed Sep  7 12:00:14 2011
@@ -35,40 +35,40 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * A <code>NodeTypeDefDiff</code> represents the result of the comparison of
+ * A {@code NodeTypeDefDiff} represents the result of the comparison of
  * two node type definitions.
  * <p/>
  * The result of the comparison can be categorized as one of the following types:
  * <p/>
- * <b><code>NONE</code></b> inidcates that there is no modification at all.
+ * <b>{@code NONE}</b> indicates that there is no modification at all.
  * <p/>
- * A <b><code>TRIVIAL</code></b> modification has no impact on the consistency
+ * A <b>{@code TRIVIAL}</b> modification has no impact on the consistency
  * of existing content. The following modifications are considered
- * <code>TRIVIAL</code>:
+ * {@code TRIVIAL}:
  * <ul>
- * <li>changing node type <code>orderableChildNodes</code> flag
- * <li>changing node type <code>primaryItemName</code> value
- * <li>adding non-<code>mandatory</code> property/child node
- * <li>changing property/child node <code>protected</code> flag
- * <li>changing property/child node <code>onParentVersion</code> value
- * <li>changing property/child node <code>mandatory</code> flag to <code>false</code>
- * <li>changing property/child node <code>autoCreated</code> flag
- * <li>changing specific property/child node <code>name</code> to <code>*</code>
- * <li>changing child node <code>defaultPrimaryType</code>
- * <li>changing child node <code>sameNameSiblings</code> flag to <code>true</code>
- * <li>weaken child node <code>requiredPrimaryTypes</code> (e.g. by removing)
- * <li>weaken property <code>valueConstraints</code> (e.g. by removing a constraint
+ * <li>changing node type {@code orderableChildNodes} flag
+ * <li>changing node type {@code primaryItemName} value
+ * <li>adding non-{@code mandatory} property/child node
+ * <li>changing property/child node {@code protected} flag
+ * <li>changing property/child node {@code onParentVersion} value
+ * <li>changing property/child node {@code mandatory} flag to {@code false}
+ * <li>changing property/child node {@code autoCreated} flag
+ * <li>changing specific property/child node {@code name} to {@code *}
+ * <li>changing child node {@code defaultPrimaryType}
+ * <li>changing child node {@code sameNameSiblings} flag to {@code true}
+ * <li>weaken child node {@code requiredPrimaryTypes} (e.g. by removing)
+ * <li>weaken property {@code valueConstraints} (e.g. by removing a constraint
  * or by making a specific constraint less restrictive)
- * <li>changing property <code>defaultValues</code>
- * <li>changing specific property <code>requiredType</code> to <code>undefined</code>
- * <li>changing property <code>multiple</code> flag to <code>true</code>
+ * <li>changing property {@code defaultValues}
+ * <li>changing specific property {@code requiredType} to {@code undefined}
+ * <li>changing property {@code multiple} flag to {@code true}
  * </ul>
  * <p/>
- * A <b><code>MAJOR</code></b> modification potentially <i>affects</i> the
+ * A <b>{@code MAJOR}</b> modification potentially <i>affects</i> the
  * consistency of existing content.
  *
- * All modifications that are not <b><code>TRIVIAL</code></b> are considered
- * <b><code>MAJOR</code></b>.
+ * All modifications that are not <b>{@code TRIVIAL}</b> are considered
+ * <b>{@code MAJOR}</b>.
  *
  * @see #getType()
  */
@@ -169,21 +169,21 @@ public class NodeTypeDefDiff {
     }
 
     /**
-     * @return <code>true</code> if modified
+     * @return {@code true} if modified
      */
     public boolean isModified() {
         return type != NONE;
     }
 
     /**
-     * @return <code>true</code> if trivial
+     * @return {@code true} if trivial
      */
     public boolean isTrivial() {
         return type == TRIVIAL;
     }
 
     /**
-     * @return <code>true</code> if major
+     * @return {@code true} if major
      */
     public boolean isMajor() {
         return type == MAJOR;
@@ -192,10 +192,10 @@ public class NodeTypeDefDiff {
     /**
      * Returns the type of modification as expressed by the following constants:
      * <ul>
-     * <li><b><code>NONE</code></b>: no modification at all
-     * <li><b><code>TRIVIAL</code></b>: does not affect consistency of
+     * <li><b>{@code NONE}</b>: no modification at all
+     * <li><b>{@code TRIVIAL}</b>: does not affect consistency of
      * existing content
-     * <li><b><code>MAJOR</code></b>: <i>does</i> affect consistency of existing
+     * <li><b>{@code MAJOR}</b>: <i>does</i> affect consistency of existing
      * content
      * </ul>
      *
@@ -206,21 +206,21 @@ public class NodeTypeDefDiff {
     }
 
     /**
-     * @return <code>true</code> if mixin flag diff
+     * @return {@code true} if mixin flag diff
      */
     public int mixinFlagDiff() {
         return oldDef.isMixin() != newDef.isMixin() ? MAJOR : NONE;
     }
 
     /**
-     * @return <code>true</code> if abstract flag diff
+     * @return {@code true} if abstract flag diff
      */
     public int abstractFlagDiff() {
         return oldDef.isAbstract() && !newDef.isAbstract() ? MAJOR : NONE;
     }
 
     /**
-     * @return <code>true</code> if supertypes diff
+     * @return {@code true} if supertypes diff
      */
     public int supertypesDiff() {
         Set<Name> set1 = new HashSet<Name>(Arrays.asList(oldDef.getSupertypes()));
@@ -344,7 +344,7 @@ public class NodeTypeDefDiff {
         return result;
     }
 
-    private String toString(List<? extends ChildItemDefDiff> childItemDefDiffs) {
+    private static String toString(List<? extends ChildItemDefDiff> childItemDefDiffs) {
         String result = "";
         for (Iterator iter = childItemDefDiffs.iterator(); iter.hasNext();) {
             ChildItemDefDiff propDefDiff = (ChildItemDefDiff) iter.next();
@@ -357,7 +357,7 @@ public class NodeTypeDefDiff {
         return result;
     }
 
-    private String modificationTypeToString(int modifcationType) {
+    private static String modificationTypeToString(int modifcationType) {
         String typeString = "unknown";
         switch (modifcationType) {
             case NONE:
@@ -376,7 +376,7 @@ public class NodeTypeDefDiff {
 
     //--------------------------------------------------------< inner classes >
 
-    abstract class ChildItemDefDiff {
+    abstract static class ChildItemDefDiff {
         protected final QItemDefinition oldDef;
         protected final QItemDefinition newDef;
         protected int type;
@@ -390,12 +390,12 @@ public class NodeTypeDefDiff {
         protected void init() {
             // determine type of modification
             if (isAdded()) {
-                if (!newDef.isMandatory()) {
-                    // adding a non-mandatory child item is a TRIVIAL change
-                    type = TRIVIAL;
-                } else {
+                if (newDef.isMandatory()) {
                     // adding a mandatory child item is a MAJOR change
                     type = MAJOR;
+                } else {
+                    // adding a non-mandatory child item is a TRIVIAL change
+                    type = TRIVIAL;
                 }
             } else if (isRemoved()) {
                 // removing a child item is a MAJOR change
@@ -420,12 +420,12 @@ public class NodeTypeDefDiff {
                             // just making a child item residual is a TRIVIAL change
                             type = TRIVIAL;
                         } else {
-                            if (!oldDef.getName().equals(newDef.getName())) {
-                                // changing the name of a child item is a MAJOR change
-                                type = MAJOR;
-                            } else {
+                            if (oldDef.getName().equals(newDef.getName())) {
                                 // all other changes are TRIVIAL
                                 type = TRIVIAL;
+                            } else {
+                                // changing the name of a child item is a MAJOR change
+                                type = MAJOR;
                             }
                         }
                     }
@@ -465,16 +465,16 @@ public class NodeTypeDefDiff {
                 operationString = "NONE";
             }
 
-            QItemDefinition itemDefinition = (oldDef != null) ? oldDef : newDef;
+            QItemDefinition itemDefinition = oldDef != null ? oldDef : newDef;
 
             return getClass().getName() + "[itemName="
                     + itemDefinition.getName() + ", type=" + typeString
-                    + ", operation=" + operationString + "]";
+                    + ", operation=" + operationString + ']';
         }
 
     }
 
-    public class PropDefDiff extends ChildItemDefDiff {
+    public static class PropDefDiff extends ChildItemDefDiff {
 
         PropDefDiff(QPropertyDefinition oldDef, QPropertyDefinition newDef) {
             super(oldDef, newDef);
@@ -558,7 +558,7 @@ public class NodeTypeDefDiff {
         }
     }
 
-    public class ChildNodeDefDiff extends ChildItemDefDiff {
+    public static class ChildNodeDefDiff extends ChildItemDefDiff {
 
         ChildNodeDefDiff(QNodeDefinition oldDef, QNodeDefinition newDef) {
             super(oldDef, newDef);
@@ -699,8 +699,8 @@ public class NodeTypeDefDiff {
             int h = 17;
             h = 37 * h + declaringNodeType.hashCode();
             h = 37 * h + name.hashCode();
-            for (int i = 0; i < requiredPrimaryTypes.length; i++) {
-                h = 37 * h + requiredPrimaryTypes[i].hashCode();
+            for (Name requiredPrimaryType : requiredPrimaryTypes) {
+                h = 37 * h + requiredPrimaryType.hashCode();
             }
             return h;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionFactory.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionFactory.java Wed Sep  7 12:00:14 2011
@@ -16,35 +16,34 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.List;
-import java.util.Collection;
-import java.util.ArrayList;
-
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.NodeTypeDefinition;
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.PropertyDefinition;
-import javax.jcr.nodetype.NodeTypeTemplate;
-import javax.jcr.nodetype.NodeDefinitionTemplate;
-import javax.jcr.nodetype.PropertyDefinitionTemplate;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.NamespaceException;
-import javax.jcr.Value;
-
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
+import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.QValueConstraint;
 import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.QValueConstraint;
 import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
+import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
 import org.apache.jackrabbit.spi.commons.value.QValueValue;
 
+import javax.jcr.NamespaceException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.nodetype.NodeDefinition;
+import javax.jcr.nodetype.NodeDefinitionTemplate;
+import javax.jcr.nodetype.NodeTypeDefinition;
+import javax.jcr.nodetype.NodeTypeManager;
+import javax.jcr.nodetype.NodeTypeTemplate;
+import javax.jcr.nodetype.PropertyDefinition;
+import javax.jcr.nodetype.PropertyDefinitionTemplate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 /**
- * <code>NodeTypeDefinitionFactory</code> can be used to convert the internal
+ * {@code NodeTypeDefinitionFactory} can be used to convert the internal
  * SPI node type definitions to JCR {@link NodeTypeDefinition}s.
  */
 public class NodeTypeDefinitionFactory {
@@ -55,15 +54,15 @@ public class NodeTypeDefinitionFactory {
 
     /**
      * Creates a new node type definition factory that operates on the given
-     * sesion to create the templates.
+     * session to create the templates.
      *
      * @param session repository session.
      * @throws RepositoryException if an error occurs.
      */
     public NodeTypeDefinitionFactory(Session session)
             throws RepositoryException {
-        this.ntMgr = session.getWorkspace().getNodeTypeManager();
-        this.resolver = new DefaultNamePathResolver(session);
+        ntMgr = session.getWorkspace().getNodeTypeManager();
+        resolver = new DefaultNamePathResolver(session);
     }
 
     /**
@@ -85,7 +84,7 @@ public class NodeTypeDefinitionFactory {
 
     /**
      * Create a new JCR node type definition from the given
-     * <code>QNodeTypeDefinition</code>.
+     * {@code QNodeTypeDefinition}.
      *
      * @param qNtd A SPI node type definition.
      * @return the corresponding JCR node type definition.
@@ -114,7 +113,7 @@ public class NodeTypeDefinitionFactory {
     }
 
     /**
-     * Create a new JCR node definition from the given <code>QNodeDefinition</code>.
+     * Create a new JCR node definition from the given {@code QNodeDefinition}.
      *
      * @param qNd A node definition.
      * @return The corresponding JCR node definition.
@@ -135,7 +134,7 @@ public class NodeTypeDefinitionFactory {
     }
 
     /**
-     * Create a new JCR property definition from the given <code>QPropertyDefinition</code>.
+     * Create a new JCR property definition from the given {@code QPropertyDefinition}.
      *
      * @param qPd A SPI property definition.
      * @return the corresponding JCR property definition.

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java Wed Sep  7 12:00:14 2011
@@ -31,7 +31,7 @@ import javax.jcr.NamespaceException;
 import javax.jcr.ValueFactory;
 
 /**
- * <code>AbstractNodeTypeDefinition</code>...
+ * {@code AbstractNodeTypeDefinition}...
  */
 public class NodeTypeDefinitionImpl implements NodeTypeDefinition {
 
@@ -58,9 +58,11 @@ public class NodeTypeDefinitionImpl impl
     }
 
     //-------------------------------------------------< NodeTypeDefinition >---
+
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#getName()
      */
+    @Override
     public String getName() {
         try {
             return resolver.getJCRName(ntd.getName());
@@ -74,6 +76,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#getPrimaryItemName()
      */
+    @Override
     public String getPrimaryItemName() {
         try {
             Name piName = ntd.getPrimaryItemName();
@@ -92,6 +95,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#isMixin()
      */
+    @Override
     public boolean isMixin() {
         return ntd.isMixin();
     }
@@ -99,6 +103,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#hasOrderableChildNodes()
      */
+    @Override
     public boolean hasOrderableChildNodes() {
         return ntd.hasOrderableChildNodes();
     }
@@ -106,6 +111,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#isAbstract()
      */
+    @Override
     public boolean isAbstract() {
         return ntd.isAbstract();
     }
@@ -113,6 +119,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#isQueryable()
      */
+    @Override
     public boolean isQueryable() {
         return ntd.isQueryable();
     }
@@ -120,6 +127,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#getDeclaredPropertyDefinitions()
      */
+    @Override
     public PropertyDefinition[] getDeclaredPropertyDefinitions() {
         QPropertyDefinition[] pds = ntd.getPropertyDefs();
         PropertyDefinition[] propDefs = new PropertyDefinition[pds.length];
@@ -133,6 +141,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#getDeclaredChildNodeDefinitions()
      */
+    @Override
     public NodeDefinition[] getDeclaredChildNodeDefinitions() {
         QNodeDefinition[] cnda = ntd.getChildNodeDefs();
         NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
@@ -145,6 +154,7 @@ public class NodeTypeDefinitionImpl impl
     /**
      * @see javax.jcr.nodetype.NodeTypeDefinition#getDeclaredSupertypeNames()
      */
+    @Override
     public String[] getDeclaredSupertypeNames() {
         Name[] stNames = ntd.getSupertypes();
         String[] dstn = new String[stNames.length];

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java Wed Sep  7 12:00:14 2011
@@ -16,17 +16,16 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.Iterator;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
 import javax.jcr.nodetype.NodeTypeExistsException;
-
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
+import java.util.Iterator;
 
 /**
- * <code>NodeTypeStorage</code> provides means for storing {@link QNodeTypeDefinition}s.
+ * {@code NodeTypeStorage} provides means for storing {@link QNodeTypeDefinition}s.
  */
 public interface NodeTypeStorage {
 
@@ -36,10 +35,10 @@ public interface NodeTypeStorage {
      * @return
      * @throws RepositoryException
      */
-    public Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException;
+    Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException;
 
     /**
-     * Returns the <code>QNodeTypeDefinition</code>s for the given node type
+     * Returns the {@code QNodeTypeDefinition}s for the given node type
      * names. The implementation is free to return additional definitions e.g.
      * dependencies.
      *
@@ -51,12 +50,12 @@ public interface NodeTypeStorage {
     public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException;
 
     /**
-     * Add all {@link QNodeTypeDefinition}s provided to the store. If <code>allowUpdate</code> is <code>true</code>
+     * Add all {@link QNodeTypeDefinition}s provided to the store. If {@code allowUpdate} is {@code true}
      * previously registered node QNodeTypeDefinitions will be overwritten.
      * @param nodeTypeDefs  QNodeTypeDefinitions to add to the store
      * @param allowUpdate   Whether to overwrite existing QNodeTypeDefinitions
      * @throws RepositoryException
-     * @throws NodeTypeExistsException  If <code>allowUpdate</code> is <code>true</code> and a QNodeTypeDefinitions
+     * @throws NodeTypeExistsException  If {@code allowUpdate} is {@code true} and a QNodeTypeDefinitions
      *   of that name already exists. In this case, none of the provided QNodeTypeDefinitions is registered.
      */
     public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate)

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorageImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorageImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorageImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorageImpl.java Wed Sep  7 12:00:14 2011
@@ -16,19 +16,18 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.NodeTypeExistsException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.nodetype.NodeTypeExistsException;
-
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-
 /**
  * This implementation of {@link NodeTypeStorage} keeps a map of the registered {@link QNodeTypeDefinition}
  * in memory.
@@ -37,17 +36,18 @@ public class NodeTypeStorageImpl impleme
 
     private final Map<Name, QNodeTypeDefinition> definitions = new HashMap<Name, QNodeTypeDefinition>();
 
+    @Override
     public Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException {
         return definitions.values().iterator();
     }
 
     /**
      * This implementation returns an iterator over all registered {@link QNodeTypeDefinition}s if
-     * <code>nodeTypeNames</code> is <code>null</code>.
+     * {@code nodeTypeNames} is {@code null}.
      * {@inheritDoc}
      */
-    public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException,
-            RepositoryException {
+    @Override
+    public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws RepositoryException {
 
         if (nodeTypeNames == null) {
             return definitions.values().iterator();
@@ -60,13 +60,14 @@ public class NodeTypeStorageImpl impleme
                 defs.add(definitions.get(name));
             }
             else {
-                throw new NoSuchNodeTypeException("{" + name.getNamespaceURI() + "}" + name.getLocalName());
+                throw new NoSuchNodeTypeException('{' + name.getNamespaceURI() + '}' + name.getLocalName());
             }
         }
 
         return defs.iterator();
     }
 
+    @Override
     public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate)
             throws RepositoryException {
 
@@ -78,7 +79,7 @@ public class NodeTypeStorageImpl impleme
             for (QNodeTypeDefinition ntd : nodeTypeDefs) {
                 Name name = ntd.getName();
                 if (definitions.containsKey(name)) {
-                    throw new NodeTypeExistsException("{" + name.getNamespaceURI() + "}" + name.getLocalName());
+                    throw new NodeTypeExistsException('{' + name.getNamespaceURI() + '}' + name.getLocalName());
                 }
             }
         }
@@ -88,10 +89,11 @@ public class NodeTypeStorageImpl impleme
         }
     }
 
-    public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException {
+    @Override
+    public void unregisterNodeTypes(Name[] nodeTypeNames) throws RepositoryException {
         for (Name name : nodeTypeNames) {
             if (!definitions.containsKey(name)) {
-                throw new NoSuchNodeTypeException("{" + name.getNamespaceURI() + "}" + name.getLocalName());
+                throw new NoSuchNodeTypeException('{' + name.getNamespaceURI() + '}' + name.getLocalName());
             }
         }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java Wed Sep  7 12:00:14 2011
@@ -22,21 +22,20 @@ import org.apache.jackrabbit.spi.commons
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.LinkedList;
-import java.util.List;
-
+import javax.jcr.NamespaceException;
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeDefinitionTemplate;
+import javax.jcr.nodetype.NodeTypeDefinition;
 import javax.jcr.nodetype.NodeTypeTemplate;
 import javax.jcr.nodetype.PropertyDefinition;
 import javax.jcr.nodetype.PropertyDefinitionTemplate;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NodeTypeDefinition;
-import javax.jcr.NamespaceException;
-import javax.jcr.RepositoryException;
+import java.util.LinkedList;
+import java.util.List;
 
 /**
- * A <code>NodeTypeTemplateImpl</code> ...
+ * A {@code NodeTypeTemplateImpl} ...
  */
 public class NodeTypeTemplateImpl implements NodeTypeTemplate {
 
@@ -109,9 +108,8 @@ public class NodeTypeTemplateImpl implem
     }
 
     //-----------------------------------------------------< NodeTypeTemplate >
-    /**
-     * {@inheritDoc}
-     */
+
+    @Override
     public void setName(String name) throws ConstraintViolationException {
         try {
             this.name = resolver.getQName(name);
@@ -120,9 +118,7 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setDeclaredSuperTypeNames(String[] names) throws ConstraintViolationException {
         // TODO see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=797
         if (names == null) {
@@ -139,30 +135,22 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setAbstract(boolean abstractStatus) {
         this.abstractStatus = abstractStatus;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setMixin(boolean mixin) {
         this.mixin = mixin;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setOrderableChildNodes(boolean orderable) {
         orderableChildNodes = orderable;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setPrimaryItemName(String name) throws ConstraintViolationException {
         if (name == null) {
             primaryItemName = null;
@@ -175,9 +163,7 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public List getPropertyDefinitionTemplates() {
         if (propertyDefinitionTemplates == null) {
             propertyDefinitionTemplates = new LinkedList<PropertyDefinitionTemplate>();
@@ -185,9 +171,7 @@ public class NodeTypeTemplateImpl implem
         return propertyDefinitionTemplates;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public List getNodeDefinitionTemplates() {
         if (nodeDefinitionTemplates == null) {
             nodeDefinitionTemplates = new LinkedList<NodeDefinitionTemplate>();
@@ -195,17 +179,13 @@ public class NodeTypeTemplateImpl implem
         return nodeDefinitionTemplates;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setQueryable(boolean queryable) {
         this.queryable = queryable;
     }
 
     //---------------------------------------------------< NodeTypeDefinition >
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getName() {
         if (name == null) {
             return null;
@@ -220,9 +200,7 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String[] getDeclaredSupertypeNames() {
         String[] names = new String[superTypeNames.length];
         for (int i = 0; i < superTypeNames.length; i++) {
@@ -237,34 +215,27 @@ public class NodeTypeTemplateImpl implem
         return names;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isAbstract() {
         return abstractStatus;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isMixin() {
         return mixin;
     }
 
+    @Override
     public boolean isQueryable() {
         return queryable;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean hasOrderableChildNodes() {
         return orderableChildNodes;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getPrimaryItemName() {
         if (primaryItemName == null) {
             return null;
@@ -279,9 +250,7 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public PropertyDefinition[] getDeclaredPropertyDefinitions() {
         if (propertyDefinitionTemplates == null) {
             return null;
@@ -291,9 +260,7 @@ public class NodeTypeTemplateImpl implem
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public NodeDefinition[] getDeclaredChildNodeDefinitions() {
         if (nodeDefinitionTemplates == null) {
             return null;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java Wed Sep  7 12:00:14 2011
@@ -16,24 +16,24 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.ValueFactory;
-import javax.jcr.nodetype.PropertyDefinition;
-
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QValueConstraint;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
-import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
+import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+import javax.jcr.nodetype.PropertyDefinition;
+
 /**
- * This class implements the <code>PropertyDefinition</code> interface.
+ * This class implements the {@code PropertyDefinition} interface.
  * All method calls are delegated to the wrapped {@link QPropertyDefinition},
- * performing the translation from <code>Name</code>s to JCR names
+ * performing the translation from {@code Name}s to JCR names
  * (and vice versa) where necessary.
  */
 public class PropertyDefinitionImpl extends ItemDefinitionImpl implements PropertyDefinition {
@@ -52,22 +52,20 @@ public class PropertyDefinitionImpl exte
      * @param resolver the name-path resolver
      * @param valueFactory a value factory
      */
-    public PropertyDefinitionImpl(QPropertyDefinition propDef, NamePathResolver resolver,
-                                  ValueFactory valueFactory) {
+    public PropertyDefinitionImpl(QPropertyDefinition propDef, NamePathResolver resolver, ValueFactory valueFactory) {
         this(propDef, null, resolver, valueFactory);
     }
 
     /**
      *
-     * @param propDef underlying propdef
+     * @param propDef underlying property definition
      * @param ntMgr nodetype manager
      * @param resolver name-path resolver
      * @param valueFactory value factory (for default values)
      */
-    public PropertyDefinitionImpl(QPropertyDefinition propDef,
-                                  AbstractNodeTypeManager ntMgr,
-                                  NamePathResolver resolver,
-                                  ValueFactory valueFactory) {
+    public PropertyDefinitionImpl(QPropertyDefinition propDef, AbstractNodeTypeManager ntMgr, NamePathResolver resolver,
+            ValueFactory valueFactory) {
+        
         super(propDef, ntMgr, resolver);
         this.valueFactory = valueFactory;
     }
@@ -83,11 +81,9 @@ public class PropertyDefinitionImpl exte
 
     //-------------------------------------------------< PropertyDefinition >---
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public Value[] getDefaultValues() {
-        QPropertyDefinition pDef = ((QPropertyDefinition) itemDef);
+        QPropertyDefinition pDef = (QPropertyDefinition) itemDef;
         QValue[] defVals = pDef.getDefaultValues();
         if (defVals == null) {
             return null;
@@ -99,7 +95,7 @@ public class PropertyDefinitionImpl exte
                 values[i] = ValueFormat.getJCRValue(defVals[i], resolver, valueFactory);
             } catch (RepositoryException e) {
                 // should never get here
-                String propName = (getName() == null) ? "[null]" : getName();
+                String propName = getName() == null ? "[null]" : getName();
                 log.error("illegal default value specified for property " + propName + " in node type " + getDeclaringNodeType(), e);
                 return null;
             }
@@ -107,16 +103,12 @@ public class PropertyDefinitionImpl exte
         return values;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public int getRequiredType() {
         return ((QPropertyDefinition) itemDef).getRequiredType();
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String[] getValueConstraints() {
         QPropertyDefinition pd = (QPropertyDefinition) itemDef;
         QValueConstraint[] constraints = pd.getValueConstraints();
@@ -136,9 +128,7 @@ public class PropertyDefinitionImpl exte
         return vca;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isMultiple() {
         return ((QPropertyDefinition) itemDef).isMultiple();
     }
@@ -146,6 +136,7 @@ public class PropertyDefinitionImpl exte
     /**
      * @see javax.jcr.nodetype.PropertyDefinition#getAvailableQueryOperators()
      */
+    @Override
     public String[] getAvailableQueryOperators() {
         return ((QPropertyDefinition) itemDef).getAvailableQueryOperators();
     }
@@ -153,6 +144,7 @@ public class PropertyDefinitionImpl exte
     /**
      * @see javax.jcr.nodetype.PropertyDefinition#isFullTextSearchable()
      */
+    @Override
     public boolean isFullTextSearchable() {
         return ((QPropertyDefinition) itemDef).isFullTextSearchable();
     }
@@ -160,6 +152,7 @@ public class PropertyDefinitionImpl exte
     /**
      * @see javax.jcr.nodetype.PropertyDefinition#isQueryOrderable()
      */
+    @Override
     public boolean isQueryOrderable() {
         return ((QPropertyDefinition) itemDef).isQueryOrderable();
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java Wed Sep  7 12:00:14 2011
@@ -26,12 +26,9 @@ import javax.jcr.nodetype.PropertyDefini
 import javax.jcr.nodetype.ConstraintViolationException;
 
 /**
- * A <code>PropertyDefinitionTemplateImpl</code> ...
+ * A {@code PropertyDefinitionTemplateImpl} ...
  */
-class PropertyDefinitionTemplateImpl
-        extends AbstractItemDefinitionTemplate
-        implements PropertyDefinitionTemplate {
-
+class PropertyDefinitionTemplateImpl extends AbstractItemDefinitionTemplate implements PropertyDefinitionTemplate {
     private int type;
     private String[] constraints;
     private Value[] defaultValues;
@@ -72,107 +69,78 @@ class PropertyDefinitionTemplateImpl
     }
 
     //-------------------------------------------< PropertyDefinitionTemplate >
-    /**
-     * {@inheritDoc}
-     *
-     * @throws IllegalArgumentException If an invalid type is passed.
-     */
+
+    @Override
     public void setRequiredType(int type) {
         // validate
         PropertyType.nameFromValue(type);
         this.type = type;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setValueConstraints(String[] constraints) {
         // TODO: see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=794
         this.constraints = constraints;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setDefaultValues(Value[] defaultValues) {
         this.defaultValues = defaultValues;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setMultiple(boolean multiple) {
         this.multiple = multiple;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setAvailableQueryOperators(String[] operators) {
         queryOperators = operators;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setFullTextSearchable(boolean searchable) {
         fullTextSearchable = searchable;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public void setQueryOrderable(boolean orderable) {
         queryOrderable = orderable;
     }
 
     //---------------------------------------------------< PropertyDefinition >
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public int getRequiredType() {
         return type;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String[] getValueConstraints() {
         // TODO: see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=794
         return constraints;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public Value[] getDefaultValues() {
         return defaultValues;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isMultiple() {
         return multiple;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String[] getAvailableQueryOperators() {
         return queryOperators;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isFullTextSearchable() {
         return fullTextSearchable;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public boolean isQueryOrderable() {
         return queryOrderable;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java Wed Sep  7 12:00:14 2011
@@ -16,14 +16,8 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.NamespaceException;
-import javax.jcr.RepositoryException;
-
-import org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory;
 import org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefReader;
+import org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NameFactory;
 import org.apache.jackrabbit.spi.QNodeDefinition;
@@ -41,6 +35,11 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.apache.jackrabbit.util.ISO9075;
 
+import javax.jcr.NamespaceException;
+import javax.jcr.RepositoryException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * This implementation of {@link DefinitionBuilderFactory} can be used with
  * the {@link CompactNodeTypeDefReader} to produce node type definitions of type
@@ -48,8 +47,8 @@ import org.apache.jackrabbit.util.ISO907
  * It uses {@link QNodeTypeDefinitionBuilderImpl} for building node type definitions,
  * {@link QPropertyDefinitionBuilderImpl} for building property definitions, and
  * {@link QNodeDefinitionBuilderImpl} for building node definitions. It further uses
- * {@link NameFactoryImpl} for creating <code>Name</code>s and {@link QValueFactoryImpl} for
- * creating <code>QValue</code>s.
+ * {@link NameFactoryImpl} for creating {@code Name}s and {@link QValueFactoryImpl} for
+ * creating {@code QValue}s.
  */
 public class QDefinitionBuilderFactory extends DefinitionBuilderFactory<QNodeTypeDefinition, NamespaceMapping> {
 
@@ -82,8 +81,8 @@ public class QDefinitionBuilderFactory e
 
     @Override
     public void setNamespaceMapping(NamespaceMapping nsMapping) {
-        this.nsMappings = nsMapping;
-        this.resolver = new DefaultNamePathResolver(nsMapping);
+        nsMappings = nsMapping;
+        resolver = new DefaultNamePathResolver(nsMapping);
     }
 
     @Override
@@ -128,10 +127,10 @@ public class QDefinitionBuilderFactory e
                     name,
                     supertypes.toArray(new Name[supertypes.size()]),
                     null,
-                    super.isMixin,
-                    super.isAbstract,
-                    super.queryable,
-                    super.isOrderable,
+                    isMixin,
+                    isAbstract,
+                    queryable,
+                    isOrderable,
                     primaryItem,
                     propertyDefs.toArray(new QPropertyDefinition[propertyDefs.size()]),
                     childNodeDefs.toArray(new QNodeDefinition[childNodeDefs.size()]));
@@ -161,7 +160,6 @@ public class QDefinitionBuilderFactory e
         private final QPropertyDefinitionBuilder builder = new QPropertyDefinitionBuilder();
 
         public QPropertyDefinitionBuilderImpl(QNodeTypeDefinitionBuilderImpl ntd) {
-            super();
             this.ntd = ntd;
         }
 
@@ -183,14 +181,12 @@ public class QDefinitionBuilderFactory e
         }
 
         @Override
-        public void setMultiple(boolean isMultiple) throws RepositoryException {
-            super.setMultiple(isMultiple);
+        public void setMultiple(boolean isMultiple) throws RepositoryException { super.setMultiple(isMultiple);
             builder.setMultiple(isMultiple);
         }
 
         @Override
-        public void setFullTextSearchable(boolean fullTextSearchable)
-                throws RepositoryException {
+        public void setFullTextSearchable(boolean fullTextSearchable) throws RepositoryException {
             super.setFullTextSearchable(fullTextSearchable);
             builder.setFullTextSearchable(fullTextSearchable);
         }
@@ -203,36 +199,31 @@ public class QDefinitionBuilderFactory e
         }
 
         @Override
-        public void setAvailableQueryOperators(String[] queryOperators)
-                throws RepositoryException {
+        public void setAvailableQueryOperators(String[] queryOperators) throws RepositoryException {
             super.setAvailableQueryOperators(queryOperators);
             builder.setAvailableQueryOperators(queryOperators);
         }
 
         @Override
-        public void setAutoCreated(boolean autocreate)
-                throws RepositoryException {
+        public void setAutoCreated(boolean autocreate) throws RepositoryException {
             super.setAutoCreated(autocreate);
             builder.setAutoCreated(autocreate);
         }
 
         @Override
-        public void setOnParentVersion(int onParent)
-                throws RepositoryException {
+        public void setOnParentVersion(int onParent) throws RepositoryException {
             super.setOnParentVersion(onParent);
             builder.setOnParentVersion(onParent);
         }
 
         @Override
-        public void setProtected(boolean isProtected)
-                throws RepositoryException {
+        public void setProtected(boolean isProtected) throws RepositoryException {
             super.setProtected(isProtected);
             builder.setProtected(isProtected);
         }
 
         @Override
-        public void setMandatory(boolean isMandatory)
-                throws RepositoryException {
+        public void setMandatory(boolean isMandatory) throws RepositoryException {
             super.setMandatory(isMandatory);
             builder.setMandatory(isMandatory);
         }
@@ -264,7 +255,6 @@ public class QDefinitionBuilderFactory e
         private final QNodeDefinitionBuilder builder = new QNodeDefinitionBuilder();
 
         public QNodeDefinitionBuilderImpl(QNodeTypeDefinitionBuilderImpl ntd) {
-            super();
             this.ntd = ntd;
         }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java Wed Sep  7 12:00:14 2011
@@ -16,24 +16,24 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import javax.jcr.nodetype.ItemDefinition;
-import javax.jcr.version.OnParentVersionAction;
-
-import org.apache.jackrabbit.spi.QItemDefinition;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QItemDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
+import javax.jcr.nodetype.ItemDefinition;
+import javax.jcr.version.OnParentVersionAction;
+
 /**
  * A builder for {@link QItemDefinition}.
  */
 public abstract class QItemDefinitionBuilder {
 
     private Name name = NameConstants.ANY_NAME;
-    private Name declaringType = null;
-    private boolean isAutocreated = false;
+    private Name declaringType;
+    private boolean isAutocreated;
     private int onParentVersion = OnParentVersionAction.COPY;
-    private boolean isProtected = false;
-    private boolean isMandatory = false;
+    private boolean isProtected;
+    private boolean isMandatory;
 
     /**
      * @param name  the name of the child item definition being build
@@ -68,7 +68,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @param autocreate <code>true</code> if building a 'autocreate' child item
+     * @param autocreate {@code true} if building a 'autocreate' child item
      * definition, false otherwise.
      * @see ItemDefinition#isAutoCreated()
      */
@@ -77,7 +77,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @return <code>true</code> if building a 'autocreate' child item
+     * @return {@code true} if building a 'autocreate' child item
      * definition, false otherwise.
      * @see ItemDefinition#isAutoCreated()
      */
@@ -102,7 +102,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @param isProtected <code>true</code> if building a 'protected' child
+     * @param isProtected {@code true} if building a 'protected' child
      * item definition, false otherwise.
      * @see ItemDefinition#isProtected()
      */
@@ -111,7 +111,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @return <code>true</code> if building a 'protected' child item
+     * @return {@code true} if building a 'protected' child item
      * definition, false otherwise.
      * @see ItemDefinition#isProtected()
      */
@@ -120,7 +120,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @param isMandatory <code>true</code> if building a 'mandatory' child
+     * @param isMandatory {@code true} if building a 'mandatory' child
      * item definition, false otherwise.
      * @see ItemDefinition#isMandatory()
      */
@@ -129,7 +129,7 @@ public abstract class QItemDefinitionBui
     }
 
     /**
-     * @return <code>true</code> if building a 'mandatory' child item
+     * @return {@code true} if building a 'mandatory' child item
      * definition, false otherwise.
      * @see ItemDefinition#isMandatory()
      */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java Wed Sep  7 12:00:14 2011
@@ -16,22 +16,22 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.Arrays;
-import java.util.Set;
-import java.util.HashSet;
-
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 /**
  * A builder for a {@link QNodeDefinition}.
  */
 public class QNodeDefinitionBuilder extends QItemDefinitionBuilder {
 
     private Name defaultPrimaryType;
-    private Set<Name> requiredPrimaryTypes = new HashSet<Name>();
+    private final Set<Name> requiredPrimaryTypes = new HashSet<Name>();
     private boolean allowsSameNameSiblings;
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeTypeDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeTypeDefinitionBuilder.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeTypeDefinitionBuilder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeTypeDefinitionBuilder.java Wed Sep  7 12:00:14 2011
@@ -16,34 +16,33 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import javax.jcr.nodetype.NodeTypeDefinition;
-
+import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeDefinition;
-import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.commons.QNodeTypeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
+
+import javax.jcr.nodetype.NodeTypeDefinition;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * A builder for {@link QNodeTypeDefinition}.
  */
 public class QNodeTypeDefinitionBuilder {
 
-    private Name name = null;
-    private List<Name> supertypes = new ArrayList<Name>();
-    private boolean isMixin = false;
-    private boolean isOrderable = false;
-    private Name primaryItemName = null;
-    private List<QPropertyDefinition> propertyDefinitions = new ArrayList<QPropertyDefinition>();
-    private List<QNodeDefinition> childNodeDefinitions = new ArrayList<QNodeDefinition>();
-    private boolean isAbstract = false;
+    private Name name;
+    private final List<Name> supertypes = new ArrayList<Name>();
+    private boolean isMixin;
+    private boolean isOrderable;
+    private Name primaryItemName;
+    private final List<QPropertyDefinition> propertyDefinitions = new ArrayList<QPropertyDefinition>();
+    private final List<QNodeDefinition> childNodeDefinitions = new ArrayList<QNodeDefinition>();
+    private boolean isAbstract;
     private boolean isQueryable = true;
-    private List<Name> supportedMixins = null;
+    private List<Name> supportedMixins;
 
 
     /**
@@ -57,7 +56,7 @@ public class QNodeTypeDefinitionBuilder 
 
     /**
      * @return the name of the node type definition being built or
-     * <code>null</code> if not set.
+     * {@code null} if not set.
      * @see NodeTypeDefinition#getName()
      */
     public Name getName() {
@@ -82,7 +81,7 @@ public class QNodeTypeDefinitionBuilder 
      * @see NodeTypeDefinition#getDeclaredSupertypeNames()
      */
     public Name[] getSuperTypes() {
-        if (supertypes.size() > 0
+        if (!supertypes.isEmpty()
                 || isMixin() || NameConstants.NT_BASE.equals(getName())) {
             return supertypes.toArray(new Name[supertypes.size()]);
         } else {
@@ -91,8 +90,8 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @param isMixin <code>true</code> if building a mixin node type
-     * definition; <code>false</code> otherwise.
+     * @param isMixin {@code true} if building a mixin node type
+     * definition; {@code false} otherwise.
      * @see NodeTypeDefinition#isMixin()
      */
     public void setMixin(boolean isMixin) {
@@ -100,8 +99,8 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if building a mixin node type definition;
-     * <code>false</code> otherwise.
+     * @return {@code true} if building a mixin node type definition;
+     * {@code false} otherwise.
      * @see NodeTypeDefinition#isMixin()
      */
     public boolean isMixin() {
@@ -111,7 +110,7 @@ public class QNodeTypeDefinitionBuilder 
     /**
      * Sets the names of additional mixin types supported on this node type.
      *
-     * @param names an array of mixin type names, or <code>null</code> when
+     * @param names an array of mixin type names, or {@code null} when
      *              there are no known constraints
      */
     public void setSupportedMixinTypes(Name[] names) {
@@ -126,7 +125,7 @@ public class QNodeTypeDefinitionBuilder 
      * Returns an array containing the names of additional mixin types supported
      * on this node type.
      *
-     * @return an array of mixin type names, or <code>null</code> when there are
+     * @return an array of mixin type names, or {@code null} when there are
      *         no known constraints.
      */
     public Name[] getSupportedMixinTypes() {
@@ -138,8 +137,8 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @param isOrderable <code>true</code> if building a node type having
-     * orderable child nodes; <code>false</code> otherwise.
+     * @param isOrderable {@code true} if building a node type having
+     * orderable child nodes; {@code false} otherwise.
      * @see NodeTypeDefinition#hasOrderableChildNodes()
      */
     public void setOrderableChildNodes(boolean isOrderable) {
@@ -147,8 +146,8 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if building a node type having orderable
-     * child nodes; <code>false</code> otherwise.
+     * @return {@code true} if building a node type having orderable
+     * child nodes; {@code false} otherwise.
      * @see NodeTypeDefinition#hasOrderableChildNodes()
      */
     public boolean hasOrderableChildNodes() {
@@ -157,7 +156,7 @@ public class QNodeTypeDefinitionBuilder 
 
     /**
      * @param primaryItemName the name of the primary item or
-     * <code>null</code> if not set.
+     * {@code null} if not set.
      * @see NodeTypeDefinition#getPrimaryItemName()
      */
     public void setPrimaryItemName(Name primaryItemName) {
@@ -165,7 +164,7 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @return the name of the primary item or <code>null</code> if not set.
+     * @return the name of the primary item or {@code null} if not set.
      * @see NodeTypeDefinition#getPrimaryItemName()
      */
     public Name getPrimaryItemName() {
@@ -173,7 +172,7 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if the node type is abstract.
+     * @return {@code true} if the node type is abstract.
      * @see NodeTypeDefinition#isAbstract()
      */
     public boolean isAbstract() {
@@ -181,7 +180,7 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @param isAbstract <code>true</code> if building a node type that is abstract.
+     * @param isAbstract {@code true} if building a node type that is abstract.
      * @see NodeTypeDefinition#isAbstract()
      */
     public void setAbstract(boolean isAbstract) {
@@ -189,7 +188,7 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if the node type is queryable
+     * @return {@code true} if the node type is queryable
      * @see NodeTypeDefinition#isQueryable()
      */
     public boolean isQueryable() {
@@ -197,7 +196,7 @@ public class QNodeTypeDefinitionBuilder 
     }
 
     /**
-     * @param queryable <code>true</code> if building a node type that is queryable
+     * @param queryable {@code true} if building a node type that is queryable
      * @see NodeTypeDefinition#isQueryable()
      */
     public void setQueryable(boolean queryable) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java Wed Sep  7 12:00:14 2011
@@ -16,28 +16,27 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.jcr.PropertyType;
-import javax.jcr.nodetype.PropertyDefinition;
-
 import org.apache.jackrabbit.commons.query.qom.Operator;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QValueConstraint;
 import org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl;
 
+import javax.jcr.PropertyType;
+import javax.jcr.nodetype.PropertyDefinition;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * A builder for {@link QPropertyDefinition}.
  */
 public class QPropertyDefinitionBuilder extends QItemDefinitionBuilder {
 
     private int requiredType = PropertyType.UNDEFINED;
-    private List<QValueConstraint> valueConstraints = new ArrayList<QValueConstraint>();
+    private final List<QValueConstraint> valueConstraints = new ArrayList<QValueConstraint>();
     private List<QValue> defaultValues;
-    private boolean isMultiple = false;
+    private boolean isMultiple;
     private boolean fullTextSearchable = true;
     private boolean queryOrderable = true;
     private String[] queryOperators = Operator.getAllQueryOperators();
@@ -114,7 +113,7 @@ public class QPropertyDefinitionBuilder 
 
     /**
      * @return array of default values of the property definition being built or
-     *         <code>null</code> if no default values are defined.
+     *         {@code null} if no default values are defined.
      * @see PropertyDefinition#getDefaultValues()
      */
     public QValue[] getDefaultValues() {
@@ -142,7 +141,7 @@ public class QPropertyDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if the property is fulltext searchable
+     * @return {@code true} if the property is fulltext searchable
      * @see PropertyDefinition#isFullTextSearchable()
      */
     public boolean getFullTextSearchable() {
@@ -150,7 +149,7 @@ public class QPropertyDefinitionBuilder 
     }
 
     /**
-     * @param fullTextSearchable <code>true</code> if building a 'fulltext
+     * @param fullTextSearchable {@code true} if building a 'fulltext
      *                           searchable' property definition
      * @see PropertyDefinition#isFullTextSearchable()
      */
@@ -159,7 +158,7 @@ public class QPropertyDefinitionBuilder 
     }
 
     /**
-     * @return <code>true</code> if the property is orderable in a query
+     * @return {@code true} if the property is orderable in a query
      * @see PropertyDefinition#isQueryOrderable()
      */
     public boolean getQueryOrderable() {
@@ -167,7 +166,7 @@ public class QPropertyDefinitionBuilder 
     }
 
     /**
-     * @param queryOrderable <code>true</code> if the property is orderable in a
+     * @param queryOrderable {@code true} if the property is orderable in a
      *                       query
      * @see PropertyDefinition#isQueryOrderable()
      */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefWriter.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefWriter.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefWriter.java Wed Sep  7 12:00:14 2011
@@ -56,8 +56,7 @@ public class CompactNodeTypeDefWriter ex
      *
      * @param out the underlying writer
      * @param s repository session
-     * @param includeNS if <code>true</code> all used namespace declarations
-     *                  are also written to the writer
+     * @param includeNS if {@code true} all used namespace declarations are also written to the writer
      */
     public CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS) {
         this(out, new SessionNamespaceResolver(s), new DefaultNamePathResolver(s), includeNS);
@@ -68,8 +67,7 @@ public class CompactNodeTypeDefWriter ex
      *
      * @param out the underlying writer
      * @param r the namespace resolver
-     * @param includeNS if <code>true</code> all used namespace decl. are also
-     *                  written to the writer
+     * @param includeNS if {@code true} all used namespace declarations are also written to the writer
      */
     public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, boolean includeNS) {
         this(out, r, new DefaultNamePathResolver(r), includeNS);
@@ -82,9 +80,7 @@ public class CompactNodeTypeDefWriter ex
      * @param r the namespace resolver
      * @param npResolver name-path resolver
      */
-    public CompactNodeTypeDefWriter(Writer out,
-                                    NamespaceResolver r,
-                                    NamePathResolver npResolver) {
+    public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver) {
         this(out, r, npResolver, false);
     }
 
@@ -94,13 +90,9 @@ public class CompactNodeTypeDefWriter ex
      * @param out the underlying writer
      * @param r the namespace resolver
      * @param npResolver name-path resolver
-     * @param includeNS if <code>true</code> all used namespace decl. are also
-     *                  written to the writer
+     * @param includeNS if {@code true} all used namespace declarations are also written to the writer
      */
-    public CompactNodeTypeDefWriter(Writer out,
-                                    final NamespaceResolver r,
-                                    NamePathResolver npResolver,
-                                    boolean includeNS) {
+    public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver, boolean includeNS) {
         super(out, createNsMapping(r), includeNS);
         this.npResolver = npResolver;
     }
@@ -115,11 +107,9 @@ public class CompactNodeTypeDefWriter ex
      * @param out output writer
      * @throws IOException if an I/O error occurs
      */
-    public static void write(Collection<? extends QNodeTypeDefinition> defs,
-                             NamespaceResolver r,
-                             NamePathResolver npResolver,
-                             Writer out)
-            throws IOException {
+    public static void write(Collection<? extends QNodeTypeDefinition> defs, NamespaceResolver r,
+            NamePathResolver npResolver, Writer out) throws IOException {
+
         CompactNodeTypeDefWriter w = new CompactNodeTypeDefWriter(out, r, npResolver, true);
         for (QNodeTypeDefinition def : defs) {
             w.write(def);
@@ -135,7 +125,7 @@ public class CompactNodeTypeDefWriter ex
      */
     public void write(QNodeTypeDefinition ntd) throws IOException {
         NodeTypeDefinition def = new NodeTypeDefinitionImpl(ntd, npResolver, new ValueFactoryQImpl(QValueFactoryImpl.getInstance(), npResolver));
-        super.write(def);
+        write(def);
     }
 
     /**
@@ -152,6 +142,7 @@ public class CompactNodeTypeDefWriter ex
 
     private static NamespaceMapping createNsMapping(final NamespaceResolver namespaceResolver) {
         return new org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter.NamespaceMapping() {
+            @Override
             public String getNamespaceURI(String prefix) {
                 try {
                     return namespaceResolver.getURI(prefix);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/BooleanConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/BooleanConstraint.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/BooleanConstraint.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/BooleanConstraint.java Wed Sep  7 12:00:14 2011
@@ -16,15 +16,15 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype.constraint;
 
+import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
+
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 
-import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
-
 /**
- * <code>BooleanConstraint</code> ...
+ * {@code BooleanConstraint} ...
  */
 class BooleanConstraint extends ValueConstraint {
 
@@ -39,7 +39,7 @@ class BooleanConstraint extends ValueCon
         } else if (definition.equals("false")) {
             reqBool = false;
         } else {
-            String msg = "'" + definition
+            String msg = '\'' + definition
                     + "' is not a valid value constraint format for BOOLEAN values";
             log.debug(msg);
             throw new InvalidConstraintException(msg);
@@ -49,15 +49,16 @@ class BooleanConstraint extends ValueCon
     /**
      * @see org.apache.jackrabbit.spi.QValueConstraint#check(QValue)
      */
-    public void check(QValue value) throws ConstraintViolationException, RepositoryException {
+    @Override
+    public void check(QValue value) throws RepositoryException {
         if (value == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '"  + getString() + "'");
+            throw new ConstraintViolationException("null value does not satisfy the constraint '"  + getString() + '\'');
         }
         switch (value.getType()) {
             case PropertyType.BOOLEAN:
                 boolean b = Boolean.valueOf(value.getString());
                 if (b != reqBool) {
-                    throw new ConstraintViolationException("'" + b + "' does not satisfy the constraint '" + getString() + "'");
+                    throw new ConstraintViolationException("'" + b + "' does not satisfy the constraint '" + getString() + '\'');
                 }
                 return;
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/DateConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/DateConstraint.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/DateConstraint.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/DateConstraint.java Wed Sep  7 12:00:14 2011
@@ -16,21 +16,20 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype.constraint;
 
-import java.util.Calendar;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
+import org.apache.jackrabbit.value.DateValue;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.ValueFormatException;
 import javax.jcr.nodetype.ConstraintViolationException;
-
-import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
-import org.apache.jackrabbit.value.DateValue;
+import java.util.Calendar;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
- * <code>DateConstraint</code> ...
+ * {@code DateConstraint} ...
  */
 class DateConstraint extends ValueConstraint {
 
@@ -72,32 +71,32 @@ class DateConstraint extends ValueConstr
                 upperInclusive = s.equals("]");
 
                 if (lowerLimit == null && upperLimit == null) {
-                    String msg = "'" + definition
+                    String msg = '\'' + definition
                             + "' is not a valid value constraint format for dates: neither min- nor max-date specified";
                     log.debug(msg);
                     throw new InvalidConstraintException(msg);
                 }
                 if (lowerLimit != null && upperLimit != null) {
                     if (lowerLimit.after(upperLimit)) {
-                        String msg = "'" + definition
+                        String msg = '\'' + definition
                                 + "' is not a valid value constraint format for dates: min-date > max-date";
                         log.debug(msg);
                         throw new InvalidConstraintException(msg);
                     }
                 }
             } catch (ValueFormatException vfe) {
-                String msg = "'" + definition
+                String msg = '\'' + definition
                         + "' is not a valid value constraint format for dates";
                 log.debug(msg);
                 throw new InvalidConstraintException(msg, vfe);
             } catch (RepositoryException re) {
-                String msg = "'" + definition
+                String msg = '\'' + definition
                         + "' is not a valid value constraint format for dates";
                 log.debug(msg);
                 throw new InvalidConstraintException(msg, re);
             }
         } else {
-            String msg = "'" + definition
+            String msg = '\'' + definition
                     + "' is not a valid value constraint format for dates";
             log.debug(msg);
             throw new InvalidConstraintException(msg);
@@ -106,20 +105,20 @@ class DateConstraint extends ValueConstr
 
     private void check(Calendar cal) throws ConstraintViolationException {
         if (cal == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + "'");
+            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + '\'');
         }
         if (lowerLimit != null) {
             if (lowerInclusive) {
                 if (cal.getTimeInMillis() < lowerLimit.getTimeInMillis()) {
                     throw new ConstraintViolationException(cal
                             + " does not satisfy the constraint '"
-                            + getString() + "'");
+                            + getString() + '\'');
                 }
             } else {
                 if (cal.getTimeInMillis() <= lowerLimit.getTimeInMillis()) {
                     throw new ConstraintViolationException(cal
                             + " does not satisfy the constraint '"
-                            + getString() + "'");
+                            + getString() + '\'');
                 }
             }
         }
@@ -128,13 +127,13 @@ class DateConstraint extends ValueConstr
                 if (cal.getTimeInMillis() > upperLimit.getTimeInMillis()) {
                     throw new ConstraintViolationException(cal
                             + " does not satisfy the constraint '"
-                            + getString() + "'");
+                            + getString() + '\'');
                 }
             } else {
                 if (cal.getTimeInMillis() >= upperLimit.getTimeInMillis()) {
                     throw new ConstraintViolationException(cal
                             + " does not satisfy the constraint '"
-                            + getString() + "'");
+                            + getString() + '\'');
                 }
             }
         }
@@ -143,9 +142,10 @@ class DateConstraint extends ValueConstr
     /**
      * @see org.apache.jackrabbit.spi.QValueConstraint#check(QValue)
      */
-    public void check(QValue value) throws ConstraintViolationException, RepositoryException {
+    @Override
+    public void check(QValue value) throws RepositoryException {
         if (value == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + "'");
+            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + '\'');
         }
         switch (value.getType()) {
             case PropertyType.DATE:

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/NameConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/NameConstraint.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/NameConstraint.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/NameConstraint.java Wed Sep  7 12:00:14 2011
@@ -16,11 +16,6 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype.constraint;
 
-import javax.jcr.NamespaceException;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.ConstraintViolationException;
-
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
@@ -28,8 +23,13 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.conversion.NameResolver;
 import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
 
+import javax.jcr.NamespaceException;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.ConstraintViolationException;
+
 /**
- * <code>NameConstraint</code> ...
+ * {@code NameConstraint} ...
  */
 class NameConstraint extends ValueConstraint {
 
@@ -64,7 +64,7 @@ class NameConstraint extends ValueConstr
 
     /**
      * Uses {@link NamePathResolver#getJCRName(Name)} to convert the
-     * <code>Name</code> identifying this constraint into a JCR name String.
+     * {@code Name} identifying this constraint into a JCR name String.
      *
      * @see ValueConstraint#getDefinition(NamePathResolver)
      * @param resolver name-path resolver
@@ -82,9 +82,10 @@ class NameConstraint extends ValueConstr
     /**
      * @see org.apache.jackrabbit.spi.QValueConstraint#check(QValue)
      */
-    public void check(QValue value) throws ConstraintViolationException, RepositoryException {
+    @Override
+    public void check(QValue value) throws RepositoryException {
         if (value == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + "'");
+            throw new ConstraintViolationException("null value does not satisfy the constraint '" + getString() + '\'');
         }
         switch (value.getType()) {
             case PropertyType.NAME:
@@ -92,7 +93,7 @@ class NameConstraint extends ValueConstr
                 if (!name.equals(n)) {
                     throw new ConstraintViolationException(n
                             + " does not satisfy the constraint '"
-                            + getString() + "'");
+                            + getString() + '\'');
                 }
                 return;
 



Mime
View raw message