You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fg...@apache.org on 2010/01/13 20:01:15 UTC

svn commit: r898886 - /incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java

Author: fguillaume
Date: Wed Jan 13 19:01:14 2010
New Revision: 898886

URL: http://svn.apache.org/viewvc?rev=898886&view=rev
Log:
Read base types without cmis:parentId

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java?rev=898886&r1=898885&r2=898886&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java Wed Jan 13 19:01:14 2010
@@ -97,6 +97,9 @@
             // TODO also for documents: versionable, contentStreamAllowed
             // TODO also for relationships: allowedSourceTypes,
             // allowedTargetTypes
+            if (!map.containsKey(CMIS.PARENT_ID.getLocalPart())) {
+                map.put(CMIS.PARENT_ID.getLocalPart(), null);
+            }
             for (QName qname : Arrays.asList( //
                     CMIS.ID, //
                     CMIS.LOCAL_NAME, //
@@ -114,10 +117,9 @@
                     CMIS.INCLUDED_IN_SUPERTYPE_QUERY //
             )) {
                 if (!map.containsKey(qname.getLocalPart())) {
-                    throw new IllegalArgumentException(
-                            "Invalid type definition: missing "
-                                    + qname.getPrefix() + ':'
-                                    + qname.getLocalPart());
+                    log.error("Invalid type definition for "
+                            + map.get(CMIS.ID.getLocalPart()) + ", missing "
+                            + qname.getPrefix() + ':' + qname.getLocalPart());
                 }
             }
             entry.init(map, pdefs);