publication form updates for ISF

This commit is contained in:
brianjlowe 2013-08-06 10:35:13 -04:00
parent 4598aae578
commit cd3ae0d0ad
2 changed files with 17 additions and 16 deletions

View file

@ -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

View file

@ -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;
}