1212
1313import org .um .dsi .gavea .orcid .client .exception .OrcidClientException ;
1414import org .um .dsi .gavea .orcid .model .activities .WorkGroup ;
15- import org .um .dsi .gavea .orcid .model .work .ExternalIdentifier ;
15+ import org .um .dsi .gavea .orcid .model .common .ExternalId ;
16+ import org .um .dsi .gavea .orcid .model .common .ExternalIds ;
1617import org .um .dsi .gavea .orcid .model .work .Work ;
17- import org .um .dsi .gavea .orcid .model .work .WorkExternalIdentifiers ;
1818import org .um .dsi .gavea .orcid .model .work .WorkSummary ;
1919
2020import pt .ptcris .exceptions .InvalidWorkException ;
4747 * <p>
4848 * The implementation of the service assumes that the local CRIS communicates
4949 * the local productions following the established ORCID schema, according to
50- * the Member API 2.0rc1 . This uniforms the API and simplifies the
50+ * the Member API 2.0rc2 . This uniforms the API and simplifies the
5151 * synchronization process. The current version focuses on synchronizing
5252 * research productions, which must be encoded as ORCID {@link Work works}.
5353 * </p>
@@ -264,10 +264,10 @@ private static Map<BigInteger, PTCRISyncResult> exportBase(ORCIDClient client, L
264264 // the remote work has spurious external identifiers
265265 if (!update .eidsDiff .more .isEmpty ()) {
266266 Work localWork = update .preWork ;
267- WorkExternalIdentifiers weids = new WorkExternalIdentifiers ();
268- List <ExternalIdentifier > ids = new ArrayList <ExternalIdentifier >(update .eidsDiff .same );
269- weids .setWorkExternalIdentifier (ids );
270- localWork .setExternalIdentifiers (weids );
267+ ExternalIds weids = new ExternalIds ();
268+ List <ExternalId > ids = new ArrayList <ExternalId >(update .eidsDiff .same );
269+ weids .setExternalId (ids );
270+ localWork .setExternalIds (weids );
271271 try {
272272 helper .updateWork (update .posWork .getPutCode (), localWork );
273273 result .put (ORCIDHelper .getActivityLocalKey (localWork ), PTCRISyncResult .OK_UPD_RESULT );
@@ -287,11 +287,11 @@ private static Map<BigInteger, PTCRISyncResult> exportBase(ORCIDClient client, L
287287 UpdateRecord update = toUpdate .get (c );
288288 if (!update .eidsDiff .less .isEmpty () || update .eidsDiff .more .isEmpty ()) {
289289 Work localWork = update .preWork ;
290- WorkExternalIdentifiers weids = new WorkExternalIdentifiers ();
291- List <ExternalIdentifier > ids = new ArrayList <ExternalIdentifier >(update .eidsDiff .same );
290+ ExternalIds weids = new ExternalIds ();
291+ List <ExternalId > ids = new ArrayList <ExternalId >(update .eidsDiff .same );
292292 ids .addAll (update .eidsDiff .less );
293- weids .setWorkExternalIdentifier (ids );
294- localWork .setExternalIdentifiers (weids );
293+ weids .setExternalId (ids );
294+ localWork .setExternalIds (weids );
295295 try {
296296 helper .updateWork (update .posWork .getPutCode (), localWork );
297297 result .put (ORCIDHelper .getActivityLocalKey (localWork ), PTCRISyncResult .OK_UPD_RESULT );
@@ -658,11 +658,11 @@ public static List<Work> importUpdates(ORCIDClient client, List<Work> localWorks
658658 for (Work mathingLocalWork : matchingLocalWorks .keySet ()) {
659659 if (!ORCIDHelper .hasNewIDs (mathingLocalWork , orcidWork )) {
660660 Work workUpdate = ORCIDHelper .clone (mathingLocalWork );
661- WorkExternalIdentifiers weids = new WorkExternalIdentifiers ();
662- List <ExternalIdentifier > neids = new ArrayList <ExternalIdentifier >(matchingLocalWorks .get (mathingLocalWork ).more );
663- weids .setWorkExternalIdentifier (neids );
661+ ExternalIds weids = new ExternalIds ();
662+ List <ExternalId > neids = new ArrayList <ExternalId >(matchingLocalWorks .get (mathingLocalWork ).more );
663+ weids .setExternalId (neids );
664664 ORCIDHelper .setWorkLocalKey (workUpdate , ORCIDHelper .getActivityLocalKey (mathingLocalWork ));
665- workUpdate .setExternalIdentifiers (weids );
665+ workUpdate .setExternalIds (weids );
666666 workUpdate .setTitle (null );
667667 workUpdate .setType (null );
668668 workUpdate .setPublicationDate (null );
0 commit comments