Commit e6d478ae40aa8fa6a6d60c7fb66978a493fca2f2

Authored by André Gonçalves
1 parent ad40382f5e

Sprint 8

Showing 100 changed files with 15539 additions and 3 deletions   Show diff stats
1 /bin/ 1 /bin/
2 -/target/  
3 2
4 # Eclipse files 3 # Eclipse files
5 .classpath 4 .classpath
src/main/java/org/um/dsi/gavea/orcid/client/constants/OrcidConstants.java
@@ -22,6 +22,6 @@ public final class OrcidConstants { @@ -22,6 +22,6 @@ public final class OrcidConstants {
22 public final static String APPLICATION_ORCID_XML = "application/orcid+xml"; 22 public final static String APPLICATION_ORCID_XML = "application/orcid+xml";
23 public final static MediaType APPLICATION_ORCID_XML_TYPE = new MediaType("application", "orcid+xml"); 23 public final static MediaType APPLICATION_ORCID_XML_TYPE = new MediaType("application", "orcid+xml");
24 24
25 - public final static String CLIENT_READ_TIMEOUT = "2000";  
26 - public final static String CLIENT_CONNECT_TIMEOUT = "2000"; 25 + public final static String CLIENT_READ_TIMEOUT = "8000";
  26 + public final static String CLIENT_CONNECT_TIMEOUT = "8000";
27 } 27 }
src/test/java/org/um/dsi/gavea/orcid/client/test/OrcidTest.java
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
  1 +package org.um.dsi.gavea.orcid.client.test;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +import org.junit.AfterClass;
  7 +import org.junit.BeforeClass;
  8 +import org.junit.Test;
  9 +import org.um.dsi.gavea.orcid.client.OrcidOAuthClient;
  10 +import org.um.dsi.gavea.orcid.model.common.ScopePathType;
  11 +
  12 +public class OrcidTest {
  13 +
  14 + private static OrcidOAuthClient orcidOAuthClient;
  15 +
  16 + static final List<ScopePathType> defaultScopes = new ArrayList<ScopePathType>() {
  17 + {
  18 + add(ScopePathType.ACTIVITIES_UPDATE);
  19 + }
  20 + };
  21 +
  22 +
  23 + @BeforeClass
  24 + public static void setUp() {
  25 + orcidOAuthClient = new OrcidOAuthClient("https://sandbox.orcid.org/", "https://api.sandbox.orcid.org/",
  26 + "0000-0002-2370-2799", "76a50cc2-c0e5-4759-968d-6511a029e4de",
  27 + "https://cosmos.dsi.uminho.pt/view/orcid/oauth.xhtml");
  28 + }
  29 +
  30 + @AfterClass
  31 + public static void tearDown() {
  32 + orcidOAuthClient = null;
  33 + }
  34 +
  35 + @Test
  36 + public void testGetFunding() {
  37 + try {
  38 + System.out.println(orcidOAuthClient.getAuthorizeUriLogin(defaultScopes, null, null));
  39 + System.out.println(orcidOAuthClient.getAuthorizeUriLogin(defaultScopes, null, "0000-0001-8317-2905"));
  40 + System.out.println(orcidOAuthClient.getAuthorizeUriLogin(defaultScopes, null, "ajg@gavea.dsi.uminho.pt"));
  41 + System.out.println(orcidOAuthClient.getAuthorizeUriRegistration(defaultScopes, null, "Gonçalves", "André"));
  42 + } catch (Exception e) {
  43 + e.printStackTrace();
  44 + }
  45 + }
  46 +}
target/generated-sources/org/um/dsi/gavea/orcid/model/activities/ActivitiesSummary.java
@@ -0,0 +1,838 @@ @@ -0,0 +1,838 @@
  1 +
  2 +package org.um.dsi.gavea.orcid.model.activities;
  3 +
  4 +import java.io.Serializable;
  5 +import java.util.ArrayList;
  6 +import java.util.List;
  7 +import javax.xml.bind.annotation.XmlAccessType;
  8 +import javax.xml.bind.annotation.XmlAccessorType;
  9 +import javax.xml.bind.annotation.XmlElement;
  10 +import javax.xml.bind.annotation.XmlRootElement;
  11 +import javax.xml.bind.annotation.XmlType;
  12 +import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
  13 +import org.jvnet.jaxb2_commons.lang.ToString;
  14 +import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
  15 +import org.jvnet.jaxb2_commons.locator.ObjectLocator;
  16 +import org.um.dsi.gavea.orcid.model.education.EducationSummary;
  17 +import org.um.dsi.gavea.orcid.model.employment.EmploymentSummary;
  18 +
  19 +
  20 +/**
  21 + * <p>Java class for anonymous complex type.
  22 + *
  23 + * <p>The following schema fragment specifies the expected content contained within this class.
  24 + *
  25 + * <pre>
  26 + * &lt;complexType&gt;
  27 + * &lt;complexContent&gt;
  28 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  29 + * &lt;sequence&gt;
  30 + * &lt;element name="educations" minOccurs="0"&gt;
  31 + * &lt;complexType&gt;
  32 + * &lt;complexContent&gt;
  33 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  34 + * &lt;sequence&gt;
  35 + * &lt;element ref="{http://www.orcid.org/ns/education}education-summary" maxOccurs="unbounded" minOccurs="0"/&gt;
  36 + * &lt;/sequence&gt;
  37 + * &lt;/restriction&gt;
  38 + * &lt;/complexContent&gt;
  39 + * &lt;/complexType&gt;
  40 + * &lt;/element&gt;
  41 + * &lt;element name="employments" minOccurs="0"&gt;
  42 + * &lt;complexType&gt;
  43 + * &lt;complexContent&gt;
  44 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  45 + * &lt;sequence&gt;
  46 + * &lt;element ref="{http://www.orcid.org/ns/employment}employment-summary" maxOccurs="unbounded" minOccurs="0"/&gt;
  47 + * &lt;/sequence&gt;
  48 + * &lt;/restriction&gt;
  49 + * &lt;/complexContent&gt;
  50 + * &lt;/complexType&gt;
  51 + * &lt;/element&gt;
  52 + * &lt;element name="fundings" minOccurs="0"&gt;
  53 + * &lt;complexType&gt;
  54 + * &lt;complexContent&gt;
  55 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  56 + * &lt;sequence&gt;
  57 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}funding-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  58 + * &lt;/sequence&gt;
  59 + * &lt;/restriction&gt;
  60 + * &lt;/complexContent&gt;
  61 + * &lt;/complexType&gt;
  62 + * &lt;/element&gt;
  63 + * &lt;element name="peer-reviews" minOccurs="0"&gt;
  64 + * &lt;complexType&gt;
  65 + * &lt;complexContent&gt;
  66 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  67 + * &lt;sequence&gt;
  68 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}peer-review-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  69 + * &lt;/sequence&gt;
  70 + * &lt;/restriction&gt;
  71 + * &lt;/complexContent&gt;
  72 + * &lt;/complexType&gt;
  73 + * &lt;/element&gt;
  74 + * &lt;element name="works" minOccurs="0"&gt;
  75 + * &lt;complexType&gt;
  76 + * &lt;complexContent&gt;
  77 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  78 + * &lt;sequence&gt;
  79 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}work-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  80 + * &lt;/sequence&gt;
  81 + * &lt;/restriction&gt;
  82 + * &lt;/complexContent&gt;
  83 + * &lt;/complexType&gt;
  84 + * &lt;/element&gt;
  85 + * &lt;/sequence&gt;
  86 + * &lt;/restriction&gt;
  87 + * &lt;/complexContent&gt;
  88 + * &lt;/complexType&gt;
  89 + * </pre>
  90 + *
  91 + *
  92 + */
  93 +@XmlAccessorType(XmlAccessType.FIELD)
  94 +@XmlType(name = "", propOrder = {
  95 + "educations",
  96 + "employments",
  97 + "fundings",
  98 + "peerReviews",
  99 + "works"
  100 +})
  101 +@XmlRootElement(name = "activities-summary")
  102 +public class ActivitiesSummary implements Serializable, ToString
  103 +{
  104 +
  105 + private final static long serialVersionUID = 1L;
  106 + protected ActivitiesSummary.Educations educations;
  107 + protected ActivitiesSummary.Employments employments;
  108 + protected ActivitiesSummary.Fundings fundings;
  109 + @XmlElement(name = "peer-reviews")
  110 + protected ActivitiesSummary.PeerReviews peerReviews;
  111 + protected ActivitiesSummary.Works works;
  112 +
  113 + /**
  114 + * Default no-arg constructor
  115 + *
  116 + */
  117 + public ActivitiesSummary() {
  118 + super();
  119 + }
  120 +
  121 + /**
  122 + * Fully-initialising value constructor
  123 + *
  124 + */
  125 + public ActivitiesSummary(final ActivitiesSummary.Educations educations, final ActivitiesSummary.Employments employments, final ActivitiesSummary.Fundings fundings, final ActivitiesSummary.PeerReviews peerReviews, final ActivitiesSummary.Works works) {
  126 + this.educations = educations;
  127 + this.employments = employments;
  128 + this.fundings = fundings;
  129 + this.peerReviews = peerReviews;
  130 + this.works = works;
  131 + }
  132 +
  133 + /**
  134 + * Gets the value of the educations property.
  135 + *
  136 + * @return
  137 + * possible object is
  138 + * {@link ActivitiesSummary.Educations }
  139 + *
  140 + */
  141 + public ActivitiesSummary.Educations getEducations() {
  142 + return educations;
  143 + }
  144 +
  145 + /**
  146 + * Sets the value of the educations property.
  147 + *
  148 + * @param value
  149 + * allowed object is
  150 + * {@link ActivitiesSummary.Educations }
  151 + *
  152 + */
  153 + public void setEducations(ActivitiesSummary.Educations value) {
  154 + this.educations = value;
  155 + }
  156 +
  157 + /**
  158 + * Gets the value of the employments property.
  159 + *
  160 + * @return
  161 + * possible object is
  162 + * {@link ActivitiesSummary.Employments }
  163 + *
  164 + */
  165 + public ActivitiesSummary.Employments getEmployments() {
  166 + return employments;
  167 + }
  168 +
  169 + /**
  170 + * Sets the value of the employments property.
  171 + *
  172 + * @param value
  173 + * allowed object is
  174 + * {@link ActivitiesSummary.Employments }
  175 + *
  176 + */
  177 + public void setEmployments(ActivitiesSummary.Employments value) {
  178 + this.employments = value;
  179 + }
  180 +
  181 + /**
  182 + * Gets the value of the fundings property.
  183 + *
  184 + * @return
  185 + * possible object is
  186 + * {@link ActivitiesSummary.Fundings }
  187 + *
  188 + */
  189 + public ActivitiesSummary.Fundings getFundings() {
  190 + return fundings;
  191 + }
  192 +
  193 + /**
  194 + * Sets the value of the fundings property.
  195 + *
  196 + * @param value
  197 + * allowed object is
  198 + * {@link ActivitiesSummary.Fundings }
  199 + *
  200 + */
  201 + public void setFundings(ActivitiesSummary.Fundings value) {
  202 + this.fundings = value;
  203 + }
  204 +
  205 + /**
  206 + * Gets the value of the peerReviews property.
  207 + *
  208 + * @return
  209 + * possible object is
  210 + * {@link ActivitiesSummary.PeerReviews }
  211 + *
  212 + */
  213 + public ActivitiesSummary.PeerReviews getPeerReviews() {
  214 + return peerReviews;
  215 + }
  216 +
  217 + /**
  218 + * Sets the value of the peerReviews property.
  219 + *
  220 + * @param value
  221 + * allowed object is
  222 + * {@link ActivitiesSummary.PeerReviews }
  223 + *
  224 + */
  225 + public void setPeerReviews(ActivitiesSummary.PeerReviews value) {
  226 + this.peerReviews = value;
  227 + }
  228 +
  229 + /**
  230 + * Gets the value of the works property.
  231 + *
  232 + * @return
  233 + * possible object is
  234 + * {@link ActivitiesSummary.Works }
  235 + *
  236 + */
  237 + public ActivitiesSummary.Works getWorks() {
  238 + return works;
  239 + }
  240 +
  241 + /**
  242 + * Sets the value of the works property.
  243 + *
  244 + * @param value
  245 + * allowed object is
  246 + * {@link ActivitiesSummary.Works }
  247 + *
  248 + */
  249 + public void setWorks(ActivitiesSummary.Works value) {
  250 + this.works = value;
  251 + }
  252 +
  253 + public String toString() {
  254 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  255 + final StringBuilder buffer = new StringBuilder();
  256 + append(null, buffer, strategy);
  257 + return buffer.toString();
  258 + }
  259 +
  260 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  261 + strategy.appendStart(locator, this, buffer);
  262 + appendFields(locator, buffer, strategy);
  263 + strategy.appendEnd(locator, this, buffer);
  264 + return buffer;
  265 + }
  266 +
  267 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  268 + {
  269 + ActivitiesSummary.Educations theEducations;
  270 + theEducations = this.getEducations();
  271 + strategy.appendField(locator, this, "educations", buffer, theEducations);
  272 + }
  273 + {
  274 + ActivitiesSummary.Employments theEmployments;
  275 + theEmployments = this.getEmployments();
  276 + strategy.appendField(locator, this, "employments", buffer, theEmployments);
  277 + }
  278 + {
  279 + ActivitiesSummary.Fundings theFundings;
  280 + theFundings = this.getFundings();
  281 + strategy.appendField(locator, this, "fundings", buffer, theFundings);
  282 + }
  283 + {
  284 + ActivitiesSummary.PeerReviews thePeerReviews;
  285 + thePeerReviews = this.getPeerReviews();
  286 + strategy.appendField(locator, this, "peerReviews", buffer, thePeerReviews);
  287 + }
  288 + {
  289 + ActivitiesSummary.Works theWorks;
  290 + theWorks = this.getWorks();
  291 + strategy.appendField(locator, this, "works", buffer, theWorks);
  292 + }
  293 + return buffer;
  294 + }
  295 +
  296 +
  297 + /**
  298 + * <p>Java class for anonymous complex type.
  299 + *
  300 + * <p>The following schema fragment specifies the expected content contained within this class.
  301 + *
  302 + * <pre>
  303 + * &lt;complexType&gt;
  304 + * &lt;complexContent&gt;
  305 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  306 + * &lt;sequence&gt;
  307 + * &lt;element ref="{http://www.orcid.org/ns/education}education-summary" maxOccurs="unbounded" minOccurs="0"/&gt;
  308 + * &lt;/sequence&gt;
  309 + * &lt;/restriction&gt;
  310 + * &lt;/complexContent&gt;
  311 + * &lt;/complexType&gt;
  312 + * </pre>
  313 + *
  314 + *
  315 + */
  316 + @XmlAccessorType(XmlAccessType.FIELD)
  317 + @XmlType(name = "", propOrder = {
  318 + "educationSummary"
  319 + })
  320 + public static class Educations implements Serializable, ToString
  321 + {
  322 +
  323 + private final static long serialVersionUID = 1L;
  324 + @XmlElement(name = "education-summary", namespace = "http://www.orcid.org/ns/education")
  325 + protected List<EducationSummary> educationSummary;
  326 +
  327 + /**
  328 + * Default no-arg constructor
  329 + *
  330 + */
  331 + public Educations() {
  332 + super();
  333 + }
  334 +
  335 + /**
  336 + * Fully-initialising value constructor
  337 + *
  338 + */
  339 + public Educations(final List<EducationSummary> educationSummary) {
  340 + this.educationSummary = educationSummary;
  341 + }
  342 +
  343 + /**
  344 + * Gets the value of the educationSummary property.
  345 + *
  346 + * <p>
  347 + * This accessor method returns a reference to the live list,
  348 + * not a snapshot. Therefore any modification you make to the
  349 + * returned list will be present inside the JAXB object.
  350 + * This is why there is not a <CODE>set</CODE> method for the educationSummary property.
  351 + *
  352 + * <p>
  353 + * For example, to add a new item, do as follows:
  354 + * <pre>
  355 + * getEducationSummary().add(newItem);
  356 + * </pre>
  357 + *
  358 + *
  359 + * <p>
  360 + * Objects of the following type(s) are allowed in the list
  361 + * {@link EducationSummary }
  362 + *
  363 + *
  364 + */
  365 + public List<EducationSummary> getEducationSummary() {
  366 + if (educationSummary == null) {
  367 + educationSummary = new ArrayList<EducationSummary>();
  368 + }
  369 + return this.educationSummary;
  370 + }
  371 +
  372 + public void setEducationSummary(List<EducationSummary> value) {
  373 + this.educationSummary = null;
  374 + if (value!= null) {
  375 + List<EducationSummary> draftl = this.getEducationSummary();
  376 + draftl.addAll(value);
  377 + }
  378 + }
  379 +
  380 + public String toString() {
  381 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  382 + final StringBuilder buffer = new StringBuilder();
  383 + append(null, buffer, strategy);
  384 + return buffer.toString();
  385 + }
  386 +
  387 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  388 + strategy.appendStart(locator, this, buffer);
  389 + appendFields(locator, buffer, strategy);
  390 + strategy.appendEnd(locator, this, buffer);
  391 + return buffer;
  392 + }
  393 +
  394 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  395 + {
  396 + List<EducationSummary> theEducationSummary;
  397 + theEducationSummary = (((this.educationSummary!= null)&&(!this.educationSummary.isEmpty()))?this.getEducationSummary():null);
  398 + strategy.appendField(locator, this, "educationSummary", buffer, theEducationSummary);
  399 + }
  400 + return buffer;
  401 + }
  402 +
  403 + }
  404 +
  405 +
  406 + /**
  407 + * <p>Java class for anonymous complex type.
  408 + *
  409 + * <p>The following schema fragment specifies the expected content contained within this class.
  410 + *
  411 + * <pre>
  412 + * &lt;complexType&gt;
  413 + * &lt;complexContent&gt;
  414 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  415 + * &lt;sequence&gt;
  416 + * &lt;element ref="{http://www.orcid.org/ns/employment}employment-summary" maxOccurs="unbounded" minOccurs="0"/&gt;
  417 + * &lt;/sequence&gt;
  418 + * &lt;/restriction&gt;
  419 + * &lt;/complexContent&gt;
  420 + * &lt;/complexType&gt;
  421 + * </pre>
  422 + *
  423 + *
  424 + */
  425 + @XmlAccessorType(XmlAccessType.FIELD)
  426 + @XmlType(name = "", propOrder = {
  427 + "employmentSummary"
  428 + })
  429 + public static class Employments implements Serializable, ToString
  430 + {
  431 +
  432 + private final static long serialVersionUID = 1L;
  433 + @XmlElement(name = "employment-summary", namespace = "http://www.orcid.org/ns/employment")
  434 + protected List<EmploymentSummary> employmentSummary;
  435 +
  436 + /**
  437 + * Default no-arg constructor
  438 + *
  439 + */
  440 + public Employments() {
  441 + super();
  442 + }
  443 +
  444 + /**
  445 + * Fully-initialising value constructor
  446 + *
  447 + */
  448 + public Employments(final List<EmploymentSummary> employmentSummary) {
  449 + this.employmentSummary = employmentSummary;
  450 + }
  451 +
  452 + /**
  453 + * Gets the value of the employmentSummary property.
  454 + *
  455 + * <p>
  456 + * This accessor method returns a reference to the live list,
  457 + * not a snapshot. Therefore any modification you make to the
  458 + * returned list will be present inside the JAXB object.
  459 + * This is why there is not a <CODE>set</CODE> method for the employmentSummary property.
  460 + *
  461 + * <p>
  462 + * For example, to add a new item, do as follows:
  463 + * <pre>
  464 + * getEmploymentSummary().add(newItem);
  465 + * </pre>
  466 + *
  467 + *
  468 + * <p>
  469 + * Objects of the following type(s) are allowed in the list
  470 + * {@link EmploymentSummary }
  471 + *
  472 + *
  473 + */
  474 + public List<EmploymentSummary> getEmploymentSummary() {
  475 + if (employmentSummary == null) {
  476 + employmentSummary = new ArrayList<EmploymentSummary>();
  477 + }
  478 + return this.employmentSummary;
  479 + }
  480 +
  481 + public void setEmploymentSummary(List<EmploymentSummary> value) {
  482 + this.employmentSummary = null;
  483 + if (value!= null) {
  484 + List<EmploymentSummary> draftl = this.getEmploymentSummary();
  485 + draftl.addAll(value);
  486 + }
  487 + }
  488 +
  489 + public String toString() {
  490 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  491 + final StringBuilder buffer = new StringBuilder();
  492 + append(null, buffer, strategy);
  493 + return buffer.toString();
  494 + }
  495 +
  496 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  497 + strategy.appendStart(locator, this, buffer);
  498 + appendFields(locator, buffer, strategy);
  499 + strategy.appendEnd(locator, this, buffer);
  500 + return buffer;
  501 + }
  502 +
  503 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  504 + {
  505 + List<EmploymentSummary> theEmploymentSummary;
  506 + theEmploymentSummary = (((this.employmentSummary!= null)&&(!this.employmentSummary.isEmpty()))?this.getEmploymentSummary():null);
  507 + strategy.appendField(locator, this, "employmentSummary", buffer, theEmploymentSummary);
  508 + }
  509 + return buffer;
  510 + }
  511 +
  512 + }
  513 +
  514 +
  515 + /**
  516 + * <p>Java class for anonymous complex type.
  517 + *
  518 + * <p>The following schema fragment specifies the expected content contained within this class.
  519 + *
  520 + * <pre>
  521 + * &lt;complexType&gt;
  522 + * &lt;complexContent&gt;
  523 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  524 + * &lt;sequence&gt;
  525 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}funding-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  526 + * &lt;/sequence&gt;
  527 + * &lt;/restriction&gt;
  528 + * &lt;/complexContent&gt;
  529 + * &lt;/complexType&gt;
  530 + * </pre>
  531 + *
  532 + *
  533 + */
  534 + @XmlAccessorType(XmlAccessType.FIELD)
  535 + @XmlType(name = "", propOrder = {
  536 + "group"
  537 + })
  538 + public static class Fundings implements Serializable, ToString
  539 + {
  540 +
  541 + private final static long serialVersionUID = 1L;
  542 + protected List<FundingGroup> group;
  543 +
  544 + /**
  545 + * Default no-arg constructor
  546 + *
  547 + */
  548 + public Fundings() {
  549 + super();
  550 + }
  551 +
  552 + /**
  553 + * Fully-initialising value constructor
  554 + *
  555 + */
  556 + public Fundings(final List<FundingGroup> group) {
  557 + this.group = group;
  558 + }
  559 +
  560 + /**
  561 + * Gets the value of the group property.
  562 + *
  563 + * <p>
  564 + * This accessor method returns a reference to the live list,
  565 + * not a snapshot. Therefore any modification you make to the
  566 + * returned list will be present inside the JAXB object.
  567 + * This is why there is not a <CODE>set</CODE> method for the group property.
  568 + *
  569 + * <p>
  570 + * For example, to add a new item, do as follows:
  571 + * <pre>
  572 + * getGroup().add(newItem);
  573 + * </pre>
  574 + *
  575 + *
  576 + * <p>
  577 + * Objects of the following type(s) are allowed in the list
  578 + * {@link FundingGroup }
  579 + *
  580 + *
  581 + */
  582 + public List<FundingGroup> getGroup() {
  583 + if (group == null) {
  584 + group = new ArrayList<FundingGroup>();
  585 + }
  586 + return this.group;
  587 + }
  588 +
  589 + public void setGroup(List<FundingGroup> value) {
  590 + this.group = null;
  591 + if (value!= null) {
  592 + List<FundingGroup> draftl = this.getGroup();
  593 + draftl.addAll(value);
  594 + }
  595 + }
  596 +
  597 + public String toString() {
  598 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  599 + final StringBuilder buffer = new StringBuilder();
  600 + append(null, buffer, strategy);
  601 + return buffer.toString();
  602 + }
  603 +
  604 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  605 + strategy.appendStart(locator, this, buffer);
  606 + appendFields(locator, buffer, strategy);
  607 + strategy.appendEnd(locator, this, buffer);
  608 + return buffer;
  609 + }
  610 +
  611 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  612 + {
  613 + List<FundingGroup> theGroup;
  614 + theGroup = (((this.group!= null)&&(!this.group.isEmpty()))?this.getGroup():null);
  615 + strategy.appendField(locator, this, "group", buffer, theGroup);
  616 + }
  617 + return buffer;
  618 + }
  619 +
  620 + }
  621 +
  622 +
  623 + /**
  624 + * <p>Java class for anonymous complex type.
  625 + *
  626 + * <p>The following schema fragment specifies the expected content contained within this class.
  627 + *
  628 + * <pre>
  629 + * &lt;complexType&gt;
  630 + * &lt;complexContent&gt;
  631 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  632 + * &lt;sequence&gt;
  633 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}peer-review-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  634 + * &lt;/sequence&gt;
  635 + * &lt;/restriction&gt;
  636 + * &lt;/complexContent&gt;
  637 + * &lt;/complexType&gt;
  638 + * </pre>
  639 + *
  640 + *
  641 + */
  642 + @XmlAccessorType(XmlAccessType.FIELD)
  643 + @XmlType(name = "", propOrder = {
  644 + "group"
  645 + })
  646 + public static class PeerReviews implements Serializable, ToString
  647 + {
  648 +
  649 + private final static long serialVersionUID = 1L;
  650 + protected List<PeerReviewGroup> group;
  651 +
  652 + /**
  653 + * Default no-arg constructor
  654 + *
  655 + */
  656 + public PeerReviews() {
  657 + super();
  658 + }
  659 +
  660 + /**
  661 + * Fully-initialising value constructor
  662 + *
  663 + */
  664 + public PeerReviews(final List<PeerReviewGroup> group) {
  665 + this.group = group;
  666 + }
  667 +
  668 + /**
  669 + * Gets the value of the group property.
  670 + *
  671 + * <p>
  672 + * This accessor method returns a reference to the live list,
  673 + * not a snapshot. Therefore any modification you make to the
  674 + * returned list will be present inside the JAXB object.
  675 + * This is why there is not a <CODE>set</CODE> method for the group property.
  676 + *
  677 + * <p>
  678 + * For example, to add a new item, do as follows:
  679 + * <pre>
  680 + * getGroup().add(newItem);
  681 + * </pre>
  682 + *
  683 + *
  684 + * <p>
  685 + * Objects of the following type(s) are allowed in the list
  686 + * {@link PeerReviewGroup }
  687 + *
  688 + *
  689 + */
  690 + public List<PeerReviewGroup> getGroup() {
  691 + if (group == null) {
  692 + group = new ArrayList<PeerReviewGroup>();
  693 + }
  694 + return this.group;
  695 + }
  696 +
  697 + public void setGroup(List<PeerReviewGroup> value) {
  698 + this.group = null;
  699 + if (value!= null) {
  700 + List<PeerReviewGroup> draftl = this.getGroup();
  701 + draftl.addAll(value);
  702 + }
  703 + }
  704 +
  705 + public String toString() {
  706 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  707 + final StringBuilder buffer = new StringBuilder();
  708 + append(null, buffer, strategy);
  709 + return buffer.toString();
  710 + }
  711 +
  712 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  713 + strategy.appendStart(locator, this, buffer);
  714 + appendFields(locator, buffer, strategy);
  715 + strategy.appendEnd(locator, this, buffer);
  716 + return buffer;
  717 + }
  718 +
  719 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  720 + {
  721 + List<PeerReviewGroup> theGroup;
  722 + theGroup = (((this.group!= null)&&(!this.group.isEmpty()))?this.getGroup():null);
  723 + strategy.appendField(locator, this, "group", buffer, theGroup);
  724 + }
  725 + return buffer;
  726 + }
  727 +
  728 + }
  729 +
  730 +
  731 + /**
  732 + * <p>Java class for anonymous complex type.
  733 + *
  734 + * <p>The following schema fragment specifies the expected content contained within this class.
  735 + *
  736 + * <pre>
  737 + * &lt;complexType&gt;
  738 + * &lt;complexContent&gt;
  739 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  740 + * &lt;sequence&gt;
  741 + * &lt;element name="group" type="{http://www.orcid.org/ns/activities}work-group" maxOccurs="unbounded" minOccurs="0"/&gt;
  742 + * &lt;/sequence&gt;
  743 + * &lt;/restriction&gt;
  744 + * &lt;/complexContent&gt;
  745 + * &lt;/complexType&gt;
  746 + * </pre>
  747 + *
  748 + *
  749 + */
  750 + @XmlAccessorType(XmlAccessType.FIELD)
  751 + @XmlType(name = "", propOrder = {
  752 + "group"
  753 + })
  754 + public static class Works implements Serializable, ToString
  755 + {
  756 +
  757 + private final static long serialVersionUID = 1L;
  758 + protected List<WorkGroup> group;
  759 +
  760 + /**
  761 + * Default no-arg constructor
  762 + *
  763 + */
  764 + public Works() {
  765 + super();
  766 + }
  767 +
  768 + /**
  769 + * Fully-initialising value constructor
  770 + *
  771 + */
  772 + public Works(final List<WorkGroup> group) {
  773 + this.group = group;
  774 + }
  775 +
  776 + /**
  777 + * Gets the value of the group property.
  778 + *
  779 + * <p>
  780 + * This accessor method returns a reference to the live list,
  781 + * not a snapshot. Therefore any modification you make to the
  782 + * returned list will be present inside the JAXB object.
  783 + * This is why there is not a <CODE>set</CODE> method for the group property.
  784 + *
  785 + * <p>
  786 + * For example, to add a new item, do as follows:
  787 + * <pre>
  788 + * getGroup().add(newItem);
  789 + * </pre>
  790 + *
  791 + *
  792 + * <p>
  793 + * Objects of the following type(s) are allowed in the list
  794 + * {@link WorkGroup }
  795 + *
  796 + *
  797 + */
  798 + public List<WorkGroup> getGroup() {
  799 + if (group == null) {
  800 + group = new ArrayList<WorkGroup>();
  801 + }
  802 + return this.group;
  803 + }
  804 +
  805 + public void setGroup(List<WorkGroup> value) {
  806 + this.group = null;
  807 + if (value!= null) {
  808 + List<WorkGroup> draftl = this.getGroup();
  809 + draftl.addAll(value);
  810 + }
  811 + }
  812 +
  813 + public String toString() {
  814 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  815 + final StringBuilder buffer = new StringBuilder();
  816 + append(null, buffer, strategy);
  817 + return buffer.toString();
  818 + }
  819 +
  820 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  821 + strategy.appendStart(locator, this, buffer);
  822 + appendFields(locator, buffer, strategy);
  823 + strategy.appendEnd(locator, this, buffer);
  824 + return buffer;
  825 + }
  826 +
  827 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  828 + {
  829 + List<WorkGroup> theGroup;
  830 + theGroup = (((this.group!= null)&&(!this.group.isEmpty()))?this.getGroup():null);
  831 + strategy.appendField(locator, this, "group", buffer, theGroup);
  832 + }
  833 + return buffer;
  834 + }
  835 +
  836 + }
  837 +
  838 +}
target/generated-sources/org/um/dsi/gavea/orcid/model/activities/FundingGroup.java
@@ -0,0 +1,160 @@ @@ -0,0 +1,160 @@
  1 +
  2 +package org.um.dsi.gavea.orcid.model.activities;
  3 +
  4 +import java.io.Serializable;
  5 +import java.util.ArrayList;
  6 +import java.util.List;
  7 +import javax.xml.bind.annotation.XmlAccessType;
  8 +import javax.xml.bind.annotation.XmlAccessorType;
  9 +import javax.xml.bind.annotation.XmlElement;
  10 +import javax.xml.bind.annotation.XmlType;
  11 +import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
  12 +import org.jvnet.jaxb2_commons.lang.ToString;
  13 +import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
  14 +import org.jvnet.jaxb2_commons.locator.ObjectLocator;
  15 +import org.um.dsi.gavea.orcid.model.funding.Summary;
  16 +
  17 +
  18 +/**
  19 + * <p>Java class for funding-group complex type.
  20 + *
  21 + * <p>The following schema fragment specifies the expected content contained within this class.
  22 + *
  23 + * <pre>
  24 + * &lt;complexType name="funding-group"&gt;
  25 + * &lt;complexContent&gt;
  26 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  27 + * &lt;sequence&gt;
  28 + * &lt;element name="identifiers" type="{http://www.orcid.org/ns/activities}identifiers"/&gt;
  29 + * &lt;sequence&gt;
  30 + * &lt;element ref="{http://www.orcid.org/ns/funding}summary" maxOccurs="unbounded" minOccurs="0"/&gt;
  31 + * &lt;/sequence&gt;
  32 + * &lt;/sequence&gt;
  33 + * &lt;/restriction&gt;
  34 + * &lt;/complexContent&gt;
  35 + * &lt;/complexType&gt;
  36 + * </pre>
  37 + *
  38 + *
  39 + */
  40 +@XmlAccessorType(XmlAccessType.FIELD)
  41 +@XmlType(name = "funding-group", propOrder = {
  42 + "identifiers",
  43 + "summary"
  44 +})
  45 +public class FundingGroup implements Serializable, ToString
  46 +{
  47 +
  48 + private final static long serialVersionUID = 1L;
  49 + @XmlElement(required = true)
  50 + protected Identifiers identifiers;
  51 + @XmlElement(namespace = "http://www.orcid.org/ns/funding")
  52 + protected List<Summary> summary;
  53 +
  54 + /**
  55 + * Default no-arg constructor
  56 + *
  57 + */
  58 + public FundingGroup() {
  59 + super();
  60 + }
  61 +
  62 + /**
  63 + * Fully-initialising value constructor
  64 + *
  65 + */
  66 + public FundingGroup(final Identifiers identifiers, final List<Summary> summary) {
  67 + this.identifiers = identifiers;
  68 + this.summary = summary;
  69 + }
  70 +
  71 + /**
  72 + * Gets the value of the identifiers property.
  73 + *
  74 + * @return
  75 + * possible object is
  76 + * {@link Identifiers }
  77 + *
  78 + */
  79 + public Identifiers getIdentifiers() {
  80 + return identifiers;
  81 + }
  82 +
  83 + /**
  84 + * Sets the value of the identifiers property.
  85 + *
  86 + * @param value
  87 + * allowed object is
  88 + * {@link Identifiers }
  89 + *
  90 + */
  91 + public void setIdentifiers(Identifiers value) {
  92 + this.identifiers = value;
  93 + }
  94 +
  95 + /**
  96 + * Gets the value of the summary property.
  97 + *
  98 + * <p>
  99 + * This accessor method returns a reference to the live list,
  100 + * not a snapshot. Therefore any modification you make to the
  101 + * returned list will be present inside the JAXB object.
  102 + * This is why there is not a <CODE>set</CODE> method for the summary property.
  103 + *
  104 + * <p>
  105 + * For example, to add a new item, do as follows:
  106 + * <pre>
  107 + * getSummary().add(newItem);
  108 + * </pre>
  109 + *
  110 + *
  111 + * <p>
  112 + * Objects of the following type(s) are allowed in the list
  113 + * {@link Summary }
  114 + *
  115 + *
  116 + */
  117 + public List<Summary> getSummary() {
  118 + if (summary == null) {
  119 + summary = new ArrayList<Summary>();
  120 + }
  121 + return this.summary;
  122 + }
  123 +
  124 + public void setSummary(List<Summary> value) {
  125 + this.summary = null;
  126 + if (value!= null) {
  127 + List<Summary> draftl = this.getSummary();
  128 + draftl.addAll(value);
  129 + }
  130 + }
  131 +
  132 + public String toString() {
  133 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  134 + final StringBuilder buffer = new StringBuilder();
  135 + append(null, buffer, strategy);
  136 + return buffer.toString();
  137 + }
  138 +
  139 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  140 + strategy.appendStart(locator, this, buffer);
  141 + appendFields(locator, buffer, strategy);
  142 + strategy.appendEnd(locator, this, buffer);
  143 + return buffer;
  144 + }
  145 +
  146 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  147 + {
  148 + Identifiers theIdentifiers;
  149 + theIdentifiers = this.getIdentifiers();
  150 + strategy.appendField(locator, this, "identifiers", buffer, theIdentifiers);
  151 + }
  152 + {
  153 + List<Summary> theSummary;
  154 + theSummary = (((this.summary!= null)&&(!this.summary.isEmpty()))?this.getSummary():null);
  155 + strategy.appendField(locator, this, "summary", buffer, theSummary);
  156 + }
  157 + return buffer;
  158 + }
  159 +
  160 +}
target/generated-sources/org/um/dsi/gavea/orcid/model/activities/Identifier.java
@@ -0,0 +1,144 @@ @@ -0,0 +1,144 @@
  1 +
  2 +package org.um.dsi.gavea.orcid.model.activities;
  3 +
  4 +import java.io.Serializable;
  5 +import javax.xml.bind.annotation.XmlAccessType;
  6 +import javax.xml.bind.annotation.XmlAccessorType;
  7 +import javax.xml.bind.annotation.XmlElement;
  8 +import javax.xml.bind.annotation.XmlSchemaType;
  9 +import javax.xml.bind.annotation.XmlType;
  10 +import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
  11 +import org.jvnet.jaxb2_commons.lang.ToString;
  12 +import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
  13 +import org.jvnet.jaxb2_commons.locator.ObjectLocator;
  14 +
  15 +
  16 +/**
  17 + * <p>Java class for identifier complex type.
  18 + *
  19 + * <p>The following schema fragment specifies the expected content contained within this class.
  20 + *
  21 + * <pre>
  22 + * &lt;complexType name="identifier"&gt;
  23 + * &lt;complexContent&gt;
  24 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  25 + * &lt;sequence&gt;
  26 + * &lt;element name="external-identifier-type" type="{http://www.orcid.org/ns/activities}identifier-types"/&gt;
  27 + * &lt;element name="external-identifier-id" type="{http://www.orcid.org/ns/common}non-empty-string"/&gt;
  28 + * &lt;/sequence&gt;
  29 + * &lt;/restriction&gt;
  30 + * &lt;/complexContent&gt;
  31 + * &lt;/complexType&gt;
  32 + * </pre>
  33 + *
  34 + *
  35 + */
  36 +@XmlAccessorType(XmlAccessType.FIELD)
  37 +@XmlType(name = "identifier", propOrder = {
  38 + "externalIdentifierType",
  39 + "externalIdentifierId"
  40 +})
  41 +public class Identifier implements Serializable, ToString
  42 +{
  43 +
  44 + private final static long serialVersionUID = 1L;
  45 + @XmlElement(name = "external-identifier-type", required = true)
  46 + @XmlSchemaType(name = "anySimpleType")
  47 + protected String externalIdentifierType;
  48 + @XmlElement(name = "external-identifier-id", required = true)
  49 + protected String externalIdentifierId;
  50 +
  51 + /**
  52 + * Default no-arg constructor
  53 + *
  54 + */
  55 + public Identifier() {
  56 + super();
  57 + }
  58 +
  59 + /**
  60 + * Fully-initialising value constructor
  61 + *
  62 + */
  63 + public Identifier(final String externalIdentifierType, final String externalIdentifierId) {
  64 + this.externalIdentifierType = externalIdentifierType;
  65 + this.externalIdentifierId = externalIdentifierId;
  66 + }
  67 +
  68 + /**
  69 + * Gets the value of the externalIdentifierType property.
  70 + *
  71 + * @return
  72 + * possible object is
  73 + * {@link String }
  74 + *
  75 + */
  76 + public String getExternalIdentifierType() {
  77 + return externalIdentifierType;
  78 + }
  79 +
  80 + /**
  81 + * Sets the value of the externalIdentifierType property.
  82 + *
  83 + * @param value
  84 + * allowed object is
  85 + * {@link String }
  86 + *
  87 + */
  88 + public void setExternalIdentifierType(String value) {
  89 + this.externalIdentifierType = value;
  90 + }
  91 +
  92 + /**
  93 + * Gets the value of the externalIdentifierId property.
  94 + *
  95 + * @return
  96 + * possible object is
  97 + * {@link String }
  98 + *
  99 + */
  100 + public String getExternalIdentifierId() {
  101 + return externalIdentifierId;
  102 + }
  103 +
  104 + /**
  105 + * Sets the value of the externalIdentifierId property.
  106 + *
  107 + * @param value
  108 + * allowed object is
  109 + * {@link String }
  110 + *
  111 + */
  112 + public void setExternalIdentifierId(String value) {
  113 + this.externalIdentifierId = value;
  114 + }
  115 +
  116 + public String toString() {
  117 + final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
  118 + final StringBuilder buffer = new StringBuilder();
  119 + append(null, buffer, strategy);
  120 + return buffer.toString();
  121 + }
  122 +
  123 + public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  124 + strategy.appendStart(locator, this, buffer);
  125 + appendFields(locator, buffer, strategy);
  126 + strategy.appendEnd(locator, this, buffer);
  127 + return buffer;
  128 + }
  129 +
  130 + public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
  131 + {
  132 + String theExternalIdentifierType;
  133 + theExternalIdentifierType = this.getExternalIdentifierType();
  134 + strategy.appendField(locator, this, "externalIdentifierType", buffer, theExternalIdentifierType);
  135 + }
  136 + {
  137 + String theExternalIdentifierId;
  138 + theExternalIdentifierId = this.getExternalIdentifierId();
  139 + strategy.appendField(locator, this, "externalIdentifierId", buffer, theExternalIdentifierId);
  140 + }
  141 + return buffer;
  142 + }
  143 +
  144 +}
target/generated-sources/org/um/dsi/gavea/orcid/model/activities/Identifiers.java
@@ -0,0 +1,121 @@ @@ -0,0 +1,121 @@
  1 +
  2 +package org.um.dsi.gavea.orcid.model.activities;
  3 +
  4 +import java.io.Serializable;
  5 +import java.util.ArrayList;
  6 +import java.util.List;
  7 +import javax.xml.bind.annotation.XmlAccessType;
  8 +import javax.xml.bind.annotation.XmlAccessorType;
  9 +import javax.xml.bind.annotation.XmlType;
  10 +import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
  11 +import org.jvnet.jaxb2_commons.lang.ToString;
  12 +import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
  13 +import org.jvnet.jaxb2_commons.locator.ObjectLocator;
  14 +
  15 +
  16 +/**
  17 + * <p>Java class for identifiers complex type.
  18 + *
  19 + * <p>The following schema fragment specifies the expected content contained within this class.
  20 + *
  21 + * <pre>
  22 + * &lt;complexType name="identifiers"&gt;
  23 + * &lt;complexContent&gt;
  24 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  25 + * &lt;sequence&gt;
  26 + * &lt;element name="identifier" type="{http://www.orcid.org/ns/activities}identifier" maxOccurs="unbounded" minOccurs="0"/&gt;
  27 + * &lt;/sequence&gt;
  28 + * &lt;/restriction&gt;
  29 + * &lt;/complexContent&gt;
  30 + * &lt;/complexType&gt;
  31 + * </pre>
  32 + *
  33 + *
  34 + */
  35 +@XmlAccessorType(XmlAccessType.FIELD)
  36 +@XmlType(name = "identifiers", propOrder = {
  37 + "identifier"
  38 +})
  39 +public class Identifiers implements Serializable, ToString
  40 +{
  41 +