|
From: <jav...@us...> - 2012-07-30 07:46:58
|
Revision: 170
http://andspidclient.svn.sourceforge.net/andspidclient/?rev=170&view=rev
Author: javinovich
Date: 2012-07-30 07:46:49 +0000 (Mon, 30 Jul 2012)
Log Message:
-----------
DMSTECH-3819:
- Implementing DoiDTO.toString()
Modified Paths:
--------------
trunk/src/main/java/au/csiro/doiclient/business/DoiDTO.java
Modified: trunk/src/main/java/au/csiro/doiclient/business/DoiDTO.java
===================================================================
--- trunk/src/main/java/au/csiro/doiclient/business/DoiDTO.java 2012-07-30 07:46:04 UTC (rev 169)
+++ trunk/src/main/java/au/csiro/doiclient/business/DoiDTO.java 2012-07-30 07:46:49 UTC (rev 170)
@@ -1,5 +1,5 @@
/**
- * Copyright 2012, CSIRO Australia.
+ * Copyright 2010, CSIRO Australia.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -180,4 +180,32 @@
this.identifier = identifier;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ final int maxLen = 1;
+ StringBuilder builder = new StringBuilder();
+ builder.append("DoiDTO [");
+ if (identifier != null)
+ builder.append("identifier=").append(identifier).append(", ");
+ if (title != null)
+ builder.append("title=").append(title).append(", ");
+ if (creators != null)
+ builder.append("creators=").append(creators.subList(0, Math.min(creators.size(), maxLen))).append(", ");
+ if (publicationYear != null)
+ builder.append("publicationYear=").append(publicationYear).append(", ");
+ if (publisher != null)
+ builder.append("publisher=").append(publisher).append(", ");
+ if (subject != null)
+ builder.append("subject=").append(subject).append(", ");
+ if (language != null)
+ builder.append("language=").append(language);
+ builder.append("]");
+ return builder.toString();
+ }
+
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|