From b4cb5089799c40e9d5287a8736ef19b46409d518 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Mon, 29 Jun 2009 22:36:29 +0000 Subject: [PATCH] CSPACE-79: Experiments with draft template for Java class-level comments. Includes Subversion keyword substitution, and UTF-8 (no BOM) document encoding's effect on the Copyright symbol. --- .../services/IDJAXBSchema.java | 15 +- .../collectionspace/services/IDResource.java | 297 ++++-------------- .../collectionspace/services/IDService.java | 21 +- .../services/IDServiceJdbcImpl.java | 15 +- .../services/id/AlphabeticIDGenerator.java | 22 +- .../services/id/AlphabeticIDPart.java | 18 +- .../services/id/IDGenerator.java | 15 +- .../collectionspace/services/id/IDPart.java | 15 +- .../services/id/IDPattern.java | 17 +- .../services/id/NumericIDGenerator.java | 19 +- .../services/id/NumericIDPart.java | 17 +- .../services/id/StringIDGenerator.java | 17 +- .../services/id/StringIDPart.java | 19 +- .../services/id/YearIDGenerator.java | 19 +- .../services/id/YearIDPart.java | 15 +- .../services/IDServiceTest.java | 15 +- .../services/id/AlphabeticIDPartTest.java | 15 +- .../services/id/IDPatternTest.java | 15 +- .../services/id/NumericIDPartTest.java | 15 +- .../services/id/StringIDPartTest.java | 15 +- .../services/id/YearIDPartTest.java | 15 +- 21 files changed, 293 insertions(+), 338 deletions(-) diff --git a/services/id/jaxb/src/main/java/org/collectionspace/services/IDJAXBSchema.java b/services/id/jaxb/src/main/java/org/collectionspace/services/IDJAXBSchema.java index bb797fbb4..a1d08d407 100644 --- a/services/id/jaxb/src/main/java/org/collectionspace/services/IDJAXBSchema.java +++ b/services/id/jaxb/src/main/java/org/collectionspace/services/IDJAXBSchema.java @@ -3,7 +3,14 @@ * * Schema for an identifier (ID). * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ package org.collectionspace.services; diff --git a/services/id/service/src/main/java/org/collectionspace/services/IDResource.java b/services/id/service/src/main/java/org/collectionspace/services/IDResource.java index 82140940b..1d28e226c 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/IDResource.java +++ b/services/id/service/src/main/java/org/collectionspace/services/IDResource.java @@ -3,7 +3,14 @@ * * Resource class to handle requests to the ID Service. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -13,50 +20,31 @@ * * Based on work by Richard Millet and Sanjay Dalal. * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ - - // @TODO: Add Javadoc comments. - - // @TODO: Remove unused import statements. - - // @TODO: Replace wildcarded import statement for - // org.collectionspace.services.id.* with class-specific - // import statements. - - package org.collectionspace.services; + +package org.collectionspace.services; -import java.util.Iterator; -import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.DELETE; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; import javax.ws.rs.PathParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; +import javax.ws.rs.Produces; import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import javax.ws.rs.core.UriInfo; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; import org.collectionspace.services.IDService; -import org.collectionspace.services.id.*; -// import org.collectionspace.services.id.IDPatternList.*; -// import org.collectionspace.services.IDJAXBSchema; +import org.collectionspace.services.id.IDPattern; -import org.dom4j.Document; -import org.dom4j.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +// Set the base path component for URLs that access this service. @Path("/ids") +// Identify the default MIME media types consumed and produced by this service. @Consumes("application/xml") @Produces("application/xml") public class IDResource { @@ -68,15 +56,29 @@ public class IDResource { // Spring, Seam, or EJB3. final static IDService service = new IDServiceJdbcImpl(); + ////////////////////////////////////////////////////////////////////// + /* + * Constructor (no argument). + */ public IDResource() { // do nothing } - // Retrieve the next available ID associated with a specified pattern. - // - // @TODO: We're currently using simple integer IDs. We'll need to - // handle both CSIDs, and URIs or another identifier type that we select, - // for uniquely identifying IDPatterns. + ////////////////////////////////////////////////////////////////////// + /* + * Returns the next available ID associated with a specified ID pattern. + * + * @param csid An identifier for an ID pattern. + * + * @return The next available ID associated with the specified ID pattern. + * + * @TODO: We're currently using simple integer IDs to identify ID patterns + * in this initial iteration. + * + * To uniquely identify ID patterns in production, we'll need to handle + * both CollectionSpace IDs (csids) - a form of UUIDs/GUIDs - and some + * other form of identifier to be determined, such as URLs or URNs. + */ @GET @Path("/next/patterns/{id}") // @TODO: Temporary during testing; to be changed to return XML @@ -85,11 +87,12 @@ public class IDResource { Response response = null; String nextId = ""; - String msg = ""; try { nextId = service.nextID(csid); + + // @TODO: Return our XML-based error results format. // @TODO: An IllegalStateException often indicates an overflow // of an IDPart. Consider whether returning a 400 Bad Request @@ -112,213 +115,17 @@ public class IDResource { } -/* - @GET - public CollectionObjectList getCollectionObjectList(@Context UriInfo ui) { - CollectionObjectList p = new CollectionObjectList(); - try { - Document document = service.getCollectionObjectList(); - Element root = document.getRootElement(); - - // debug - System.err.println(document.asXML()); - - List list = p - .getCollectionObjectListItem(); - for (Iterator i = root.elementIterator(); i.hasNext();) { - Element element = (Element) i.next(); - // debug - System.err.println(); - element.asXML(); - - // set the CollectionObject list item entity elements - CollectionObjectListItem pli = new CollectionObjectListItem(); - pli.setObjectNumber(element.attributeValue("title")); - pli.setUri(element.attributeValue("url")); - pli.setCsid(element.attributeValue("id")); - list.add(pli); - } - - } catch (Exception e) { - e.printStackTrace(); - } - - return p; - } - - @POST - public Response createCollectionObject(CollectionObject co) { - - String csid = null; - try { - - Document document = service.postCollectionObject(co); - Element root = document.getRootElement(); - for (Iterator i = root.elementIterator(); i.hasNext();) { - Element element = (Element) i.next(); - if ("docRef".equals(element.getName())) { - csid = (String) element.getData(); - co.setCsid(csid); - } - } - } catch (Exception e) { - Response response = Response.status(Response.Status.NOT_FOUND) - .entity("Create failed").type("text/plain").build(); - throw new WebApplicationException(response); - } - - verbose("createCollectionObject: ", co); - UriBuilder path = UriBuilder - .fromResource(CollectionObjectResource.class); - path.path("" + csid); - Response response = Response.created(path.build()).build(); - - return response; - } - - @GET - @Path("{csid}") - public CollectionObject getCollectionObject(@PathParam("csid") String csid) { - - CollectionObject co = null; - try { - Document document = service.getCollectionObject(csid); - Element root = document.getRootElement(); - co = new CollectionObject(); - - // TODO: recognize schema thru namespace uri - // Namespace ns = new Namespace("collectionobject", - // "http://collectionspace.org/collectionobject"); - - Iterator siter = root.elementIterator("schema"); - while (siter.hasNext()) { - - Element schemaElement = siter.next(); - System.err - .println("CollectionObject.getCollectionObject() called."); - - // TODO: recognize schema thru namespace uri - if (CollectionObjectService.CO_SCHEMA_NAME.equals(schemaElement.attribute("name") - .getValue())) { - Element ele = schemaElement - .element(CollectionObjectJAXBSchema.OBJECT_NUMBER); - if (ele != null) { - co.setObjectNumber((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.OTHER_NUMBER); - if (ele != null) { - co.setOtherNumber((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.BRIEF_DESCRIPTION); - if (ele != null) { - co.setBriefDescription((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.COMMENTS); - if (ele != null) { - co.setComments((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.DIST_FEATURES); - if (ele != null) { - co.setDistFeatures((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.OBJECT_NAME); - if (ele != null) { - co.setObjectName((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.RESPONSIBLE_DEPT); - if (ele != null) { - co.setResponsibleDept((String) ele.getData()); - } - ele = schemaElement - .element(CollectionObjectJAXBSchema.TITLE); - if (ele != null) { - co.setTitle((String) ele.getData()); - } - } - } - } catch (Exception e) { - e.printStackTrace(); - Response response = Response.status( - Response.Status.INTERNAL_SERVER_ERROR).entity("Get failed") - .type("text/plain").build(); - throw new WebApplicationException(response); - } - if (co == null) { - Response response = Response.status(Response.Status.NOT_FOUND) - .entity( - "Get failed, the requested CollectionObject CSID:" - + csid + ": was not found.").type( - "text/plain").build(); - throw new WebApplicationException(response); - } - verbose("getCollectionObject: ", co); - - return co; - } - - @PUT - @Path("{csid}") - public CollectionObject updateCollectionObject( - @PathParam("csid") String csid, CollectionObject theUpdate) { - - verbose("updateCollectionObject with input: ", theUpdate); - - String status = null; - try { - - Document document = service.putCollectionObject(csid, theUpdate); - Element root = document.getRootElement(); - for (Iterator i = root.elementIterator(); i.hasNext();) { - Element element = (Element) i.next(); - if ("docRef".equals(element.getName())) { - status = (String) element.getData(); - verbose("updateCollectionObject response: " + status); - } - } - } catch (Exception e) { - // FIXME: NOT_FOUND? - Response response = Response.status(Response.Status.NOT_FOUND) - .entity("Update failed ").type("text/plain").build(); - throw new WebApplicationException(response); - } - - return theUpdate; - } - - @DELETE - @Path("{csid}") - public void deleteCollectionObject(@PathParam("csid") String csid) { - - verbose("deleteCollectionObject with csid=" + csid); - try { - - Document document = service.deleteCollectionObject(csid); - Element root = document.getRootElement(); - for (Iterator i = root.elementIterator(); i.hasNext();) { - Element element = (Element) i.next(); - if ("docRef".equals(element.getName())) { - String status = (String) element.getData(); - verbose("deleteCollectionObjectt response: " + status); - } - } - } catch (Exception e) { - // FIXME: NOT_FOUND? - Response response = Response.status(Response.Status.NOT_FOUND) - .entity("Delete failed ").type("text/plain").build(); - throw new WebApplicationException(response); - } - - } - -*/ - + ////////////////////////////////////////////////////////////////////// + /* + * Prints a serialized ID pattern to the console (stdout). + * + * @param msg A message. + * + * @param idPattern An ID Pattern. + * + */ private void verbose(String msg, IDPattern idPattern) { + try { verbose(msg); JAXBContext jc = JAXBContext.newInstance(IDPattern.class); @@ -328,8 +135,16 @@ public class IDResource { } catch (Exception e) { e.printStackTrace(); } + } + ////////////////////////////////////////////////////////////////////// + /* + * Prints a message to the console (stdout). + * + * @param msg A message. + * + */ private void verbose(String msg) { System.out.println("IDResource. " + msg); } diff --git a/services/id/service/src/main/java/org/collectionspace/services/IDService.java b/services/id/service/src/main/java/org/collectionspace/services/IDService.java index 92aa6c13c..91311175b 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/IDService.java +++ b/services/id/service/src/main/java/org/collectionspace/services/IDService.java @@ -3,7 +3,14 @@ * * Interface for the methods of the ID Service. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -13,19 +20,15 @@ * * Based on work by Richard Millet and Sanjay Dalal. * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * @author $Author$ + * @version $Revision$ + * $Date$ */ package org.collectionspace.services; -import org.collectionspace.services.id.*; - public interface IDService { - // public final static String ID_SCHEMA_NAME = "id"; // Note to self: Where is this used? - // ---------------------------------------- // IDs // ---------------------------------------- @@ -33,6 +36,8 @@ public interface IDService { // Create // Read single object + // + // Returns the next available ID associated with a specified ID pattern. public String nextID(String csid) throws IllegalArgumentException, IllegalStateException; // Read a list of objects (aka read multiple) diff --git a/services/id/service/src/main/java/org/collectionspace/services/IDServiceJdbcImpl.java b/services/id/service/src/main/java/org/collectionspace/services/IDServiceJdbcImpl.java index 8cf1bcd60..ec9a92380 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/IDServiceJdbcImpl.java +++ b/services/id/service/src/main/java/org/collectionspace/services/IDServiceJdbcImpl.java @@ -4,7 +4,14 @@ * Implementation of portions of the ID Service that use JDBC * for persistence of IDPatterns, IDParts, and ID values. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -14,9 +21,9 @@ * * Based on work by Richard Millet and Sanjay Dalal. * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * @author $Author$ + * @version $Revision$ + * $Date$ */ // @TODO: Replace wildcarded import statement for diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java b/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java index 21f268cc7..3083800dd 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java @@ -1,10 +1,17 @@ /* * AlphabeticIDGenerator * - *

An identifier generator that generates an incrementing alphabetic ID - * from any sequence of characters, as a String object.

+ * Generates identifiers (IDs) that consist of incrementing alphabetic + * characters, from within a sequence of characters. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -12,9 +19,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments @@ -315,5 +322,6 @@ public class AlphabeticIDGenerator implements IDGenerator { String.valueOf(this.startChar) + "-" + String.valueOf(this.endChar) + "]+" + ")"; return regex; - } + } + } diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDPart.java b/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDPart.java index 61cd834bc..c90d86766 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDPart.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/AlphabeticIDPart.java @@ -1,9 +1,17 @@ /* * AlphabeticIDPart * - * Models a part of an identifier (ID) whose values are an alphabetic series. + * Models a part of an identifier (ID) whose values consist of incrementing + * alphabetic characters, from within a sequence of characters. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +19,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/IDGenerator.java b/services/id/service/src/main/java/org/collectionspace/services/id/IDGenerator.java index 0963894ee..fa054a769 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/IDGenerator.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/IDGenerator.java @@ -3,7 +3,14 @@ * * Interface for a generator class that returns IDs. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Consider making this class, or a class that implements diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/IDPart.java b/services/id/service/src/main/java/org/collectionspace/services/id/IDPart.java index 7c24676fa..25d7265cf 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/IDPart.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/IDPart.java @@ -12,7 +12,14 @@ *
  • Static separators
  • * * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -20,9 +27,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 291 $ - * $Date: 2009-06-24 11:48:28 -0700 (Wed, 24 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/IDPattern.java b/services/id/service/src/main/java/org/collectionspace/services/id/IDPattern.java index 7b848c1e7..f74f2e22c 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/IDPattern.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/IDPattern.java @@ -1,9 +1,16 @@ /* * IDPattern * - *

    Models an identifier (ID), which consists of multiple IDParts.

    + * Models an identifier (ID), which consists of multiple IDParts. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDGenerator.java b/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDGenerator.java index 4d4f7206b..05ea816bf 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDGenerator.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDGenerator.java @@ -1,10 +1,17 @@ /* * NumericIDGenerator * - *

    An identifier generator that generates an incrementing ID as a - * series of numeric values, beginning from an initial value.

    + * Generates identifiers (IDs) that consist of a sequence of + * numeric values, beginning from an initial value. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -12,9 +19,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDPart.java b/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDPart.java index 78977e85f..bb3e5b02e 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDPart.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/NumericIDPart.java @@ -1,11 +1,18 @@ /* * NumericIDPart * - * Models a part of an identifier (ID) whose values come from an + * Models a part of an identifier (ID) whose values consist of an * incrementing numeric series, with those values represented as * String objects. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -13,9 +20,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/StringIDGenerator.java b/services/id/service/src/main/java/org/collectionspace/services/id/StringIDGenerator.java index e2c2a391e..6ad0b94d5 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/StringIDGenerator.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/StringIDGenerator.java @@ -1,9 +1,16 @@ /* * StringIDGenerator * - *

    An identifier generator that stores and returns a static String.

    + * Generates identifiers (IDs) that consist of a static String value. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/StringIDPart.java b/services/id/service/src/main/java/org/collectionspace/services/id/StringIDPart.java index 16ae17420..7fd8981c1 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/StringIDPart.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/StringIDPart.java @@ -1,9 +1,16 @@ /* - * StringIDGenerator + * StringIDPart * - * Models a part of an identifier (ID) whose values are an alphabetic series. + * Models a part of an identifier (ID) that stores and returns a static String value. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/YearIDGenerator.java b/services/id/service/src/main/java/org/collectionspace/services/id/YearIDGenerator.java index 915783511..b098dfdce 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/YearIDGenerator.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/YearIDGenerator.java @@ -1,10 +1,17 @@ /* * YearIDGenerator * - *

    An identifier generator that stores and returns the current year - * as a String object.

    + * Generates identifiers (IDs) that store and returns the current year + * or a supplied year as a String object. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -12,9 +19,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/main/java/org/collectionspace/services/id/YearIDPart.java b/services/id/service/src/main/java/org/collectionspace/services/id/YearIDPart.java index f0d7ede9d..d66bfd901 100644 --- a/services/id/service/src/main/java/org/collectionspace/services/id/YearIDPart.java +++ b/services/id/service/src/main/java/org/collectionspace/services/id/YearIDPart.java @@ -4,7 +4,14 @@ * Models a part of an identifier (ID) whose value is the current year * or a supplied year. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -12,9 +19,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Add Javadoc comments diff --git a/services/id/service/src/test/java/org/collectionspace/services/IDServiceTest.java b/services/id/service/src/test/java/org/collectionspace/services/IDServiceTest.java index 20ddaf179..7a154c488 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/IDServiceTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/IDServiceTest.java @@ -3,7 +3,14 @@ * * Test class for the ID Service. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ // @TODO: Use a URL builder in core Java or the Restlet framework, diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/AlphabeticIDPartTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/AlphabeticIDPartTest.java index 5b85ad55a..abde5674a 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/AlphabeticIDPartTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/AlphabeticIDPartTest.java @@ -3,7 +3,14 @@ * * Test class for AlphabeticIDPart. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ package org.collectionspace.services.id; diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/IDPatternTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/IDPatternTest.java index e89653522..9a1120b6a 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/IDPatternTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/IDPatternTest.java @@ -3,7 +3,14 @@ * * Test class for IDPattern. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ package org.collectionspace.services.id; diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/NumericIDPartTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/NumericIDPartTest.java index 0708300bb..a21cd88a2 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/NumericIDPartTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/NumericIDPartTest.java @@ -3,7 +3,14 @@ * * Test class for NumericIDPart. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ package org.collectionspace.services.id; diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/StringIDPartTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/StringIDPartTest.java index dd3a7a928..8a4b0ebfb 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/StringIDPartTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/StringIDPartTest.java @@ -3,7 +3,14 @@ * * Test class for StringIDPart. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastChangedDate$ */ package org.collectionspace.services.id; diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/YearIDPartTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/YearIDPartTest.java index 12b5d85f3..4ce82a320 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/YearIDPartTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/YearIDPartTest.java @@ -3,7 +3,14 @@ * * Test class for YearIDPart. * - * Copyright 2009 Regents of the University of California + * 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 Regents of the University of California * * Licensed under the Educational Community License (ECL), Version 2.0. * You may not use this file except in compliance with this License. @@ -11,9 +18,9 @@ * You may obtain a copy of the ECL 2.0 License at * https://source.collectionspace.org/collection-space/LICENSE.txt * - * @author $Author: aron $ - * @version $Revision: 267 $ - * $Date: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ + * $LastChangedBy$ + * $LastChangedRevision$ + * $LastchangedDate: 2009-06-19 19:03:38 -0700 (Fri, 19 Jun 2009) $ */ package org.collectionspace.services.id; -- 2.47.3