jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r651626 - in /jackrabbit/trunk: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/
Date Fri, 25 Apr 2008 15:14:36 GMT
Author: angela
Date: Fri Apr 25 08:14:35 2008
New Revision: 651626

URL: http://svn.apache.org/viewvc?rev=651626&view=rev
Log:
JCR-1550: Remove ItemInfo.getName() since it is redundant

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java
Fri Apr 25 08:14:35 2008
@@ -30,11 +30,6 @@
 public abstract class ItemInfoImpl implements ItemInfo, Serializable {
 
     /**
-     * The name of this item info.
-     */
-    private final Name name;
-
-    /**
      * The path of this item info.
      */
     private final Path path;
@@ -51,32 +46,23 @@
      * @param name     the name of this item.
      * @param path     the path to this item.
      * @param isNode   if this item is a node.
-     * @deprecated Use {@link #ItemInfoImpl(Name, Path, boolean)} instead. The
+     * @deprecated Use {@link #ItemInfoImpl(Path, boolean)} instead. The
      * parentId is not used any more and the corresponding getter has been
      * removed.
      */
     public ItemInfoImpl(NodeId parentId, Name name, Path path, boolean isNode) {
-        this(name, path, isNode);
+        this(path, isNode);
     }
     
     /**
      * Creates a new item info from the given name, path and boolean flag.
      *
-     * @param name     the name of this item.
      * @param path     the path to this item.
      * @param isNode   if this item is a node.
      */
-    public ItemInfoImpl(Name name, Path path, boolean isNode) {
-        this.name = name;
+    public ItemInfoImpl(Path path, boolean isNode) {
         this.path = path;
         this.isNode = isNode;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Name getName() {
-        return name;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
Fri Apr 25 08:14:35 2008
@@ -86,8 +86,7 @@
             NodeId nodeId = nodeInfo.getId();
             nodeId = idFactory.createNodeId(nodeId.getUniqueID(), nodeId.getPath());
             final Iterator propIds = nodeInfo.getPropertyIds();
-            return new NodeInfoImpl(nodeInfo.getName(),
-                    nodeInfo.getPath(), nodeId,
+            return new NodeInfoImpl(nodeInfo.getPath(), nodeId,
                     nodeInfo.getIndex(), nodeInfo.getNodetype(),
                     nodeInfo.getMixins(), serRefs.iterator(),
                     new Iterator() {
@@ -127,13 +126,12 @@
     public NodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id,
                         int index, Name primaryTypeName, Name[] mixinNames,
                         Iterator references, Iterator propertyIds) {
-         this(name, path, id, index, primaryTypeName, mixinNames, references, propertyIds);
+         this(path, id, index, primaryTypeName, mixinNames, references, propertyIds);
     }
 
     /**
      * Creates a new node info from the given parameters.
      *
-     * @param name            the name of this item.
      * @param path            the path to this item.
      * @param id              the id of this item.
      * @param index           the index of this item.
@@ -142,10 +140,9 @@
      * @param references      the references to this node.
      * @param propertyIds     the properties of this node.
      */
-    public NodeInfoImpl(Name name, Path path, NodeId id,
-                        int index, Name primaryTypeName, Name[] mixinNames,
-                        Iterator references, Iterator propertyIds) {
-        super(name, path, true);
+    public NodeInfoImpl(Path path, NodeId id, int index, Name primaryTypeName,
+                        Name[] mixinNames, Iterator references, Iterator propertyIds) {
+        super(path, true);
         this.id = id;
         this.index = index;
         this.primaryTypeName = primaryTypeName;

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java
Fri Apr 25 08:14:35 2008
@@ -68,8 +68,8 @@
                     parentId.getUniqueID(), parentId.getPath());
             PropertyId propId = idFactory.createPropertyId(
                     parentId, propertyInfo.getId().getName());
-            return new PropertyInfoImpl(propertyInfo.getName(),
-                    propertyInfo.getPath(), propId, propertyInfo.getType(),
+            return new PropertyInfoImpl(propertyInfo.getPath(),
+                    propId, propertyInfo.getType(),
                     propertyInfo.isMultiValued(), propertyInfo.getValues());
         }
     }
@@ -84,29 +84,27 @@
      * @param type          the type of this property.
      * @param isMultiValued whether this property is multi-valued.
      * @param values        the values.
-     * @deprecated Use {@link #PropertyInfoImpl(Name, Path, PropertyId, int, boolean, QValue[])}
+     * @deprecated Use {@link #PropertyInfoImpl(Path, PropertyId, int, boolean, QValue[])}
      * instead. The parentId is not used any more.
      */
     public PropertyInfoImpl(NodeId parentId, Name name, Path path,
                             PropertyId id, int type, boolean isMultiValued,
                             QValue[] values) {
-        this(name, path, id, type, isMultiValued, values);
+        this(path, id, type, isMultiValued, values);
     }
 
     /**
      * Creates a new property info for the given parameters.
      *
-     * @param name          the name of this property.
      * @param path          the path to this property.
      * @param id            the id of this property.
      * @param type          the type of this property.
      * @param isMultiValued whether this property is multi-valued.
      * @param values        the values.
      */
-    public PropertyInfoImpl(Name name, Path path,
-                            PropertyId id, int type, boolean isMultiValued,
-                            QValue[] values) {
-        super(name, path, false);
+    public PropertyInfoImpl(Path path, PropertyId id, int type,
+                            boolean isMultiValued, QValue[] values) {
+        super(path, false);
         this.propertyId = id;
         this.type = type;
         this.isMultiValued = isMultiValued;

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
Fri Apr 25 08:14:35 2008
@@ -23,14 +23,6 @@
 public interface ItemInfo {
 
     /**
-     * Returns the qualified representation of the item name. For the root node
-     * expected return value is <code>{""}""</code>.
-     *
-     * @return the qualified representation of the item name.
-     */
-    public Name getName();
-
-    /**
      * Returns true if this <code>ItemInfo</code> denotes a node, false otherwise.
      *
      * @return true if this <code>ItemInfo</code> denotes a node, false otherwise.

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/NodeInfoImpl.java
Fri Apr 25 08:14:35 2008
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
-import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.Name;
 
 import javax.jcr.RepositoryException;
@@ -49,8 +48,7 @@
                         IdFactoryImpl idFactory,
                         NamePathResolver resolver)
             throws RepositoryException, NameException {
-        super(node.getName().length() == 0 ? NameConstants.ROOT : resolver.getQName(node.getName()),
-                resolver.getQPath(node.getPath()),
+        super(resolver.getQPath(node.getPath()),
                 idFactory.createNodeId(node, resolver), node.getIndex(),
                 resolver.getQName(node.getPrimaryNodeType().getName()),
                 getNodeTypeNames(node.getMixinNodeTypes(), resolver),

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java?rev=651626&r1=651625&r2=651626&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
Fri Apr 25 08:14:35 2008
@@ -48,11 +48,10 @@
                             NamePathResolver resolver,
                             QValueFactory qValueFactory)
             throws RepositoryException, NameException {
-        super(resolver.getQName(property.getName()),
-                resolver.getQPath(property.getPath()),
+        super(resolver.getQPath(property.getPath()),
                 idFactory.createPropertyId(property, resolver),
                 property.getType(), property.getDefinition().isMultiple(),
-                getValues(property, resolver, qValueFactory)); // TODO: build QValues upon
(first) usage only.
+                getValues(property, resolver, qValueFactory));
     }
 
     /**



Mime
View raw message