chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r898886 - /incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
Date Wed, 13 Jan 2010 19:01:15 GMT
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);



Mime
View raw message