jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r571394 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
Date Fri, 31 Aug 2007 07:49:42 GMT
Author: dpfister
Date: Fri Aug 31 00:49:42 2007
New Revision: 571394

URL: http://svn.apache.org/viewvc?rev=571394&view=rev
Log:
JCR-1O96 - Problems with custom nodes in journal

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java?rev=571394&r1=571393&r2=571394&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
Fri Aug 31 00:49:42 2007
@@ -32,6 +32,7 @@
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
 import org.apache.jackrabbit.core.nodetype.PropDef;
 import org.apache.jackrabbit.core.nodetype.ValueConstraint;
+import org.apache.jackrabbit.core.nodetype.ItemDef;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.QName;
@@ -174,11 +175,9 @@
         QName[] sta = ntd.getSupertypes();
         String delim = " > ";
         for (int i = 0; i < sta.length; i++) {
-            if (!sta[i].equals(QName.NT_BASE)) {
-                out.write(delim);
-                out.write(resolve(sta[i]));
-                delim = ", ";
-            }
+            out.write(delim);
+            out.write(resolve(sta[i]));
+            delim = ", ";
         }
     }
 
@@ -278,7 +277,7 @@
     private void writeValueConstraints(ValueConstraint[] vca) throws IOException {
         if (vca != null && vca.length > 0) {
             String vc = vca[0].getDefinition(resolver);
-            out.write("\n" + INDENT + INDENT + "< '");
+            out.write(" < '");
             out.write(escape(vc));
             out.write("'");
             for (int i = 1; i < vca.length; i++) {
@@ -296,7 +295,13 @@
      */
     private void writeNodeDef(NodeTypeDef ntd, NodeDef nd) throws IOException {
         out.write("\n" + INDENT + "+ ");
-        writeItemDefName(nd.getName());
+
+        QName name = nd.getName();
+        if (name.equals(ItemDef.ANY_NAME)) {
+            out.write('*');
+        } else {
+            writeItemDefName(name);
+        }
         writeRequiredTypes(nd.getRequiredPrimaryTypes());
         writeDefaultType(nd.getDefaultPrimaryType());
         out.write(ntd.getPrimaryItemName() != null && ntd.getPrimaryItemName().equals(nd.getName())
? " primary" : "");



Mime
View raw message