From cd3ae0d0ad77d3f4a811431de33c8a8642a8b41f Mon Sep 17 00:00:00 2001 From: brianjlowe Date: Tue, 6 Aug 2013 10:35:13 -0400 Subject: [PATCH] publication form updates for ISF --- ...ddAuthorsToInformationResourceGenerator.java | 16 ++++++++-------- .../AddPublicationToPersonGenerator.java | 17 +++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java index 55fe1a5a..5d5d8a68 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java @@ -145,28 +145,28 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator return getN3PrefixString() + "?newPerson a foaf:Person ;\n" + "<" + RDFS.label.getURI() + "> ?label .\n" + - "?authorshipUri core:linkedAuthor ?newPerson .\n" + - "?newPerson core:authorInAuthorship ?authorshipUri . "; + "?authorshipUri core:relates ?newPerson .\n" + + "?newPerson core:relatedBy ?authorshipUri . "; } private String getN3ForExistingPerson() { return getN3PrefixString() + - "?authorshipUri core:linkedAuthor ?personUri .\n" + - "?personUri core:authorInAuthorship ?authorshipUri ."; + "?authorshipUri core:relates ?personUri .\n" + + "?personUri core:relatedBy ?authorshipUri ."; } private String getN3NewOrg() { return getN3PrefixString() + "?newOrg a foaf:Organization ;\n" + "<" + RDFS.label.getURI() + "> ?orgName .\n" + - "?authorshipUri core:linkedAuthor ?newOrg .\n" + - "?newOrg core:authorInAuthorship ?authorshipUri . "; + "?authorshipUri core:relates ?newOrg .\n" + + "?newOrg core:relatedBy ?authorshipUri . "; } private String getN3ForExistingOrg() { return getN3PrefixString() + - "?authorshipUri core:linkedAuthor ?orgUri .\n" + - "?orgUri core:authorInAuthorship ?authorshipUri ."; + "?authorshipUri core:relates ?orgUri .\n" + + "?orgUri core:relatedBy ?authorshipUri ."; } /** Get new resources */ //A new authorship uri will always be created when an author is added diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java index 08b373e0..9f338092 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java @@ -197,22 +197,22 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement private String getAuthorshipN3() { return "@prefix core: <" + vivoCore + "> . " + "?authorshipUri a core:Authorship ;" + - "core:linkedAuthor ?person ." + - "?person core:authorInAuthorship ?authorshipUri ."; + "core:relates ?person ." + + "?person core:relatedBy ?authorshipUri ."; } private String getN3ForNewPub() { return "@prefix core: <" + vivoCore + "> ." + "?newPublication a ?pubType ." + "?newPublication <" + label + "> ?title ." + - "?authorshipUri core:linkedInformationResource ?newPublication ." + - "?newPublication core:informationResourceInAuthorship ?authorshipUri ."; + "?authorshipUri core:relates ?newPublication ." + + "?newPublication core:relatedBy ?authorshipUri ."; } private String getN3ForExistingPub() { return "@prefix core: <" + vivoCore + "> ." + - "?authorshipUri core:linkedInformationResource ?pubUri ." + - "?pubUri core:informationResourceInAuthorship ?authorshipUri ."; + "?authorshipUri core:relates ?pubUri ." + + "?pubUri core:relatedBy ?authorshipUri ."; } private String getN3ForNewCollectionNewPub() { @@ -875,8 +875,9 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement String query = "PREFIX core:<" + vivoCore + "> " + "SELECT ?pubUri WHERE { " + - "<" + subject + "> core:authorInAuthorship ?authorshipUri ." + - "?authorshipUri core:linkedInformationResource ?pubUri . }"; + "<" + subject + "> core:relatedBy ?authorshipUri . " + + "?authorship a core:Authorship . " + + "?authorshipUri core:relates ?pubUri . }"; return query; }