additional custom form changes to support multiple autocomplete fields
This commit is contained in:
parent
e1cedc156d
commit
07c9c7c066
9 changed files with 355 additions and 103 deletions
|
@ -64,7 +64,7 @@ public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator impleme
|
|||
roleLabelAssertion,
|
||||
presTypeAssertion,
|
||||
presLabelAssertion ) );
|
||||
conf.setN3Optional( Arrays.asList( n3ForConference, n3ForConfLabel, n3ForStart, n3ForEnd ) );
|
||||
conf.setN3Optional( Arrays.asList( n3ForConference, n3ForStart, n3ForEnd ) );
|
||||
|
||||
conf.addNewResource("presentation", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("conference", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
|
@ -178,9 +178,7 @@ public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator impleme
|
|||
final static String n3ForConference =
|
||||
"?conference a <" + conferenceClass + "> . \n" +
|
||||
"?conference <" + includesEventPred + "> ?presentation . \n" +
|
||||
"?presentation <" + eventWithinPred + "> ?conference . ";
|
||||
|
||||
final static String n3ForConfLabel =
|
||||
"?presentation <" + eventWithinPred + "> ?conference . \n" +
|
||||
"?conference <" + label + "> ?conferenceLabel .";
|
||||
|
||||
final static String n3ForStart =
|
||||
|
|
|
@ -145,17 +145,11 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
|
|||
getN3NewPubNameAssertion(),
|
||||
getN3NewPubTypeAssertion(),
|
||||
getN3ForCollection(),
|
||||
getN3CollectionNameAssertion(),
|
||||
getN3ForBook(),
|
||||
getN3BookNameAssertion(),
|
||||
getN3ForConference(),
|
||||
getN3ConferenceNameAssertion(),
|
||||
getN3ForEvent(),
|
||||
getN3EventNameAssertion(),
|
||||
getN3ForEditor(),
|
||||
getN3EditorNameAssertion(),
|
||||
getN3ForPublisher(),
|
||||
getN3PublisherNameAssertion(),
|
||||
getN3ForLocaleAssertion(),
|
||||
getN3ForVolumeAssertion(),
|
||||
getN3ForNumberAssertion(),
|
||||
|
@ -205,66 +199,48 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
|
|||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri vivo:hasPublicationVenue ?collectionUri . \n" +
|
||||
"?collectionUri a <" + collectionClass + "> . \n" +
|
||||
"?collectionUri vivo:publicationVenueFor ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3CollectionNameAssertion() {
|
||||
return "?collectionUri <" + label + "> ?collection .";
|
||||
"?collectionUri vivo:publicationVenueFor ?pubUri . \n" +
|
||||
"?collectionUri <" + label + "> ?collection .";
|
||||
}
|
||||
|
||||
private String getN3ForBook() {
|
||||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri vivo:hasPublicationVenue ?bookUri . \n" +
|
||||
"?bookUri a <" + bookClass + "> . \n" +
|
||||
"?bookUri vivo:publicationVenueFor ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3BookNameAssertion() {
|
||||
return "?bookUri <" + label + "> ?book .";
|
||||
"?bookUri vivo:publicationVenueFor ?pubUri . \n " +
|
||||
"?bookUri <" + label + "> ?book .";
|
||||
}
|
||||
|
||||
private String getN3ForConference() {
|
||||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri <" + presentedAtPred + "> ?conferenceUri . \n" +
|
||||
"?conferenceUri a <" + conferenceClass + "> . \n" +
|
||||
"?conferenceUri vivo:includesEvent ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3ConferenceNameAssertion() {
|
||||
return "?conferenceUri <" + label + "> ?conference .";
|
||||
"?conferenceUri vivo:includesEvent ?pubUri . \n" +
|
||||
"?conferenceUri <" + label + "> ?conference .";
|
||||
}
|
||||
|
||||
private String getN3ForEvent() {
|
||||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri vivo:proceedingsOf ?eventUri . \n" +
|
||||
"?eventUri a <" + conferenceClass + "> . \n" +
|
||||
"?eventUri vivo:hasProceedings ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3EventNameAssertion() {
|
||||
return "?eventUri <" + label + "> ?event .";
|
||||
"?eventUri vivo:hasProceedings ?pubUri . \n" +
|
||||
"?eventUri <" + label + "> ?event .";
|
||||
}
|
||||
|
||||
private String getN3ForEditor() {
|
||||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri vivo:editor ?editorUri . \n" +
|
||||
"?editorUri a <" + editorClass + "> . \n" +
|
||||
"?editorUri vivo:editorOf ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3EditorNameAssertion() {
|
||||
return "?editorUri <" + label + "> ?editor .";
|
||||
"?editorUri vivo:editorOf ?pubUri . \n" +
|
||||
"?editorUri <" + label + "> ?editor .";
|
||||
}
|
||||
|
||||
private String getN3ForPublisher() {
|
||||
return "@prefix vivo: <" + vivoCore + "> . \n" +
|
||||
"?pubUri vivo:publisher ?publisherUri . \n" +
|
||||
"?publisherUri a <" + publisherClass + "> . \n" +
|
||||
"?publisherUri vivo:publisherOf ?pubUri . ";
|
||||
}
|
||||
|
||||
private String getN3PublisherNameAssertion() {
|
||||
return "?publisherUri <" + label + "> ?publisher .";
|
||||
"?publisherUri vivo:publisherOf ?pubUri . \n" +
|
||||
"?publisherUri <" + label + "> ?publisher .";
|
||||
}
|
||||
|
||||
private String getN3ForLocaleAssertion() {
|
||||
|
@ -351,6 +327,12 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
|
|||
//activity label and role label are literals on form
|
||||
List<String> literalsOnForm = new ArrayList<String>();
|
||||
literalsOnForm.add("title");
|
||||
literalsOnForm.add("collection");
|
||||
literalsOnForm.add("book");
|
||||
literalsOnForm.add("conference");
|
||||
literalsOnForm.add("event");
|
||||
literalsOnForm.add("editor");
|
||||
literalsOnForm.add("publisher");
|
||||
literalsOnForm.add("locale");
|
||||
literalsOnForm.add("volume");
|
||||
literalsOnForm.add("number");
|
||||
|
|
|
@ -69,7 +69,6 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
|
|||
n3ForAwardToReceipt,
|
||||
descriptionAssertion,
|
||||
n3ForOrgAssertion,
|
||||
orgLabelAssertion,
|
||||
awardLabelAssertion,
|
||||
n3ForYearAwarded,
|
||||
n3ForStart,
|
||||
|
@ -200,11 +199,9 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
|
|||
"?awardReceipt <"+ descriptionPred +"> ?description .";
|
||||
|
||||
final static String n3ForOrgAssertion =
|
||||
"?awardReceipt <" + awardConferredByPred +"> ?org . \n" +
|
||||
"?award <" + awardConferredByPred +"> ?org . \n" +
|
||||
"?org a <" + orgClass + "> . \n" +
|
||||
"?org <" + awardConferredPred + "> ?awardReceipt .";
|
||||
|
||||
final static String orgLabelAssertion =
|
||||
"?org <" + awardConferredPred + "> ?award . \n" +
|
||||
"?org <"+ label + "> ?orgLabel .";
|
||||
|
||||
final static String n3ForYearAwarded =
|
||||
|
@ -238,8 +235,8 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
|
|||
|
||||
final static String orgQuery =
|
||||
"SELECT ?existingOrg WHERE { \n" +
|
||||
" ?awardReceipt <" + awardConferredByPred + "> ?existingOrg . \n" +
|
||||
" ?existingOrg <" + awardConferredPred + "> ?awardReceipt . }";
|
||||
" ?award <" + awardConferredByPred + "> ?existingOrg . \n" +
|
||||
" ?existingOrg <" + awardConferredPred + "> ?award . }";
|
||||
|
||||
final static String awardReceiptLabelQuery =
|
||||
"SELECT ?existingAwardReceiptLabel WHERE { \n" +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue