Commit cd7f7f727e4b93de978d8dd485802c37ebff8437

Authored by Paulo Graça
1 parent 6c41472c88

Change namespace for bulks

src/main/java/org/um/dsi/gavea/orcid/client/OrcidOAuthClient.java
@@ -41,6 +41,8 @@ import org.um.dsi.gavea.orcid.model.researcherurl.ResearcherUrl; @@ -41,6 +41,8 @@ import org.um.dsi.gavea.orcid.model.researcherurl.ResearcherUrl;
41 import org.um.dsi.gavea.orcid.model.researcherurl.ResearcherUrls; 41 import org.um.dsi.gavea.orcid.model.researcherurl.ResearcherUrls;
42 import org.um.dsi.gavea.orcid.model.work.Work; 42 import org.um.dsi.gavea.orcid.model.work.Work;
43 import org.um.dsi.gavea.orcid.model.work.WorkSummary; 43 import org.um.dsi.gavea.orcid.model.work.WorkSummary;
  44 +import org.um.dsi.gavea.orcid.model.bulk.Bulk;
  45 +
44 46
45 public class OrcidOAuthClient extends BaseOrcidOAuthClient { 47 public class OrcidOAuthClient extends BaseOrcidOAuthClient {
46 private static final long serialVersionUID = -6655680509383446710L; 48 private static final long serialVersionUID = -6655680509383446710L;
@@ -807,11 +809,11 @@ public class OrcidOAuthClient extends BaseOrcidOAuthClient { @@ -807,11 +809,11 @@ public class OrcidOAuthClient extends BaseOrcidOAuthClient {
807 } 809 }
808 810
809 /* Bulks */ 811 /* Bulks */
810 - public org.orcid.ns.bulk.Bulk addWorks(final OrcidAccessToken token, final org.orcid.ns.bulk.Bulk bulk) throws OrcidClientException { 812 + public Bulk addWorks(final OrcidAccessToken token, final Bulk bulk) throws OrcidClientException {
811 Response response = null; 813 Response response = null;
812 try { 814 try {
813 response = post(OrcidConstants.ENDPOINT_WORKS, token, Entity.entity(bulk, MediaType.APPLICATION_XML_TYPE)); 815 response = post(OrcidConstants.ENDPOINT_WORKS, token, Entity.entity(bulk, MediaType.APPLICATION_XML_TYPE));
814 - return response.readEntity(org.orcid.ns.bulk.Bulk.class); 816 + return response.readEntity(Bulk.class);
815 } finally { 817 } finally {
816 if (response != null) 818 if (response != null)
817 response.close(); 819 response.close();
src/main/resources/binding/orcid-2.0.xjb
@@ -181,4 +181,12 @@ @@ -181,4 +181,12 @@
181 <jaxb:package name="org.um.dsi.gavea.orcid.model.work" /> 181 <jaxb:package name="org.um.dsi.gavea.orcid.model.work" />
182 </jaxb:schemaBindings> 182 </jaxb:schemaBindings>
183 </jaxb:bindings> 183 </jaxb:bindings>
  184 +
  185 + <jaxb:bindings schemaLocation="../xsd/record_2.0/bulk-2.0.xsd" node="/xs:schema">
  186 + <jaxb:schemaBindings>
  187 + <jaxb:package name="org.um.dsi.gavea.orcid.model.bulk" />
  188 + </jaxb:schemaBindings>
  189 + </jaxb:bindings>
  190 +
  191 +
184 </jaxb:bindings> 192 </jaxb:bindings>
185 \ No newline at end of file 193 \ No newline at end of file