From 27a993905417cf2d5d5e99115f91b0f979f83f51 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 15 May 2012 16:24:37 -0700 Subject: [PATCH] CSPACE-5133: Adding mock additional display names to list result for partial term searches. Do this so we can test full-stack integration of term completion with P/NP terms. Signed-off-by: Richard Millet --- .../AuthorityItemDocumentModelHandler.java | 55 +++++++++---- .../common/document/DocumentHandler.java | 1 + .../common/imaging/nuxeo/NuxeoImageUtils.java | 6 +- .../nuxeo/client/java/CommonList.java | 44 ++++++++--- .../nuxeo/client/java/DocHandlerBase.java | 60 ++++++++------ .../java/RemoteDocumentModelHandlerImpl.java | 52 ++---------- .../services/nuxeo/util/NuxeoUtils.java | 79 ++++++++++++++++--- .../servicegroup/ServiceGroupResource.java | 2 +- .../ServiceGroupDocumentModelHandler.java | 2 +- 9 files changed, 188 insertions(+), 113 deletions(-) diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java index dc72d97a6..738ba114f 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java @@ -24,13 +24,13 @@ package org.collectionspace.services.common.vocabulary.nuxeo; import org.collectionspace.services.client.AuthorityClient; +import org.collectionspace.services.client.IQueryManager; import org.collectionspace.services.client.PayloadInputPart; import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PoxPayloadIn; import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.RelationClient; import org.collectionspace.services.common.ResourceBase; -import org.collectionspace.services.common.ServiceMessages; import org.collectionspace.services.common.api.CommonAPI; import org.collectionspace.services.common.api.RefName; import org.collectionspace.services.common.api.Tools; @@ -41,17 +41,16 @@ import org.collectionspace.services.common.context.ServiceContext; import org.collectionspace.services.common.document.DocumentException; import org.collectionspace.services.common.document.DocumentFilter; import org.collectionspace.services.common.document.DocumentWrapper; -import org.collectionspace.services.common.document.DocumentWrapperImpl; import org.collectionspace.services.common.relation.IRelationsManager; import org.collectionspace.services.common.repository.RepositoryClient; -import org.collectionspace.services.common.repository.RepositoryClientFactory; import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema; import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema; import org.collectionspace.services.common.vocabulary.RefNameServiceUtils; import org.collectionspace.services.config.service.ListResultField; import org.collectionspace.services.config.service.ObjectPartType; +import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.nuxeo.client.java.CommonList; //FIXME: REM - 5/15/2012 - CommonList should be moved out of this package and into a more "common" package import org.collectionspace.services.nuxeo.client.java.DocHandlerBase; -import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl; import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl; import org.collectionspace.services.nuxeo.util.NuxeoUtils; import org.collectionspace.services.relation.RelationResource; @@ -60,27 +59,25 @@ import org.collectionspace.services.relation.RelationsCommonList; import org.collectionspace.services.relation.RelationsDocListItem; import org.collectionspace.services.relation.RelationshipType; import org.collectionspace.services.vocabulary.VocabularyItemJAXBSchema; + import org.nuxeo.ecm.core.api.ClientException; import org.nuxeo.ecm.core.api.DocumentModel; +import org.nuxeo.ecm.core.api.DocumentModelList; import org.nuxeo.ecm.core.api.model.PropertyException; -import org.nuxeo.ecm.core.api.model.PropertyNotFoundException; import org.nuxeo.ecm.core.api.repository.RepositoryInstance; -import org.nuxeo.runtime.transaction.TransactionHelper; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.ws.rs.PathParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; + import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.collectionspace.services.nuxeo.client.java.DocumentModelHandler; //import org.collectionspace.services.common.authority.AuthorityItemRelations; /** @@ -173,6 +170,10 @@ public abstract class AuthorityItemDocumentModelHandler return result; } + private boolean isTermDisplayName(String elName) { + return AuthorityItemJAXBSchema.TERM_DISPLAY_NAME.equals(elName) || VocabularyItemJAXBSchema.DISPLAY_NAME.equals(elName); + } + @Override public List getListItemsArray() throws DocumentException { List list = super.getListItemsArray(); @@ -187,7 +188,7 @@ public abstract class AuthorityItemDocumentModelHandler for (int i = 0; i < nFields; i++) { ListResultField field = list.get(i); String elName = field.getElement(); - if (AuthorityItemJAXBSchema.TERM_DISPLAY_NAME.equals(elName) || VocabularyItemJAXBSchema.DISPLAY_NAME.equals(elName)) { + if (isTermDisplayName(elName) == true) { hasDisplayName = true; } else if (AuthorityItemJAXBSchema.SHORT_IDENTIFIER.equals(elName)) { hasShortId = true; @@ -218,11 +219,10 @@ public abstract class AuthorityItemDocumentModelHandler field = getListResultsTermStatusField(); list.add(field); } - + return list; } - - + /* (non-Javadoc) * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#handleCreate(org.collectionspace.services.common.document.DocumentWrapper) */ @@ -474,8 +474,6 @@ public abstract class AuthorityItemDocumentModelHandler } - - /* (non-Javadoc) * @see org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl#extractPart(org.nuxeo.ecm.core.api.DocumentModel, java.lang.String, org.collectionspace.services.common.service.ObjectPartType) */ @@ -515,6 +513,29 @@ public abstract class AuthorityItemDocumentModelHandler } } + @Override + protected Object getXPathValue(DocumentModel docModel, // REM - CSPACE-5133 + String schema, ListResultField field) { + Object result = null; + + result = NuxeoUtils.getXPathValue(docModel, schema, field.getXpath()); + String elName = field.getElement(); + if (isTermDisplayName(elName) == true) { + MultivaluedMap queryParams = this.getServiceContext().getQueryParams(); + String partialTerm = queryParams != null ? queryParams.getFirst(IQueryManager.SEARCH_TYPE_PARTIALTERM) : null; + if (partialTerm != null && partialTerm.trim().isEmpty() == false) { + List strList = new ArrayList(); + strList.add((String)result); + strList.add("Tiny"); + strList.add("Tucker"); + strList.add("Tim"); + result = strList; + } + } + + return result; + } + @Override public void extractAllParts(DocumentWrapper wrapDoc) throws Exception { MultipartServiceContext ctx = (MultipartServiceContext) getServiceContext(); diff --git a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentHandler.java b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentHandler.java index fde044675..17bbcf838 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentHandler.java +++ b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentHandler.java @@ -233,6 +233,7 @@ public interface DocumentHandler { */ public TL extractCommonPartList(DocumentWrapper docWrap) throws Exception; + /** * Extract paging info. * diff --git a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java index 7e0dfc172..7c9445070 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java +++ b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java @@ -200,9 +200,9 @@ public class NuxeoImageUtils { return uri + result + "/" + BlobInput.URI_CONTENT_PATH; } - static private HashMap createBlobListItem(Blob blob, + static private HashMap createBlobListItem(Blob blob, String uri) { - HashMap item = new HashMap(); + HashMap item = new HashMap(); String value = blob.getEncoding(); if (value != null && !value.trim().isEmpty()) { @@ -248,7 +248,7 @@ public class NuxeoImageUtils { .getAdapter(BlobHolder.class); List docBlobs = docBlobHolder.getBlobs(); // List blobListItems = result.getBlobListItem(); - HashMap item = null; + HashMap item = null; for (Blob blob : docBlobs) { item = createBlobListItem(blob, uri); commonList.addItem(item); diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java index e13c0f33d..df6bfbfa3 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CommonList.java @@ -34,6 +34,9 @@ import org.apache.commons.lang.builder.ToStringBuilder; import org.jvnet.jaxb2_commons.lang.ToString; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -45,8 +48,7 @@ import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlSeeAlso; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; +import org.slf4j.LoggerFactory; /** * This class allows us to generically represent and marshall a set of list @@ -66,7 +68,7 @@ import javax.xml.bind.annotation.XmlSeeAlso; public class CommonList extends AbstractCommonList { /** The logger. */ - //private final Logger logger = LoggerFactory.getLogger(this.getClass()); + private final Logger logger = LoggerFactory.getLogger(CommonList.class); @XmlTransient private DocumentBuilderFactory factory; @XmlTransient @@ -129,6 +131,27 @@ public class CommonList extends AbstractCommonList { } return implodedString; } + + private void addItem(List anyList, String key, Object value) { + if (value != null ) { + Element el = doc.createElement(key); + if (value instanceof String) { + el.setTextContent((String)value); + anyList.add(el); + } else if (value instanceof List) { + List valueList = (List)value; + for (String val : valueList) { + addItem(anyList, key, val); + } + } else { + logger.error("Unknown value type found while processing common list results: " + + value.getClass().getCanonicalName()); + } + } else { + logger.trace("Null value encountered while processing common list results for key: " + + key); + } + } /** * Adds an item to the results list. Each item should have fields @@ -138,18 +161,19 @@ public class CommonList extends AbstractCommonList { * @param itemInfo * @throws RuntimeException if this is called before fieldKeys has been set. */ - public void addItem(HashMap itemInfo) { - if(fieldKeys==null) { - throw new RuntimeException("CommonList.addItem: Cannot add items before fieldKeys are set."); + public void addItem(HashMap itemInfo) { + if (fieldKeys == null) { + throw new RuntimeException( + "CommonList.addItem: Cannot add items before fieldKeys are set."); } List itemsList = getListItem(); AbstractCommonList.ListItem listItem = new AbstractCommonList.ListItem(); itemsList.add(listItem); + List anyList = listItem.getAny(); - for(String key:fieldKeys) { - Element el = doc.createElement(key); - el.setTextContent(itemInfo.get(key)); - anyList.add(el); + for (String key : fieldKeys) { + Object value = itemInfo.get(key); + addItem(anyList, key, value); } } diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java index 34f7646aa..8fb3c9e02 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java @@ -193,31 +193,39 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl iter = wrapDoc.getWrappedObject().iterator(); - HashMap item = new HashMap(); - while(iter.hasNext()){ - DocumentModel docModel = iter.next(); - String id = NuxeoUtils.getCsid(docModel); - item.put(STANDARD_LIST_CSID_FIELD, id); - String uri = getUri(docModel); - item.put(STANDARD_LIST_URI_FIELD, uri); - item.put(STANDARD_LIST_UPDATED_AT_FIELD, getUpdatedAtAsString(docModel)); - item.put(STANDARD_LIST_WORKFLOW_FIELD, docModel.getCurrentLifeCycleState()); - - for (ListResultField field : resultsFields ){ - String schema = field.getSchema(); - if(schema==null || schema.trim().isEmpty()) - schema = commonSchema; - String value = - getXPathStringValue(docModel, schema, field.getXpath()); - if(value!=null && !value.trim().isEmpty()) { - item.put(field.getElement(), value); - } - } - commonList.addItem(item); - item.clear(); - } + commonList.setFieldsReturned(fields); + Iterator iter = wrapDoc.getWrappedObject().iterator(); + HashMap item = new HashMap(); + while (iter.hasNext()) { + DocumentModel docModel = iter.next(); + String id = NuxeoUtils.getCsid(docModel); + item.put(STANDARD_LIST_CSID_FIELD, id); + String uri = getUri(docModel); + item.put(STANDARD_LIST_URI_FIELD, uri); + item.put(STANDARD_LIST_UPDATED_AT_FIELD, + getUpdatedAtAsString(docModel)); + item.put(STANDARD_LIST_WORKFLOW_FIELD, + docModel.getCurrentLifeCycleState()); + + for (ListResultField field : resultsFields) { + String schema = field.getSchema(); + if (schema == null || schema.trim().isEmpty()) { + schema = commonSchema; + } + Object value = getXPathValue(docModel, schema, field); + if (value != null && value instanceof String) { + String strValue = (String) value; + if (strValue.trim().isEmpty() == true) { + value = null; + } + } + if (value != null) { + item.put(field.getElement(), value); + } + } + commonList.addItem(item); + item.clear(); + } return commonList; } @@ -271,7 +279,7 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl * @param xpath The XPath expression (without schema prefix) * @return value the indicated property value as a String */ - protected static String getXPathStringValue(DocumentModel docModel, - String schema, String xpath) { - String result = null; - - xpath = schema + ":" + xpath; - try { - Object value = docModel.getPropertyValue(xpath); - String returnVal = null; - if (value == null) { - // Nothing to do - leave returnVal null - } else if (value instanceof GregorianCalendar) { - returnVal = DateTimeFormatUtils.formatAsISO8601Timestamp((GregorianCalendar) value); - } else { - returnVal = value.toString(); - } - result = returnVal; - } catch (PropertyException pe) { - throw new RuntimeException("Problem retrieving property {" + xpath - + "}. Bad XPath spec?" + pe.getLocalizedMessage()); - } catch (ClassCastException cce) { - throw new RuntimeException("Problem retrieving property {" + xpath - + "} as String. Not a String property?" - + cce.getLocalizedMessage()); - } catch (IndexOutOfBoundsException ioobe) { - // Nuxeo seems to handle foo/[0]/bar when it is missing, - // but not foo/bar[0] (for repeating scalars). - if (xpath.endsWith("[0]")) { // gracefully handle missing elements - result = ""; - } else { - String msg = ioobe.getMessage(); - if (msg != null && msg.equals("Index: 0, Size: 0")) { - // Some other variant on a missing sub-field; quietly - // absorb. - result = ""; - } - } - // Otherwise, e.g., for true OOB indices, propagate the exception. - if (result == null) { - throw new RuntimeException("Problem retrieving property {" + xpath - + "}:" + ioobe.getLocalizedMessage()); - } - } catch (Exception e) { - throw new RuntimeException("Unknown problem retrieving property {" - + xpath + "}." + e.getLocalizedMessage()); - } + protected Object getXPathValue(DocumentModel docModel, // REM - CSPACE-5133 + String schema, ListResultField field) { + Object result = null; + result = NuxeoUtils.getXPathValue(docModel, schema, field.getXpath()); + return result; } diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java index 75c42bda8..836672215 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java @@ -22,9 +22,8 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.File; -import java.io.Serializable; +import java.util.GregorianCalendar; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.regex.Matcher; @@ -37,11 +36,10 @@ import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.api.Tools; import org.collectionspace.services.common.context.ServiceBindingUtils; import org.collectionspace.services.common.context.ServiceContext; -import org.collectionspace.services.common.document.BadRequestException; +import org.collectionspace.services.common.datetime.DateTimeFormatUtils; import org.collectionspace.services.common.document.DocumentException; -import org.collectionspace.services.common.document.DocumentWrapper; -import org.collectionspace.services.common.document.DocumentWrapperImpl; import org.collectionspace.services.common.query.QueryContext; +import org.collectionspace.services.config.service.ListResultField; import org.collectionspace.services.nuxeo.client.java.DocumentModelHandler; import org.dom4j.Document; @@ -55,12 +53,10 @@ import org.nuxeo.ecm.core.api.CoreSession; import org.nuxeo.ecm.core.api.DocumentRef; import org.nuxeo.ecm.core.api.IdRef; import org.nuxeo.ecm.core.api.PathRef; -import org.nuxeo.ecm.core.api.IterableQueryResult; -import org.nuxeo.ecm.core.api.model.DocumentPart; +import org.nuxeo.ecm.core.api.model.PropertyException; import org.nuxeo.ecm.core.io.DocumentPipe; import org.nuxeo.ecm.core.io.DocumentReader; -import org.nuxeo.ecm.core.io.impl.plugins.DocumentTreeReader; import org.nuxeo.ecm.core.io.DocumentWriter; import org.nuxeo.ecm.core.io.impl.DocumentPipeImpl; import org.nuxeo.ecm.core.io.impl.plugins.SingleDocumentReader; @@ -68,8 +64,6 @@ import org.nuxeo.ecm.core.io.impl.plugins.XMLDocumentWriter; import org.nuxeo.ecm.core.schema.SchemaManager; import org.nuxeo.ecm.core.search.api.client.querymodel.descriptor.QueryModelDescriptor; -import org.nuxeo.ecm.core.storage.sql.jdbc.ResultSetQueryResult; -import org.nuxeo.ecm.core.query.sql.NXQL; import org.nuxeo.runtime.api.Framework; @@ -602,6 +596,71 @@ public class NuxeoUtils { return result; } + /** + * Gets XPath value from schema. Note that only "/" and "[n]" are + * supported for xpath. Can omit grouping elements for repeating complex types, + * e.g., "fieldList/[0]" can be used as shorthand for "fieldList/field[0]" and + * "fieldGroupList/[0]/field" can be used as shorthand for "fieldGroupList/fieldGroup[0]/field". + * If there are no entries for a list of scalars or for a list of complex types, + * a 0 index expression (e.g., "fieldGroupList/[0]/field") will safely return an empty + * string. A non-zero index will throw an IndexOutOfBoundsException if there are not + * that many elements in the list. + * N.B.: This does not follow the XPath spec - indices are 0-based, not 1-based. + * + * @param docModel The document model to get info from + * @param schema The name of the schema (part) + * @param xpath The XPath expression (without schema prefix) + * @return value the indicated property value as a String + */ + public static Object getXPathValue(DocumentModel docModel, + String schema, String xpath) { + Object result = null; + + xpath = schema + ":" + xpath; + try { + Object value = docModel.getPropertyValue(xpath); + String returnVal = null; + if (value == null) { + // Nothing to do - leave returnVal null + } else if (value instanceof GregorianCalendar) { + returnVal = DateTimeFormatUtils.formatAsISO8601Timestamp((GregorianCalendar) value); + } else { + returnVal = value.toString(); + } + result = returnVal; + } catch (PropertyException pe) { + throw new RuntimeException("Problem retrieving property {" + xpath + + "}. Bad XPath spec?" + pe.getLocalizedMessage()); + } catch (ClassCastException cce) { + throw new RuntimeException("Problem retrieving property {" + xpath + + "} as String. Not a String property?" + + cce.getLocalizedMessage()); + } catch (IndexOutOfBoundsException ioobe) { + // Nuxeo seems to handle foo/[0]/bar when it is missing, + // but not foo/bar[0] (for repeating scalars). + if (xpath.endsWith("[0]")) { // gracefully handle missing elements + result = ""; + } else { + String msg = ioobe.getMessage(); + if (msg != null && msg.equals("Index: 0, Size: 0")) { + // Some other variant on a missing sub-field; quietly + // absorb. + result = ""; + } + } + // Otherwise, e.g., for true OOB indices, propagate the exception. + if (result == null) { + throw new RuntimeException("Problem retrieving property {" + xpath + + "}:" + ioobe.getLocalizedMessage()); + } + } catch (Exception e) { + throw new RuntimeException("Unknown problem retrieving property {" + + xpath + "}." + e.getLocalizedMessage()); + } + + return result; + } + static public String getPrimaryXPathPropertyName(String schema, String complexPropertyName, String fieldName) { if (Tools.isBlank(schema)) { return complexPropertyName + "/[0]/" + fieldName; diff --git a/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/ServiceGroupResource.java b/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/ServiceGroupResource.java index 1e26f73a3..92169aa25 100644 --- a/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/ServiceGroupResource.java +++ b/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/ServiceGroupResource.java @@ -137,7 +137,7 @@ public class ServiceGroupResource extends AbstractCollectionSpaceResourceImpl { fields[0] = ServiceGroupListItemJAXBSchema.NAME; fields[1] = ServiceGroupListItemJAXBSchema.URI; commonList.setFieldsReturned(fields); - HashMap item = new HashMap(); + HashMap item = new HashMap(); for(String groupName:svcGroups){ item.put(ServiceGroupListItemJAXBSchema.NAME, groupName); String uri = "/" + getServiceName().toLowerCase() + "/" + groupName; diff --git a/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java b/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java index cd3eddd31..0b7a138d1 100644 --- a/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java +++ b/services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java @@ -209,7 +209,7 @@ public class ServiceGroupDocumentModelHandler fields[6] = DOC_TYPE_FIELD; list.setFieldsReturned(fields); Iterator iter = docList.iterator(); - HashMap item = new HashMap(); + HashMap item = new HashMap(); while (iter.hasNext()) { DocumentModel docModel = iter.next(); String docType = docModel.getDocumentType().getName(); -- 2.47.3