\r
package org.collectionspace.services.IntegrationTests.xmlreplay;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
\r
import java.io.*;\r
import java.util.ArrayList;\r
package org.collectionspace.services.IntegrationTests.xmlreplay;\r
\r
import org.apache.commons.httpclient.Header;\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
\r
import java.util.ArrayList;\r
import java.util.HashMap;\r
public String location = "";\r
public String CSID = "";\r
public String subresourceCSID = "";\r
- public String requestPayload = "";\r
+ public String requestPayload = ""; //just like requestPayloadRaw, but may have multipart boundary and headers.\r
+ public Map<String, String> requestPayloadsRaw = new HashMap<String, String>();\r
public String result = "";\r
public int responseCode = 0;\r
public String responseMessage = "";\r
}\r
break;\r
case TEXT:\r
+ if (value.countFor(TreeWalkResults.TreeWalkEntry.STATUS.TEXT_DIFFERENT)>0) {\r
+ failureReason = " : DOM TEXT_DIFFERENT; ";\r
+ return false;\r
+ }\r
+ break;\r
+ case TREE:\r
if (!value.treesMatch()) {\r
failureReason = " : DOM TREE MISMATCH; ";\r
return false;\r
}\r
+ break;\r
+ case TREE_TEXT:\r
if (value.countFor(TreeWalkResults.TreeWalkEntry.STATUS.TEXT_DIFFERENT)>0) {\r
failureReason = " : DOM TEXT_DIFFERENT; ";\r
return false;\r
}\r
- break;\r
- case TREE:\r
if (!value.treesMatch()) {\r
failureReason = " : DOM TREE MISMATCH; ";\r
return false;\r
return true;\r
}\r
\r
+ private boolean overrideExpectedResult = false;\r
+\r
+ /** Call this method to create a ServiceResult mock object, for when you are doing autoDelete, and you come\r
+ * across a GET : GETs don't have a DELETE url, so they don't need to be autoDeleted, so an empty ServiceResult object\r
+ * signifies this.\r
+ */\r
+ public void overrideGotExpectedResult(){\r
+ overrideExpectedResult = true;\r
+ }\r
+\r
public boolean gotExpectedResult(){\r
+ if (overrideExpectedResult){\r
+ return true;\r
+ }\r
if (Tools.notEmpty(failureReason)){\r
return false;\r
}\r
//public static final String[] DUMP_OPTIONS = {"minimal", "detailed", "full"};\r
public static enum DUMP_OPTIONS {minimal, detailed, full};\r
\r
- public static enum PAYLOAD_STRICTNESS {ZERO, ADDOK, TREE, TEXT, STRICT};\r
+ public static enum PAYLOAD_STRICTNESS {ZERO, ADDOK, TREE, TEXT, TREE_TEXT, STRICT};\r
\r
public String toString(){\r
return detail(true);\r
\r
}\r
+\r
+ private static final String LINE = "\r\n==================================";\r
+ private static final String CRLF = "\r\n";\r
+\r
public String detail(boolean includePayloads){\r
String res = "{"\r
+ ( gotExpectedResult() ? "SUCCESS" : "FAILURE" )\r
+ ( Tools.notEmpty(location) ? "; location.CSID:"+location : "" )\r
+ ( Tools.notEmpty(error) ? "; ERROR:"+error : "" )\r
+ "; gotExpected:"+gotExpectedResult()\r
- + ( includePayloads && Tools.notEmpty(requestPayload) ? "; requestPayload:\r\n"+requestPayload+"\r\n" : "" )\r
- + ( includePayloads && Tools.notEmpty(result) ? "; result:"+result : "" )\r
+ ( partsSummary(true))\r
- +"}";\r
+ +"}"\r
+ + ( includePayloads && Tools.notBlank(requestPayload) ? LINE+"requestPayload:"+LINE+CRLF+requestPayload+LINE : "" )\r
+ + ( includePayloads && Tools.notBlank(result) ? LINE+"result:"+LINE+CRLF+result : "" );\r
return res;\r
}\r
+\r
public String minimal(){\r
return "{"\r
+ ( gotExpectedResult() ? "SUCCESS" : "FAILURE" )\r
return toString();\r
}\r
}\r
+\r
+ /** This method may be called from a test case, using a syntax like ${testID3.resValue("persons_common", "//refName")} */\r
+ public String got(String partName, String xpath) throws Exception {\r
+ try {\r
+ PayloadLogger.HttpTraffic traffic = PayloadLogger.readPayloads(this.result, this.boundary, this.contentLength);\r
+ PayloadLogger.Part partFromServer = traffic.getPart(partName);\r
+ String source = partFromServer.getContent();\r
+ org.jdom.Element element = (org.jdom.Element) XmlCompareJdom.selectSingleNode(source, xpath);\r
+ String sr = element != null ? element.getText() : "";\r
+ return sr;\r
+ } catch (Exception e){\r
+ return "ERROR reading response value: "+e;\r
+ }\r
+ }\r
+\r
+ /** This method may be called from a test case, using a syntax like ${oe9.reqValue("personauthorities_common","//shortIdentifier")} */\r
+ public String sent(String partName, String xpath) throws Exception {\r
+ try {\r
+ if (Tools.isEmpty(partName)){\r
+ partName = "default";\r
+ }\r
+ String source = this.requestPayloadsRaw.get(partName);\r
+ if (source == null){\r
+ return "ERROR:null:requestPayloadsRaw["+partName+"]";\r
+ }\r
+ org.jdom.Element element = (org.jdom.Element) XmlCompareJdom.selectSingleNode(source, xpath); //e.g. "//shortIdentifier");\r
+ String sr = element != null ? element.getText() : "";\r
+ return sr;\r
+ } catch (Exception e){\r
+ return "ERROR reading request value: "+e;\r
+ }\r
+ }\r
}\r
\r
package org.collectionspace.services.IntegrationTests.xmlreplay;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
\r
import java.util.ArrayList;\r
\r
+(Tools.notEmpty(lpath) ? ", L.path:"+lpath : "")\r
+(Tools.notEmpty(rpath) ? ", R.path:"+rpath : "")\r
+(Tools.notEmpty(message) ? ", message:"+message : "")\r
+ +(Tools.notEmpty(errmessage) ? ", errmessage:"+errmessage : "")\r
+((status != STATUS.MATCHED) && Tools.notEmpty(ltextTrimmed) ? ",\r\n L.trimmed:"+ltextTrimmed : "")\r
+((status != STATUS.MATCHED) && Tools.notEmpty(rtextTrimmed) ? ",\r\n R.trimmed:"+rtextTrimmed : "")\r
+"}";\r
*/\r
package org.collectionspace.services.IntegrationTests.xmlreplay;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.jdom.Document;\r
import org.jdom.Element;\r
import org.jdom.JDOMException;\r
return xpath.selectSingleNode(element);\r
}\r
\r
-\r
+ public static Object selectSingleNode(String docSource, String xpathExpression) throws Exception {\r
+ Document doc = getDocumentFromContent(docSource);\r
+ Element element = doc.getRootElement();\r
+ XPath xpath = new JDOMXPath(xpathExpression);\r
+ return xpath.selectSingleNode(element);\r
+ }\r
\r
\r
public static boolean treeWalk(Document left, Document right, TreeWalkResults list) throws Exception {\r
import org.apache.commons.jexl2.JexlContext;\r
import org.apache.commons.jexl2.JexlEngine;\r
import org.apache.commons.jexl2.MapContext;\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.dom4j.*;\r
import org.dom4j.io.SAXReader;\r
\r
return list;\r
}\r
\r
- /** Use this if you wish to named tests within a testGroup, otherwise call runTestGroup(). */\r
+ /** Use this if you wish to run named tests within a testGroup, otherwise call runTestGroup(). */\r
public List<ServiceResult> runTests(String testGroupID, String testID) throws Exception {\r
List<ServiceResult> result = runXmlReplayFile(this.basedir,\r
this.controlFileName,\r
List<ServiceResult> results = new ArrayList<ServiceResult>();\r
for (ServiceResult pr : serviceResultsMap.values()){\r
try {\r
- ServiceResult deleteResult = XmlReplayTransport.doDELETE(pr.deleteURL, pr.auth, pr.testID, "[autodelete:"+logName+"]");\r
- results.add(deleteResult);\r
+ if (Tools.notEmpty(pr.deleteURL)){\r
+ ServiceResult deleteResult = XmlReplayTransport.doDELETE(pr.deleteURL, pr.auth, pr.testID, "[autodelete:"+logName+"]");\r
+ results.add(deleteResult);\r
+ } else {\r
+ ServiceResult errorResult = new ServiceResult();\r
+ errorResult.fullURL = pr.fullURL;\r
+ errorResult.testGroupID = pr.testGroupID;\r
+ errorResult.fromTestID = pr.fromTestID;\r
+ errorResult.overrideGotExpectedResult();\r
+ results.add(errorResult);\r
+ }\r
} catch (Throwable t){\r
String s = (pr!=null) ? "ERROR while cleaning up ServiceResult map: "+pr+" for "+pr.deleteURL+" :: "+t\r
: "ERROR while cleaning up ServiceResult map (null ServiceResult): "+t;\r
private static class PartsStruct {\r
public List<String> partsList = new ArrayList<String>();\r
public List<String> filesList = new ArrayList<String>();\r
+ public List<String> fromTests = new ArrayList<String>();\r
+ public List<Map<String,String>> varsList = new ArrayList<Map<String,String>>();\r
boolean bDoingSinglePartPayload = false;\r
String singlePartPayloadFilename = "";\r
String overrideTestID = "";\r
public static PartsStruct readParts(Node testNode, final String testID, String xmlReplayBaseDir){\r
- PartsStruct result = new PartsStruct();\r
- result.singlePartPayloadFilename = testNode.valueOf("filename");\r
+ PartsStruct resultPartsStruct = new PartsStruct();\r
+ resultPartsStruct.singlePartPayloadFilename = testNode.valueOf("filename");\r
String singlePartPayloadFilename = testNode.valueOf("filename");\r
if (Tools.notEmpty(singlePartPayloadFilename)){\r
- result.bDoingSinglePartPayload = true;\r
- result.singlePartPayloadFilename = xmlReplayBaseDir + '/' + singlePartPayloadFilename;\r
+ resultPartsStruct.bDoingSinglePartPayload = true;\r
+ resultPartsStruct.singlePartPayloadFilename = xmlReplayBaseDir + '/' + singlePartPayloadFilename;\r
+ List<Node> varNodes = testNode.selectNodes("vars/var");\r
+ readVars(testNode, varNodes, resultPartsStruct);\r
} else {\r
- result.bDoingSinglePartPayload = false;\r
+ resultPartsStruct.bDoingSinglePartPayload = false;\r
List<Node> parts = testNode.selectNodes("parts/part");\r
if (parts == null || parts.size()==0){\r
//path is just /testGroup/test/part/\r
- String commonPartName = testNode.valueOf("part/label");\r
- String testfile = testNode.valueOf("part/filename");\r
- String fullTestFilename = xmlReplayBaseDir + '/' + testfile;\r
- if ( Tools.isEmpty(testID) ){\r
- result.overrideTestID = testfile; //It is legal to have a missing ID attribute, and rely on a unique filename.\r
- }\r
- result.partsList.add(commonPartName);\r
- result.filesList.add(fullTestFilename);\r
+ Node part = testNode.selectSingleNode("part");\r
+ readPart(testNode, part, xmlReplayBaseDir, testID, resultPartsStruct); //side-effect: adds objects to result.\r
} else {\r
// path is /testGroup/test/parts/part/\r
for (Node part : parts){\r
- String commonPartName = part.valueOf("label");\r
- String filename = part.valueOf("filename");\r
- String fullTestFilename = xmlReplayBaseDir + '/' + filename;\r
- if ( Tools.isEmpty(testID) ){ //if testID is empty, we'll use the *first* filename as ID.\r
- result.overrideTestID = filename; //It is legal to have a missing ID attribute, and rely on a unique filename.\r
- }\r
- result.partsList.add(commonPartName);\r
- result.filesList.add(fullTestFilename);\r
+ readPart(testNode, part, xmlReplayBaseDir, testID, resultPartsStruct); //side-effect: adds objects to result.\r
}\r
}\r
}\r
- return result;\r
+ return resultPartsStruct;\r
+ }\r
+ private static void readPart(Node testNode, Node part, String xmlReplayBaseDir, String testID, PartsStruct resultPartsStruct){\r
+ String commonPartName = part.valueOf("label");\r
+ String filename = part.valueOf("filename");\r
+ String fullTestFilename = xmlReplayBaseDir + '/' + filename;\r
+ if ( Tools.isEmpty(testID) ){ //if testID is empty, we'll use the *first* filename as ID.\r
+ resultPartsStruct.overrideTestID = filename; //It is legal to have a missing ID attribute, and rely on a unique filename.\r
+ }\r
+ String fromTest = part.valueOf("fromTest");\r
+ if (fromTest == null){\r
+ fromTest = "";\r
+ }\r
+\r
+ //These next foun members (partsList,filesList,varsList, and fromTests),\r
+ // should be added in lock-step, since they are assumed to exist by index (0,1,2,3, etc.)\r
+ resultPartsStruct.partsList.add(commonPartName);\r
+ resultPartsStruct.filesList.add(fullTestFilename);\r
+ resultPartsStruct.fromTests.add(fromTest);\r
+\r
+ List<Node> varNodes = part.selectNodes("var");\r
+ readVars(testNode, varNodes, resultPartsStruct);\r
+ /* Map<String,String> vars = new HashMap<String,String>();\r
+ resultPartsStruct.varsList.add(vars);\r
+\r
+ List<Node> varNodes = part.selectNodes("var");\r
+ //System.out.println("### vars: "+vars.size()+" ########");\r
+ for (Node var: varNodes){\r
+ String ID = var.valueOf("@ID");\r
+ String value = var.getText();\r
+ //System.out.println("ID: "+ID+" value: "+value);\r
+ vars.put(ID, value); //vars is already part of resultPartsStruct.varsList\r
+ }\r
+ //System.out.println("### end-vars ########");\r
+ */\r
+ }\r
+ private static void readVars(Node testNode, List<Node> varNodes, PartsStruct resultPartsStruct){\r
+ Map<String,String> vars = new HashMap<String,String>();\r
+ resultPartsStruct.varsList.add(vars);\r
+ //System.out.println("### vars: "+vars.size()+" ########");\r
+ for (Node var: varNodes){\r
+ String ID = var.valueOf("@ID");\r
+ String value = var.getText();\r
+ //System.out.println("ID: "+ID+" value: "+value);\r
+ vars.put(ID, value); //vars is already part of resultPartsStruct.varsList\r
+ }\r
+ //System.out.println("### end-vars ########");\r
}\r
}\r
\r
+\r
+\r
private static String fixupFullURL(String fullURL, String protoHostPort, String uri){\r
if ( ! uri.startsWith(protoHostPort)){\r
fullURL = Tools.glue(protoHostPort, "/", uri);\r
String OK = "";\r
byte[] b = FileUtils.readFileToByteArray(new File(expectedResponseParts.singlePartPayloadFilename));\r
String expectedPartContent = new String(b);\r
- expectedPartContent = evalStruct.eval(expectedPartContent, serviceResultsMap, evalStruct.jexl, evalStruct.jc);\r
+ Map<String,String> vars = expectedResponseParts.varsList.get(0); //just one part, so just one varsList. Must be there, even if empty.\r
+ expectedPartContent = evalStruct.eval(expectedPartContent, serviceResultsMap, vars, evalStruct.jexl, evalStruct.jc);\r
String label = "NOLABEL";\r
String leftID = "{from expected part, label:"+label+" filename: "+expectedResponseParts.singlePartPayloadFilename+"}";\r
String rightID = "{from server, label:"+label\r
for (int i=0; i<expectedResponseParts.partsList.size(); i++){\r
String fileName = expectedResponseParts.filesList.get(i);\r
String label = expectedResponseParts.partsList.get(i);\r
- byte[] b = FileUtils.readFileToByteArray(new File(fileName));\r
- String expectedPartContent = new String(b);\r
- expectedPartContent = evalStruct.eval(expectedPartContent, serviceResultsMap, evalStruct.jexl, evalStruct.jc);\r
- System.out.println("expected: "+label+ " content ==>\r\n"+expectedPartContent);\r
+ Map<String,String> vars = expectedResponseParts.varsList.get(i);\r
+ String fromTest = expectedResponseParts.fromTests.get(i);\r
+ String expectedPartContent;\r
+ if ( ! Tools.isEmpty(fromTest)){\r
+ ServiceResult resultFromTest = serviceResultsMap.get(fromTest);\r
+ expectedPartContent = resultFromTest.requestPayloadsRaw.get(label); //TODO: debug this!!!!!!!\r
+ } else {\r
+ byte[] b = FileUtils.readFileToByteArray(new File(fileName));\r
+ expectedPartContent = new String(b);\r
+ expectedPartContent = evalStruct.eval(expectedPartContent, serviceResultsMap, vars, evalStruct.jexl, evalStruct.jc);\r
+ }\r
+ //System.out.println("expected: "+label+ " content ==>\r\n"+expectedPartContent);\r
PayloadLogger.Part partFromServer = traffic.getPart(label);\r
String partFromServerContent = "";\r
if (partFromServer != null){\r
//}\r
}\r
} catch (Exception e){\r
- String err = "ERROR in XmlReplay.validateResponse() : "+e; \r
+ String err = "ERROR in XmlReplay.validateResponse() : "+e;\r
//System.out.println(err);\r
return err ;\r
}\r
evalStruct.jexl = jexl;\r
\r
for (Node testgroup : testgroupNodes) {\r
+\r
JexlContext jc = new MapContext(); //Get a new JexlContext for each test group.\r
evalStruct.jc = jc;\r
\r
int testElementIndex = -1;\r
\r
for (Node testNode : tests) {\r
+ long startTime = System.currentTimeMillis();\r
try {\r
+ /*try {\r
+ //"sleeping 2");\r
+ Thread.currentThread().sleep(2);\r
+ } catch (InterruptedException ie){\r
+ System.out.println("ERROR sleeping: "+ie);\r
+ }\r
+ */\r
testElementIndex++;\r
String testID = testNode.valueOf("@ID");\r
String testIDLabel = Tools.notEmpty(testID) ? (testGroupID+'.'+testID) : (testGroupID+'.'+testElementIndex);\r
}\r
\r
if (uri.indexOf("$")>-1){\r
- uri = evalStruct.eval(uri, serviceResultsMap, jexl, jc);\r
+ uri = evalStruct.eval(uri, serviceResultsMap, null, jexl, jc);\r
}\r
fullURL = fixupFullURL(fullURL, protoHostPort, uri);\r
\r
uri = fromTestID(uri, testNode, serviceResultsMap);\r
}\r
if (parts.bDoingSinglePartPayload){\r
- serviceResult = XmlReplayTransport.doPOST_PUTFromXML(parts.singlePartPayloadFilename, protoHostPort, uri, method, XmlReplayTransport.APPLICATION_XML, evalStruct, authForTest, testIDLabel);\r
+ Map<String,String> vars = null;\r
+ if (parts.varsList.size()>0){\r
+ vars = parts.varsList.get(0);\r
+ }\r
+ serviceResult = XmlReplayTransport.doPOST_PUTFromXML(parts.singlePartPayloadFilename, vars, protoHostPort, uri, method, XmlReplayTransport.APPLICATION_XML, evalStruct, authForTest, testIDLabel);\r
} else {\r
- serviceResult = XmlReplayTransport.doPOST_PUTFromXML_Multipart(parts.filesList, parts.partsList, protoHostPort, uri, method, evalStruct, authForTest, testIDLabel);\r
+ boolean POX = true;\r
+ if (POX){\r
+ serviceResult = XmlReplayTransport.doPOST_PUTFromXML_POX (parts.filesList, parts.partsList, parts.varsList, protoHostPort, uri, method, evalStruct, authForTest, testIDLabel);\r
+ } else {\r
+ serviceResult = XmlReplayTransport.doPOST_PUTFromXML_Multipart(parts.filesList, parts.partsList, parts.varsList, protoHostPort, uri, method, evalStruct, authForTest, testIDLabel);\r
+ }\r
}\r
results.add(serviceResult);\r
- if (isPOST){\r
+ //if (isPOST){\r
serviceResultsMap.put(testID, serviceResult); //PUTs do not return a Location, so don't add PUTs to serviceResultsMap.\r
- }\r
+ //}\r
fullURL = fixupFullURL(fullURL, protoHostPort, uri);\r
} else if (method.equalsIgnoreCase("DELETE")){\r
String fromTestID = testNode.valueOf("fromTestID");\r
fullURL = fromTestID(fullURL, testNode, serviceResultsMap);\r
serviceResult = XmlReplayTransport.doGET(fullURL, authForTest, testIDLabel);\r
results.add(serviceResult);\r
+ serviceResultsMap.put(testID, serviceResult);\r
} else if (method.equalsIgnoreCase("LIST")){\r
fullURL = fixupFullURL(fullURL, protoHostPort, uri);\r
String listQueryParams = ""; //TODO: empty for now, later may pick up from XML control file.\r
serviceResult = XmlReplayTransport.doLIST(fullURL, listQueryParams, authForTest, testIDLabel);\r
results.add(serviceResult);\r
+ serviceResultsMap.put(testID, serviceResult);\r
} else {\r
throw new Exception("HTTP method not supported by XmlReplay: "+method);\r
}\r
String level = expectedLevel.valueOf("@level");\r
serviceResult.payloadStrictness = level;\r
}\r
-\r
+ //=====================================================\r
+ // ALL VALIDATION FOR ALL REQUESTS IS DONE HERE:\r
+ //=====================================================\r
String vError = validateResponse(serviceResult, serviceResultsMap, expectedResponseParts, evalStruct);\r
if (Tools.notEmpty(vError)){\r
serviceResult.error = vError;\r
serviceResult.failureReason = " : VALIDATION ERROR; ";\r
}\r
\r
- String serviceResultRow = serviceResult.dump(dump.dumpServiceResult);\r
+ String serviceResultRow = serviceResult.dump(dump.dumpServiceResult)+"; time:"+(startTime-System.currentTimeMillis());\r
String leader = (dump.dumpServiceResult == ServiceResult.DUMP_OPTIONS.detailed) ? "XmlReplay:"+testIDLabel+": ": "";\r
+ if ( (dump.dumpServiceResult == ServiceResult.DUMP_OPTIONS.detailed)\r
+ || (dump.dumpServiceResult == ServiceResult.DUMP_OPTIONS.full)){\r
+ System.out.println("\r\n#---------------------#");\r
+ }\r
System.out.println(leader+serviceResultRow+"\r\n");\r
- if (dump.payloads) System.out.println(serviceResult.result);\r
+ if (dump.payloads && Tools.notBlank(serviceResult.requestPayload)) {\r
+ System.out.println("\r\n========== request payload ===============");\r
+ System.out.println(serviceResult.requestPayload);\r
+ System.out.println("==========================================\r\n");\r
+ }\r
+ if (dump.payloads && Tools.notBlank(serviceResult.result)) {\r
+ System.out.println("\r\n========== response payload ==============");\r
+ System.out.println(serviceResult.result);\r
+ System.out.println("==========================================\r\n");\r
+ }\r
} catch (Throwable t) {\r
String msg = "ERROR: XmlReplay experienced an error in a test node: "+testNode+" Throwable: "+t;\r
System.out.println(msg);\r
+ System.out.println(Tools.getStackTrace(t));\r
ServiceResult serviceResult = new ServiceResult();\r
serviceResult.error = msg;\r
serviceResult.failureReason = " : SYSTEM ERROR; ";\r
if (Tools.notEmpty(fromProps)){\r
return fromProps;\r
}\r
+ if (line==null){\r
+ return "";\r
+ }\r
result = line.getOptionValue(option);\r
if (result == null){\r
result = "";\r
* uri = eval(uri, serviceResultsMap, jexl, jc); <br />\r
* RESULT: "/cspace-services/orgauthorities/43a2739c-4f40-49c8-a6d5/items/"\r
*/\r
- public static String eval(String inputJexlExpression, Map<String, ServiceResult> serviceResultsMap, JexlEngine jexl, JexlContext jc) {\r
+ public static String eval(String inputJexlExpression, Map<String, ServiceResult> serviceResultsMap, Map<String,String> vars, JexlEngine jexl, JexlContext jc) {\r
//System.out.println("\r\n---- REPLACE.init-uri: "+inputJexlExpression);\r
String result;\r
try {\r
- for (ServiceResult postResult : serviceResultsMap.values()) {\r
- jc.set(postResult.testID, postResult);\r
- //System.out.println("eval :: "+postResult.testID+"==>"+postResult);\r
+ //System.out.println("eval :: serviceResultsMap "+serviceResultsMap.size());\r
+ for (ServiceResult serviceResult : serviceResultsMap.values()) {\r
+ jc.set(serviceResult.testID, serviceResult);\r
+ //System.out.println("eval :: "+serviceResult.testID+"==>"+serviceResult.minimal());\r
+ }\r
+ if (vars!=null){\r
+ for (Map.Entry<String,String> entry: vars.entrySet()) {\r
+ String value = entry.getValue();\r
+ String key = entry.getKey();\r
+ try {\r
+ value = parse(value, jexl, jc);\r
+ } catch (Exception e){\r
+ value = "ERROR: "+e;\r
+ }\r
+ jc.set(key, value);\r
+ }\r
}\r
result = parse(inputJexlExpression, jexl, jc);\r
} catch (Throwable t) {\r
\r
package org.collectionspace.services.IntegrationTests.xmlreplay;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.testng.Assert;\r
\r
import java.io.File;\r
import java.net.HttpURLConnection;\r
import java.net.URL;\r
import java.util.Arrays;\r
+import java.util.HashMap;\r
import java.util.List;\r
import java.util.Map;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
\r
/**\r
* @author Laramie Crocker\r
private static String CRLF = "\r\n";\r
\r
public static ServiceResult doGET(String urlString, String authForTest, String fromTestID) throws Exception {\r
+ ServiceResult pr = new ServiceResult();\r
+ pr.fromTestID = fromTestID;\r
+ pr.method = "GET";\r
+ //HACK for speed testing.\r
+ //pr.CSID = "2";\r
+ //pr.overrideGotExpectedResult();\r
+ //if (true) return pr;\r
+ //END-HACK\r
HttpClient client = new HttpClient();\r
GetMethod getMethod = new GetMethod(urlString);\r
getMethod.addRequestHeader("Accept", "multipart/mixed");\r
getMethod.addRequestHeader("Accept", "application/xml");\r
getMethod.setRequestHeader("Authorization", "Basic " + authForTest); //"dGVzdDp0ZXN0");\r
getMethod.setRequestHeader("X-XmlReplay-fromTestID", fromTestID);\r
- ServiceResult pr = new ServiceResult();\r
-\r
- pr.fromTestID = fromTestID;\r
- pr.method = "GET";\r
try {\r
int statusCode1 = client.executeMethod(getMethod);\r
pr.responseCode = statusCode1;\r
\r
/** Use this overload for multipart messages. */\r
public static ServiceResult doPOST_PUTFromXML_Multipart(List<String> filesList,\r
- List<String> partsList,\r
- String protoHostPort,\r
- String uri,\r
- String method,\r
- XmlReplayEval evalStruct,\r
- String authForTest,\r
- String fromTestID)\r
- throws Exception {\r
+ List<String> partsList,\r
+ List<Map<String,String>> varsList,\r
+ String protoHostPort,\r
+ String uri,\r
+ String method,\r
+ XmlReplayEval evalStruct,\r
+ String authForTest,\r
+ String fromTestID)\r
+ throws Exception {\r
if ( filesList==null||filesList.size()==0\r
||partsList==null||partsList.size()==0\r
||(partsList.size() != filesList.size())){\r
throw new Exception("filesList and partsList must not be empty and must have the same number of items each.");\r
}\r
String content = DD + BOUNDARY;\r
-\r
+ Map<String, String> contentRaw = new HashMap<String, String>();\r
for (int i=0; i<partsList.size(); i++){\r
String fileName = filesList.get(i);\r
String commonPartName = partsList.get(i);\r
byte[] b = FileUtils.readFileToByteArray(new File(fileName));\r
String xmlString = new String(b);\r
\r
- xmlString = evalStruct.eval(xmlString, evalStruct.serviceResultsMap, evalStruct.jexl, evalStruct.jc);\r
-\r
+ xmlString = evalStruct.eval(xmlString, evalStruct.serviceResultsMap, varsList.get(i), evalStruct.jexl, evalStruct.jc);\r
+ contentRaw.put(commonPartName, xmlString);\r
content = content + CRLF + "label: "+commonPartName + CRLF\r
+ "Content-Type: application/xml" + CRLF\r
+ CRLF\r
}\r
content = content + DD;\r
String urlString = protoHostPort+uri;\r
- return doPOST_PUT(urlString, content, BOUNDARY, method, MULTIPART_MIXED, authForTest, fromTestID); //method is POST or PUT.\r
+ return doPOST_PUT(urlString, content, contentRaw, BOUNDARY, method, MULTIPART_MIXED, authForTest, fromTestID); //method is POST or PUT.\r
}\r
\r
+ public static ServiceResult doPOST_PUTFromXML_POX(List<String> filesList,\r
+ List<String> partsList,\r
+ List<Map<String,String>> varsList,\r
+ String protoHostPort,\r
+ String uri,\r
+ String method,\r
+ XmlReplayEval evalStruct,\r
+ String authForTest,\r
+ String fromTestID)\r
+ throws Exception {\r
+ if ( filesList==null||filesList.size()==0\r
+ ||partsList==null||partsList.size()==0\r
+ ||(partsList.size() != filesList.size())){\r
+ throw new Exception("filesList and partsList must not be empty and must have the same number of items each.");\r
+ }\r
+ StringBuffer content = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");\r
+ //content.append(CRLF).append("<document name=\"objectexit\">").append(CRLF);\r
+ Map<String, String> contentRaw = new HashMap<String, String>();\r
+ for (int i=0; i<partsList.size(); i++){\r
+ String fileName = filesList.get(i);\r
+ String commonPartName = partsList.get(i);\r
+ byte[] b = FileUtils.readFileToByteArray(new File(fileName));\r
+ String xmlString = new String(b);\r
+\r
+ xmlString = evalStruct.eval(xmlString, evalStruct.serviceResultsMap, varsList.get(i), evalStruct.jexl, evalStruct.jc);\r
+ contentRaw.put(commonPartName, xmlString);\r
+ \r
+ content.append(xmlString).append(CRLF);\r
+ }\r
+ //content.append("</document>");\r
+ String urlString = protoHostPort+uri;\r
+ String POX_BOUNDARY = "";//empty for POX.\r
+ return doPOST_PUT(urlString, content.toString(), contentRaw, POX_BOUNDARY, method,APPLICATION_XML, authForTest, fromTestID); //method is POST or PUT.\r
+ }\r
+\r
+\r
/** Use this overload for NON-multipart messages, that is, regular POSTs. */\r
- public static ServiceResult doPOST_PUTFromXML(String fileName,\r
- String protoHostPort,\r
- String uri,\r
- String method,\r
- String contentType,\r
- XmlReplayEval evalStruct,\r
- String authForTest,\r
- String fromTestID)\r
+ public static ServiceResult doPOST_PUTFromXML(String fileName,\r
+ Map<String,String> vars,\r
+ String protoHostPort,\r
+ String uri,\r
+ String method,\r
+ String contentType,\r
+ XmlReplayEval evalStruct,\r
+ String authForTest,\r
+ String fromTestID)\r
throws Exception {\r
byte[] b = FileUtils.readFileToByteArray(new File(fileName));\r
String xmlString = new String(b);\r
- xmlString = evalStruct.eval(xmlString, evalStruct.serviceResultsMap, evalStruct.jexl, evalStruct.jc);\r
+ xmlString = evalStruct.eval(xmlString, evalStruct.serviceResultsMap, vars, evalStruct.jexl, evalStruct.jc);\r
String urlString = protoHostPort+uri;\r
- return doPOST_PUT(urlString, xmlString, BOUNDARY, method, contentType, authForTest, fromTestID); //method is POST or PUT.\r
+ Map<String, String> contentRaw = new HashMap<String, String>();\r
+ contentRaw.put("default", xmlString);\r
+ return doPOST_PUT(urlString, xmlString, contentRaw, BOUNDARY, method, contentType, authForTest, fromTestID); //method is POST or PUT.\r
}\r
\r
\r
- public static ServiceResult doPOST_PUT(String urlString, String content, String boundary, String method, String contentType,\r
+ public static ServiceResult doPOST_PUT(String urlString, String content, Map<String,String> contentRaw,\r
+ String boundary, String method, String contentType,\r
String authForTest, String fromTestID) throws Exception {\r
ServiceResult result = new ServiceResult();\r
result.method = method;\r
+ //HACK for speed testing. Result: XmlReplay takes 9ms to process one test\r
+ // right up to the point of actually firing an HTTP request.\r
+ // or ~ 120 records per second.\r
+ //result.CSID = "2";\r
+ //result.overrideGotExpectedResult();\r
+ //if (true) return result;\r
+ //END-HACK\r
try {\r
URL url = new URL(urlString);\r
HttpURLConnection conn;\r
\r
try {\r
result.requestPayload = content;\r
+ result.requestPayloadsRaw = contentRaw;\r
result.responseCode = conn.getResponseCode();\r
//System.out.println("responseCode: "+result.responseCode);\r
if (400 <= result.responseCode && result.responseCode <= 499){\r
import org.collectionspace.services.IntegrationTests.xmlreplay.ServiceResult;
import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplay;
import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplayTest;
+import org.collectionspace.services.common.api.Tools;
+
import org.testng.annotations.Test;
+import java.util.ArrayList;
import java.util.List;
/**
+ Maven surefire doesn't let you pass stuff on the command line
+ unless you define -DforkMode=never inn the command-line args.
+ So be sure to use a command-line like:
+ mvn -e test -DxmlReplayMaster=dev-master.xml -DforkMode=never -Dtest=XmlReplayDevTest
+ *
* User: laramie
* $LastChangedRevision: $
* $LastChangedDate: $
@Test
public void runMaster() throws Exception {
- XmlReplay replay = createXmlReplayUsingIntegrationTestsModule("..");
- List<List<ServiceResult>> list = replay.runMaster(XmlReplay.DEFAULT_DEV_MASTER_CONTROL);
- logTestForGroup(list, "XmlReplayMasterTest");
- /*
- Maven surefire doesn't let you pass stuff on the command line
- unless you define it in command args in the pom.xml file.
- So this doesn't work, because -D defines don't get passed through
- when maven execs surefire.
+ if (true) return;
+ //This was a hack test.
String masterFile = System.getProperty("xmlReplayMaster");
if (Tools.notEmpty(masterFile)){
System.out.println("Using masterFile specified in System property: "+masterFile);
- XmlReplay replay = createXmlReplayUsingIntegrationTestsModule("..");
- List<List<ServiceResult>> list = replay.runMaster(masterFile);
- logTestForGroup(list, "XmlReplayMasterTest");
- } */
+ } else {
+ masterFile = XmlReplay.DEFAULT_DEV_MASTER_CONTROL;
+ System.out.println("Using default masterFile: "+masterFile);
+ }
+ //XmlReplay replay = createXmlReplayUsingIntegrationTestsModule("..");
+ //List<List<ServiceResult>> list = replay.runMaster(masterFile);
+ //logTestForGroup(list, "XmlReplayMasterTest");
+ int MAXWORKERS = 20;
+ long start = System.currentTimeMillis();
+ for (int t=0; t<MAXWORKERS; t++){
+ Worker w = new Worker(masterFile, "Worker"+t, this);
+ synchronized (workers){
+ workers.add(w);
+ }
+ w.start();
+ }
+ while (!quitNow) {
+ Thread.yield();
+ }
+ System.out.println("DONE. workers: "+MAXWORKERS+" time: "+(System.currentTimeMillis()-start));
+ for (Long l: stats){
+ System.out.println(""+l);
+ }
+ }
+
+ private List<Worker> workers = new ArrayList<Worker>();
+ private List<Long> stats = new ArrayList<Long>();
+ private volatile boolean quitNow = false;
+ protected void finished(Worker worker, Long time){
+ synchronized(workers){
+ workers.remove(worker);
+ stats.add(time);
+ if (workers.size()==0){
+ quitNow = true;
+ }
+ System.out.println("Workers left: "+workers.size());
+ workers.notifyAll();
+ }
+
+ }
+
+ public static class Worker extends Thread{
+ public Worker(String masterFile, String ID, XmlReplayDevTest dtest){
+ super(ID);
+ this.masterFile = masterFile;
+ this.dtest = dtest;
+ }
+ private String masterFile;
+ private XmlReplayDevTest dtest;
+
+ public void run(){
+ try {
+ long start = System.currentTimeMillis();
+ System.out.println("RUNNING Master in Worker: "+this.getName());
+ XmlReplay replay = createXmlReplayUsingIntegrationTestsModule("..");
+ List<List<ServiceResult>> list = replay.runMaster(masterFile);
+ logTestForGroup(list, "XmlReplayMasterTest");
+ long stop = System.currentTimeMillis();
+ dtest.finished(this, stop-start);
+ } catch (Exception e){
+ System.out.println("ERROR in Worker: "+e);
+ return;
+ }
+
+ }
}
}
below about not leaving any active testGroups enabled in this file\r
when you check it in.\r
-->\r
+ <!--<protoHostPort>http://173.45.245.189:8180</protoHostPort>-->\r
<protoHostPort>http://localhost:8180</protoHostPort>\r
\r
<!-- legal values for dumpServiceResult=[minimal,detailed,full] -->\r
- <dump payloads="false" dumpServiceResult="full" />\r
+ <dump payloads="true" dumpServiceResult="detailed" />\r
\r
<auths default="admin@collectionspace.org">\r
<auth ID="admin@collectionspace.org">YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y</auth>\r
\r
<run controlFile="media/media.xml" testGroup="authrefs" />\r
\r
+ <run controlFile="objectexit/object-exit.xml" testGroup="authrefs" />\r
+ <run controlFile="objectexit/object-exit.xml" testGroup="authrefs" />\r
+ <run controlFile="acquisitions/acquisitions.xml" testGroup="makeone" />\r
-->\r
\r
\r
+ <!--\r
+ Used to verify CSPACE-3178\r
+ <run controlFile="objectexit/object-exit-display.xml" testGroup="refNameDisplayNameOnly" />\r
+ -->\r
\r
+ <!--\r
+ Used to measure timings of 1000 records for CSPACE-3553\r
+ <run controlFile="objectexit/object-exit-LOOP.xml" testGroup="LOOP" />\r
+ -->\r
+ <run controlFile="objectexit/object-exit-LOOP.xml" testGroup="LOOP" />\r
\r
-\r
</xmlReplayMaster>\r
\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <auths>\r
+ <!-- IMPORTANT: THESE ARE STICKY :: THEY STICK AROUND UNTIL RESET, IN EXEC ORDER OF THIS FILE. -->\r
+ <auth ID="admin@collectionspace.org">YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y</auth>\r
+ <auth ID="testAdministator">YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y</auth>\r
+ </auths>\r
+\r
+ <!-- \r
+ ========================================================\r
+ testGroup :: refNameDisplayNameOnly\r
+ Creates a record using only displayName and not shortIdentifier. \r
+ ======================================================== \r
+ -->\r
+ \r
+ <testGroup ID="refNameDisplayNameOnly" autoDeletePOSTS="false">\r
+ <test ID="oePersonauthority"> \r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <filename>objectexit/oePersonauthority.xml</filename>\r
+ </test>\r
+ <test ID="oePerson">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/${oePersonauthority.CSID}/items/</uri>\r
+ <filename>objectexit/oePersonDisplayOnly.xml</filename>\r
+ <vars>\r
+ <var ID="displayName">Finbar the DisplayName</var>\r
+ </vars>\r
+ </test>\r
+ <test ID="oePersonGET">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/personauthorities/${oePersonauthority.CSID}/items/${oePerson.CSID}</uri>\r
+ <!--\r
+ TODO: this response can't be validated because HttpTraffic object doesn't know\r
+ how to parse new POX format.\r
+ <response>\r
+ <expected level="ADDOK" />\r
+ <part>\r
+ <label>persons_common</label>\r
+ <filename>objectexit/res/oePersonDisplayGET.res.xml</filename>\r
+ <var ID="displayName">${oePerson.sent("persons_common","//displayName")}</var>\r
+ <var ID="refName">urn:cspace:collectionspace.org:Personauthorities(${oePersonauthority.sent("personauthorities_common","//shortIdentifier")}):items(foobar)'${oePerson.sent("persons_common","//displayName")}'</var>\r
+ </part>\r
+ </response>\r
+ -->\r
+ </test>\r
+ </testGroup>\r
+\r
+</xmlReplay>\r
+ \r
+ \r
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
<ns2:objectexit_common\r
xmlns:ns2="http://collectionspace.org/services/objectexit"\r
xmlns:ns3="http://collectionspace.org/services/jaxb">\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:objectexit_common\r
+xmlns:ns2="http://collectionspace.org/services/objectexit"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <depositor>${depositor}</depositor>\r
+ <currentOwner>${currentOwner}</currentOwner>\r
+ <exitDate>exitDate-1290026474563</exitDate>\r
+ <exitNumber>${exitNumber}</exitNumber>\r
+</ns2:objectexit_common>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="persons">\r
+<ns2:persons_common\r
+xmlns:ns2="http://collectionspace.org/services/person"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <!--<shortIdentifier>thePersonShortIdentifier</shortIdentifier>-->\r
+ <displayName>${displayName}</displayName>\r
+ <displayNameComputed>false</displayNameComputed>\r
+</ns2:persons_common>\r
+</document>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="personauthorities">\r
+<ns2:personauthorities_common\r
+xmlns:ns2="http://collectionspace.org/services/person"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <displayName>Default Person Authority</displayName>\r
+ <shortIdentifier>defaultPersonAuthority</shortIdentifier>\r
+ <vocabType>PersonAuthority</vocabType>\r
+</ns2:personauthorities_common>\r
+</document>\r
+\r
+\r
<?xml version="1.0" encoding="UTF-8"?>\r
+<document name="objectexit">\r
<ns2:objectexit_common \r
xmlns:ns2="http://collectionspace.org/services/objectexit" \r
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \r
<depositor>urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum'</depositor>\r
<exitMethods></exitMethods>\r
</ns2:objectexit_common>\r
+</document>\r
\r
--- /dev/null
+removed from svn
+
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.common-api</artifactId>\r
<name>services.common-api</name>\r
+ <version>1.5.1</version>\r
<packaging>jar</packaging>\r
<dependencies>\r
<dependency>\r
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2009 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.collectionspace.services.common.api;\r
+\r
+// This class is designed to avoid dependencies, so it does not include logging, or apache commons.\r
+// There is another cspace utility class, called\r
+// org.collectionspace.services.common.FileUtils\r
+// albeit with different functions, which does have dependencies.\r
+\r
+import java.io.*;\r
+import java.util.UUID;\r
+import java.util.regex.Pattern;\r
+import java.util.regex.Matcher;\r
+\r
+\r
+/**\r
+ * @author Laramie Crocker\r
+ * $LastChangedRevision: $\r
+ * $LastChangedDate: $\r
+ */\r
+public class FileTools {\r
+\r
+ public static void forceParentDirectories(String filename) throws IOException {\r
+ File theFile = new File(filename);\r
+ String parent = theFile.getParent();\r
+ if (parent != null){\r
+ File p = new File(parent);\r
+ p.mkdirs();\r
+ System.out.println("Making directory: "+p.getCanonicalPath());\r
+ }\r
+ }\r
+\r
+ public static boolean copyFile(String sourceFileName, String destFileName, boolean forceParentDirs) throws IOException {\r
+ if (sourceFileName == null || destFileName == null)\r
+ return false;\r
+ if (sourceFileName.equals(destFileName))\r
+ return false;\r
+ if (forceParentDirs)\r
+ forceParentDirectories(destFileName);\r
+ try{\r
+ java.io.FileInputStream in = new java.io.FileInputStream(sourceFileName);\r
+ java.io.FileOutputStream out = new java.io.FileOutputStream(destFileName);\r
+ try {\r
+ byte[] buf = new byte[31000];\r
+ int read = in.read(buf);\r
+ while (read > -1){\r
+ out.write(buf, 0, read);\r
+ read = in.read(buf);\r
+ }\r
+ } finally {\r
+ in.close();\r
+ out.close();\r
+ }\r
+ } catch (Exception e) {\r
+ System.out.println(e.toString());\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\r
+ public static String readFile(String dir, String relPath){\r
+ try {\r
+ File theFile = new File(dir, relPath);\r
+ FileInputStream fis = new FileInputStream(theFile);\r
+ byte[] theData = new byte[(int) theFile.length()];\r
+ // need to check the number of bytes read here\r
+ int howmany = fis.read(theData);\r
+ if (howmany != theData.length){\r
+ System.out.println("ERROR: Couldn't read all of stream! filesize: "+theData.length+" read: "+howmany);\r
+ }\r
+ fis.close();\r
+ return new String(theData);\r
+ } catch (Exception e) { // can't find the file\r
+ System.out.println("ERROR: "+e);\r
+ return null;\r
+ }\r
+ }\r
+\r
+ public static File saveFile(String dir, String relativeName, String content, boolean forceParentDirs)\r
+ throws IOException {\r
+ File result = null;\r
+ PrintWriter writer;\r
+ try{\r
+ if (forceParentDirs) forceParentDirectories(dir+'/'+relativeName);\r
+ result = new File(dir,relativeName);\r
+ writer = new PrintWriter(new FileOutputStream(result));\r
+ }catch (Exception e){\r
+ System.out.println("Can't write to file in FileTools.saveFile: " + relativeName + " :: " + e);\r
+ return null;\r
+ }\r
+ writer.write(content);\r
+ writer.close();\r
+ return result;\r
+ }\r
+\r
+ public static File createTmpDir(String filePrefix){\r
+ String tmpDir = System.getProperty("java.io.tmpdir");\r
+ File result = new File(tmpDir, filePrefix + UUID.randomUUID().toString());\r
+ return result;\r
+ }\r
+\r
+\r
+}\r
import java.util.regex.Pattern;\r
\r
/**\r
+ * Usage for this class, if you have a URN and would like to get at its fields, is to call one of these methods:\r
+ *\r
+ * RefName.AuthorityItem item = RefName.AuthorityItem.parse(RefName.AUTHORITY_ITEM_EXAMPLE);\r
+ * or\r
+ * RefName.Authority authority = RefName.Authority.parse(RefName.AUTHORITY_EXAMPLE);\r
+ *\r
+ * From the object returned, you may set/get any of the public fields.\r
+ *\r
+ * If you want to format a string urn, then you need to construct either a RefName.AuthorityItem or RefName.Authority.\r
+ * You can parse a URN to do so, as shown above, or you can construct one with a constructor, setting its fields afterwards.\r
+ * A better way is to use one of the build*() methods on this class:\r
+ *\r
+ * RefName.Authority authority2 = RefName.buildAuthority(tenantName, serviceName, authorityShortIdentifier, authorityDisplayName);\r
+ *\r
+ * RefName.AuthorityItem item2 = RefName.buildAuthorityItem(authority2,\r
+ * RefName.EX_itemShortIdentifier,\r
+ * RefName.EX_itemDisplayName);\r
+ *\r
+ * Note that authority2 is an object, not a String, and is passed in to RefName.buildAuthorityItem().\r
+ *\r
+ * Then simply call toString() on the object:\r
+ *\r
+ * String authorityURN = authority2.toString();\r
+ *\r
+ * String itemURN = item2.toString();\r
+ *\r
+ * These test cases are kept up-to-date in\r
+ *\r
+ * org.collectionspace.services.common.api.test.RefNameTest\r
+ *\r
* User: laramie\r
- * $LastChangedRevision: $\r
- * $LastChangedDate: $\r
*/\r
+ \r
public class RefName {\r
public static final String HACK_VOCABULARIES = "Vocabularies"; //TODO: get rid of these.\r
public static final String HACK_ORGANIZATIONS = "Organizations"; //TODO: get rid of these.\r
* limitations under the License.\r
*/\r
\r
-package org.collectionspace.services.common;\r
+package org.collectionspace.services.common.api;\r
\r
import java.io.File;\r
import java.util.regex.Pattern;\r
return first+separator+second;\r
}\r
\r
+ /** Remove all whitespace from a String. */\r
+ public static String squeeze(String s) {\r
+ return s.replaceAll("\\s+", "");\r
+ }\r
+\r
+ /** Milliseconds from start time as defined by the Date class. */\r
+ public static Long now(){\r
+ return new Long((new java.util.Date()).getTime());\r
+ }\r
+\r
/** Handles null strings as empty. */\r
public static boolean isEmpty(String str){\r
return !notEmpty(str);\r
}\r
\r
/** Handles null strings as empty. */\r
- public static boolean notEmpty(String str){\r
+ public static boolean notEmpty(String str){\r
+ if (str==null) return false;\r
+ if (str.length()==0) return false;\r
+ return true;\r
+ }\r
+ public static boolean notBlank(String str){\r
if (str==null) return false;\r
if (str.length()==0) return false;\r
+ if (str.trim().length()==0){\r
+ return false;\r
+ }\r
return true;\r
}\r
\r
return result;\r
}\r
\r
-\r
+ /** Takes an Exception object and formats a message that provides more debug information\r
+ * suitable for developers for printing to System.out or for logging. Not suitable for\r
+ * presentation of error messages to clients.\r
+ */\r
+ public static String errorToString(Throwable e, boolean stackTraceOnException){\r
+ if (e==null){\r
+ return "";\r
+ }\r
+ String s = e.toString() + "\r\n -- message: " + e.getMessage();\r
+ s = s + "\r\n -- Stack Trace: \r\n -- " + getStackTrace(e);\r
+ return s;\r
+ }\r
\r
\r
}\r
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2009 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.collectionspace.services.common.api;\r
+\r
+import java.io.*;\r
+import java.util.*;\r
+import java.util.zip.*;\r
+\r
+/**\r
+ * User: laramie\r
+ * $LastChangedRevision: $\r
+ * $LastChangedDate: $\r
+ */\r
+public class ZipTools {\r
+\r
+ public static final void copyInputStream(InputStream in, OutputStream out) throws IOException {\r
+ try {\r
+ byte[] buffer = new byte[1024];\r
+ int len;\r
+ while ((len = in.read(buffer)) >= 0) {\r
+ out.write(buffer, 0, len);\r
+ }\r
+ } finally {\r
+ in.close();\r
+ out.close();\r
+ }\r
+ }\r
+\r
+ public static void forceParentDirectories(String filename) throws Exception {\r
+ File theFile = new File(filename);\r
+ String parent = theFile.getParent();\r
+ if (parent != null) {\r
+ File p = new File(parent);\r
+ p.mkdirs();\r
+ System.out.println("Making directory: " + p.getCanonicalPath());\r
+ }\r
+ }\r
+\r
+ /**\r
+ * It is HIGHLY recommended to use a baseOutputDir, such as "./", or\r
+ * a local directory you know, such as "/tmp/foo", to prevent\r
+ * files from being unzipped in your root directory.\r
+ */\r
+ public static final void unzip(String zipfileName, String baseOutputDir) {\r
+ Enumeration entries;\r
+ ZipFile zipFile;\r
+ try {\r
+ zipFile = new ZipFile(zipfileName);\r
+ entries = zipFile.entries();\r
+ while (entries.hasMoreElements()) {\r
+ ZipEntry entry = (ZipEntry) entries.nextElement();\r
+ String entryName = entry.getName();\r
+ String theName = baseOutputDir + '/' + entryName;\r
+ if (entry.isDirectory()) {\r
+ // Assume directories are stored parents first then children.\r
+ System.out.println("Extracting directory: " + entry.getName());\r
+ // This is not robust, just for demonstration purposes.\r
+ (new File(theName)).mkdirs();\r
+ continue;\r
+ }\r
+ //(new File(theName)).mkdirs();\r
+ forceParentDirectories(theName);\r
+ System.out.println("Extracting file: " + theName);\r
+ copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r
+ }\r
+ zipFile.close();\r
+ } catch (Exception ioe) {\r
+ System.err.println("Unhandled exception:");\r
+ ioe.printStackTrace();\r
+ return;\r
+ }\r
+ }\r
+\r
+ public static void zipDiveDirectory(int stripLeadingPathChars, String directory, String zipFilename) throws Exception {\r
+ ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFilename));\r
+ zipDir(stripLeadingPathChars, directory, zos);\r
+ zos.close();\r
+ }\r
+\r
+ public static void zipDir(int stripLeadingPathChars, String dir2zip, ZipOutputStream zos) throws Exception {\r
+ File fzipDir = new File(dir2zip);\r
+ if (!fzipDir.exists()) {\r
+ System.out.println("dir doesn't exist: " + dir2zip);\r
+ return;\r
+ }\r
+ String[] dirList = fzipDir.list(); //get a listing of the directory content\r
+ byte[] readBuffer = new byte[2156];\r
+ int bytesIn = 0;\r
+ //loop through dirList, and zip the files\r
+ for (int i = 0; i < dirList.length; i++) {\r
+ File f = new File(fzipDir, dirList[i]);\r
+ if (f.isDirectory()) {\r
+ //if the File object is a directory, call this function again to add its content recursively\r
+ zipDir(stripLeadingPathChars, f.getPath(), zos); //DIVE!\r
+ continue;\r
+ }\r
+ //if we reached here, the File object f was not a directory\r
+ String fpath = f.getPath();\r
+ String nameInArchive = fpath.substring(stripLeadingPathChars, fpath.length());\r
+ addToZip(zos, fpath, nameInArchive);\r
+ }\r
+ }\r
+\r
+ public static void addToZip(ZipOutputStream zos, String filename, String nameInArchive) throws Exception {\r
+ File file = new File(filename);\r
+ if (!file.exists()) {\r
+ System.err.println("File does not exist, skipping: " + filename);\r
+ return;\r
+ }\r
+ BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));\r
+ int bytesRead;\r
+ byte[] buffer = new byte[1024];\r
+ CRC32 crc = new CRC32();\r
+ crc.reset();\r
+ while ((bytesRead = bis.read(buffer)) != -1) {\r
+ crc.update(buffer, 0, bytesRead);\r
+ }\r
+ bis.close();\r
+ // Reset to beginning of input stream\r
+ bis = new BufferedInputStream(new FileInputStream(file));\r
+ String nameInArchiveFixed = nameInArchive.replace("\\", "/");\r
+ ZipEntry entry = new ZipEntry(nameInArchiveFixed);\r
+ entry.setMethod(ZipEntry.STORED);\r
+ entry.setCompressedSize(file.length());\r
+ entry.setSize(file.length());\r
+ entry.setCrc(crc.getValue());\r
+ zos.putNextEntry(entry);\r
+ while ((bytesRead = bis.read(buffer)) != -1) {\r
+ zos.write(buffer, 0, bytesRead);\r
+ }\r
+ bis.close();\r
+ }\r
+\r
+}\r
+\r
<dependencies>\r
\r
<!-- CollectionSpace dependencies -->\r
+ <dependency>\r
+ <groupId>org.collectionspace.services</groupId>\r
+ <artifactId>org.collectionspace.services.common-api</artifactId>\r
+ <version>1.5.1</version>\r
+ </dependency>\r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.3rdparty.nuxeo.quote-api</artifactId> \r
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2009 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
package org.collectionspace.services.common;\r
\r
//import java.io.*;\r
import javax.servlet.http.HttpServletRequest;\r
\r
+import java.io.*;\r
import java.util.Iterator;\r
import java.util.List;\r
import java.util.Map;\r
import java.util.UUID;\r
\r
//import java.io.IOException;\r
-import java.io.File;\r
-import java.io.InputStream;\r
-import java.io.FileOutputStream;\r
+\r
+import java.util.UUID;\r
+import java.util.regex.Pattern;\r
+import java.util.regex.Matcher;\r
\r
//import javax.servlet.ServletException;\r
//import javax.servlet.http.HttpServlet;\r
\r
return result;\r
}\r
+\r
}\r
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2011 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.collectionspace.services.common;\r
+\r
+import org.dom4j.Document;\r
+import org.dom4j.Element;\r
+\r
+/** Define this interface to listen for events from the driving class:\r
+ * org.collectionspace.services.common.XmlSaxFragmenter , so that\r
+ * the XmlSaxFragmenter class may be passed a large file or InputSource (stream)\r
+ * and it will be parsed with SAX, but you will get fragments from it that you can\r
+ * parse with DOM.\r
+ *\r
+ * You will be passed a Document context, which is a Dom4j document that represents the\r
+ * skeleton of the document you started with, but without any fragments, so the Document\r
+ * will just be context information of how the XmlSaxFragmenter found this fragment.\r
+ *\r
+ * You will receive onFragmentReady() events whenever a fragment is parsed completely.\r
+ * the fragment parameter will be just the inner XML String of fragmentParent, and will\r
+ * not be represented in the DOM of the Document context.\r
+ *\r
+ * @author Laramie Crocker\r
+ */\r
+public interface IFragmentHandler {\r
+ /** @param fragmentIndex is the zero-based index of the current fragment; you will first get this event\r
+ * on fragmentIndex==0, which is a fragmentCount of 1. */\r
+ public void onFragmentReady(Document context,\r
+ Element fragmentParent,\r
+ String currentPath,\r
+ int fragmentIndex,\r
+ String fragment);\r
+\r
+ /** @param fragmentCount is the count of fragments processed - a value of 1 means 1 fragment was found. */\r
+ public void onEndDocument(Document context, int fragmentCount);\r
+}\r
*/\r
package org.collectionspace.services.common;\r
\r
+import org.collectionspace.services.common.api.Tools;\r
+\r
import java.lang.reflect.Constructor;\r
import java.lang.reflect.Method;\r
\r
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2010 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
package org.collectionspace.services.common;\r
\r
import org.collectionspace.services.client.PoxPayloadIn;\r
public static final String LIST = "list";\r
\r
//FIXME retrieve client type from configuration\r
- final static ClientType CLIENT_TYPE = ServiceMain.getInstance().getClientType();\r
+ static ClientType CLIENT_TYPE;\r
+ static {\r
+ try {\r
+ // I put this in a try-catch static block instead of file-level static var initializer so that static methods of\r
+ // *Resource classes may be called statically from test cases.\r
+ // Without this catch, you can't even access static methods of a *Resource class for testing.\r
+ CLIENT_TYPE = ServiceMain.getInstance().getClientType();\r
+ //System.out.println("Static initializer in ResourceBase. CLIENT_TYPE:"+CLIENT_TYPE);\r
+ } catch (Throwable t){\r
+ System.out.println("Static initializer failed in ResourceBase because not running from deployment. OK to use Resource classes statically for tests.");\r
+ }\r
+ }\r
\r
protected void ensureCSID(String csid, String crudType) throws WebApplicationException {\r
if (logger.isDebugEnabled()) {\r
protected WebApplicationException bigReThrow(Exception e,\r
String serviceMsg, String csid) throws WebApplicationException {\r
Response response;\r
- if (logger.isDebugEnabled()) {\r
- logger.debug(getClass().getName(), e);\r
- }\r
+ //if (logger.isDebugEnabled()) {\r
+ logger.error(getClass().getName(), e);\r
+ //}\r
if (e instanceof UnauthorizedException) {\r
response = Response.status(Response.Status.UNAUTHORIZED)\r
.entity(serviceMsg + e.getMessage()).type("text/plain")\r
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2011 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.collectionspace.services.common;\r
+\r
+import org.collectionspace.services.common.api.Tools;\r
+import org.dom4j.Document;\r
+import org.dom4j.DocumentHelper;\r
+import org.dom4j.Element;\r
+import org.dom4j.io.HTMLWriter;\r
+import org.dom4j.io.OutputFormat;\r
+import org.xml.sax.Attributes;\r
+import org.xml.sax.ContentHandler;\r
+import org.xml.sax.ErrorHandler;\r
+import org.xml.sax.InputSource;\r
+import org.xml.sax.Locator;\r
+import org.xml.sax.SAXException;\r
+import org.xml.sax.SAXParseException;\r
+import org.xml.sax.XMLReader;\r
+import org.xml.sax.helpers.XMLReaderFactory;\r
+import org.xml.sax.ext.Locator2;\r
+import java.io.StringWriter;\r
+\r
+/** Use XmlSaxFragmenter to parse a large file or InputSource (stream)\r
+ * with SAX, and pass in an instance of IFragmentHandler to parse() so that you can\r
+ * get fragments back that you can parse with DOM or other processing.\r
+ *\r
+ * You would typically instantiate and run this class like so:\r
+ *\r
+ * IFragmentHandler callback = new MyFragmentHandlerImpl(); //define the interface somewhere.\r
+ * XmlSaxFragmenter.parse("C:\\tmp\\imports.xml", "/document/schema", callback);\r
+ *\r
+ * Then, given an XML document like this:\r
+ * <document repository="default" id="123">\r
+ * <schema name="collectionobjects_naturalhistory">\r
+ * <nh-int/>\r
+ * <nh-note/>\r
+ * </schema>\r
+ * <schema name="collectionobjects_common">\r
+ * <remNumber>\r
+ * <numberValue/>\r
+ * <numberType/>\r
+ * </remNumber>\r
+ * </schema>\r
+ * </document>\r
+ *\r
+ * you'll get two onFragmentReady() events: the first will pass String fragment =\r
+ * <schema name="collectionobjects_naturalhistory"> <nh-int/>\r
+ * <nh-note/>\r
+ * plus some context information, and the second will pass String fragment =\r
+ * <remNumber>\r
+ * <numberValue/>\r
+ * <numberType/>\r
+ * </remNumber>\r
+ *\r
+ * @author Laramie Crocker\r
+ */\r
+public class XmlSaxFragmenter implements ContentHandler, ErrorHandler {\r
+\r
+ //=============== ContentHandler ====================================================\r
+\r
+ public void setDocumentLocator(Locator locator) {\r
+ if (xmlDeclarationDone){\r
+ return;\r
+ }\r
+ if (locator instanceof Locator2){\r
+ Locator2 l2 = ((Locator2) locator);\r
+ String enc = l2.getEncoding();\r
+ String ver = l2.getXMLVersion();\r
+ append("<?xml version=\""+ver+"\" encoding=\""+enc+"\"?>\r\n");\r
+ xmlDeclarationDone = true;\r
+ } else {\r
+ //System.err.println("Locator2 not found.");\r
+ append("<?xml version=\"1.0\"?>\r\n");\r
+ xmlDeclarationDone = true;\r
+ }\r
+ //more info available from Locator if needed: locator.getPublicId(), locator.getSystemId();\r
+ }\r
+\r
+ public void startDocument() throws SAXException {\r
+ document = DocumentHelper.createDocument();\r
+ }\r
+\r
+ public void endDocument() throws SAXException {\r
+ if (fragmentHandler!=null) {\r
+ fragmentHandler.onEndDocument(document, fragmentIndex + 1);\r
+ }\r
+ }\r
+\r
+ public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\r
+ String attsString = attsToStr(atts);\r
+ append("<" + name(qName, localName) + attsString + ">");\r
+ if (inFragment){\r
+ inFragmentDepth++;\r
+ return;\r
+ }\r
+ if (currentElement == null){\r
+ currentElement = document.addElement(qName);\r
+ } else {\r
+ Element element = DocumentHelper.createElement(qName);\r
+ currentElement.add(element);\r
+ previousElement = currentElement;\r
+ currentElement = element;\r
+ }\r
+ addAttributes(currentElement, atts);\r
+ String currentPath = currentElement.getPath();\r
+ if (currentPath.equals(chopPath)){\r
+ buffer = new StringBuffer();\r
+ inFragment = true;\r
+ if (includeParent){\r
+ append("<" + name(qName, localName) + attsString + ">");\r
+ }\r
+ }\r
+ }\r
+\r
+ public void endElement(String uri, String localName, String qName) throws SAXException {\r
+ if (inFragment && (inFragmentDepth>0)){\r
+ append("</" + name(qName, localName) + '>');\r
+ } else if (inFragment && inFragmentDepth == 0 && includeParent){\r
+ append("</" + name(qName, localName) + '>');\r
+ }\r
+ if (inFragment && (inFragmentDepth==0)){\r
+ if (fragmentHandler!=null) {\r
+ fragmentIndex++;\r
+ fragmentHandler.onFragmentReady(document,\r
+ currentElement,\r
+ currentElement.getPath(),\r
+ fragmentIndex,\r
+ buffer.toString());\r
+ }\r
+ inFragment = false;\r
+ currentElement = previousElement;\r
+ }\r
+ if (inFragment){\r
+ inFragmentDepth--;\r
+ }\r
+ }\r
+\r
+ public void characters(char ch[], int start, int length) throws SAXException {\r
+ String chars = new String(ch, start, length);\r
+ append(chars);\r
+ }\r
+\r
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {\r
+ }\r
+ public void endPrefixMapping(String prefix) throws SAXException {\r
+ }\r
+ public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {\r
+ }\r
+ public void processingInstruction(String target, String data) throws SAXException {\r
+ }\r
+ public void skippedEntity(String name) throws SAXException {\r
+ }\r
+\r
+ //=============== ErrorHandler ====================================================\r
+\r
+ public void error(SAXParseException exception){\r
+ System.err.println("ERROR:"+exception);\r
+ }\r
+ public void fatalError(SAXParseException exception){\r
+ System.err.println("FATAL_ERROR:"+exception);\r
+ }\r
+ public void warning(SAXParseException exception){\r
+ System.err.println("WARNING:"+exception);\r
+ }\r
+\r
+ //================ Helper Methods ===================================================\r
+\r
+ private Document document;\r
+ private Element currentElement;\r
+ private Element previousElement;\r
+ private StringBuffer buffer = new StringBuffer();\r
+\r
+ private boolean xmlDeclarationDone = false;\r
+ private boolean inFragment = false;\r
+ private int inFragmentDepth = 0;\r
+ private int fragmentIndex = -1; //zero-based. Used for informational purposes only, to report to the IFragmentHandler.\r
+\r
+ private String chopPath = "";\r
+ public String getChopPath() {\r
+ return chopPath;\r
+ }\r
+ /** You should not set the chopPath directly; instead you must set it in the call to parse(). */\r
+ protected void setChopPath(String chopPath) {\r
+ this.chopPath = chopPath;\r
+ }\r
+\r
+ private boolean includeParent = false;\r
+ public boolean isIncludeParent() {\r
+ return includeParent;\r
+ }\r
+ public void setIncludeParent(boolean includeParent) {\r
+ this.includeParent = includeParent;\r
+ }\r
+\r
+\r
+ private IFragmentHandler fragmentHandler;\r
+ public IFragmentHandler getFragmentHandler() {\r
+ return fragmentHandler;\r
+ }\r
+ /** You should not set the FragmentHandler directly; instead you must set it in the call to parse(). */\r
+ protected void setFragmentHandler(IFragmentHandler fragmentHandler) {\r
+ this.fragmentHandler = fragmentHandler;\r
+ }\r
+\r
+ protected void append(String str){\r
+ buffer.append(str);\r
+ }\r
+\r
+ protected String name(String qn, String ln){\r
+ if (Tools.isEmpty(qn)){\r
+ return ln;\r
+ }\r
+ if (qn.equals(ln)){\r
+ return ln;\r
+ }\r
+ return qn;\r
+ }\r
+\r
+ //NOTE: we don't deal with this here because we don't need to\r
+ // actually understand the namespace uri:\r
+ // a.getURI(i)\r
+ protected String attsToStr(Attributes a){\r
+ StringBuffer b = new StringBuffer();\r
+ String qn, ln;\r
+ int attsLen = a.getLength();\r
+ for (int i=0; i<attsLen; i++){\r
+ b.append(' ');\r
+ qn = a.getQName(i);\r
+ ln = a.getLocalName(i);\r
+ b.append(name(qn, ln)).append("=\"")\r
+ .append(a.getValue(i)).append('\"');\r
+ }\r
+ return b.toString();\r
+ }\r
+\r
+ protected void addAttributes(Element cur, Attributes a){\r
+ int attsLen = a.getLength();\r
+ for (int i=0; i<attsLen; i++){\r
+ cur.addAttribute(a.getQName(i), a.getValue(i));\r
+ }\r
+ }\r
+\r
+ public static String prettyPrint(Document document) {\r
+ String prettyHTML;\r
+ try {\r
+ StringWriter swriter = new StringWriter();\r
+ OutputFormat format = OutputFormat.createPrettyPrint();\r
+ format.setNewlines(true);\r
+ format.setTrimText(true);\r
+ format.setIndent(false);\r
+ format.setXHTML(true);\r
+ format.setLineSeparator(System.getProperty("line.separator")) ;\r
+ HTMLWriter writer = new HTMLWriter(swriter, format);\r
+ writer.write(document);\r
+ writer.flush();\r
+ prettyHTML = swriter.toString();\r
+ } catch (Exception e){\r
+ prettyHTML = "<?xml?><error>"+e+"</error>";\r
+ }\r
+ return prettyHTML;\r
+ }\r
+\r
+ /** This method takes a filename of a local file only; InputSource is not implemented yet.\r
+ *\r
+ * @param theFileName the filename of a local file, which should be valid XML.\r
+ * @param chopPath the path from the root of the document to the parent element\r
+ * of the fragment you want.\r
+ * @param handler An instance of IFragmentHandler that you define to get the onFragmentReady event\r
+ * which will give you the fragment and some context information.\r
+ * @param includeParent If you set this to true, you will get the element described by chopPath included in the fragment, otherwise,\r
+ * it will not appear in the fragment; in either case, the element will be available in the Document context and the\r
+ * Element fragmentParent in the callback IFragmentHandler.onFragmentReady().\r
+ */\r
+ public static void parse(String theFileName,\r
+ String chopPath,\r
+ IFragmentHandler handler,\r
+ boolean includeParent){\r
+ try{\r
+ XMLReader parser = setupParser(chopPath, handler, includeParent);\r
+ parser.parse(theFileName);\r
+ } catch(Exception e) {\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+\r
+ public static void parse(InputSource inputSource,\r
+ String chopPath,\r
+ IFragmentHandler handler,\r
+ boolean includeParent){\r
+ try{\r
+ XMLReader parser = setupParser(chopPath, handler, includeParent);\r
+ parser.parse(inputSource);\r
+ } catch(Exception e) {\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+\r
+ protected static XMLReader setupParser(String chopPath,\r
+ IFragmentHandler handler,\r
+ boolean includeParent) throws Exception {\r
+ XMLReader parser = XMLReaderFactory.createXMLReader();\r
+ XmlSaxFragmenter fragmenter = new XmlSaxFragmenter();\r
+ fragmenter.setChopPath(chopPath);\r
+ fragmenter.setFragmentHandler(handler);\r
+ fragmenter.setIncludeParent(includeParent);\r
+ parser.setContentHandler(fragmenter);\r
+ parser.setErrorHandler(fragmenter);\r
+ parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true);\r
+ return parser;\r
+ }\r
+\r
+}\r
import java.sql.Statement;\r
import java.util.List;\r
\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.collectionspace.services.common.service.ServiceBindingType;\r
import org.collectionspace.services.common.service.InitHandler.Params.Field;\r
import org.collectionspace.services.common.service.InitHandler.Params.Property;\r
package org.collectionspace.services.common.storage;\r
\r
import org.collectionspace.services.common.ServiceMain;\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
\r
import java.util.List;\r
\r
import org.collectionspace.services.common.ReflectionMapper;\r
-import org.collectionspace.services.common.Tools;\r
+import org.collectionspace.services.common.api.Tools;\r
import org.collectionspace.services.common.service.ListResultField;\r
import org.collectionspace.services.common.service.DocHandlerParams;\r
import org.collectionspace.services.common.service.ServiceBindingType;\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<document repository="default" id="aa13777e-941d-4db9-b746-145502d49e97">\r
+ <schema xmlns:collectionobjects_naturalhistory="http://collectionspace.org/collectionobject/" name="collectionobjects_naturalhistory">\r
+ <collectionobjects_naturalhistory:nh-int/>\r
+ <collectionobjects_naturalhistory:nh-note>In test-data</collectionobjects_naturalhistory:nh-note>\r
+ </schema>\r
+ <schema xmlns:collectionobjects_common="http://collectionspace.org/collectionobject/" name="collectionobjects_common">\r
+ <collectionobjects_common:remNumber>\r
+ <numberValue/>\r
+ <numberType/>\r
+ </collectionobjects_common:remNumber>\r
+ <collectionobjects_common:sex>Male</collectionobjects_common:sex>\r
+ </schema>\r
+</document>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+ <name>org.collectionspace.services.imports</name>\r
+ <comment></comment>\r
+ <projects>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+ <name>org.collectionspace.services.imports.3rdparty</name>\r
+ <comment></comment>\r
+ <projects>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>\r
--- /dev/null
+#Fri Aug 27 16:35:21 PDT 2010\r
+activeProfiles=\r
+eclipse.preferences.version=1\r
+fullBuildGoals=process-test-resources\r
+includeModules=false\r
+resolveWorkspaceProjects=true\r
+resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
+version=1\r
--- /dev/null
+
+<project name="imports.3rdparty" default="package" basedir=".">
+ <description>
+ imports service 3rdparty
+ </description>
+ <!-- set global properties for this build -->
+ <property name="services.trunk" value="../../.."/>
+ <!-- environment should be declared before reading build.properties -->
+ <property environment="env" />
+ <property file="${services.trunk}/build.properties" />
+ <property name="mvn.opts" value="" />
+ <property name="src" location="src"/>
+
+ <condition property="osfamily-unix">
+ <os family="unix" />
+ </condition>
+ <condition property="osfamily-windows">
+ <os family="windows" />
+ </condition>
+
+ <target name="init" >
+ <!-- Create the time stamp -->
+ <tstamp/>
+ </target>
+
+ <target name="package" depends="package-unix,package-windows"
+ description="Package CollectionSpace Services" />
+ <target name="package-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="package-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="install" depends="install-unix,install-windows"
+ description="Install" />
+ <target name="install-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="install-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="clean" depends="clean-unix,clean-windows"
+ description="Delete target directories" >
+ <delete dir="${build}"/>
+ </target>
+ <target name="clean-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="clean-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="test" depends="test-unix,test-windows" description="Run tests" />
+ <target name="test-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="test-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="deploy" depends="install"
+ description="deploy imports in ${jboss.server.nuxeo}">
+ <ant antfile="nuxeo-platform-cs-imports/build.xml" target="deploy" inheritall="false"/>
+ </target>
+
+ <target name="undeploy"
+ description="undeploy imports from ${jboss.server.nuxeo}">
+ <ant antfile="nuxeo-platform-cs-imports/build.xml" target="undeploy" inheritall="false"/>
+ </target>
+
+ <target name="dist"
+ description="generate distribution for imports" depends="package">
+ <ant antfile="nuxeo-platform-cs-imports/build.xml" target="dist" inheritall="false"/>
+ </target>
+
+
+</project>
--- /dev/null
+<classpath>\r
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>\r
+ <classpathentry kind="output" path="target/classes"/>\r
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6-jdk15.jar"/>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
+</classpath>
\ No newline at end of file
--- /dev/null
+<projectDescription>\r
+ <name>org.collectionspace.services.imports.3rdparty.nuxeo</name>\r
+ <comment>Imports Nuxeo Document Type. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\r
+ <projects/>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>
\ No newline at end of file
--- /dev/null
+#Fri Aug 27 16:35:21 PDT 2010\r
+activeProfiles=\r
+eclipse.preferences.version=1\r
+fullBuildGoals=process-test-resources\r
+includeModules=false\r
+resolveWorkspaceProjects=true\r
+resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
+version=1\r
--- /dev/null
+
+<project name="nuxeo-platform-cs-imports" default="package" basedir=".">
+ <description>
+ imports nuxeo document type
+ </description>
+ <!-- set global properties for this build -->
+ <property name="services.trunk" value="../../../.."/>
+ <!-- environment should be declared before reading build.properties -->
+ <property environment="env" />
+ <property file="${services.trunk}/build.properties" />
+ <property name="mvn.opts" value="" />
+ <property name="src" location="src"/>
+ <property name="nuxeo.imports.jar"
+ value="org.collectionspace.services.imports.3rdparty.nuxeo-${cspace.release}.jar"/>
+ <property name="nuxeo.imports.jars.all"
+ value="org.collectionspace.services.imports.3rdparty.nuxeo-*.jar"/>
+
+ <condition property="osfamily-unix">
+ <os family="unix" />
+ </condition>
+ <condition property="osfamily-windows">
+ <os family="windows" />
+ </condition>
+
+ <target name="init" >
+ <!-- Create the time stamp -->
+ <tstamp/>
+ </target>
+
+ <target name="package" depends="package-unix,package-windows"
+ description="Package CollectionSpace Services" />
+ <target name="package-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="package-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="install" depends="install-unix,install-windows"
+ description="Install" />
+ <target name="install-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="install-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="clean" depends="clean-unix,clean-windows"
+ description="Delete target directories" >
+ <delete dir="${build}"/>
+ </target>
+ <target name="clean-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="clean-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="test" depends="test-unix,test-windows" description="Run tests" />
+ <target name="test-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="test-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="deploy" depends="install"
+ description="deploy imports doctype in ${jboss.server.nuxeo}">
+ <copy file="${basedir}/target/${nuxeo.imports.jar}"
+ todir="${jboss.deploy.nuxeo.plugins}"/>
+ </target>
+
+ <target name="undeploy"
+ description="undeploy imports doctype from ${jboss.server.nuxeo}">
+ <delete>
+ <fileset dir="${jboss.deploy.nuxeo.plugins}">
+ <include name="${nuxeo.imports.jars.all}"/>
+ </fileset>
+ <!-- Legacy deployment location through release 0.6 -->
+ <fileset dir="${jboss.deploy.nuxeo.system}">
+ <include name="${nuxeo.imports.jars.all}"/>
+ </fileset>
+ </delete>
+ </target>
+
+
+ <target name="dist"
+ description="generate distribution for imports doctype" depends="package">
+ <copy todir="${services.trunk}/${dist.deploy.nuxeo.plugins}">
+ <fileset file="${basedir}/target/${nuxeo.imports.jar}"/>
+ </copy>
+ </target>
+
+</project>
+
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.3rdparty</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.3rdparty.nuxeo</artifactId>
+ <name>services.imports.3rdparty.nuxeo</name>
+ <packaging>jar</packaging>
+ <description>
+ Imports Nuxeo Document Type
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile> src/main/resources/META-INF/MANIFEST.MF </manifestFile>
+ <manifestEntries>
+ <Bundle-Version>${eclipseVersion}</Bundle-Version>
+ <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
--- /dev/null
+Manifest-Version: 1.0 \r
+Bundle-ManifestVersion: 1 \r
+Bundle-Name: NuxeoCS\r
+Bundle-SymbolicName: org.collectionspace.imports;singleton:=true \r
+Bundle-Version: 1.0.0\r
+Bundle-Localization: plugin\r
+Bundle-Vendor: Nuxeo \r
+Require-Bundle: org.nuxeo.runtime, \r
+ org.nuxeo.ecm.core.api, \r
+ org.nuxeo.ecm.core,\r
+ org.nuxeo.ecm.core.api,\r
+ org.nuxeo.ecm.platform.types.api,\r
+ org.nuxeo.ecm.platform.versioning.api,\r
+ org.nuxeo.ecm.platform.ui,\r
+ org.nuxeo.ecm.platform.forms.layout.client,\r
+ org.nuxeo.ecm.platform.ws,\r
+ org.collectionspace.collectionspace_core\r
+Provide-Package: org.collectionspace.imports\r
+Nuxeo-Component: OSGI-INF/core-types-contrib.xml,\r
+ OSGI-INF/ecm-types-contrib.xml,\r
+ OSGI-INF/layouts-contrib.xml\r
+\r
--- /dev/null
+<?xml version="1.0"?>
+<component name="org.collectionspace.imports.coreTypes">
+ <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
+ <schema name="imports_common" prefix="imports_common" src="schemas/imports_common.xsd"/>
+ </extension>
+
+ <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
+ <doctype name="Imports" extends="Document">
+ <schema name="common"/>
+ <schema name="dublincore"/>
+ <schema name="collectionspace_core"/>
+ <schema name="imports_common"/>
+ </doctype>
+ </extension>
+</component>
--- /dev/null
+<?xml version="1.0"?>
+<fragment>
+
+ <extension target="application#MODULE">
+ <module>
+ <ejb>${bundle.fileName}</ejb>
+ </module>
+
+ <module>
+ <web>
+ <web-uri>nuxeo.war</web-uri>
+ <context-root>/nuxeo</context-root>
+ </web>
+ </module>
+ </extension>
+
+ <!-- uncomment that to enable tomcat based auth
+ <extension target="web#LOGIN-CONFIG">
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>nuxeo.ecm</realm-name>
+ <form-login-config>
+ <form-login-page>/login.jsp</form-login-page>
+ <form-error-page>/login.jsp?loginFailed=true</form-error-page>
+ </form-login-config>
+ </login-config>
+ </extension>
+ -->
+
+ <extension target="web#FILTER-MAPPING">
+
+ <!-- Seam Context Filter is declared in org.nuxeo.ecm.platform.ui.web
+ deployment fragment -->
+
+ <filter-mapping>
+ <filter-name>Seam Context Filter</filter-name>
+ <url-pattern>/ws/FileManageWS</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>Seam Context Filter</filter-name>
+ <url-pattern>/DocumentManagerWS</url-pattern>
+ </filter-mapping>
+ </extension>
+
+ <extension target="web#SERVLET">
+ </extension>
+
+ <extension target="web#SERVLET-MAPPING">
+ </extension>
+
+ <extension target="pages#PAGES">
+ <!-- This calls a method which load the Workspace logo -->
+ <page view-id="/showLogo.xhtml" action="#{logoHelper.getLogo}"/>
+
+ <!-- Bind URL to the Document URL resolver-->
+ <page view-id="/getDocument.xhtml"
+ action="#{navigationContext.navigateToURL}">
+ </page>
+
+ <page view-id="/nxliveedit.xhtml" action="#{liveEditHelper.getBootstrap()}"/>
+
+ <!-- Bind URL to the Parallele conversation Document URL resolver-->
+ <page view-id="/parallele.xhtml"
+ action="#{paralleleNavigationHelper.navigateToURL}">
+ </page>
+
+ <!-- Post login and 'home' view handler -->
+ <page view-id="/nxstartup.xhtml"
+ action="#{startupHelper.initDomainAndFindStartupPage('Default domain', 'view')}"/>
+
+ <!-- To redirect to the user dashboard instead, use instead:
+
+ <page view-id="/nxstartup.xhtml"
+ action="#{startupHelper.initDomainAndFindStartupPage('Default domain', 'user_dashboard')}" />
+ -->
+
+ <!-- config for workspace management
+ = give a description for each viewId
+ -->
+
+ <page view-id="/view_domains.xhtml">
+ #{currentServerLocation.name}/#{currentTabAction.label}
+ </page>
+
+ <page view-id="/select_document_type.faces.xhtml">
+ Create new document in #{currentDocument.name}
+ </page>
+
+ <page view-id="/create_document.faces.xhtml">
+ Create new document in #{currentDocument.name}
+ </page>
+
+ <page view-id="/user_dashboard.xhtml">
+ breadcrumb=command.user_dashboard
+ </page>
+
+ <page view-id="/view_users.xhtml">
+ breadcrumb=command.manageMembers
+ </page>
+
+ <page view-id="/view_many_users.xhtml">
+ breadcrumb=command.manageMembers
+ </page>
+
+ <page view-id="/view_vocabularies.xhtml">
+ breadcrumb=title.vocabularies
+ </page>
+
+ <page view-id="/search/search_form.xhtml">
+ breadcrumb=command.advancedSearch
+ </page>
+ </extension>
+
+ <extension target="faces-config#APPLICATION">
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>en_GB</supported-locale>
+ <supported-locale>en_US</supported-locale>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>es</supported-locale>
+ <supported-locale>it</supported-locale>
+ <supported-locale>ar</supported-locale>
+ <supported-locale>ru</supported-locale>
+ <supported-locale>ja</supported-locale>
+ <supported-locale>vn</supported-locale>
+ </locale-config>
+
+ <message-bundle>messages</message-bundle>
+ </extension>
+
+ <extension target="components#PAGEFLOW">
+ <value>config/addWorkspace.jpdl.xml</value>
+ </extension>
+
+ <extension target="faces-config#NAVIGATION">
+ <!-- generic pages -->
+ <navigation-case>
+ <from-outcome>generic_error_page</from-outcome>
+ <to-view-id>/generic_error_page.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>generic_message_page</from-outcome>
+ <to-view-id>/generic_message_page.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>home</from-outcome>
+ <to-view-id>/nxstartup.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>user_login</from-outcome>
+ <to-view-id>/login.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>user_logout</from-outcome>
+ <to-view-id>/logout.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_servers</from-outcome>
+ <to-view-id>/view_servers.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- pages for document actions -->
+
+ <navigation-case>
+ <from-outcome>view_domains</from-outcome>
+ <to-view-id>/view_domains.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>select_document_type</from-outcome>
+ <to-view-id>/select_document_type.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create_document</from-outcome>
+ <to-view-id>/create_document.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit_document</from-outcome>
+ <to-view-id>/edit_document.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_documents</from-outcome>
+ <to-view-id>/view_documents.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create_file</from-outcome>
+ <to-view-id>/create_file.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create_workspace_wizard</from-outcome>
+ <to-view-id>/createWorkspaceWizard.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>send_email</from-outcome>
+ <to-view-id>/document_email.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- AT: BBB, use view_documents instead -->
+ <navigation-case>
+ <from-outcome>view_workspaces</from-outcome>
+ <to-view-id>/view_workspaces.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- AT: BBB, use create_document instead -->
+ <navigation-case>
+ <from-outcome>create_domain</from-outcome>
+ <to-view-id>/create_domain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- AT: BBB, use edit_document instead -->
+ <navigation-case>
+ <from-outcome>edit_domain</from-outcome>
+ <to-view-id>/edit_domain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- AT: BBB, use create_document instead -->
+ <navigation-case>
+ <from-outcome>create_workspace</from-outcome>
+ <to-view-id>/create_workspace.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- AT: BBB, use edit_document instead -->
+ <navigation-case>
+ <from-outcome>edit_workspace</from-outcome>
+ <to-view-id>/edit_workspace.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- users ang groups -->
+
+ <navigation-case>
+ <from-outcome>members_management</from-outcome>
+ <to-view-id>/members_management.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_users</from-outcome>
+ <to-view-id>/view_users.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_many_users</from-outcome>
+ <to-view-id>/view_many_users.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit_user</from-outcome>
+ <to-view-id>/edit_user.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit_user_password</from-outcome>
+ <to-view-id>/edit_user_password.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_user</from-outcome>
+ <to-view-id>/view_user.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create_user</from-outcome>
+ <to-view-id>/create_user.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_groups</from-outcome>
+ <to-view-id>/view_groups.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_group</from-outcome>
+ <to-view-id>/view_group.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit_group</from-outcome>
+ <to-view-id>/edit_group.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create_group</from-outcome>
+ <to-view-id>/create_group.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_vocabularies</from-outcome>
+ <to-view-id>/view_vocabularies.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>view_vocabulary</from-outcome>
+ <to-view-id>/view_vocabulary.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- search -->
+
+ <navigation-case>
+ <from-outcome>search_form</from-outcome>
+ <to-view-id>/search/search_form.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>search_results_nxql</from-outcome>
+ <to-view-id>/search/search_results_nxql.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>search_results_advanced</from-outcome>
+ <to-view-id>
+ /search/search_results_advanced.xhtml
+ </to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>search_results_simple</from-outcome>
+ <to-view-id>/search/search_results_simple.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <!-- miscellaneaous -->
+
+ <navigation-case>
+ <from-outcome>clipboard</from-outcome>
+ <to-view-id>/incl/clipboard.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>user_dashboard</from-outcome>
+ <to-view-id>/user_dashboard.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>select_workspace_template</from-outcome>
+ <to-view-id>/select_workspace_template.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>pdf_generation_error</from-outcome>
+ <to-view-id>/pdf_generation_error.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>mass_edit</from-outcome>
+ <to-view-id>/massedit_documents.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>mass_edit_confirm</from-outcome>
+ <to-view-id>/massedit_documents_preview.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </extension>
+
+</fragment>
+
--- /dev/null
+<?xml version="1.0"?>
+<component name="org.collectionspace.imports.ecm.types">
+ <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
+ <type id="Imports" coretype="Imports">
+ <label>org.collectionspace.imports</label>
+ <!--icon>/icons/file.gif</icon-->
+ <default-view>view_documents</default-view>
+
+ <layouts mode="any">
+ <layout>heading</layout>
+ <layout>collectionspace_core</layout>
+ <layout>imports</layout>
+ </layouts>
+ </type>
+
+ <type id="Folder" coretype="Folder">
+ <subtypes>
+ <type>Imports</type>
+ </subtypes>
+ </type>
+
+ <type id="Workspace" coretype="Workspace">
+ <subtypes>
+ <type>Imports</type>
+ </subtypes>
+ </type>
+
+ </extension>
+</component>
--- /dev/null
+<?xml version="1.0"?>
+
+<!--
+layouts-contrib.xml
+
+Layout file for configuring screen layouts in the
+user interface of Nuxeo EP's web application, for
+viewing or editing CollectionSpace records stored
+in the Nuxeo repository,
+
+See the "Nuxeo Book" for an introductory description
+of how to edit this file. For instance, for Nuxeo EP 5.3:
+http://doc.nuxeo.org/5.3/books/nuxeo-book/html/
+
+$LastChangedRevision: $
+$LastChangedDate: $
+-->
+
+<component name="org.collectionspace.imports.layouts.webapp">
+
+ <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
+ point="layouts">
+
+ <layout name="imports">
+ <templates>
+ <template mode="any">/layouts/layout_default_template.xhtml</template>
+ </templates>
+
+ <rows>
+ <row><widget>importsNumber</widget></row>
+ <row><widget>borrower</widget></row>
+ <row><widget>borrowersContact</widget></row>
+ <row><widget>lendersAuthorizer</widget></row>
+ <row><widget>lendersAuthorizationDate</widget></row>
+ <row><widget>lendersContact</widget></row>
+
+ <!--
+ Omitting loaned object status fields in release 0.5.2,
+ as these are likely to be repeatable or else handled
+ in some alternate way in release 0.7.
+ -->
+ <!-- <row><widget>loanedObjectStatus</widget></row> -->
+ <!-- <row><widget>loanedObjectStatusDate</widget></row> -->
+ <!-- <row><widget>loanedObjectStatusNote</widget></row> -->
+
+ <row><widget>importsDate</widget></row>
+ <row><widget>loanReturnDate</widget></row>
+ <row><widget>loanRenewalApplicationDate</widget></row>
+ <row><widget>specialConditionsOfLoan</widget></row>
+ <row><widget>importsNote</widget></row>
+ <row><widget>loanPurpose</widget></row>
+ </rows>
+
+ <widget name="importsNumber" type="text">
+ <labels>
+ <label mode="any">importsNumber</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">importsNumber</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="borrower" type="text">
+ <labels>
+ <label mode="any">borrower</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">borrower</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="borrowersContact" type="text">
+ <labels>
+ <label mode="any">borrowersContact</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">borrowersContact</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="lendersAuthorizer" type="text">
+ <labels>
+ <label mode="any">lendersAuthorizer</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">lendersAuthorizer</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="lendersAuthorizationDate" type="text">
+ <labels>
+ <label mode="any">lendersAuthorizationDate</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">lendersAuthorizationDate</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="lendersContact" type="text">
+ <labels>
+ <label mode="any">lendersContact</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">lendersContact</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="importsDate" type="text">
+ <labels>
+ <label mode="any">importsDate</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">importsDate</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="loanReturnDate" type="text">
+ <labels>
+ <label mode="any">loanReturnDate</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">loanReturnDate</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="loanRenewalApplicationDate" type="text">
+ <labels>
+ <label mode="any">loanRenewalApplicationDate</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">loanRenewalApplicationDate</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="specialConditionsOfLoan" type="text">
+ <labels>
+ <label mode="any">specialConditionsOfLoan</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">specialConditionsOfLoan</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="importsNote" type="text">
+ <labels>
+ <label mode="any">importsNote</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">importsNote</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <widget name="loanPurpose" type="text">
+ <labels>
+ <label mode="any">loanPurpose</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field schema="imports_common">loanPurpose</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ </layout>
+ </extension>
+</component>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+\r
+<xs:schema \r
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"\r
+ xmlns:ns="http://collectionspace.org/imports/"\r
+ xmlns="http://collectionspace.org/imports/"\r
+ targetNamespace="http://collectionspace.org/imports/"\r
+ version="0.1">\r
+\r
+ <xs:element name="importsField" type="xs:string"/>\r
+ <xs:element name="params">\r
+ <xs:complexType>\r
+ <xs:sequence>\r
+ <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ </xs:complexType>\r
+ </xs:element> \r
+</xs:schema>\r
--- /dev/null
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>org.collectionspace.services.imports</artifactId>
+ <groupId>org.collectionspace.services</groupId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.3rdparty</artifactId>
+ <name>services.imports.3rdparty</name>
+ <packaging>pom</packaging>
+
+ <description>
+ 3rd party build for imports service
+ </description>
+
+ <modules>
+ <module>nuxeo-platform-cs-imports</module>
+ </modules>
+</project>
--- /dev/null
+
+<project name="imports" default="package" basedir=".">
+ <description>
+ imports service
+ </description>
+ <!-- set global properties for this build -->
+ <property name="services.trunk" value="../.."/>
+ <!-- environment should be declared before reading build.properties -->
+ <property environment="env" />
+ <property file="${services.trunk}/build.properties" />
+ <property name="mvn.opts" value="" />
+ <property name="src" location="src"/>
+
+ <condition property="osfamily-unix">
+ <os family="unix" />
+ </condition>
+ <condition property="osfamily-windows">
+ <os family="windows" />
+ </condition>
+
+ <target name="package" depends="package-unix,package-windows"
+ description="Package CollectionSpace Services" />
+
+ <target name="package-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="package-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="package" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+
+ <target name="install" depends="install-unix,install-windows"
+ description="Install" />
+ <target name="install-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="install-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="install" />
+ <arg value="-Dmaven.test.skip=true" />
+ <arg value="-f" />
+ <arg value="${basedir}/pom.xml" />
+ <arg value="-N" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="clean" depends="clean-unix,clean-windows"
+ description="Delete target directories" >
+ <delete dir="${build}"/>
+ </target>
+ <target name="clean-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="clean-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="clean" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="test" depends="test-unix,test-windows" description="Run tests" />
+ <target name="test-unix" if="osfamily-unix">
+ <exec executable="mvn" failonerror="true">
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+ <target name="test-windows" if="osfamily-windows">
+ <exec executable="cmd" failonerror="true">
+ <arg value="/c" />
+ <arg value="mvn.bat" />
+ <arg value="test" />
+ <arg value="${mvn.opts}" />
+ </exec>
+ </target>
+
+ <target name="deploy" depends="install"
+ description="deploy imports service">
+ <ant antfile="3rdparty/build.xml" target="deploy" inheritall="false"/>
+ </target>
+
+ <target name="undeploy"
+ description="undeploy imports service">
+ <ant antfile="3rdparty/build.xml" target="undeploy" inheritall="false"/>
+ </target>
+
+ <target name="dist" depends="package"
+ description="distribute imports service">
+ <ant antfile="3rdparty/build.xml" target="dist" inheritall="false"/>
+ </target>
+
+</project>
--- /dev/null
+<classpath>\r
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>\r
+ <classpathentry kind="src" path="target/generated-sources/xjc"/>\r
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>\r
+ <classpathentry kind="output" path="target/classes"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-lang/commons-lang/2.2/commons-lang-2.2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.jaxb"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0.jar" sourcepath="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4.jar" sourcepath="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6-jdk15.jar"/>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
+</classpath>
\ No newline at end of file
--- /dev/null
+<projectDescription>\r
+ <name>org.collectionspace.services.imports.jaxb</name>\r
+ <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\r
+ <projects>\r
+ <project>org.collectionspace.services.jaxb</project>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>
\ No newline at end of file
--- /dev/null
+#Wed Jan 19 22:49:45 PST 2011\r
+activeProfiles=\r
+eclipse.preferences.version=1\r
+fullBuildGoals=process-test-resources\r
+includeModules=false\r
+resolveWorkspaceProjects=true\r
+resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
+version=1\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>org.collectionspace.services.imports</artifactId>
+ <groupId>org.collectionspace.services</groupId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.jaxb</artifactId>
+ <name>services.imports.jaxb</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2-commons</groupId>
+ <artifactId>property-listener-injector</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>collectionspace-services-imports-jaxb</finalName>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.jaxb2.maven2</groupId>
+ <artifactId>maven-jaxb2-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
--- /dev/null
+/**
+ *
+ */
+package org.collectionspace.services;
+
+public interface ImportsJAXBSchema {
+ final static String OBJECT_EXIT_CURRENT_OWNER = "currentOwner";
+ final static String OBJECT_EXIT_DEPOSITOR = "depositor";
+ final static String OBJECT_EXIT_DATE = "exitDate";
+ final static String OBJECT_EXIT_METHODS = "exitMethods";
+ final static String OBJECT_EXIT_METHOD = "exitMethod";
+ final static String OBJECT_EXIT_NOTE = "exitNote";
+ final static String OBJECT_EXIT_NUMBER = "exitNumber";
+ final static String OBJECT_EXIT_REASON = "exitReason";
+ final static String OBJECT_EXIT_PACKING_NOTE = "packingNote";
+}
--- /dev/null
+package org.collectionspace.services;
+
+public interface ImportsListItemJAXBSchema {
+ final static String OBJECT_EXIT_CURRENT_OWNER = "currentOwner";
+ final static String OBJECT_EXIT_NUMBER = "exitNumber";
+
+ final static String CSID = "csid";
+ final static String URI = "url";
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+ Loan Out schema (XSD)
+
+ Entity : Imports
+ Part : Common
+ Used for: JAXB binding between XML and Java objects
+
+ $LastChangedRevision: 2316 $
+ $LastChangedDate: 2010-06-02 16:03:51 -0700 (Wed, 02 Jun 2010) $
+-->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ jaxb:version="1.0" elementFormDefault="unqualified"
+ xmlns:ns="http://collectionspace.org/services/imports"
+ xmlns="http://collectionspace.org/services/imports"
+ targetNamespace="http://collectionspace.org/services/imports"
+ version="0.1"
+>
+
+<!--
+ Avoid XmlRootElement nightmare:
+ See http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
+-->
+<!-- See http://wiki.collectionspace.org/display/collectionspace/Loans+Out+Schema -->
+
+ <!-- imports -->
+ <xs:element name="imports_common">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="importsField" type="xs:string"/>
+ <xs:element name="params" type="params"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="params">
+ <xs:sequence>
+ <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- This is the base class for paginated lists -->
+ <xs:complexType name="abstractCommonList">
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:class ref="org.collectionspace.services.jaxb.AbstractCommonList"/>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:complexType>
+
+</xs:schema>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- A comment. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.main</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports</artifactId>
+ <name>services.imports</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>jaxb</module>
+ <module>service</module>
+ <module>3rdparty</module>
+ </modules>
+
+</project>
+
--- /dev/null
+<classpath>\r
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>\r
+ <classpathentry kind="output" path="target/classes"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/media/jai_core/1.1.2_01/jai_core-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar" sourcepath="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar" sourcepath="M2_REPO/javax/mail/mail/1.4/mail-1.4-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/javax/script/script-api/1.0/script-api-1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0/stax-api-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6.jar" sourcepath="M2_REPO/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1/classworlds-1.1.jar" sourcepath="M2_REPO/classworlds/classworlds/1.1/classworlds-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/noelios/restlet/com.noelios.restlet/1.0.7/com.noelios.restlet-1.0.7.jar" sourcepath="M2_REPO/com/noelios/restlet/com.noelios.restlet/1.0.7/com.noelios.restlet-1.0.7-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.httpclient/1.0.7/com.noelios.restlet.ext.httpclient-1.0.7.jar" sourcepath="M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.httpclient/1.0.7/com.noelios.restlet.ext.httpclient-1.0.7-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" sourcepath="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" sourcepath="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4.jar" sourcepath="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-jexl/2.0.1/commons-jexl-2.0.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-lang/commons-lang/2.2/commons-lang-2.2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar" sourcepath="M2_REPO/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/EditableImage/0.9.5/EditableImage-0.9.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.0/httpclient-4.0.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.0/httpclient-4.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4.jar" sourcepath="M2_REPO/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/imagej/imagej/1.4.1.e/imagej-1.4.1.e.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/JAI-Adapter/0.9.5/JAI-Adapter-0.9.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/media/jai_codec/1.1.2_01/jai_codec-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/cup/java-cup/0.11a/java-cup-0.11a.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2.jar" sourcepath="M2_REPO/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/jaxrs-api/1.2.1.GA/jaxrs-api-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.0.4.GA/jboss-common-4.0.4.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-remoting/2.2.2.SP1/jboss-remoting-2.2.2.SP1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar" sourcepath="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.5.8/jcl-over-slf4j-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1H.7/jetty-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1H.7/jetty-util-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/joda-time/joda-time/1.6/joda-time-1.6.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/jcraft/jsch/0.1.27/jsch-0.1.27.jar" sourcepath="M2_REPO/com/jcraft/jsch/0.1.27/jsch-0.1.27-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/com/jcraft/jsch/0.1.27/jsch-0.1.27-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar" sourcepath="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.1/junit-4.1.jar" sourcepath="M2_REPO/junit/junit/4.1/junit-4.1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/junit/junit/4.1/junit-4.1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/metadata-extractor/2.3.1/metadata-extractor-2.3.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/media/mlib_jai/1.1.2_01/mlib_jai-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.5/mysql-connector-java-5.1.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/common/nuxeo-common/1.6.2/nuxeo-common-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core/1.6.2/nuxeo-core-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-api/1.6.2/nuxeo-core-api-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-client/1.6.2/nuxeo-core-client-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-convert-api/1.6.2/nuxeo-core-convert-api-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-event/1.6.2/nuxeo-core-event-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-facade/1.6.2/nuxeo-core-facade-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-io/1.6.2/nuxeo-core-io-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-query/1.6.2/nuxeo-core-query-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-schema/1.6.2/nuxeo-core-schema-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-storage-sql/1.6.2/nuxeo-core-storage-sql-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-commandline-executor/5.3.2/nuxeo-platform-commandline-executor-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-filemanager-api/5.3.2/nuxeo-platform-filemanager-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-filemanager-core/5.3.2/nuxeo-platform-filemanager-core-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-forms-layout-api/5.3.2/nuxeo-platform-forms-layout-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-api/5.3.2/nuxeo-platform-imaging-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-core/5.3.2/nuxeo-platform-imaging-core-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-mimetype-api/5.3.2/nuxeo-platform-mimetype-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-search-api/5.3.2/nuxeo-platform-search-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-types-api/5.3.2/nuxeo-platform-types-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-versioning-api/5.3.2/nuxeo-platform-versioning-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime/1.6.2/nuxeo-runtime-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime-management/1.6.2/nuxeo-runtime-management-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime-osgi/1.6.2/nuxeo-runtime-osgi-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/Operations/0.9.5/Operations-0.9.5.jar"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.3rdparty.nuxeo.quote-api"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.collectionobject.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.common"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.contact.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.contact.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.hyperjaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.imports.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.person.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.person.jaxb"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/restlet/org.restlet/1.0.7/org.restlet-1.0.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0.jar" sourcepath="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/relaxngDatatype/1.0/relaxngDatatype-1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxb-provider/1.2.1.GA/resteasy-jaxb-provider-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/1.2.1.GA/resteasy-jaxrs-1.2.1.GA.jar" sourcepath="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/1.2.1.GA/resteasy-jaxrs-1.2.1.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-multipart-provider/1.2.1.GA/resteasy-multipart-provider-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4.jar" sourcepath="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/scannotation/scannotation/1.0.2/scannotation-1.0.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.1H.7/servlet-api-2.5-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.5.8/slf4j-log4j12-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6-jdk15.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/xsom/20060306/xsom-20060306.jar"/>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
+</classpath>
\ No newline at end of file
--- /dev/null
+<classpath>\r
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>\r
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>\r
+ <classpathentry kind="output" path="target/classes"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/media/jai_core/1.1.2_01/jai_core-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar" sourcepath="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar" sourcepath="M2_REPO/javax/mail/mail/1.4/mail-1.4-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/javax/script/script-api/1.0/script-api-1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0/stax-api-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6.jar" sourcepath="M2_REPO/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1/classworlds-1.1.jar" sourcepath="M2_REPO/classworlds/classworlds/1.1/classworlds-1.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/noelios/restlet/com.noelios.restlet/1.0.7/com.noelios.restlet-1.0.7.jar" sourcepath="M2_REPO/com/noelios/restlet/com.noelios.restlet/1.0.7/com.noelios.restlet-1.0.7-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.httpclient/1.0.7/com.noelios.restlet.ext.httpclient-1.0.7.jar" sourcepath="M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.httpclient/1.0.7/com.noelios.restlet.ext.httpclient-1.0.7-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" sourcepath="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar" sourcepath="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4.jar" sourcepath="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-jexl/2.0.1/commons-jexl-2.0.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-lang/commons-lang/2.2/commons-lang-2.2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar" sourcepath="M2_REPO/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/EditableImage/0.9.5/EditableImage-0.9.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.0/httpclient-4.0.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.0/httpclient-4.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4.jar" sourcepath="M2_REPO/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/hyperjaxb3/hyperjaxb3-ejb-runtime/0.5.4/hyperjaxb3-ejb-runtime-0.5.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/imagej/imagej/1.4.1.e/imagej-1.4.1.e.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/JAI-Adapter/0.9.5/JAI-Adapter-0.9.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/media/jai_codec/1.1.2_01/jai_codec-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/cup/java-cup/0.11a/java-cup-0.11a.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.9/jaxb-impl-2.1.9-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1/jaxb-xjc-2.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2.jar" sourcepath="M2_REPO/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/0.5.2/jaxb2-basics-runtime-0.5.2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/jaxrs-api/1.2.1.GA/jaxrs-api-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.0.4.GA/jboss-common-4.0.4.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-remoting/2.2.2.SP1/jboss-remoting-2.2.2.SP1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar" sourcepath="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.5.8/jcl-over-slf4j-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1H.7/jetty-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1H.7/jetty-util-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/joda-time/joda-time/1.6/joda-time-1.6.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/jcraft/jsch/0.1.27/jsch-0.1.27.jar" sourcepath="M2_REPO/com/jcraft/jsch/0.1.27/jsch-0.1.27-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/com/jcraft/jsch/0.1.27/jsch-0.1.27-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar" sourcepath="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.1/junit-4.1.jar" sourcepath="M2_REPO/junit/junit/4.1/junit-4.1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/junit/junit/4.1/junit-4.1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.jar" sourcepath="M2_REPO/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/metadata-extractor/2.3.1/metadata-extractor-2.3.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/media/mlib_jai/1.1.2_01/mlib_jai-1.1.2_01.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.5/mysql-connector-java-5.1.5.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/common/nuxeo-common/1.6.2/nuxeo-common-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core/1.6.2/nuxeo-core-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-api/1.6.2/nuxeo-core-api-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-client/1.6.2/nuxeo-core-client-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-convert-api/1.6.2/nuxeo-core-convert-api-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-event/1.6.2/nuxeo-core-event-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-facade/1.6.2/nuxeo-core-facade-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-io/1.6.2/nuxeo-core-io-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-query/1.6.2/nuxeo-core-query-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-schema/1.6.2/nuxeo-core-schema-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/core/nuxeo-core-storage-sql/1.6.2/nuxeo-core-storage-sql-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-commandline-executor/5.3.2/nuxeo-platform-commandline-executor-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-filemanager-api/5.3.2/nuxeo-platform-filemanager-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-filemanager-core/5.3.2/nuxeo-platform-filemanager-core-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-forms-layout-api/5.3.2/nuxeo-platform-forms-layout-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-api/5.3.2/nuxeo-platform-imaging-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-core/5.3.2/nuxeo-platform-imaging-core-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-mimetype-api/5.3.2/nuxeo-platform-mimetype-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-search-api/5.3.2/nuxeo-platform-search-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-types-api/5.3.2/nuxeo-platform-types-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-versioning-api/5.3.2/nuxeo-platform-versioning-api-5.3.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime/1.6.2/nuxeo-runtime-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime-management/1.6.2/nuxeo-runtime-management-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/nuxeo/runtime/nuxeo-runtime-osgi/1.6.2/nuxeo-runtime-osgi-1.6.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/mistral/Operations/0.9.5/Operations-0.9.5.jar"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.3rdparty.nuxeo.quote-api"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.collectionobject.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.common"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.contact.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.contact.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.hyperjaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.imports.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.imports.jaxb"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.person.client"/>\r
+ <classpathentry kind="src" path="/org.collectionspace.services.person.jaxb"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/restlet/org.restlet/1.0.7/org.restlet-1.0.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0.jar" sourcepath="M2_REPO/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2-commons/property-listener-injector/1.0/property-listener-injector-1.0-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/relaxngDatatype/1.0/relaxngDatatype-1.0.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxb-provider/1.2.1.GA/resteasy-jaxb-provider-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/1.2.1.GA/resteasy-jaxrs-1.2.1.GA.jar" sourcepath="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/1.2.1.GA/resteasy-jaxrs-1.2.1.GA-sources.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-multipart-provider/1.2.1.GA/resteasy-multipart-provider-1.2.1.GA.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4.jar" sourcepath="M2_REPO/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/jvnet/jaxb2_commons/runtime/0.4.1.4/runtime-0.4.1.4-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/scannotation/scannotation/1.0.2/scannotation-1.0.2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.1H.7/servlet-api-2.5-6.1H.7.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.5.8/slf4j-log4j12-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3.jar" sourcepath="M2_REPO/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.6/testng-5.6-jdk15.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-2/wagon-http-lightweight-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh/1.0-beta-2/wagon-ssh-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh-common/1.0-beta-2/wagon-ssh-common-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2-sources.jar">\r
+ <attributes>\r
+ <attribute value="jar:file:/C:/Documents%20and%20Settings/remillet/.m2/repository/org/apache/maven/wagon/wagon-ssh-external/1.0-beta-2/wagon-ssh-external-1.0-beta-2-javadoc.jar!/" name="javadoc_location"/>\r
+ </attributes>\r
+ </classpathentry>\r
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>\r
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/xsom/20060306/xsom-20060306.jar"/>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
+</classpath>
\ No newline at end of file
--- /dev/null
+<projectDescription>\r
+ <name>org.collectionspace.services.imports.service</name>\r
+ <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\r
+ <projects>\r
+ <project>org.collectionspace.services.3rdparty.nuxeo.quote-api</project>\r
+ <project>org.collectionspace.services.collectionobject.jaxb</project>\r
+ <project>org.collectionspace.services.common</project>\r
+ <project>org.collectionspace.services.contact.client</project>\r
+ <project>org.collectionspace.services.contact.jaxb</project>\r
+ <project>org.collectionspace.services.hyperjaxb</project>\r
+ <project>org.collectionspace.services.jaxb</project>\r
+ <project>org.collectionspace.services.imports.jaxb</project>\r
+ <project>org.collectionspace.services.person.client</project>\r
+ <project>org.collectionspace.services.person.jaxb</project>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>
\ No newline at end of file
--- /dev/null
+<projectDescription>\r
+ <name>org.collectionspace.services.imports.service</name>\r
+ <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\r
+ <projects>\r
+ <project>org.collectionspace.services.3rdparty.nuxeo.quote-api</project>\r
+ <project>org.collectionspace.services.client</project>\r
+ <project>org.collectionspace.services.collectionobject.jaxb</project>\r
+ <project>org.collectionspace.services.common</project>\r
+ <project>org.collectionspace.services.contact.client</project>\r
+ <project>org.collectionspace.services.contact.jaxb</project>\r
+ <project>org.collectionspace.services.hyperjaxb</project>\r
+ <project>org.collectionspace.services.jaxb</project>\r
+ <project>org.collectionspace.services.imports.client</project>\r
+ <project>org.collectionspace.services.imports.jaxb</project>\r
+ <project>org.collectionspace.services.person.client</project>\r
+ <project>org.collectionspace.services.person.jaxb</project>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.maven.ide.eclipse.maven2Builder</name>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ </natures>\r
+</projectDescription>
\ No newline at end of file
--- /dev/null
+#Fri Aug 27 16:35:21 PDT 2010\r
+activeProfiles=\r
+eclipse.preferences.version=1\r
+fullBuildGoals=process-test-resources\r
+includeModules=false\r
+resolveWorkspaceProjects=true\r
+resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
+version=1\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.service</artifactId>
+ <name>services.imports.service</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+
+
+
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.imports.jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.collectionobject.jaxb</artifactId> <!-- FIXME: REM - Is this really a required dependency? -->
+ <version>${project.version}</version>
+ </dependency>
+ <!-- External dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.6</version>
+ </dependency>
+
+ <!-- javax -->
+
+ <dependency>
+ <groupId>javax.security</groupId>
+ <artifactId>jaas</artifactId>
+ <version>1.0.01</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- jboss -->
+
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>tjws</groupId>
+ <artifactId>webserver</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxb-provider</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-multipart-provider</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.nuxeo.ecm.platform</groupId>
+ <artifactId>nuxeo-shell-core</artifactId>
+ <version>${nuxeo.platform.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nuxeo.ecm.core</groupId>
+ <artifactId>nuxeo-core-api</artifactId>
+ <version>${nuxeo.core.version}</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jboss-remoting</artifactId>
+ <groupId>jboss</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.restlet</groupId>
+ <artifactId>org.restlet</artifactId>
+ <version>1.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>com.noelios.restlet</groupId>
+ <artifactId>com.noelios.restlet.ext.httpclient</artifactId>
+ <version>1.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>com.noelios.restlet</groupId>
+ <artifactId>com.noelios.restlet</artifactId>
+ <version>1.0.7</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>collectionspace-services-imports</finalName>
+ </build>
+</project>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<profilesXml xmlns="http://maven.apache.org/PROFILES/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
+</profilesXml>
\ No newline at end of file
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2011 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.collectionspace.services.imports;
+
+import org.collectionspace.services.common.FileUtils;
+import org.collectionspace.services.common.ResourceBase;
+import org.collectionspace.services.common.ServiceMessages;
+import org.collectionspace.services.common.api.FileTools;
+import org.collectionspace.services.common.api.Tools;
+import org.collectionspace.services.common.api.ZipTools;
+
+// The modified Nuxeo ImportCommand from nuxeo's shell:
+import org.collectionspace.services.imports.nuxeo.ImportCommand;
+import org.jboss.resteasy.plugins.providers.multipart.InputPart;
+import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
+import org.xml.sax.InputSource;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Laramie Crocker
+ */
+@Path(ImportsResource.SERVICE_PATH)
+@Produces({"application/xml"})
+@Consumes({"application/xml"})
+public class ImportsResource extends ResourceBase {
+
+ public static final String SERVICE_PATH = "imports";
+ public static final String SERVICE_NAME = "imports";
+
+ @Override
+ public String getServiceName(){
+ return SERVICE_NAME;
+ }
+
+ @Override
+ protected String getVersionString() {
+ final String lastChangeRevision = "$LastChangedRevision: 2108 $";
+ return lastChangeRevision;
+ }
+
+ @Override
+ //public Class<ImportsCommon> getCommonPartClass() {
+ public Class getCommonPartClass() {
+ try {
+ return Class.forName("org.collectionspace.services.imports.ImportsCommon");//.class;
+ } catch (ClassNotFoundException e){
+ return null;
+ }
+ }
+
+
+ /* KRUFT:
+
+ 1) here is how you can deal with poxpayloads:
+ //PoxPayloadIn input = new PoxPayloadIn(xmlPayload);
+ //ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(input);
+ 2) here are some notes:
+ //First, save the import request to a local file.
+ // It may be huge. To accept a stream, send it as an upload request; see acceptUpload()
+ 3) useful for debugging:
+ System.out.println("\r\n\r\n\r\n=====================\r\n RUNNING create with xmlPayload: \r\n"+xmlPayload);
+ */
+
+
+ public static final String TEMPLATE_DIR = "/src/trunk/services/imports/service/src/main/resources/templates";
+
+ /** you can test this with something like:
+ * curl -X POST http://localhost:8180/cspace-services/imports -i -u "Admin@collectionspace.org:Administrator" -H "Content-Type: application/xml" -T in.xml
+ * -T /src/trunk/services/imports/service/src/main/resources/templates/authority-request.xml
+ */
+ @POST
+ @Consumes("application/xml")
+ @Produces("application/xml")
+ public javax.ws.rs.core.Response create(String xmlPayload) {
+ String result;
+ javax.ws.rs.core.Response.ResponseBuilder rb;
+ try {
+ InputSource inputSource = payloadToInputSource(xmlPayload);
+ result = createFromInputSource(inputSource);
+ rb = javax.ws.rs.core.Response.ok();
+ } catch (Exception e) {
+ result = Tools.errorToString(e, true);
+ rb = javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ rb.entity(result);
+ return rb.build();
+ }
+
+ public static String createFromInputSource(InputSource inputSource) throws Exception {
+ // We must expand the request and wrap it with all kinds of Nuxeo baggage, which expandXmlPayloadToDir knows how to do.
+ String outputDir = FileTools.createTmpDir("imports-").getCanonicalPath();
+ expandXmlPayloadToDir(inputSource, TEMPLATE_DIR, outputDir);
+
+ // Next, call the nuxeo import service, pointing it to our local directory that has the expanded request.
+ ImportCommand importCommand = new ImportCommand();
+ String destWorkspaces = "/default-domain/workspaces";
+ String report = importCommand.run(outputDir, destWorkspaces);
+ String result = "<?xml ?><import><msg>SUCCESS</msg><report></report>"+report+"</import>";
+ return result;
+ }
+
+ /** @param xmlPayload A request file has a specific format, you can look at:
+ * trunk/services/imports/service/src/test/resources/requests/authority-request.xml
+ */
+ public static InputSource payloadToInputSource(String xmlPayload) throws Exception {
+ String requestDir = FileTools.createTmpDir("imports-request-").getCanonicalPath();
+ File requestFile = FileTools.saveFile(requestDir, "request.xml", xmlPayload, true);
+ if (requestFile == null){
+ throw new FileNotFoundException("Could not create file in requestDir: "+requestDir);
+ }
+ String requestFilename = requestFile.getCanonicalPath();
+ InputSource inputSource = new InputSource(requestFilename);
+ System.out.println("############## REQUEST_FILENAME: "+requestFilename);
+ return inputSource;
+ }
+
+ /** This method may be called statically from outside this class; there is a test call in
+ * org.collectionspace.services.test.ImportsServiceTest
+ *
+ * @param inputSource A wrapper around a request file, either a local file or a stream;
+ * the file has a specific format, you can look at:
+ * trunk/services/imports/service/src/test/resources/requests/authority-request.xml
+ * @param templateDir The local directory where templates are to be found at runtime.
+ * @param outputDir The local directory where expanded files and directories are found, ready to be passed to the Nuxeo importer.
+ */
+ public static void expandXmlPayloadToDir(InputSource inputSource, String templateDir, String outputDir) throws Exception {
+ System.out.println("############## TEMPLATE_DIR: "+templateDir);
+ System.out.println("############## OUTPUT_DIR:"+outputDir);
+ TemplateExpander.expandInputSource(templateDir, outputDir, inputSource, "/imports/import");
+ }
+
+ /** you can test like this:
+ * curl -F "file=@out.zip;type=application/zip" --basic -u "Admin@collectionspace.org:Administrator" http://localhost:8280/cspace-services/imports
+ */
+ @POST
+ @Consumes("multipart/form-data")
+ @Produces("application/xml")
+ public javax.ws.rs.core.Response acceptUpload(@Context HttpServletRequest req,
+ MultipartFormDataInput partFormData) {
+ javax.ws.rs.core.Response response = null;
+ StringBuffer resultBuf = new StringBuffer();
+ try {
+ InputStream fileStream = null;
+ String preamble = partFormData.getPreamble();
+ System.out.println("Preamble type is:" + preamble);
+ Map<String, List<InputPart>> partsMap = partFormData.getFormDataMap();
+ List<InputPart> fileParts = partsMap.get("file");
+ for (InputPart part : fileParts){
+ String mediaType = part.getMediaType().toString();
+ System.out.println("Media type is:" + mediaType);
+ if (mediaType.equalsIgnoreCase("text/xml")){
+ InputSource inputSource = new InputSource(part.getBody(InputStream.class, null));
+ String result = createFromInputSource(inputSource);
+ resultBuf.append(result);
+ continue;
+ }
+ if (mediaType.equalsIgnoreCase("application/zip")){
+ fileStream = part.getBody(InputStream.class, null);
+
+ File zipfile = FileUtils.createTmpFile(fileStream, getServiceName() + "_");
+ String zipfileName = zipfile.getCanonicalPath();
+ System.out.println("Imports zip file saved to:" + zipfileName);
+
+ String baseOutputDir = FileTools.createTmpDir("imports-").getCanonicalPath();
+ File indir = new File(baseOutputDir+"/in");
+ indir.mkdir();
+ ZipTools.unzip(zipfileName, indir.getCanonicalPath());
+ String result = "\r\n<zipResult>Zipfile " + zipfileName + "extracted to: " + indir.getCanonicalPath()+"</zipResult>";
+ System.out.println(result);
+
+ long start = System.currentTimeMillis();
+ //TODO: now call import service...
+ resultBuf.append(result);
+ continue;
+ }
+ }
+ javax.ws.rs.core.Response.ResponseBuilder rb = javax.ws.rs.core.Response.ok();
+ rb.entity(resultBuf.toString());
+ response = rb.build();
+ } catch (Exception e) {
+ throw bigReThrow(e, ServiceMessages.CREATE_FAILED);
+ }
+ return response;
+ }
+
+ String page = "<html><body><form enctype='multipart/form-data' action='/cspace-services/imports?type=xml' method='POST'>"
+ + "Choose a file to import: <input name='file' type='file' /><br /><input type='submit' value='Upload File' /></form></body></html>";
+ @GET
+ @Produces("text/html")
+ public String getInputForm(@QueryParam("form") String form) {
+ return page;
+ }
+}
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.collectionspace.services.imports;
+
+import org.collectionspace.services.client.ImportsClient;
+import org.collectionspace.services.common.ResourceBase;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+@Path(ImportsClient.SERVICE_PATH)
+@Produces({"application/xml"})
+@Consumes({"application/xml"})
+public class ImportsResource extends ResourceBase {
+
+ @Override
+ public String getServiceName(){
+ return ImportsClient.SERVICE_NAME;
+ }
+
+ @Override
+ protected String getVersionString() {
+ final String lastChangeRevision = "$LastChangedRevision: 2108 $";
+ return lastChangeRevision;
+ }
+
+ @Override
+ //public Class<ImportsCommon> getCommonPartClass() {
+ public Class getCommonPartClass() {
+ try {
+ return Class.forName("org.collectionspace.services.imports.ImportsCommon");//.class;
+ } catch (ClassNotFoundException e){
+ return null;
+ }
+ }
+
+}
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+\r
+ * Copyright 2011 University of California at Berkeley\r
+\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package org.collectionspace.services.imports;\r
+\r
+import java.io.*;\r
+import java.util.UUID;\r
+\r
+import org.collectionspace.services.common.IFragmentHandler;\r
+import org.collectionspace.services.common.XmlSaxFragmenter;\r
+import org.collectionspace.services.common.api.FileTools;\r
+import org.collectionspace.services.common.api.Tools;\r
+import org.dom4j.Document;\r
+import org.dom4j.Element;\r
+import org.hibernate.sql.Template;\r
+import org.testng.annotations.Test;\r
+import org.xml.sax.InputSource;\r
+\r
+/** This class expands templates specifically for the imports service.\r
+ *\r
+ * To see capability to create workspaces, see svn revision 4346 on branch\r
+ * https://source.collectionspace.org/collection-space/src/services/branches/CSPACE-3178/services\r
+ * This capability was removed, as it was necessary for testing only.\r
+ *\r
+ * @author Laramie Crocker\r
+ */\r
+public class TemplateExpander {\r
+\r
+ protected static String var(String theVar){\r
+ return "\\$\\{"+theVar+"\\}";\r
+ }\r
+\r
+ /**\r
+ * @param source the template, which contains variables wrapped in a dollar sign and curly braces, e.g. source="my template with ID ${docID} yada yada."\r
+ * @param theVar a variable name, without the dollar sign or curly braces or internal quotes, e.g. searchAndReplaceVar(source, "docID", "1234-5678")\r
+ * @param replace the value the variable will be replaced with.\r
+ * @return the expanded template.\r
+ */\r
+ public static String searchAndReplaceVar(String source, String theVar, String replace){\r
+ return Tools.searchAndReplace(source, var(theVar), replace);\r
+ }\r
+\r
+ public static String doOneService(String outDir, String partTmpl, String wrapperTmpl,\r
+ String SERVICE_TYPE, String SERVICE_NAME, String CSID) throws Exception {\r
+ String docID;\r
+ if (Tools.notBlank(CSID)){\r
+ docID = CSID;\r
+ } else {\r
+ docID = UUID.randomUUID().toString();\r
+ }\r
+ String part = Tools.searchAndReplace(partTmpl, var("docID"), docID);\r
+\r
+ wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("Schema"), part);\r
+ wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("docID"), docID);\r
+ wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceType"), SERVICE_TYPE);\r
+ wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceName"), SERVICE_NAME);\r
+ //TODO: set timestamp via creating a ${created} variable.\r
+\r
+ String serviceDir = outDir+'/'+docID;\r
+ FileTools.saveFile(serviceDir, "document.xml", wrapperTmpl, true/*true=create parent dirs*/);\r
+ return docID;\r
+ }\r
+\r
+\r
+ /** Once you have called createWorkspace() to create a home for documents of a service, you can call this method to add documents for that service.\r
+ *\r
+ * Internally, this method also gets called by the XmlSaxFragmenter callback via the public inner class FragmentHandlerImpl.\r
+ *\r
+ * @param partTmpl A template file that contains the schema part for the service, and which has macros such as ${docID} to be expanded.\r
+ * @param SERVICE_NAME The name of the service, such as "Personauthorities"\r
+ * @param SERVICE_TYPE The Nuxeo document type, such as "Personauthority"\r
+ * @param TEMPLATE_DIR The local filesystem location of all the standard templates that wrap up workspace documents;\r
+ * once expanded, these spit out Nuxeo import format.\r
+ * @param CSID An optional parameter which forces the document CSID, otherwise the CSID is set to a random UUID.\r
+ * @throws Exception\r
+ */\r
+ public static void createDocInWorkspace(String partTmpl,\r
+ String SERVICE_NAME,\r
+ String SERVICE_TYPE,\r
+ String TEMPLATE_DIR,\r
+ String OUTPUT_DIR,\r
+ String CSID) throws Exception {\r
+ String wrapperTmpl = FileTools.readFile(TEMPLATE_DIR,"service-document.xml");\r
+ String outputDir = OUTPUT_DIR+'/'+SERVICE_NAME;\r
+ doOneService(outputDir, partTmpl, wrapperTmpl, SERVICE_TYPE, SERVICE_NAME, CSID);\r
+ }\r
+\r
+ public static void expand(String TEMPLATE_DIR, String outputDir, String requestFilename, String chopPath){\r
+ FragmentHandlerImpl callback = new FragmentHandlerImpl(TEMPLATE_DIR, outputDir);\r
+ XmlSaxFragmenter.parse(requestFilename, chopPath, callback, false);\r
+ }\r
+\r
+ public static void expandInputSource(String TEMPLATE_DIR, String outputDir, InputSource requestSource, String chopPath){\r
+ FragmentHandlerImpl callback = new FragmentHandlerImpl(TEMPLATE_DIR, outputDir);\r
+ XmlSaxFragmenter.parse(requestSource, chopPath, callback, false);\r
+ }\r
+\r
+ /** This inner class is the callback target for calls to XmlSaxFragmenter, for example:\r
+ * FragmentHandlerImpl callback = new FragmentHandlerImpl();\r
+ * XmlSaxFragmenter.parse(filename, "/imports/import", callback, false);\r
+ * It will be called for every /imports/import in the file:\r
+ * <import ID="1" service="Personauthorities" type="Personauthority">\r
+ */\r
+ public static class FragmentHandlerImpl implements IFragmentHandler {\r
+ //============IFragmentHandler===========================================================\r
+ public void onFragmentReady(Document context, Element fragmentParent, String currentPath, int fragmentIndex, String fragment){\r
+ try {\r
+ dump(context, currentPath, fragmentIndex, fragment);\r
+ String serviceName = checkAttribute(fragmentParent, "service", SERVICE_NAME);\r
+ String serviceType = checkAttribute(fragmentParent, "type", SERVICE_TYPE);\r
+ String CSID = fragmentParent.attributeValue("CSID");\r
+ TemplateExpander.createDocInWorkspace(fragment, serviceName, serviceType, TEMPLATE_DIR, OUPUT_DIR, CSID);\r
+ } catch (Exception e){\r
+ System.err.println("ERROR calling expandXmlPayloadToDir"+e);\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+ public void onEndDocument(Document document, int fragmentCount){\r
+ System.out.println("====TemplateExpander DONE============\r\n"+ XmlSaxFragmenter.prettyPrint(document)+"================");\r
+ }\r
+ //============helper methods==============================================================\r
+ public FragmentHandlerImpl(String templateDir, String outputDir){\r
+ TEMPLATE_DIR = templateDir;\r
+ OUPUT_DIR = outputDir;\r
+ }\r
+ public String SERVICE_NAME = ""; //You can provide a default.\r
+ public String SERVICE_TYPE = ""; //You can provide a default.\r
+ public String TEMPLATE_DIR = ""; //You MUST provide a default via constructor.\r
+ public String OUPUT_DIR = ""; //You MUST provide a default via constructor.\r
+ private String checkAttribute(Element fragmentParent, String attName, String defaultVal){\r
+ String val = fragmentParent.attributeValue(attName);\r
+ if (Tools.notEmpty(val)){\r
+ return val;\r
+ }\r
+ return defaultVal;\r
+ }\r
+ private void dump(Document context, String currentPath, int fragmentIndex, String fragment){\r
+ System.out.println("====Path============\r\n"+currentPath+'['+fragmentIndex+']');\r
+ System.out.println("====Context=========\r\n"+ XmlSaxFragmenter.prettyPrint(context));\r
+ System.out.println("====Fragment========\r\n"+fragment+"\r\n===================\r\n");\r
+ }\r
+ }\r
+\r
+}\r
--- /dev/null
+package org.collectionspace.services.imports.nuxeo;\r
+\r
+import java.io.File;\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.collectionspace.services.nuxeo.client.java.NuxeoConnector;\r
+import org.nuxeo.ecm.core.api.repository.RepositoryInstance;\r
+import org.nuxeo.ecm.core.client.NuxeoClient;\r
+import org.nuxeo.ecm.core.io.DocumentPipe;\r
+import org.nuxeo.ecm.core.io.DocumentReader;\r
+import org.nuxeo.ecm.core.io.DocumentWriter;\r
+import org.nuxeo.ecm.core.io.impl.DocumentPipeImpl;\r
+import org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter;\r
+// we use our own override of this: import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;\r
+\r
+// based loosely on package org.nuxeo.ecm.shell.commands.io.ImportCommand;\r
+public class ImportCommand {\r
+ private static final Log log = LogFactory.getLog(ImportCommand.class);\r
+\r
+ public String run(String src, String dest) throws Exception {\r
+ File file = new File(src);\r
+ ///cspace way of configuring client and auth:\r
+ NuxeoClient client = NuxeoConnector.getInstance().getClient();\r
+ RepositoryInstance repository = client.openRepository();\r
+ try {\r
+ return importTree(repository, file, dest);\r
+ } finally {\r
+ repository.close();\r
+ }\r
+ }\r
+\r
+ String importTree(RepositoryInstance repository, File file, String toPath) throws Exception {\r
+ DocumentReader reader = null;\r
+ DocumentWriter writer = null;\r
+ String dump = "NO RESULTS";\r
+ try {\r
+ System.out.println("importTree reading file: "+file+(file!=null ? " exists? "+file.exists() : " file param is null"));\r
+ reader = new LoggedXMLDirectoryReader(file); //our overload of XMLDirectoryReader.\r
+ writer = new DocumentModelWriter(repository, toPath, 10);\r
+ DocumentPipe pipe = new DocumentPipeImpl(10);\r
+ // pipe.addTransformer(transformer);\r
+ pipe.setReader(reader);\r
+ pipe.setWriter(writer);\r
+ pipe.run();\r
+ } finally {\r
+ if (reader != null) {\r
+ reader.close();\r
+ dump = ((LoggedXMLDirectoryReader)reader).report();\r
+ }\r
+ if (writer != null) {\r
+ writer.close();\r
+ }\r
+ }\r
+ return dump;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2011 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.collectionspace.services.imports.nuxeo;
+
+import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
+import org.collectionspace.services.imports.ImportsCommon;
+
+public class ImportsDocumentModelHandler
+ extends DocHandlerBase<ImportsCommon> {
+}
+
--- /dev/null
+package org.collectionspace.services.imports.nuxeo;\r
+\r
+import java.io.BufferedInputStream;\r
+import java.io.File;\r
+import java.io.FileFilter;\r
+import java.io.FileInputStream;\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.dom4j.Document;\r
+import org.dom4j.DocumentException;\r
+import org.dom4j.io.SAXReader;\r
+import org.nuxeo.common.utils.FileTreeIterator;\r
+import org.nuxeo.common.utils.FileUtils;\r
+import org.nuxeo.common.utils.Path;\r
+import org.nuxeo.ecm.core.api.impl.blob.StreamingBlob;\r
+import org.nuxeo.ecm.core.io.ExportConstants;\r
+import org.nuxeo.ecm.core.io.ExportedDocument;\r
+import org.nuxeo.ecm.core.io.impl.AbstractDocumentReader;\r
+import org.nuxeo.ecm.core.io.impl.ExportedDocumentImpl;\r
+import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;\r
+import org.nuxeo.runtime.services.streaming.FileSource;\r
+\r
+public class LoggedXMLDirectoryReader extends AbstractDocumentReader {\r
+\r
+ protected Document loadXML(File file) throws IOException {\r
+ String filename = file.getCanonicalPath();\r
+ System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename);\r
+ BufferedInputStream in = null;\r
+ try {\r
+ in = new BufferedInputStream(new FileInputStream(file));\r
+ System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: DONE");\r
+ reportList.add("READ: "+filename);\r
+ return new SAXReader().read(in);\r
+ } catch (DocumentException e) {\r
+ IOException ioe = new IOException("Failed to read file document "\r
+ + file + ": " + e.getMessage());\r
+ ioe.setStackTrace(e.getStackTrace());\r
+ System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: ERROR");\r
+ reportList.add("ERROR: "+filename);\r
+ throw ioe;\r
+ } finally {\r
+ if (in != null) {\r
+ in.close();\r
+ }\r
+ }\r
+ }\r
+\r
+ private File source;\r
+\r
+ private FileTreeIterator iterator;\r
+\r
+ public LoggedXMLDirectoryReader(String sourcePath) {\r
+ this(new File(sourcePath));\r
+ }\r
+\r
+ public LoggedXMLDirectoryReader(File source) {\r
+ this.source = source;\r
+ iterator = new FileTreeIterator(source);\r
+ iterator.setFilter(new FileFilter() {\r
+ public boolean accept(File pathname) {\r
+ return pathname.isDirectory();\r
+ }\r
+ });\r
+ }\r
+\r
+ public Object getSource() {\r
+ return source;\r
+ }\r
+\r
+ public void setSource(File source) {\r
+ this.source = source;\r
+ }\r
+\r
+ public void close() {\r
+ source = null;\r
+ iterator = null;\r
+ }\r
+\r
+ private List<String> reportList = new ArrayList<String>();\r
+ public String report(){\r
+ StringBuffer result = new StringBuffer();\r
+ for (String s: reportList){\r
+ result.append(s).append("\r\n");\r
+ }\r
+ return result.toString();\r
+ }\r
+\r
+\r
+ @Override\r
+ public ExportedDocument read() throws IOException {\r
+ if (iterator.hasNext()) {\r
+ File dir = iterator.next();\r
+ if (dir == null) {\r
+ return null;\r
+ }\r
+ // read document files\r
+ ExportedDocument xdoc = new ExportedDocumentImpl();\r
+ for (File file : dir.listFiles()) {\r
+ if (file.isFile()) {\r
+ String name = file.getName();\r
+ if (ExportConstants.DOCUMENT_FILE.equals(name)) {\r
+ Document doc = loadXML(file);\r
+ xdoc.setDocument(doc);\r
+ Path relPath = computeRelativePath(dir);\r
+ xdoc.setPath(relPath);\r
+ reportList.add(relPath.toString());\r
+ } else if (name.endsWith(".xml")) {\r
+ xdoc.putDocument(\r
+ FileUtils.getFileNameNoExt(file.getName()),\r
+ loadXML(file));\r
+ } else { // presume a blob\r
+ xdoc.putBlob(file.getName(), new StreamingBlob(\r
+ new FileSource(file)));\r
+ }\r
+ }\r
+ }\r
+ return xdoc;\r
+ }\r
+ return null;\r
+ }\r
+\r
+ /*NXP-1688 Rux: the path was somehow left over when migrated from\r
+ core 1.3.4 to 1.4.0. Pull back.*/\r
+ private Path computeRelativePath(File file) {\r
+ /*NXP-2507 Rux: preserve directory structure with slashes instead OS name separator*/\r
+ String subPathS =\r
+ file.getAbsolutePath().substring(source.getAbsolutePath().length());\r
+ subPathS = subPathS.replace(File.separatorChar, '/');\r
+ return new Path(subPathS);\r
+ }\r
+\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<imports>\r
+ <import ID="1">\r
+ <schema xmlns:personauthorities_naturalhistory="http://collectionspace.org/personauthorities_naturalhistory/" name="personauthorities_naturalhistory">\r
+ <personauthorities_naturalhistory:nh-int/>\r
+ <personauthorities_naturalhistory:nh-note>In test-data</personauthorities_naturalhistory:nh-note>\r
+ </schema>\r
+ <schema xmlns:personauthorities_common="http://collectionspace.org/services/person" name="personauthorities_common">\r
+ <personauthorities_common:displayName>Perf Test Person Auth ${docID}</personauthorities_common:displayName>\r
+ <personauthorities_common:shortIdentifier>perfTestPersons-${docID}</personauthorities_common:shortIdentifier>\r
+ <personauthorities_common:vocabType>PersonAuthority</personauthorities_common:vocabType>\r
+ <personauthorities_common:refName>urn:cspace:collectionspace.org:Personauthorities(perfTestPersons)'Perf Test Person Auth'</personauthorities_common:refName>\r
+ </schema>\r
+ </import>\r
+ <import ID="2">\r
+ <schema xmlns:personauthorities_naturalhistory="http://collectionspace.org/personauthorities_naturalhistory/" name="personauthorities_naturalhistory">\r
+ <personauthorities_naturalhistory:nh-int/>\r
+ <personauthorities_naturalhistory:nh-note>In test-data</personauthorities_naturalhistory:nh-note>\r
+ </schema>\r
+ <schema xmlns:personauthorities_common="http://collectionspace.org/services/person" name="personauthorities_common">\r
+ <personauthorities_common:displayName>Perf Test Person Auth ${docID}</personauthorities_common:displayName>\r
+ <personauthorities_common:shortIdentifier>perfTestPersons-${docID}</personauthorities_common:shortIdentifier>\r
+ <personauthorities_common:vocabType>PersonAuthority</personauthorities_common:vocabType>\r
+ <personauthorities_common:refName>urn:cspace:collectionspace.org:Personauthorities(perfTestPersons)'Perf Test Person Auth'</personauthorities_common:refName>\r
+ </schema>\r
+ </import>\r
+</imports>
\ No newline at end of file
--- /dev/null
+<!-- this format assumes that the workspace documents and folders are in place:\r
+ ./Personauthorities/\r
+ ./Personauthorities/document.xml\r
+ ./Persons/\r
+ ./Persons/document.xml\r
+--> \r
+<document repository="default" id="${docID}">\r
+ <system>\r
+ <type>${ServiceType}</type>\r
+ <path>${ServiceName}/${docID}</path>\r
+ <lifecycle-state>undefined</lifecycle-state>\r
+ <lifecycle-policy>undefined</lifecycle-policy>\r
+ <access-control>\r
+ <acl name="inherited">\r
+ <entry principal="Administrator" permission="Everything" grant="true"/>\r
+ <entry principal="members" permission="Read" grant="true"/>\r
+ </acl>\r
+ </access-control>\r
+ </system>\r
+ <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore">\r
+ <dc:creator>Administrator</dc:creator>\r
+ <dc:contributors>\r
+ <item>Administrator</item>\r
+ </dc:contributors>\r
+ <dc:source/>\r
+ <dc:created>2011-03-05T00:06:17Z</dc:created>\r
+ <dc:description/>\r
+ <dc:rights/>\r
+ <dc:subjects/>\r
+ <dc:valid/>\r
+ <dc:format/>\r
+ <dc:issued/>\r
+ <dc:modified>2011-03-05T00:06:17Z</dc:modified>\r
+ <dc:language/>\r
+ <dc:expired/>\r
+ <dc:coverage/>\r
+ <dc:title/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/common/" name="common">\r
+ <icon/>\r
+ <icon-expanded/>\r
+ <size/>\r
+ </schema>\r
+ <schema xmlns:collectionspace_core="http://collectionspace.org/collectionspace_core/" name="collectionspace_core">\r
+ <collectionspace_core:updatedAt>2011-03-05T00:06:17Z</collectionspace_core:updatedAt>\r
+ <collectionspace_core:createdAt>2011-03-05T00:06:17Z</collectionspace_core:createdAt>\r
+ <collectionspace_core:tenantId>1</collectionspace_core:tenantId>\r
+ </schema>\r
+ ${Schema}\r
+</document>\r
+\r
--- /dev/null
+<!-- this format assumes that the workspace documents and folders are in place:\r
+ ./Personauthorities/\r
+ ./Personauthorities/document.xml\r
+ ./Persons/\r
+ ./Persons/document.xml\r
+--> \r
+<document repository="default" id="${docID}">\r
+ <system>\r
+ <type>Person</type>\r
+ <path>Persons/${docID}</path>\r
+ <lifecycle-state>undefined</lifecycle-state>\r
+ <lifecycle-policy>undefined</lifecycle-policy>\r
+ <access-control>\r
+ <acl name="inherited">\r
+ <entry principal="Administrator" permission="Everything" grant="true"/>\r
+ <entry principal="members" permission="Read" grant="true"/>\r
+ </acl>\r
+ </access-control>\r
+ </system>\r
+ <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore">\r
+ <dc:creator>Administrator</dc:creator>\r
+ <dc:contributors>\r
+ <item>Administrator</item>\r
+ </dc:contributors>\r
+ <dc:source/>\r
+ <dc:created>2011-03-05T00:06:18Z</dc:created>\r
+ <dc:description/>\r
+ <dc:rights/>\r
+ <dc:subjects/>\r
+ <dc:valid/>\r
+ <dc:format/>\r
+ <dc:issued/>\r
+ <dc:modified>2011-03-05T00:06:18Z</dc:modified>\r
+ <dc:language/>\r
+ <dc:expired/>\r
+ <dc:coverage/>\r
+ <dc:title/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/common/" name="common">\r
+ <icon/>\r
+ <icon-expanded/>\r
+ <size/>\r
+ </schema>\r
+ <schema xmlns:collectionspace_core="http://collectionspace.org/collectionspace_core/" name="collectionspace_core">\r
+ <collectionspace_core:updatedAt>2011-03-05T00:06:18Z</collectionspace_core:updatedAt>\r
+ <collectionspace_core:createdAt>2011-03-05T00:06:18Z</collectionspace_core:createdAt>\r
+ <collectionspace_core:tenantId>1</collectionspace_core:tenantId>\r
+ </schema>\r
+ ${personsSchema}\r
+</document>\r
+\r
--- /dev/null
+ <schema xmlns:personauthorities_common="http://collectionspace.org/services/person" name="personauthorities_common">\r
+ <personauthorities_common:displayName>Perf Test Person Auth ${docID}</personauthorities_common:displayName>\r
+ <personauthorities_common:shortIdentifier>perfTestPersons-${docID}</personauthorities_common:shortIdentifier>\r
+ <personauthorities_common:vocabType>PersonAuthority</personauthorities_common:vocabType>\r
+ <personauthorities_common:refName>urn:cspace:collectionspace.org:Personauthorities(perfTestPersons)'Perf Test Person Auth'</personauthorities_common:refName>\r
+ </schema>\r
+\r
--- /dev/null
+<document repository="default" id="0743566a-fafa-46ba-bc3d-03ede35254ed">\r
+ <system>\r
+ <type>Workspace</type>\r
+ <path>${ServiceName}</path>\r
+ <lifecycle-state>project</lifecycle-state>\r
+ <lifecycle-policy>default</lifecycle-policy>\r
+ <access-control>\r
+ <acl name="inherited">\r
+ <entry principal="Administrator" permission="Everything" grant="true"/>\r
+ <entry principal="members" permission="Read" grant="true"/>\r
+ </acl>\r
+ </access-control>\r
+ </system>\r
+ <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore">\r
+ <dc:creator>Administrator</dc:creator>\r
+ <dc:contributors>\r
+ <item>Administrator</item>\r
+ </dc:contributors>\r
+ <dc:source/>\r
+ <dc:created>2011-03-04T23:51:05Z</dc:created>\r
+ <dc:description>A CollectionSpace workspace for ${ServiceName}</dc:description>\r
+ <dc:rights/>\r
+ <dc:subjects/>\r
+ <dc:valid/>\r
+ <dc:format/>\r
+ <dc:issued/>\r
+ <dc:modified>2011-03-04T23:51:05Z</dc:modified>\r
+ <dc:language/>\r
+ <dc:expired/>\r
+ <dc:coverage/>\r
+ <dc:title>${ServiceName}</dc:title>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/files/" name="files">\r
+ <files/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/common/" name="common">\r
+ <icon>/icons/workspace.gif</icon>\r
+ <icon-expanded/>\r
+ <size/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/file/" name="file">\r
+ <content/>\r
+ <filename/>\r
+ </schema>\r
+ <schema xmlns:webc="http://www.nuxeo.org/ecm/schemas/webcontainer/" name="webcontainer">\r
+ <webc:useCaptcha/>\r
+ <webc:welcomeText/>\r
+ <webc:welcomeMedia/>\r
+ <webc:theme>sites</webc:theme>\r
+ <webc:isWebContainer/>\r
+ <webc:baseline/>\r
+ <webc:template/>\r
+ <webc:logo/>\r
+ <webc:themePerspective/>\r
+ <webc:themePage>workspace</webc:themePage>\r
+ <webc:name>${ServiceName}</webc:name>\r
+ <webc:moderationType>aposteriori</webc:moderationType>\r
+ <webc:url>${ServiceName}</webc:url>\r
+ <webc:email/>\r
+ </schema>\r
+ <schema xmlns:publish="http://www.nuxeo.org/ecm/schemas/publishing/" name="publishing">\r
+ <publish:sections/>\r
+ </schema>\r
+</document>\r
+\r
--- /dev/null
+<document repository="default" id="${docID}">\r
+ <system>\r
+ <type>${ServiceType}</type>\r
+ <path>${ServiceName}/${docID}</path>\r
+ <lifecycle-state>undefined</lifecycle-state>\r
+ <lifecycle-policy>undefined</lifecycle-policy>\r
+ <access-control>\r
+ <acl name="inherited">\r
+ <entry principal="Administrator" permission="Everything" grant="true"/>\r
+ <entry principal="members" permission="Read" grant="true"/>\r
+ </acl>\r
+ </access-control>\r
+ </system>\r
+ <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore">\r
+ <dc:creator>Administrator</dc:creator>\r
+ <dc:contributors>\r
+ <item>Administrator</item>\r
+ </dc:contributors>\r
+ <dc:source/>\r
+ <dc:created>2011-03-05T00:06:17Z</dc:created>\r
+ <dc:description/>\r
+ <dc:rights/>\r
+ <dc:subjects/>\r
+ <dc:valid/>\r
+ <dc:format/>\r
+ <dc:issued/>\r
+ <dc:modified>2011-03-05T00:06:17Z</dc:modified>\r
+ <dc:language/>\r
+ <dc:expired/>\r
+ <dc:coverage/>\r
+ <dc:title/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/common/" name="common">\r
+ <icon/>\r
+ <icon-expanded/>\r
+ <size/>\r
+ </schema>\r
+ <schema xmlns:collectionspace_core="http://collectionspace.org/collectionspace_core/" name="collectionspace_core">\r
+ <collectionspace_core:updatedAt>2011-03-05T00:06:17Z</collectionspace_core:updatedAt>\r
+ <collectionspace_core:createdAt>2011-03-05T00:06:17Z</collectionspace_core:createdAt>\r
+ <collectionspace_core:tenantId>1</collectionspace_core:tenantId>\r
+ </schema>\r
+ ${Schema}\r
+</document>\r
+\r
--- /dev/null
+<document repository="default" id="0743566a-fafa-46ba-bc3d-03ede35254ed">\r
+ <system>\r
+ <type>Workspace</type>\r
+ <path>${ServiceName}</path>\r
+ <lifecycle-state>project</lifecycle-state>\r
+ <lifecycle-policy>default</lifecycle-policy>\r
+ <access-control>\r
+ <acl name="inherited">\r
+ <entry principal="Administrator" permission="Everything" grant="true"/>\r
+ <entry principal="members" permission="Read" grant="true"/>\r
+ </acl>\r
+ </access-control>\r
+ </system>\r
+ <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore">\r
+ <dc:creator>Administrator</dc:creator>\r
+ <dc:contributors>\r
+ <item>Administrator</item>\r
+ </dc:contributors>\r
+ <dc:source/>\r
+ <dc:created>2011-03-04T23:51:05Z</dc:created>\r
+ <dc:description>A CollectionSpace workspace for ${ServiceName}</dc:description>\r
+ <dc:rights/>\r
+ <dc:subjects/>\r
+ <dc:valid/>\r
+ <dc:format/>\r
+ <dc:issued/>\r
+ <dc:modified>2011-03-04T23:51:05Z</dc:modified>\r
+ <dc:language/>\r
+ <dc:expired/>\r
+ <dc:coverage/>\r
+ <dc:title>${ServiceName}</dc:title>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/files/" name="files">\r
+ <files/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/common/" name="common">\r
+ <icon>/icons/workspace.gif</icon>\r
+ <icon-expanded/>\r
+ <size/>\r
+ </schema>\r
+ <schema xmlns="http://www.nuxeo.org/ecm/schemas/file/" name="file">\r
+ <content/>\r
+ <filename/>\r
+ </schema>\r
+ <schema xmlns:webc="http://www.nuxeo.org/ecm/schemas/webcontainer/" name="webcontainer">\r
+ <webc:useCaptcha/>\r
+ <webc:welcomeText/>\r
+ <webc:welcomeMedia/>\r
+ <webc:theme>sites</webc:theme>\r
+ <webc:isWebContainer/>\r
+ <webc:baseline/>\r
+ <webc:template/>\r
+ <webc:logo/>\r
+ <webc:themePerspective/>\r
+ <webc:themePage>workspace</webc:themePage>\r
+ <webc:name>${ServiceName}</webc:name>\r
+ <webc:moderationType>aposteriori</webc:moderationType>\r
+ <webc:url>${ServiceName}</webc:url>\r
+ <webc:email/>\r
+ </schema>\r
+ <schema xmlns:publish="http://www.nuxeo.org/ecm/schemas/publishing/" name="publishing">\r
+ <publish:sections/>\r
+ </schema>\r
+</document>\r
+\r
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2011 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.collectionspace.services.test;
+
+import org.collectionspace.services.common.IFragmentHandler;
+import org.collectionspace.services.common.XmlSaxFragmenter;
+import org.collectionspace.services.common.api.FileTools;
+import org.collectionspace.services.common.api.Tools;
+import org.collectionspace.services.imports.ImportsResource;
+import org.collectionspace.services.imports.TemplateExpander;
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.restlet.util.Template;
+import org.testng.annotations.Test;
+import org.xml.sax.InputSource;
+
+import java.io.File;
+
+/** Run this with something like:
+ * cd C:\src\trunk\services\imports\service
+ * mvn test -Dtest=ImportsServiceTest
+ */
+public class ImportsServiceTest {
+ //These paths won't work when deployed in jboss, but they will work in the build in the source tree, which is what this test is for.
+ public static final String TEMPLATES_REL_DIR_TO_MODULE = "./src/main/resources/templates";
+ public static final String REQUESTS_REL_DIR_TO_MODULE = "./src/test/resources/requests";
+
+ /** this test just attempts to expand a single file upload to nuxeo's import/export file/directory format,
+ * but does not do the import, so that this test may be run without a nuxeo instance running.
+ * @throws Exception
+ */
+ @Test
+ public void testImports() throws Exception {
+ String TEMPLATE_DIR = (new File(TEMPLATES_REL_DIR_TO_MODULE)).getCanonicalPath();
+ String REQUESTS_DIR = (new File(REQUESTS_REL_DIR_TO_MODULE)).getCanonicalPath();
+ String outputDir = FileTools.createTmpDir("imports-test-").getCanonicalPath();
+
+ String xmlPayload = FileTools.readFile(REQUESTS_DIR,"authority-request.xml");
+ InputSource inputSource = ImportsResource.payloadToInputSource(xmlPayload);
+ ImportsResource.expandXmlPayloadToDir(inputSource, TEMPLATE_DIR, outputDir);
+
+ //TODO: inspect dir, then *cleanup*!!
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.TTCCLayout">
+ <param name="DateFormat" value="ISO8601" />
+ </layout>
+ </appender>
+
+
+ <appender name="unit-tests"
+ class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="./target/unit-tests.log" />
+ <param name="MaxFileSize" value="10240KB" />
+ <param name="MaxBackupIndex" value="6" />
+ <layout class="org.apache.log4j.TTCCLayout">
+ <param name="DateFormat" value="ISO8601" />
+ </layout>
+ </appender>
+
+ <logger name="org.apache.commons.httpclient" additivity="false">
+ <level value="warn" />
+ <appender-ref ref="console" />
+ <appender-ref ref="unit-tests" />
+ </logger>
+
+ <logger name="httpclient.wire" additivity="false">
+ <level value="info" />
+ <appender-ref ref="console" />
+ <appender-ref ref="unit-tests" />
+ </logger>
+
+ <root>
+ <priority value="debug" />
+ <appender-ref ref="console" />
+ <appender-ref ref="unit-tests" />
+ </root>
+
+</log4j:configuration>
+
+
+
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<imports>\r
+ <import ID="0" workspace="Personauthorities" />\r
+ <import ID="1" service="Personauthorities" type="Personauthority">\r
+ <schema xmlns:personauthorities_common="http://collectionspace.org/services/person" name="personauthorities_common">\r
+ <personauthorities_common:displayName>Perf Test Person Auth ${docID}</personauthorities_common:displayName>\r
+ <personauthorities_common:shortIdentifier>perfTestPersons-${docID}</personauthorities_common:shortIdentifier>\r
+ <personauthorities_common:vocabType>PersonAuthority</personauthorities_common:vocabType>\r
+ <personauthorities_common:refName>urn:cspace:collectionspace.org:Personauthorities(perfTestPersons)'Perf Test Person Auth'</personauthorities_common:refName>\r
+ </schema>\r
+ </import>\r
+ <import ID="2" service="Personauthorities" type="Personauthority" CSID="11111111-2222-3333-4444-123456789012">\r
+ <schema xmlns:personauthorities_common="http://collectionspace.org/services/person" name="personauthorities_common">\r
+ <personauthorities_common:displayName>Perf Test Person Auth ${docID}</personauthorities_common:displayName>\r
+ <personauthorities_common:shortIdentifier>perfTestPersons-${docID}</personauthorities_common:shortIdentifier>\r
+ <personauthorities_common:vocabType>PersonAuthority</personauthorities_common:vocabType>\r
+ <personauthorities_common:refName>urn:cspace:collectionspace.org:Personauthorities(perfTestPersons)'Perf Test Person Auth'</personauthorities_common:refName>\r
+ </schema>\r
+ </import>\r
+</imports>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<imports>\r
+ <import ID="0" workspace="CollectionObjects" />\r
+ <import ID="1" service="CollectionObjects" type="CollectionObject">\r
+ <schema xmlns:collectionobjects_naturalhistory="http://collectionspace.org/collectionobject/" name="collectionobjects_naturalhistory">\r
+ <collectionobjects_naturalhistory:nh-int/>\r
+ <collectionobjects_naturalhistory:nh-note/>\r
+ <collectionobjects_naturalhistory:nh-string/>\r
+ <collectionobjects_naturalhistory:nh-long/>\r
+ <collectionobjects_naturalhistory:nh-date/>\r
+ </schema>\r
+ <schema xmlns:collectionobjects_common="http://collectionspace.org/collectionobject/" name="collectionobjects_common">\r
+ <collectionobjects_common:assocCulturalContextGroupListNONEXISTENT/>\r
+ <collectionobjects_common:assocCulturalContextGroupList/>\r
+ <collectionobjects_common:assocObjectGroupList/>\r
+ <collectionobjects_common:assocEventNameType></collectionobjects_common:assocEventNameType>\r
+ <collectionobjects_common:ownershipCategory>public</collectionobjects_common:ownershipCategory>\r
+ <collectionobjects_common:objectProductionReasons/>\r
+ <collectionobjects_common:inscriptionDescriptionMethod></collectionobjects_common:inscriptionDescriptionMethod>\r
+ <collectionobjects_common:fieldCollectionNote></collectionobjects_common:fieldCollectionNote>\r
+ <collectionobjects_common:contentObjectGroupList>\r
+ <contentObjectGroup>\r
+ <contentObjectType></contentObjectType>\r
+ <contentObject>The Ogres hand</contentObject>\r
+ </contentObjectGroup>\r
+ </collectionobjects_common:contentObjectGroupList>\r
+ <collectionobjects_common:assocEventPersons>\r
+ <assocEventPerson>urn:cspace:org.collectionspace.demo:personauthority:name(person):person:name(maryannecasseta)'Mary+Anne+Cassata'</assocEventPerson>\r
+ </collectionobjects_common:assocEventPersons>\r
+ <collectionobjects_common:inscriptionDescription>Big symbol at the base</collectionobjects_common:inscriptionDescription>\r
+ <collectionobjects_common:dateEarliestSingleQualifier/>\r
+ <collectionobjects_common:technicalAttributeGroupList>\r
+ <technicalAttributeGroup>\r
+ <technicalAttributeMeasurement>78</technicalAttributeMeasurement>\r
+ <technicalAttribute>record-speed</technicalAttribute>\r
+ <technicalAttributeMeasurementUnit>rpm</technicalAttributeMeasurementUnit>\r
+ </technicalAttributeGroup>\r
+ </collectionobjects_common:technicalAttributeGroupList>\r
+ <collectionobjects_common:inscriptionDescriptionInterpretation>No Idea</collectionobjects_common:inscriptionDescriptionInterpretation>\r
+ <collectionobjects_common:dateText/>\r
+ <collectionobjects_common:ownershipDates></collectionobjects_common:ownershipDates>\r
+ <collectionobjects_common:dimensionSummary/>\r
+ <collectionobjects_common:inscriptionContentInterpretation>It could mean a lot of things, but oddly no connection to ogres</collectionobjects_common:inscriptionContentInterpretation>\r
+ <collectionobjects_common:objectProductionOrganizationGroupList>\r
+ <objectProductionOrganizationGroup>\r
+ <objectProductionOrganizationRole></objectProductionOrganizationRole>\r
+ <objectProductionOrganization>urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(boardwalkrecords)'Boardwalk+Records'</objectProductionOrganization>\r
+ </objectProductionOrganizationGroup>\r
+ </collectionobjects_common:objectProductionOrganizationGroupList>\r
+ <collectionobjects_common:objectComponentGroupList>\r
+ <objectComponentGroup>\r
+ <objectComponentInformation></objectComponentInformation>\r
+ <objectComponentName>sleeve</objectComponentName>\r
+ </objectComponentGroup>\r
+ </collectionobjects_common:objectComponentGroupList>\r
+ <collectionobjects_common:ownershipPlace></collectionobjects_common:ownershipPlace>\r
+ <collectionobjects_common:fieldCollectionDate></collectionobjects_common:fieldCollectionDate>\r
+ <collectionobjects_common:contentActivities>\r
+ <contentActivity></contentActivity>\r
+ </collectionobjects_common:contentActivities>\r
+ <collectionobjects_common:contentPlaces>\r
+ <contentPlace></contentPlace>\r
+ </collectionobjects_common:contentPlaces>\r
+ <collectionobjects_common:dateEarliestSingleCertainty/>\r
+ <collectionobjects_common:objectProductionDates/>\r
+ <collectionobjects_common:contentConcepts>\r
+ <contentConcept></contentConcept>\r
+ </collectionobjects_common:contentConcepts>\r
+ <collectionobjects_common:numberOfObjects>1</collectionobjects_common:numberOfObjects>\r
+ <collectionobjects_common:ownershipExchangePriceCurrency>poundsterling</collectionobjects_common:ownershipExchangePriceCurrency>\r
+ <collectionobjects_common:contentOtherGroupList>\r
+ <contentOtherGroup>\r
+ <contentOther></contentOther>\r
+ <contentOtherType></contentOtherType>\r
+ </contentOtherGroup>\r
+ </collectionobjects_common:contentOtherGroupList>\r
+ <collectionobjects_common:editionNumber>123-bg-192</collectionobjects_common:editionNumber>\r
+ <collectionobjects_common:dimensionMeasuredPart/>\r
+ <collectionobjects_common:styles>\r
+ <style></style>\r
+ </collectionobjects_common:styles>\r
+ <collectionobjects_common:briefDescriptions>\r
+ <briefDescription>A petrified Ogre found in the woods of Neverland</briefDescription>\r
+ <briefDescription>Or it could be a petrified tree looking slightly like an ogre</briefDescription>\r
+ <briefDescription>Or just a rock, looking a lot like a petrified tree</briefDescription>\r
+ </collectionobjects_common:briefDescriptions>\r
+ <collectionobjects_common:inscriptionContentLanguage>arabic</collectionobjects_common:inscriptionContentLanguage>\r
+ <collectionobjects_common:colors>\r
+ <color></color>\r
+ </collectionobjects_common:colors>\r
+ <collectionobjects_common:fieldCollectors>\r
+ <fieldCollector></fieldCollector>\r
+ </collectionobjects_common:fieldCollectors>\r
+ <collectionobjects_common:ownersPersonalExperience>These object records are tedious to fill out</collectionobjects_common:ownersPersonalExperience>\r
+ <collectionobjects_common:contentDescription>Content of a piece of rock?! .. well there might be diamonds and petrified fish in it</collectionobjects_common:contentDescription>\r
+ <collectionobjects_common:inscriptionDescriptionInscriber>urn:cspace:org.collectionspace.demo:personauthority:name(person):person:name(reginabadet)'Regina+Badet'</collectionobjects_common:inscriptionDescriptionInscriber>\r
+ <collectionobjects_common:objectProductionPeopleGroupList>\r
+ <objectProductionPeopleGroup>\r
+ <objectProductionPeople></objectProductionPeople>\r
+ <objectProductionPeopleRole></objectProductionPeopleRole>\r
+ </objectProductionPeopleGroup>\r
+ </collectionobjects_common:objectProductionPeopleGroupList>\r
+ <collectionobjects_common:objectProductionPlaceGroupList>\r
+ <objectProductionPlaceGroup>\r
+ <objectProductionPlace></objectProductionPlace>\r
+ <objectProductionPlaceRole></objectProductionPlaceRole>\r
+ </objectProductionPlaceGroup>\r
+ </collectionobjects_common:objectProductionPlaceGroupList>\r
+ <collectionobjects_common:contentDate></collectionobjects_common:contentDate>\r
+ <collectionobjects_common:assocPlaceGroupList/>\r
+ <collectionobjects_common:physicalDescription>It's pretty big - the size of an ogre.. Three arms and a hump-back</collectionobjects_common:physicalDescription>\r
+ <collectionobjects_common:dimensionValue/>\r
+ <collectionobjects_common:fieldCollectionNumber></collectionobjects_common:fieldCollectionNumber>\r
+ <collectionobjects_common:ageUnit>years</collectionobjects_common:ageUnit>\r
+ <collectionobjects_common:otherNumber/>\r
+ <collectionobjects_common:dimension/>\r
+ <collectionobjects_common:dateLatestQualifier/>\r
+ <collectionobjects_common:contentEventNameGroupList>\r
+ <contentEventNameGroup>\r
+ <contentEventNameType></contentEventNameType>\r
+ <contentEventName></contentEventName>\r
+ </contentEventNameGroup>\r
+ </collectionobjects_common:contentEventNameGroupList>\r
+ <collectionobjects_common:contentNote>pst., it's not a real ogre</collectionobjects_common:contentNote>\r
+ <collectionobjects_common:forms>\r
+ <form></form>\r
+ </collectionobjects_common:forms>\r
+ <collectionobjects_common:inscriptionContentDate></collectionobjects_common:inscriptionContentDate>\r
+ <collectionobjects_common:inscriptionContent>Non, c'est vrai! Je ne suis pas une baguette</collectionobjects_common:inscriptionContent>\r
+ <collectionobjects_common:assocPeopleGroupList/>\r
+ <collectionobjects_common:dateEarliestSingle/>\r
+ <collectionobjects_common:ownershipExchangeNote>none</collectionobjects_common:ownershipExchangeNote>\r
+ <collectionobjects_common:dateLatest/>\r
+ <collectionobjects_common:assocEventOrganizations>\r
+ <assocEventOrganization>urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(7-eleven)'7-Eleven'</assocEventOrganization>\r
+ </collectionobjects_common:assocEventOrganizations>\r
+ <collectionobjects_common:inscriptionContentType>label</collectionobjects_common:inscriptionContentType>\r
+ <collectionobjects_common:inscriptionContentTransliteration>I'm a vegetarian</collectionobjects_common:inscriptionContentTransliteration>\r
+ <collectionobjects_common:objectNumber>CompleteObject001</collectionobjects_common:objectNumber>\r
+ <collectionobjects_common:inscriptionDescriptionPosition>bottom</collectionobjects_common:inscriptionDescriptionPosition>\r
+ <collectionobjects_common:inscriptionContentTranslation>No, it's true, I'm not a baguette</collectionobjects_common:inscriptionContentTranslation>\r
+ <collectionobjects_common:dateAssociation/>\r
+ <collectionobjects_common:inscriptionDescriptionType>decoration</collectionobjects_common:inscriptionDescriptionType>\r
+ <collectionobjects_common:dimensionMeasurementUnit/>\r
+ <collectionobjects_common:contentScripts>\r
+ <contentScript></contentScript>\r
+ </collectionobjects_common:contentScripts>\r
+ <collectionobjects_common:usageGroupList/>\r
+ <collectionobjects_common:contentOrganizations>\r
+ <contentOrganization>urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(wolperorganization)'Wolper+Organization'</contentOrganization>\r
+ </collectionobjects_common:contentOrganizations>\r
+ <collectionobjects_common:ownershipExchangeMethod>exchange</collectionobjects_common:ownershipExchangeMethod>\r
+ <collectionobjects_common:assocDateGroupList/>\r
+ <collectionobjects_common:dimensionValueQualifier/>\r
+ <collectionobjects_common:objectProductionNote>.. But it wasn't</collectionobjects_common:objectProductionNote>\r
+ <collectionobjects_common:age>10223</collectionobjects_common:age>\r
+ <collectionobjects_common:collection>study-collection</collectionobjects_common:collection>\r
+ <collectionobjects_common:distinguishingFeatures>Made out of rock, pretty big</collectionobjects_common:distinguishingFeatures>\r
+ <collectionobjects_common:fieldColEventNames>\r
+ <fieldColEventName>fieldCollectionEventName</fieldColEventName>\r
+ </collectionobjects_common:fieldColEventNames>\r
+ <collectionobjects_common:inscriptionContentInscriber>urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(screenmagicinc.)'Screen+Magic+Inc.'</collectionobjects_common:inscriptionContentInscriber>\r
+ <collectionobjects_common:contentPersons>\r
+ <contentPerson>urn:cspace:org.collectionspace.demo:personauthority:name(person):person:name(gingerrogers)'Ginger+Rogers'</contentPerson>\r
+ </collectionobjects_common:contentPersons>\r
+ <collectionobjects_common:objectProductionPersonGroupList>\r
+ <objectProductionPersonGroup>\r
+ <objectProductionPersonRole></objectProductionPersonRole>\r
+ <objectProductionPerson>urn:cspace:org.collectionspace.demo:personauthority:name(person):person:name(virginiaboardman)'Virginia+Boardman'</objectProductionPerson>\r
+ </objectProductionPersonGroup>\r
+ </collectionobjects_common:objectProductionPersonGroupList>\r
+ <collectionobjects_common:ownersContributionNote>Haven't really contributed with much</collectionobjects_common:ownersContributionNote>\r
+ <collectionobjects_common:ownersPersonalResponse>Should have gone with an automagic solution</collectionobjects_common:ownersPersonalResponse>\r
+ <collectionobjects_common:objectHistoryNote>Someone found it, then gave it to a museum, duh!</collectionobjects_common:objectHistoryNote>\r
+ <collectionobjects_common:copyNumber>1</collectionobjects_common:copyNumber>\r
+ <collectionobjects_common:titleGroupList>\r
+ <titleGroup>\r
+ <title>Petrified Ogre</title>\r
+ <titleTranslationLanguage>klingon</titleTranslationLanguage>\r
+ <titleTranslation>waka waka</titleTranslation>\r
+ <titleType>generic</titleType>\r
+ <titleLanguage>swahili</titleLanguage>\r
+ </titleGroup>\r
+ </collectionobjects_common:titleGroupList>\r
+ <collectionobjects_common:inscriptionContentPosition>base</collectionobjects_common:inscriptionContentPosition>\r
+ <collectionobjects_common:assocPersonGroupList/>\r
+ <collectionobjects_common:assocOrganizationGroupList/>\r
+ <collectionobjects_common:viewersPersonalExperience>Probably a horrible one, considering how uninteresting this object is</collectionobjects_common:viewersPersonalExperience>\r
+ <collectionobjects_common:remNumber>\r
+ <numberValue/>\r
+ <numberType/>\r
+ </collectionobjects_common:remNumber>\r
+ <collectionobjects_common:comments>\r
+ <comment>Seriously guys, it's just a piece of rock</comment>\r
+ </collectionobjects_common:comments>\r
+ <collectionobjects_common:viewersReferences/>\r
+ <collectionobjects_common:phase>adult</collectionobjects_common:phase>\r
+ <collectionobjects_common:objectNameList>\r
+ <objectNameGroup>\r
+ <objectNameCurrency>current</objectNameCurrency>\r
+ <objectNameLanguage>french</objectNameLanguage>\r
+ <objectName></objectName>\r
+ <objectNameSystem>nomenclature</objectNameSystem>\r
+ <objectNameType>simple</objectNameType>\r
+ <objectNameNote>Je ne suis pas une baguette</objectNameNote>\r
+ <objectNameLevel>subgroup</objectNameLevel>\r
+ </objectNameGroup>\r
+ </collectionobjects_common:objectNameList>\r
+ <collectionobjects_common:dimensions/>\r
+ <collectionobjects_common:dimensionValueDate/>\r
+ <collectionobjects_common:ownersReferences/>\r
+ <collectionobjects_common:otherNumberList/>\r
+ <collectionobjects_common:inscriptionContentMethod></collectionobjects_common:inscriptionContentMethod>\r
+ <collectionobjects_common:fieldCollectionPlace></collectionobjects_common:fieldCollectionPlace>\r
+ <collectionobjects_common:viewersContributionNote>You got the basic details down - it was horrible, what else can I say</collectionobjects_common:viewersContributionNote>\r
+ <collectionobjects_common:fieldCollectionMethods>\r
+ <fieldCollectionMethod></fieldCollectionMethod>\r
+ </collectionobjects_common:fieldCollectionMethods>\r
+ <collectionobjects_common:contentPositions/>\r
+ <collectionobjects_common:owners>\r
+ <owner></owner>\r
+ </collectionobjects_common:owners>\r
+ <collectionobjects_common:assocEventName></collectionobjects_common:assocEventName>\r
+ <collectionobjects_common:dateLatestCertainty/>\r
+ <collectionobjects_common:assocEventPlaces>\r
+ <assocEventPlace></assocEventPlace>\r
+ </collectionobjects_common:assocEventPlaces>\r
+ <collectionobjects_common:assocActivityGroupList>\r
+ <assocActivityGroup>\r
+ <assocActivityNote>associated act. note</assocActivityNote>\r
+ <assocActivity></assocActivity>\r
+ <assocActivityType></assocActivityType>\r
+ </assocActivityGroup>\r
+ </collectionobjects_common:assocActivityGroupList>\r
+ <collectionobjects_common:viewersPersonalResponse>\"yeah, that was pretty horrible\", viewer, 1982</collectionobjects_common:viewersPersonalResponse>\r
+ <collectionobjects_common:assocEventNote/>\r
+ <collectionobjects_common:assocEventPeoples>\r
+ <assocEventPeople></assocEventPeople>\r
+ </collectionobjects_common:assocEventPeoples>\r
+ <collectionobjects_common:viewersRole>Dont know what viewers role is</collectionobjects_common:viewersRole>\r
+ <collectionobjects_common:recordStatus>in-process</collectionobjects_common:recordStatus>\r
+ <collectionobjects_common:ageQualifier>Document</collectionobjects_common:ageQualifier>\r
+ <collectionobjects_common:techniqueGroupList>\r
+ <techniqueGroup>\r
+ <technique></technique>\r
+ <techniqueType></techniqueType>\r
+ </techniqueGroup>\r
+ </collectionobjects_common:techniqueGroupList>\r
+ <collectionobjects_common:inscriptionDescriptionDate></collectionobjects_common:inscriptionDescriptionDate>\r
+ <collectionobjects_common:assocConceptGroupList/>\r
+ <collectionobjects_common:contentPeoples>\r
+ <contentPeople></contentPeople>\r
+ </collectionobjects_common:contentPeoples>\r
+ <collectionobjects_common:ownershipAccess>open</collectionobjects_common:ownershipAccess>\r
+ <collectionobjects_common:datePeriod/>\r
+ <collectionobjects_common:ownershipExchangePriceValue>189</collectionobjects_common:ownershipExchangePriceValue>\r
+ <collectionobjects_common:contentLanguages>\r
+ <contentLanguage></contentLanguage>\r
+ </collectionobjects_common:contentLanguages>\r
+ <collectionobjects_common:fieldCollectionSources>\r
+ <fieldCollectionSource></fieldCollectionSource>\r
+ </collectionobjects_common:fieldCollectionSources>\r
+ <collectionobjects_common:inscriptionContentScript>gothic-script</collectionobjects_common:inscriptionContentScript>\r
+ <collectionobjects_common:sex>female</collectionobjects_common:sex>\r
+ <collectionobjects_common:materialGroupList>\r
+ <materialGroup>\r
+ <materialSource></materialSource>\r
+ <materialName>rocky balboa rocks</materialName>\r
+ <materialComponent>It is not gold</materialComponent>\r
+ <material></material>\r
+ <materialComponentNote></materialComponentNote>\r
+ </materialGroup>\r
+ </collectionobjects_common:materialGroupList>\r
+ <collectionobjects_common:otherNumberType/>\r
+ <collectionobjects_common:responsibleDepartments>\r
+ <responsibleDepartment>antiquities</responsibleDepartment>\r
+ <responsibleDepartment>decorative-arts</responsibleDepartment>\r
+ <responsibleDepartment>ethnography</responsibleDepartment>\r
+ </collectionobjects_common:responsibleDepartments>\r
+ </schema>\r
+ </import>\r
+</imports>
\ No newline at end of file
import java.util.regex.Pattern;
-import org.collectionspace.services.common.Tools;
+import org.collectionspace.services.common.api.Tools;
import org.collectionspace.services.person.PersonsCommon;
import org.collectionspace.services.common.context.MultipartServiceContext;
import org.collectionspace.services.common.context.ServiceContext;
<module>hyperjaxb</module>
<module>common</module>
<module>authorization-mgt</module> <!-- relies on authorization -->
+ <module>common-api</module>
<module>common-test</module>
<module>account</module> <!-- relies on authorization-mgt.import -->
<module>note</module>