diff --git a/build.xml b/build.xml index 2100f27f..c19a9b9a 100644 --- a/build.xml +++ b/build.xml @@ -72,6 +72,7 @@ + diff --git a/doc/install.html b/doc/install.html index 33423d77..7740fd0f 100644 --- a/doc/install.html +++ b/doc/install.html @@ -316,18 +316,35 @@ /usr/local/vivo/home + + + Languages (in addition to American English) that will be built into your + VIVO site. The languages must be found in the + languages directory of the VIVO distribution. + See + the VIVO Wiki for more information. + + + + + languages.addToBuild + + + es_MX + +

5. Specify runtime properties

- In Step 4, you defined the location of the Vitro home directory, + In Step 4, you defined the location of the VIVO home directory, by specifying vitro.home in the build.properties file. Create that directory now.

At the top level of the VIVO distribution directory, you will find a file called - example.runtime.properties. Copy this to the Vitro home directory you have created, + example.runtime.properties. Copy this to the VIVO home directory you have created, renaming the copy to runtime.properties. Edit the file to suit your installation, as described in the following table.

diff --git a/doc/upgrade-1.6.html b/doc/upgrade-1.6.html index 39a6e0f3..b6ef4ecd 100644 --- a/doc/upgrade-1.6.html +++ b/doc/upgrade-1.6.html @@ -49,6 +49,8 @@
  • Multiple foaf:Person Profile Pages
  • Home Page Re-design
  • Auto-loaded RDF files move to the Home directory
  • +
  • Support for additional languages
  • +
  • More compact responses to Linked data requests
  • ANYTHING ELSE?
  • @@ -334,8 +336,9 @@ rdf/tbox/filegraph/tbox/vivo-foaf-1.5.owl rdf/tbox/filegraph/tbox/vivo-pws-1.5.owl rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl

    - If you are using a three-tier build process, you will need to add a single line - to the build script so the RDF files will be merged properly across the tiers. So this: + If you are using a three-tier build process, you will need to add two lines + to the build script to accomodate the RDF files, and the language support (see below) + So this:

    <patternset id="appbase.patterns">
     <include name="src/**/*" />
     <include name="lib/**/*" />
    @@ -352,6 +355,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl
    <include name="src/**/*" /> <include name="lib/**/*" /> <include name="rdf/**/*" /> +<include name="languages/**/*" /> <include name="test/**/*" /> <include name="themes/**/*" /> <include name="config/*.properties" /> @@ -362,6 +366,71 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl </patternset>

    +

    Support for additional languages

    +

    + VIVO 1.6 includes limited support for other languages, in addition to American English. + This limited support is described as read-only support on public-facing + pages. +

    +

    + Read-only means that there is no provision for editing multi-language + data or displays. Property values, ontology labels, etc. must all be provided in RDF files + and ingested or otherwise inserted into the data model. The Page Management user interface + does not support maintaining pages in multiple languages. +

    +

    + Public-facing means that most of the pages used for site adminstration + are only presented in American English. +

    +

    + These two pages in the VIVO Wiki describe how to + + Build VIVO with multiple languages and how to + + Add a new language to VIVO. +

    + +

    More compact responses to Linked data requests

    +

    + In VIVO 1.6, the response to requests for linked data is changed, to be smaller and faster. +

    +

    + When responding to a request for linked data about an individual, VIVO 1.6 returns: +

      +
    • Data properties of the individual
    • +
    • Object relationships to and from the individual
    • +
    • The RDF types and RDFS labels for any object that directly relates to the individual
    • +
    + This data is filtered by the usual VIVO privacy policies, + so properties such as salary or employee ID number may not be revealed + unless the requester has been properly authenticated. +

    +

    + VIVO releases prior to VIVO 1.6 returned a more complex set of statements, + referred to as "extended linked data": +

      +
    • Data properties of the individual
    • +
    • Object relationships from the individual
    • +
    • All properties of the context nodes (positions, roles, etc.) that are associated with the individual.
    • +
    • Labels of objects that are joined to the individual through context nodes.
    • +
    • Full details of time intervals that are attached to context nodes: start, end, precision.
    • +
    + As above, this data was filtered by the VIVO privacy policies. + Although these additional items were included, + extended linked data was based only on relationships from the individual. + Relationships to the individual were not included. +

    +

    + Extended linked data was costly to produce, in terms of resources, + because it required a recursive search of the data model. + Extended linked data typically contained 50% more information than its non-extended equivalent, + and took more than 10 times as long to produce. +

    +

    + VIVO release 1.6 can be configured to produce extended linked data like previous releases. + However, extended linked data will not be supported in future releases. +

    +

    ANYTHING ELSE?

    @@ -394,7 +463,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl -

    III. Upgrade Instructions

    +

    III. Upgrade Instructions

    1. Download the new distribution file and unpack it into a new @@ -402,9 +471,9 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl

    2. Separate your existing deploy.properties file into two files, - as described below. The new build.properties file is stored in - the top level of the VIVO distribution directory. The new runtime.properties - file is stored in your Vitro home directory. + as described below. Store the new build.properties file in + the top level of the VIVO distribution directory. Store the new runtime.properties + file in your VIVO home directory.

    @@ -441,9 +510,48 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl

    If you prefer, you may start with example.build.properties and example.runtime.properties, make copies, - and edit them to suit your installation. + and edit them to suit your installation. Remember, the runtime.properties file + goes into your VIVO home directory.

    +

    + The properties below are new to build.properties. They are optional, + so you need not add them unless you want a value other than the default. +

    +

    + +

    +
    + + + + + + + + + + + + + + +
    + Property Name + + Example Value +
    + Languages (in addition to American English) that will be built into your + VIVO site. The languages must be found in the + languages directory of the VIVO distribution. + See + the VIVO Wiki for more information. +
    + languages.addToBuild + + es_MX +
    +

    The properties below are new to runtime.properties. They are optional, so you need not add them, unless you want a value other than the default. @@ -550,7 +658,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl - developer.defeatI18nCache = true + developer.defeatI18nCache false @@ -568,7 +676,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl - developer.insertFreemarkerDelimiters = true + developer.insertFreemarkerDelimiters false @@ -583,7 +691,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl - homePage.geoFocusMaps = enabled + homePage.geoFocusMaps enabled @@ -603,13 +711,35 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl - MultiViews.profilePageTypes=disabled + MultiViews.profilePageTypes disabled + + + Setting this property causes VIVO 1.6 to produce extended responses to requests + for linked data. This provides compatibility with earlier releases. + The default is false. +
    + Extended linked data is costly, in terms of server resource. Typically, extended + linke data contains 50% more information than its non-extended equivalent, and + takes 10 times as long to produce. +
    + Extended linked data will not be supported in future releases of VIVO. + + + + + serveExtendedLinkedData + + + true + + + diff --git a/example.build.properties b/example.build.properties index 16c2b598..64fb99f2 100644 --- a/example.build.properties +++ b/example.build.properties @@ -37,3 +37,10 @@ webapp.name = vivo # This includes uploaded files (usually images) and the search index. # vitro.home = /usr/local/vivo/home + +# +# Additional languages to be built into your VIVO site. The locales specified +# here must appear as sub-directories of [vivo]/languages in the distribution. +# Find more information on the VIVO Wiki (https://wiki.duraspace.org/display/VIVO). +# +#languages.addToBuild = diff --git a/rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 b/languages/example/rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 similarity index 100% rename from rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 rename to languages/example/rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 diff --git a/rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 b/languages/example/rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 similarity index 100% rename from rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 rename to languages/example/rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 diff --git a/rdf/display/everytime/aboutPage_es.n3 b/languages/example/rdf/display/firsttime/aboutPage_es.n3 similarity index 100% rename from rdf/display/everytime/aboutPage_es.n3 rename to languages/example/rdf/display/firsttime/aboutPage_es.n3 diff --git a/rdf/display/everytime/menu_es.n3 b/languages/example/rdf/display/firsttime/menu_es.n3 similarity index 100% rename from rdf/display/everytime/menu_es.n3 rename to languages/example/rdf/display/firsttime/menu_es.n3 diff --git a/rdf/tbox/firsttime/vivo-core-1.5-labels_es.n3 b/languages/example/rdf/tbox/firsttime/vivo-core-1.5-labels_es.n3 similarity index 100% rename from rdf/tbox/firsttime/vivo-core-1.5-labels_es.n3 rename to languages/example/rdf/tbox/firsttime/vivo-core-1.5-labels_es.n3 diff --git a/productMods/templates/freemarker/visualization/mapOfScience/aboutMapOfScience_es.ftl b/languages/example/templates/freemarker/aboutMapOfScience_es.ftl similarity index 100% rename from productMods/templates/freemarker/visualization/mapOfScience/aboutMapOfScience_es.ftl rename to languages/example/templates/freemarker/aboutMapOfScience_es.ftl diff --git a/productMods/templates/freemarker/body/aboutQrCodes_es.ftl b/languages/example/templates/freemarker/aboutQrCodes_es.ftl similarity index 100% rename from productMods/templates/freemarker/body/aboutQrCodes_es.ftl rename to languages/example/templates/freemarker/aboutQrCodes_es.ftl diff --git a/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceTooltips_es.ftl b/languages/example/templates/freemarker/mapOfScienceTooltips_es.ftl similarity index 100% rename from productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceTooltips_es.ftl rename to languages/example/templates/freemarker/mapOfScienceTooltips_es.ftl diff --git a/themes/wilma/i18n/all_es.properties b/languages/example/themes/wilma/i18n/all_es.properties similarity index 97% rename from themes/wilma/i18n/all_es.properties rename to languages/example/themes/wilma/i18n/all_es.properties index e4bffa47..e8641a38 100644 --- a/themes/wilma/i18n/all_es.properties +++ b/languages/example/themes/wilma/i18n/all_es.properties @@ -486,16 +486,14 @@ academic_studies_or_other = Otros estudios académicos o de formación edit_mailing_address = Editar Dirección postal create_mailing_address = Cree Dirección postal mailing_address_for = dirección postal -select_a_country = Por favor, seleccione un país. -enter_address1_value = Por favor, introduzca un valor en el campo Dirección Línea 1. -enter_a_city = Por favor, introduzca un valor en el campo Ciudad. +enter_a_country = Por favor, introduzca un valor en el campo País. +enter_street_address = Por favor, introduzca un valor en el campo Dirección. +enter_a_locality = Por favor, introduzca un valor en el campo Ciudad/Localidad. enter_postal_code = Por favor, introduzca un valor en el campo Código Postal. country = País -street_Address1 = Dirección 1 -street_Address2 = Dirección 2 -street_Address3 = Dirección 3 -city = Ciudad -state = Estado +street_address = Dirección +city_locality = Ciudad/Localidad +region = Estado/Provincia/Región postal_code = Código Postal posn_entry_for = entrada de la posición de @@ -721,7 +719,6 @@ researchers_in = investigadores en no_faculty_found = No hay miembros de la facultad encontrados. placeholder_image = imagen de marcador de posición view_all_departments = ver todos los departamentos académicos -view_all_faculty = ver todos los profesores no_departments_found = No hay departamentos académicos encontrados. # @@ -768,7 +765,6 @@ no_matching_entities_found = No hay entidades que coincidan encontrados clear_search_query = claro consulta de búsqueda short_max_entity_note = Un máximo de 10 entidades se pueden comparar. information_capitalized = Información -entity_type = Del tipo de entidad content_requires_flash = Este contenido requiere Adobe Flash Player. get_flash = Obtener Flash of_pubs = de los pubs. @@ -815,4 +811,14 @@ local_research = Investigación Local selected_presentation = Presentación Seleccionado event_capitalized = Evento collection_capitalized = Colección -item_capitalized = Artículo \ No newline at end of file +item_capitalized = Artículo +telephone_number_for = número de teléfono para +telephone_number = Número de Teléfono +enter_telephone_number = Por favor, introduzca un valor en el campo Número de teléfono. +email_address = Dirección de Correo Electrónico +email_address_for = dirección de correo electrónico para +enter_email_address = Por favor, introduzca un valor en el campo Dirección de Correo Electrónico. +full_name = Nombre y apellidos +full_name_for = nombre y apellidos para +first_name = Primer nombre +last_name = Apellido \ No newline at end of file diff --git a/themes/wilma/i18n/images/select_locale_es_ES.GIF b/languages/example/themes/wilma/i18n/images/select_locale_es_ES.GIF similarity index 100% rename from themes/wilma/i18n/images/select_locale_es_ES.GIF rename to languages/example/themes/wilma/i18n/images/select_locale_es_ES.GIF diff --git a/productMods/WEB-INF/filegraph/tbox/ConceptSemanticType.owl b/productMods/WEB-INF/filegraph/tbox/ConceptSemanticType.owl deleted file mode 100644 index 04ab3d10..00000000 --- a/productMods/WEB-INF/filegraph/tbox/ConceptSemanticType.owl +++ /dev/null @@ -1,47 +0,0 @@ - - - 0.7 - - - - Semantic Type for given concept, for example UMLS's type returned for concepts - Semantic Type for given concept, for example UMLS's type returned for concepts. - - Concept Semantic Type - - - - - - - - diff --git a/productMods/WEB-INF/ontologies/update/askUpdated.sparql b/productMods/WEB-INF/ontologies/update/askUpdated.sparql index a9a17942..024bfb78 100644 --- a/productMods/WEB-INF/ontologies/update/askUpdated.sparql +++ b/productMods/WEB-INF/ontologies/update/askUpdated.sparql @@ -3,9 +3,6 @@ PREFIX owl: PREFIX rdf: ASK { - graph { vitro:updatedToOntology ?u . - ?u vitro:updatedOntology . - ?u vitro:toOntologyVersion "1.5" . - } -} \ No newline at end of file + ?u vitro:toOntologyVersion "1.6" . +} diff --git a/productMods/WEB-INF/ontologies/update/diff.tab.txt b/productMods/WEB-INF/ontologies/update/diff.tab.txt index e69de29b..d946c21b 100644 --- a/productMods/WEB-INF/ontologies/update/diff.tab.txt +++ b/productMods/WEB-INF/ontologies/update/diff.tab.txt @@ -0,0 +1 @@ +http://purl.org/NET/c4dm/event.owl#agent Delete z http://purl.org/NET/c4dm/event.owl#isAgentIn Delete z http://purl.org/NET/c4dm/event.owl#produced_in http://purl.obolibrary.org/obo/RO_0002353 Yes z http://purl.org/NET/c4dm/event.owl#product http://purl.obolibrary.org/obo/RO_0002234 Yes z http://purl.org/dc/elements/1.1/isVersionOf Delete z http://vivoweb.org/ontology/core#administeredBy Delete complex construct with grant administrator role http://purl.org/dc/terms/contributor Delete z http://purl.org/dc/terms/isReferencedBy Delete z http://purl.org/dc/terms/isVersionOf Delete z http://purl.org/dc/terms/publisher http://vivoweb.org/ontology/core#publisher Yes z http://purl.org/ontology/bibo/editor Delete z http://vivoweb.org/ontology/core#administers Delete complex construct with grant administrator role http://vivoweb.org/ontology/core#advisee Delete CC - advising relationship plus add advisee role http://vivoweb.org/ontology/core#adviseeIn Delete CC - advising relationship plus add advisee role http://vivoweb.org/ontology/core#advisingContributionTo Delete construct http://vivoweb.org/ontology/core#advisor Delete CC - advising relationship plus add advisor role http://vivoweb.org/ontology/core#advisorIn Delete CC - advising relationship plus add advisor role http://vivoweb.org/ontology/core#affiliatedOrganization Delete construct Relationship node? http://vivoweb.org/ontology/core#associatedRole http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#associatedWithPosition http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#attendeeRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#authorInAuthorship http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#awardConferred http://vivoweb.org/ontology/core#assigns Yes z http://vivoweb.org/ontology/core#awardConferredBy http://vivoweb.org/ontology/core#assignedBy Yes z http://vivoweb.org/ontology/core#awardOrHonor http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#awardOrHonorFor http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#awardsGrant http://vivoweb.org/ontology/core#assigns Yes z http://vivoweb.org/ontology/core#clinicalRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#co-PrincipalInvestigatorRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#courseOfferedBy http://vivoweb.org/ontology/core#offeredBy Yes z http://vivoweb.org/ontology/core#credentialOf http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#currentMemberOf Delete construct MemberRole http://vivoweb.org/ontology/core#currentlyHeadOf Delete construct LeaderRole http://vivoweb.org/ontology/core#currentlyHeadedBy Delete construct LeaderRole http://vivoweb.org/ontology/core#degreeEarned http://purl.obolibrary.org/obo/RO_0002234 Yes z http://vivoweb.org/ontology/core#degreeOfferedBy http://vivoweb.org/ontology/core#offeredBy Yes z http://vivoweb.org/ontology/core#degreeOutcomeOf http://purl.obolibrary.org/obo/RO_0002353 Yes z http://vivoweb.org/ontology/core#domesticGeographicFocus http://vivoweb.org/ontology/core#geographicFocus Yes z http://vivoweb.org/ontology/core#domesticGeographicFocusOf http://vivoweb.org/ontology/core#geographicFocusOf Yes z http://vivoweb.org/ontology/core#editor Delete CC editorship http://vivoweb.org/ontology/core#editorOf Delete CC editorship http://vivoweb.org/ontology/core#editorRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#educationalTraining http://purl.obolibrary.org/obo/RO_0000056 Yes z http://vivoweb.org/ontology/core#educationalTrainingOf http://purl.obolibrary.org/obo/RO_0000057 Yes z http://vivoweb.org/ontology/core#equipmentInFacility http://purl.obolibrary.org/obo/RO_0001025 Yes """located in""" http://vivoweb.org/ontology/core#eventWithin http://purl.obolibrary.org/obo/BFO_0000050 Yes """part of""" http://vivoweb.org/ontology/core#geographicLocationOf http://purl.obolibrary.org/obo/RO_0001015 Yes """location of""" http://vivoweb.org/ontology/core#geographicallyContains http://purl.obolibrary.org/obo/BFO_0000051 Yes """has part""" http://vivoweb.org/ontology/core#geographicallyWithin http://purl.obolibrary.org/obo/BFO_0000050 Yes z http://vivoweb.org/ontology/core#grantAwardedBy http://vivoweb.org/ontology/core#assignedBy Yes z http://vivoweb.org/ontology/core#hasAttendeeRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasAttendeeRoleContext http://vivoweb.org/ontology/core#hasClinicalRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasClinicalRoleContext http://vivoweb.org/ontology/core#hasCo-PrincipalInvestigatorRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasCo-PrincipalInvestigatorRoleContext http://vivoweb.org/ontology/core#hasCollaborator http://vivoweb.org/ontology/core#relatedBy Yes CC construct Relationship http://vivoweb.org/ontology/core#hasCredential http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#hasCurrentMember Delete construct MemberRole http://vivoweb.org/ontology/core#hasEditorRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasEditorRoleContext http://vivoweb.org/ontology/core#hasGeographicLocation http://purl.obolibrary.org/obo/RO_0001025 Yes """located in""" http://vivoweb.org/ontology/core#hasInvestigatorRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasInvestigatorRoleContext http://vivoweb.org/ontology/core#hasLeaderRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasLeaderRoleContext http://vivoweb.org/ontology/core#hasMemberRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasMemberRoleContext http://vivoweb.org/ontology/core#hasOrganizerRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasOrganizerRoleContext http://vivoweb.org/ontology/core#hasOutreachProviderRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasOutreachProviderContext http://vivoweb.org/ontology/core#hasPart http://purl.obolibrary.org/obo/BFO_0000051 Yes z http://vivoweb.org/ontology/core#hasPresenterRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasPresenterRoleContext http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasPrincipalInvestigatorRoleContext http://vivoweb.org/ontology/core#hasResearcherRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasResearcherRoleContext http://vivoweb.org/ontology/core#hasReviewerRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasReviewerRoleContext http://vivoweb.org/ontology/core#hasRole http://purl.obolibrary.org/obo/RO_0000053 Yes z http://vivoweb.org/ontology/core#hasRoom http://purl.obolibrary.org/obo/BFO_0000051 Yes """has part""" http://vivoweb.org/ontology/core#hasServiceProviderRole http://purl.obolibrary.org/obo/RO_0000053 Yes cc:hasServiceProviderRoleContext http://vivoweb.org/ontology/core#hasSubGrant http://purl.obolibrary.org/obo/BFO_0000051 Yes z http://vivoweb.org/ontology/core#hasSubOrganization http://purl.obolibrary.org/obo/BFO_0000051 Yes z http://vivoweb.org/ontology/core#hasTeacherRole http://purl.obolibrary.org/obo/RO_0000053 Yes z http://vivoweb.org/ontology/core#inEventSeries http://purl.obolibrary.org/obo/BFO_0000050 Yes """part of""" http://vivoweb.org/ontology/core#includesEvent http://purl.obolibrary.org/obo/BFO_0000051 Yes z http://vivoweb.org/ontology/core#informationProduct http://purl.obolibrary.org/obo/RO_0002234 Yes z http://vivoweb.org/ontology/core#informationProductOf http://purl.obolibrary.org/obo/RO_0002353 Yes z http://vivoweb.org/ontology/core#informationResourceInAuthorship http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#internationalGeographicFocus http://vivoweb.org/ontology/core#geographicFocus Yes z http://vivoweb.org/ontology/core#internationalGeographicFocusOf http://vivoweb.org/ontology/core#geographicFocusOf Yes z http://vivoweb.org/ontology/core#investigatorRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes """inheres in""" http://vivoweb.org/ontology/core#issuanceOfCredential http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#issuedCredential http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#leaderRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#linkedAuthor http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#linkedInformationResource http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#locationOfEquipment http://purl.obolibrary.org/obo/RO_0001015 Yes z http://vivoweb.org/ontology/core#mailingAddress Delete VCard http://vivoweb.org/ontology/core#mailingAddressFor Delete VCard http://vivoweb.org/ontology/core#memberRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#offersCourse http://vivoweb.org/ontology/core#offers Yes z http://vivoweb.org/ontology/core#offersDegree http://vivoweb.org/ontology/core#offers Yes z http://vivoweb.org/ontology/core#organizationForPosition http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#organizationForTraining http://purl.obolibrary.org/obo/RO_0000056 Yes z http://vivoweb.org/ontology/core#organizerRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#outcome http://purl.obolibrary.org/obo/RO_0002234 Yes z http://vivoweb.org/ontology/core#outcomeOf http://purl.obolibrary.org/obo/RO_0002353 Yes z http://vivoweb.org/ontology/core#outreachProviderRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#partOf http://purl.obolibrary.org/obo/BFO_0000050 Yes z http://vivoweb.org/ontology/core#personInPosition http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#positionForPerson http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#positionInOrganization http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#presenterRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#principalInvestigatorRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#providesService http://vivoweb.org/ontology/core#offers Yes z http://vivoweb.org/ontology/core#realizedRole http://purl.obolibrary.org/obo/BFO_0000055 Yes """realizes""" http://vivoweb.org/ontology/core#receipt http://vivoweb.org/ontology/core#relatedBy Yes z http://vivoweb.org/ontology/core#receiptOf http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#relatedRole http://vivoweb.org/ontology/core#relates Yes z http://vivoweb.org/ontology/core#researcherRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#reviewerRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#roleIn http://purl.obolibrary.org/obo/BFO_0000054 Yes """realized in"" (or delete, since there should be subs?)" http://vivoweb.org/ontology/core#roleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#roleRealizedIn http://purl.obolibrary.org/obo/BFO_0000054 Yes z http://vivoweb.org/ontology/core#roomWithinBuilding http://purl.obolibrary.org/obo/RO_0001025 Yes z http://vivoweb.org/ontology/core#seriesForEvent http://purl.obolibrary.org/obo/BFO_0000051 Yes z http://vivoweb.org/ontology/core#serviceProvidedBy http://vivoweb.org/ontology/core#offeredBy Yes z http://vivoweb.org/ontology/core#serviceProviderRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#subGrantOf http://purl.obolibrary.org/obo/BFO_0000050 Yes z http://vivoweb.org/ontology/core#subOrganizationWithin http://purl.obolibrary.org/obo/BFO_0000050 Yes z http://vivoweb.org/ontology/core#teacherRoleOf http://purl.obolibrary.org/obo/RO_0000052 Yes z http://vivoweb.org/ontology/core#trainingAtOrganization http://purl.obolibrary.org/obo/RO_0000057 Yes z http://vivoweb.org/ontology/core#authorRank http://vivoweb.org/ontology/core#rank Yes z http://vivoweb.org/ontology/core#preferredTitle Delete z http://vivoweb.org/ontology/core#EducationalTraining http://vivoweb.org/ontology/core#EducationalProcess Yes z http://vivoweb.org/ontology/core#ServiceProviderRole http://purl.obolibrary.org/obo/ERO_0000012 Yes z http://vivoweb.org/ontology/core#URLLink http://www.w3.org/2006/vcard/ns#URL Yes z \ No newline at end of file diff --git a/productMods/WEB-INF/ontologies/update/oldAnnotations/geopolitical-ver1.1-11-18-11-annotations.rdf b/productMods/WEB-INF/ontologies/update/oldAnnotations/geopolitical-ver1.1-11-18-11-annotations.rdf new file mode 100644 index 00000000..82cbce85 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/oldAnnotations/geopolitical-ver1.1-11-18-11-annotations.rdf @@ -0,0 +1,562 @@ + + + hasCoordinate + + + + + + + nameShortFR + + + disputed + -1 + -1 + + + + + -1 + + -1 + area + + + + agriculturalAreaNotes + + + + + + nameListZH + + + + + nameListES + + + + codeFAOTERM + + + + + + + nameListAR + + + populationYear + + + + + + + codeCurrency + + + + nationalityES + + + + nameOfficialRU + + + + + economic_region + -1 + -1 + + + + + codeUNDP + + + + + + + -1 + non_self_governing + -1 + + + + nameShortES + + + + isPredecessorOf + + true + + + + GDPTotalInCurrentPrices + + + + + hasMaxLatitude + + + + + hasStatistics + + + + + other + -1 + -1 + + + + + hasCurrency + + + + + + + GDP + + + + + landArea + + + nameListIT + + + + + countryAreaNotes + + + + + populationUnit + + + + + + + nameCurrencyRU + + + + true + hasBorderWith + + + + landAreaUnit + + + + + + nationalityAR + + + + geo + geopolitical.owl + + + nameCurrencyEN + + + + + + + nameOfficialAR + + + validSince + + + + + isInGroup + true + + + + + + nameListEN + + + + hasCode + + + + + + nameListFR + + + + countryAreaYear + + + + + organization + -1 + -1 + + + + + hasShortName + + + + + codeGAUL + + + + + + + nameListRU + + + populationNotes + + + + + hasMinLongitude + + + + + + nameShortAR + + + + validUntil + + + + + hasMember + true + + + + + hasMinLatitude + + + + + GDPYear + + + + + agriculturalAreaYear + + + + + nameOfficialEN + + + + + -1 + + + -1 + territory + + + agriculturalArea + + + + + nameCurrencyAR + + + + + + + nameOfficialZH + + + GDPNotes + + + + + nationalityZH + + + + + nameOfficialES + + + + + populationTotal + + + + + + + population + + + nationalityFR + + + + + nameCurrencyZH + + + + + + + nameOfficialIT + + + landAreaYear + + + + + + + nationalityIT + + + group + -1 + -1 + + + + + + + nameShortEN + + + + nameCurrencyIT + + + + hasListName + + + + + agriculturalAreaTotal + + + + + landAreaNotes + + + + + hasMaxLongitude + + + + + nameShortRU + + + + + + nationalityEN + + + + + codeISO3 + + + + special_group + -1 + -1 + + + + + countryAreaUnit + + + + + hasOfficialName + + + + + codeDBPediaID + + + + + countryArea + + + + + + nameShortIT + + + + + codeFAOSTAT + + + + nameCurrencyFR + + + + + GDPUnit + + + + + + codeAGROVOC + + + + hasNationality + + + + + nameShortZH + + + + + true + isSuccessorOf + + + + + nameCurrencyES + + + + + countryAreaTotal + + + + + agriculturalAreaUnit + + + + + Transnational Region + + -1 + + + -1 + + + codeISO2 + + + + + + nameOfficialFR + + + + + + nationalityRU + + + + -1 + -1 + self_governing + + + + + codeUN + + + + true + isAdministeredBy + + + + + landAreaTotal + + + + diff --git a/productMods/WEB-INF/ontologies/update/oldAnnotations/isDefinedBy-1.5-annotations.rdf b/productMods/WEB-INF/ontologies/update/oldAnnotations/isDefinedBy-1.5-annotations.rdf new file mode 100644 index 00000000..27938d1f --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/oldAnnotations/isDefinedBy-1.5-annotations.rdf @@ -0,0 +1,33 @@ + + + is defined by + true + + + + + diff --git a/productMods/WEB-INF/ontologies/update/oldAnnotations/scires-1.5-annotations.rdf b/productMods/WEB-INF/ontologies/update/oldAnnotations/scires-1.5-annotations.rdf new file mode 100644 index 00000000..4eda8a12 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/oldAnnotations/scires-1.5-annotations.rdf @@ -0,0 +1,267 @@ + + + Research Resources (eagle-i) + ero + + + Biological Specimen + -1 + -1 + + + + + + study population count + 20 + + + + + + documentation for + true + + + + + + Protocol + + + -1 + 15 + + + + Phase 4 Clinical Trial + 4 + + + -1 + + + + access provided by + true + + + + + Scientific Research + scires + + + Human Study + + -1 + + -1 + + + + Phase 2 Clinical Trial + 5 + + + -1 + + + + Storage Service + + + + 20 + -1 + + + National Clinical Trials (NCT) number + 1 + + 4 + + ClinicalTrials.gov registry number + + + + has documentation + true + + + + + + Production Service + + -1 + + + 20 + + + realizes protocol + true + + + + + Reagent + -1 + -1 + + + + + + Phase 1 Clinical Trial + + 4 + + + -1 + + + Organism + -1 + -1 + + + + + + Clinical Trial + -1 + 1 + + + + + Institutional Review Board (IRB) number + + Institutional Review Board (IRB) number for a Clinical Trial + + + + + Phase 3 Clinical Trial + + + -1 + -1 + + + + Instrument + + + -1 + + 10 + + + provides access to + true + + + + + Phase 0 Clinical Trial + + + -1 + + 6 + + + Research Project + -1 + + -1 + + + + + protocol realized by + true + + + + + Access Service + 20 + + + + -1 + + diff --git a/productMods/WEB-INF/ontologies/update/oldAnnotations/vitro-0.7-annotations.rdf b/productMods/WEB-INF/ontologies/update/oldAnnotations/vitro-0.7-annotations.rdf new file mode 100644 index 00000000..3f9f1cdc --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/oldAnnotations/vitro-0.7-annotations.rdf @@ -0,0 +1,14 @@ + + + + + moniker (deprecated) + 3 + 100 + This property is deprecated. + + diff --git a/productMods/WEB-INF/ontologies/update/oldAnnotations/vivo-core-1.5-annotations.rdf b/productMods/WEB-INF/ontologies/update/oldAnnotations/vivo-core-1.5-annotations.rdf new file mode 100644 index 00000000..88df4862 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/oldAnnotations/vivo-core-1.5-annotations.rdf @@ -0,0 +1,7018 @@ + + + PubMed Central ID + + + + + + sub grant of + 1 + + 5 + + true + + true + + + NIH Manuscript Submission System ID + + + + + + produced in + + + true + 5 + + + Note + -1 + + -1 + + + + offered by + + + + true + 5 + 4 + + + is this person a corresponding author? + 60 + 1 + + + Indicates whether the author handles correspondence about the work and is in effect the guarantor of the published work. The response is either 'true' or 'false' (without the quotes). + + + + date/time value + false + + 5 + 5 + + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.DateTimeValueFormGenerator + true + + + Academic Term + + + -1 + -1 + + + Case Study + + -1 + + + -1 + + + section + + + + A section number + + + Seminar Series + + + -1 + + -1 + + + supplemental information + + + Allows for the entry of additional information, such as additional information describing educational background. + + 3 + 40 + + + populationYear + + + + + isReferencedBy + isReferencedBy + true + + A related resource that references, cites, or otherwise points to the described resource. This relates a resource to the resource that cited it. + true + + + + + nationalityES + + + + + interviewer + interviewer + true + + + + true + An agent that interview another agent. + + + chapter + + + + A chapter number. NOT to be used for the chapter title, which should be entered in the "name" field instead (the field in bold at the top of the page) + 50 + + + Student + + + -1 + -1 + + + codeUNDP + + + + + non_self_governing + + + -1 + -1 + + + relevant activity + true + + + Relates an organization to a specific award receipt or distinction it has conferred + true + award or honor given + 72 + 5 + + + + FOAF + foaf + + + assignee for + true + + 5 + + true + 5 + + + Company + 2 + + 2 + + + + + GDPTotalInCurrentPrices + + + + + hasMaxLatitude + + + + + Date/Time Interval + + + true + 4 + 4 + + + Non-Academic Position + + -1 + -1 + + true + + + other + + + -1 + -1 + + + sici + + + The Serial Item and Contribution Identifier (SICI) is a code (ANSI/NISO standard Z39.56) used to uniquely identify specific volumes, articles or other identifiable parts of a periodical. + + + + Licensure + + + 5 + 5 + + + + place of publication + + + City in which the publication was done. + + 1 + 55 + + + address line 1 + + + + 10 + + + offers degree + offers degree + This relates an organization to the academic degrees offered. + + 5 + + 60 + true + + + + collaborator + 5 + Use for a simple assertion that a person or organization is your collaborator; to describe the relationship in more detail enter a role for each collaborator in some common endeavor. + true + + + 60 + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator + + + + Patent + + -1 + + + -1 + + + Government Agency + -1 + + + + -1 + + + narrower term + true + narrower term + true + This relates a term that is narrower in meaning (i.e. more specific) to another term that is broader in meaning, where the scope (meaning) of narrower term falls completely within the scope of the broader term. + 50 + + + 5 + + + co-principal investigator role of + 50 + + + + 5 + true + + + affliliated organization + + + 40 + true + 5 + true + + + + SKOS (Simple Knowledge Organization System) + skos + + + geopolitical.owl + geo + + + based_near + A location that something is based near, for some broadly human notion of near. + + true + + true + based_near + + + + Screenplay + + + -1 + -1 + + + License + + 5 + + + 5 + + + product + + + true + 5 + + + nameOfficialAR + + + + + validSince + + + + + administered by + Relates the grant to the organization that administers the grant. This is normally the department of the principal investigator. + + + true + administered by + + true + + + Person + + individual--foaf-person.ftl + + + -1 + -1 + + + isInGroup + + + true + + + Editorial Article + + + + -1 + -1 + + + start page + + + Starting page number within a continuous page range. + + 40 + 1 + + + ORCID id + 10 + + 2 + + + ORCID (Open Researcher and Contributor ID) is a proposed nonproprietary alphanumeric code that would uniquely identify scientific and other academic authors. + + + has facility + true + 5 + true + has facility + + + + This relates something to a facility that it owns or runs. + + + publisher + true + + + An entity responsible for making the resource available. + + true + publisher + + + nameListFR + + + + + true + desc + + 15 + 20 + awards and honors + + awards and distinctions + This relates a person to an award or honor that they received. + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAwardOrHonorGenerator + + true + + + countryAreaYear + + + + + organization + + + -1 + -1 + + + Slideshow + -1 + + + -1 + + + report identifier + 1 + 20 + + + + Unique identifier for a Report (a type of information resource). + + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorRoleToPersonGenerator + 2 + + + 5 + + true + true + use this property to record editorial management or oversight responsibilities for a collection or a series such as a journal. + collection or series editor for + + + equipment for + + 5 + This relates equipment to the organization that owns the equipment. + true + equipment for + + true + + + + geographic focus + true + 70 + + 5 + true + + + + + codeGAUL + + + + + name prefix + + 1 + + A title placed before a person's name. + 32 + + + + Dublin Core elements + dcelem + + + attended + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator + 5 + + true + true + + 1 + + + hasMinLongitude + + + + + nameShortAR + + + + + Bibliographic Information Source + + 5 + 5 + + + + Academic Department + + + -1 + + -1 + + + Manuscript + + + -1 + -1 + + + ISI researcher id + 2 + + The identification number given to the profile created by a researcher in ResearcherID (http://isiwebofknowledge.com/researcherid/). + + 20 + + + + Presentation + + + + -1 + -1 + + + has part + 99 + true + + + true + has part + 5 + + + published in + 5 + + + 60 + + true + true + + + Non-Faculty Academic + + + + -1 + -1 + + + Excerpt + -1 + -1 + + + + + + 40 + true + 5 + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAdvisingRelationshipGenerator + advisees + true + true + + + + + annotates + + true + annotates + + Critical or explanatory note for a Document. + true + + + + Subnational Region + -1 + -1 + + + + + territory + -1 + + + -1 + + + Grant + + + + -1 + -1 + + + Score + + + -1 + -1 + + + nameOfficialZH + + + + + reversedBy + reversedBy + + true + + true + + A legal decision that reverses a ruling. This relates the legal decision to the legal decision that reversed it. + + + major field of degree + + + 50 + Major subject focus of the degree being described in an educational background. + + 3 + + + isVersionOf + + true + 30 + + isVersionOf + true + + + + GDPNotes + + + + + receipts + + + true + 5 + + + nameOfficialES + + + + + research area of + true + + 10 + + + 5 + true + + + populationTotal + + + + + upc + + + The Universal Product Code (UPC) is a barcode symbology (i.e., a specific type of barcode), that is widely used in Canada and the United States for tracking trade items in stores. + + + + The core:webpage relates to an intermediate node (of type core:URLLink) that allows specifying the homepage URL as a literal, as well as a human-readable label ("anchor text") for the link. + 5 + + webpage + + true + 40 + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator + true + webpage + + + Faculty Member + -1 + -1 + + + + + + nationalityFR + + + + + hide from display + + + 100 + + + concept for + + true + + true + 5 + 20 + + + nameOfficialIT + + + + + role in + + + true + 5 + + + Competition + + + -1 + -1 + + + + reproduces + 5 + true + + + + 60 + + + investigator on + true + + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator + 60 + + 5 + + + Faculty Member Emeritus + + + + -1 + -1 + + + Video + + + + -1 + -1 + + + Issue + + -1 + + -1 + + + + issued + 5 + 8 + + + Research Proposal + + + + -1 + -1 + + + File + + + -1 + -1 + + + director + + + This relates an entity to a Film director. + true + director + + true + + + Academic Year + + + -1 + -1 + + + + This relates an award or honor to the person who received the award or honor. + + award or distinction for + true + award or honor for + 20 + true + 5 + + + + nameShortRU + + + + + room within building + Relates a room to the building that contains the room. + true + true + building + 5 + + + + + + Course + -1 + -1 + + + + + + Event Ontology + event + + + Vitro internals + + + codeISO3 + + + + + Magazine + + -1 + -1 + + + + moniker (deprecated) + + + 3 + 100 + + + Address + + -1 + + -1 + + + + Librarian Position + + -1 + + -1 + true + + + address line 2 + + + + 10 + + + nameShortIT + + + + + Internship + + + 10 + 10 + + + codeFAOSTAT + + + + + Attendee Role + + + true + -1 + -1 + + + Relates a component of something to the whole thing. + 99 + + part of + + + part of + 5 + true + true + + + geographic location of + + 5 + 60 + This relates a geographic location to something within that geographic location, for example, an organization within that geographic location. + + + true + nearestGeographicLocationFor + + + Editor Role + + + 2 + 2 + + + News Release + + + + -1 + -1 + + + 5 + true + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddHeadOfRoleToPersonGenerator + + true + 30 + head of + + + + codeISO2 + + + + + nameOfficialFR + + + + + equipmentInFacility + Relates the equipment to the facility that contains that equipment. + true + + true + 5 + 40 + in facility + + + + + Library of Congress Control Number (LCCN) + + The Library of Congress Control Number or LCCN is a serially based system of numbering cataloging records in the Library of Congress in the United States. + + + + + Authorship + + true + + -1 + -1 + + + Workshop + + + + -1 + -1 + + + address line 3 + + + + 10 + + + co-principal investigator on + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator + 5 + true + true + + 50 + + + + false + defaultLinkForm.jsp + true + + + contributes to + + + true + 5 + + + PubMed Identifier + 10 + 1 + A PMID (PubMed Identifier or PubMed Unique Identifier) is a unique number assigned to each PubMed citation of life sciences and biomedical scientific journal articles. + + + + + + Group + -1 + -1 + + + + + + Film + -1 + + -1 + + + + + Consortium + -1 + + + + -1 + + + provided by + + true + 5 + 10 + true + + Links a service to the provider of the service. + serviceProvidedBy + + + + Chapter + + + -1 + + -1 + + + Periodical + -1 + -1 + + + + + Committee + + + -1 + + -1 + + + disputed + + + -1 + -1 + + + Standard + + -1 + + -1 + + + Legal Document + + -1 + -1 + + + + direct costs + 1 + 61 + + + + This is the cost associated with the grant activity, and should not include any indirect cost associated with administering the grant. + + + supported by + 5 + + + relevant organization + 15 + true + 21 + award conferred by + + Indicates the organization conferring the award -- perhaps different from the sponsor of the award + + true + + + + nameListES + + + + + Continent + -1 + + + + -1 + + + postal code + A code of letters and digits added to a postal address to aid in the sorting of mail. + + + 1 + 50 + + + + Core Laboratory + + + + -1 + -1 + + + relation + A related resource. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system. + + true + relation + true + + + + + US Postal Address + -1 + + + -1 + + + + related role + + true + + true + 5 + + + + + broader term + broader term + true + This relates a term that is broader in meaning (i.e. more general) to another term that is narrower in meaning, where the scope (meaning) of narrower term falls completely within the scope of the broader term. + + + 50 + 5 + true + + + Leader Role + -1 + + + -1 + true + + + most specific type + + + 1 + 1 + + + nameOfficialRU + + + + + true + + educational organization + desc + 20 + + + 5 + true + This relates an instance of Educational Training to the Organization that provided the training. + + + features + 5 + true + 60 + features + + + + This relates an information resource to a person it features. + + + Webpage + + -1 + + + -1 + + + Investigator Role + + + true + -1 + -1 + + + + + has sub-organization + true + 10 + Relates an organization to the sub-organization that it contains. + true + + hasSubOrganization + true + 5 + + + includes event + + 5 + true + true + + + + + featured in + true + + This relates a person to an information resource that contains a featured article on that person. + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator + 5 + + featuredIn + + 50 + + + Certification + 2 + + 2 + + + + + Book Section + + -1 + + -1 + + + department or school name within institution + 3 + 40 + + + Name of department or school name used when describing educational background. + + + + provides service + This relates something to the service it provides. + + 5 + true + + + 10 + providesService + + + Clinical Role + + + true + -1 + -1 + + + true + true + 5 + offered by + offered by + + 60 + + + This relates an academic degree to the organization offering the degree. + + + hasCurrency + + + + + + 5 + 10 + + presenter role of + true + + Relates a person to their presentation activity. + presentationActivityBy + true + + + landArea + + + + + event within + true + + 5 + true + + + + + countryAreaNotes + + + + + court + true + Relates a legal document with an organization. Bibo definition is: "A court associated with a legal document; for example, that which issues a decision." + + + true + court + + + + Peer Reviewer Role + -1 + + true + -1 + + + + Extension Unit + -1 + + -1 + + + + + Interview + + + -1 + -1 + + + + 70 + The foaf definition is as follows - Distributor of a document or a collection of documents. However, in VIVO, this can relate anything as the distributor to anything else. + distributor + + 5 + true + true + distributor + + + + + nameCurrencyRU + + + + + eligible for + 2 + + 5 + + + true + true + + + principal investigator role of + + + true + 5 + + 40 + + + Agreement + + + -1 + -1 + + + + has global count date + + 5 + + + 5 + + + Museum + + -1 + + + -1 + + + associated concept + + true + 20 + + 5 + true + + + + affirmedBy + + true + true + + + affirmedBy + A legal decision that affirms a ruling. + + + Legal Case Document + + -1 + + -1 + + + state or province + + + 30 + 1 + One of a number of areas or communities having their own governments and forming a federation under a sovereign government, as in the US. + + + + domestic geographic focus of + + + + true + domesticGeographicFocusOf + 20 + 5 + true + + + nameCurrencyEN + + + + + Service Providing Lab + + -1 + + + -1 + + + listed author for + 5 + + + Facility + -1 + -1 + + + + + + expiration date + + true + + 6 + 5 + + false + + + Meeting + + + + -1 + -1 + + + assignee + true + the individual or entity to whom ownership of the published application was assigned at the time of publication. + true + 5 + 5 + + + + + + offers + + + + true + 5 + 4 + + + translator + true + + true + 55 + This relates an information resource to the translator of the written document from one language to another. + + + 5 + translator + + + associated with position + true + 5 + + + + + + true + true + desc + 40 + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasPositionHistoryGenerator + + + This relates a person to their position information. + true + positions + 5 + current positions + + + Blog + + -1 + + -1 + + + offers course + true + + true + + 5 + 5 + + + related documents + true + 200 + Relates an event to associated documents; for example, conference to a paper. + + presentations + + + true + + + distributes funding from + true + + distributes funding from + true + 5 + Indicates the organization that distributes funding from another organization. For example, indicates the source of flow-through funding. + + + + + advisee in + 5 + + + + true + 30 + true + + + hasShortName + + + + + cited by + 4 + + true + + + true + 5 + + + Manual + + -1 + -1 + + + + true + 1 + geographicallyContains + Relates a geographic location with the geographic locations that it contains. + + geographically contains + 5 + + true + + + + Comment + 5 + + + 5 + + + + Transnational Region + -1 + -1 + + + + + 5 + true + + + linked author + true + + linked author + 1 + This relates authorship information to a agent who/that owns the authorship information. + + + Populated Place + + + + -1 + -1 + + + term label + + + + 1 + + + degree outcome of + This relates an academic degree to a person's educational background. + + + 10 + + 5 + awarded to + true + + + related + 5 + + related + true + This indicates when a term is related to another term in the same vocabulary. + + true + 60 + + + Faculty Administrative Position + + true + -1 + + -1 + + + leadership role of + + 5 + + + true + 30 + + + Equipment + -1 + + -1 + + + + + abbreviation + + + 1 + 11 + + + locator + + + A description (often numeric) that locates an item within a containing document or collection. + + + + Article + + + + + + Undergraduate Advising Relationship + + + 1 + 1 + + + Position + true + -1 + + -1 + + + + GDPYear + + + + + Non-Academic + + + + -1 + -1 + + + Postdoc or Fellow Advising Relationship + + + 1 + 1 + + + governing authority for + 5 + 8 + + + related degree + degree + The thesis degree. + true + + + + true + + + Laboratory + -1 + + + -1 + + + + participant + + + true + 5 + + + local award id + + + 1 + An institution's local identifier assigned to a grant awarded. + 60 + + + + reviewer role of + 5 + 2 + + + Issued Credential + 2 + 2 + + + + true + + + true + use this property to record editorial work performed for a document, such as a book, an academic article or a conference paper. + + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator + editor of + 20 + + + 5 + + + agriculturalAreaYear + + + + + true + service to the profession + + + true + hasProfessionalActivity + true + 20 + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddServiceProviderRoleToPersonGenerator + 5 + This relates a person or organization to a role they provide in delivering a service within a professional environment, such as conference organization, grant proposal review, or providing research support services. + + + fax + + + Please enter the complete phone number for your fax, with area code and also country code (if outside the US). + + 4 + 70 + + + provides funding through + 5 + + + true + Relates an organization to the organization through which it provides its funding. + provides funding through + + true + + + International Classification (ICL) code + The International classification(s) to which the published application has been assigned. + + 1 + 5 + + + + + + presented at + true + + presentedAt + + + Relates a document to an event; for example, a paper to a conference. + 200 + true + + + Geographic Location + + + + -1 + -1 + + + agriculturalArea + + + + + + + true + publisher of + Relates an entity that is engaged in publishing printed or online material to the material itself. + 51 + + true + 5 + publisher of + + + contributing advising relationship + 5 + 50 + true + + + true + + + + nameCurrencyAR + + + + + end + true + + 99 + 1 + false + + + + interviewee + interviewee + + true + + true + + An agent that is interviewed by another agent. + + + has role + true + true + 60 + This relates a person to a role they play. + hasActivityDescription + + + 5 + + + presentationActivity + true + + 20 + presentations + + This relates a person to a description of their presentation activity. + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator + true + + 5 + + + Teacher Role + + + true + -1 + -1 + + + research overview + + 1 + + + 10 + + + Concept + + + + -1 + 35 + + + Researcher Role + true + -1 + + + -1 + + + transcript of + + true + + true + + transcriptOf + Relates a document to some transcribed original. + + + population + + + + + facility for + + 5 + + facility for + This relates a facility as being used for something, e.g. for a particular service. + true + + + + Dataset + + + -1 + -1 + + + issuer + + An entity responsible for issuing often informally published documents such as press releases, reports, etc. + true + issuer + + true + + + + Software + -1 + + + -1 + + + + Contract + + + + -1 + -1 + + + start + 1 + the start of a time interval. + false + 80 + true + + + + + group + + + -1 + -1 + + + false + has author entry + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAuthorsToInformationResourceGenerator + true + + authors + 5 + true + Relates information resources to information about its authors. Information about the authors would include, but is not limited to, the author's rank in the list of authors and whether or not that author was a corresponding author. + 10 + + + author rank in publication + 3 + A number only, (e.g. 1, 2, etc.), that reflects the order of this author in the publication's author list. + 1 + + + + + + + + + Vitro Public Ontology + Vitro Public Ontology + Vitro public constructs + vitro-public + + + Research Opportunity + + + -1 + + -1 + + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining + 10 + true + true + true + education and training + educational background + + 5 + This relates a person to the description of their educational training. + + + + + Hearing + + -1 + + + -1 + + + International Standard Book Number (ISBN) 10 + + + + 10 + 1 + The International Standard Book Number (ISBN) is a unique[1][2] numeric commercial book identifier based upon the 9-digit Standard Book Numbering (SBN) code created by Gordon Foster. The 10-digit ISBN format was developed by the International Organization for Standardization and was published in 1970 as international standard ISO 2108. + + + Online Computer Library Center (OCLC) number + + 1 + An oclcnum is a sequential accession number assigned by OCLC as bibliographic records are entered into OCLC WorldCat (the OCLC Online Union Catalog). + 1 + + + + + Medical Residency + + + 10 + 10 + + + Brief + + -1 + -1 + + + + nameShortEN + + + + + Date/Time Value + + + true + -1 + -1 + + + reproduced in + 5 + true + 60 + true + + + + + + has global count source + true + 5 + true + + + + 5 + + + nameCurrencyIT + + + + + hasListName + + + + + asin + + + The Amazon Standard Identification Number (ASIN) is a unique identification number assigned by Amazon.com and its partners for product identification within the Amazon.com organization. + + + + name suffix + If applicable, please enter the preferred name suffix. Only one may be entered. + + + 34 + + 1 + + + outreach overview + + Please enter a single summary narrative of your outreach goals and/or contributions + + + 10 + 1 + + + Service Provider Role + -1 + + -1 + true + + + + administers grant + true + + + true + administers + Relates the grant to the organization that administers the grant. This is normally the department of the principal investigator. + + + + Member Role + + + true + -1 + -1 + + + Bibontology + bibo + + + special_group + + + -1 + -1 + + + countryAreaUnit + + + + + successor organization + + + 5 + true + true + 60 + + + + Librarian + + + + -1 + -1 + + + role in + + true + + true + 5 + + + nameCurrencyFR + + + + + author as listed + 90 + true + + + 5 + + + prerequisite for + + + prerequisite for + 5 + true + + 40 + + + International Standard Book Number (ISBN) 13 + 11 + + The International Standard Book Number (ISBN) is a unique[1][2] numeric commercial book identifier based upon the 9-digit Standard Book Numbering (SBN) code created by Gordon Foster.Since 1 January 2007, ISBNs have contained 13 digits, a format that is compatible with Bookland EAN-13s. + + + 1 + + + Published US Classification Class/Subclass (CCL) code + + + The original and cross-reference US Classification(s) to which the published application was assigned at the time of publication -- includes both primary and secondary class information. + + 1 + 5 + + + hasNationality + + + + + governing authority + 8 + + true + + + true + 5 + + + Invited Talk + + + + -1 + -1 + + + URI + + + 1 + + Universal Resource Identifier of a document. + 30 + + + Document + + + -1 + -1 + + + translator of + This relates something as the translator of an information resource. + 5 + translatorOf + + + 30 + true + + + grant awarded by + true + + true + This relates a grant to the organization that awarded that grant. + funded by + + + + + location of equipment + true + 40 + This relates a facility to the equipment it houses. + locationOfEquipment + + 5 + + + + nameCurrencyES + + + + + Academic Article + + + + -1 + -1 + + + countryAreaTotal + + + + + Reference Source + -1 + + + -1 + + + funding provided via + + + true + 5 + + + This relates an organization to the person's position(s) within that organization. + + 15 + + employer having employment + true + people + desc + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.OrganizationHasPositionHistoryGenerator + true + + true + + + Transnational Region + + -1 + + + -1 + + + EAN International-Uniform Code Council (EAN-UCC) 13 + EAN International-Uniform Code Council (EAN-UCC) was a supply chain standards family name, formally the EAN.UCC System, that included product barcodes which are printed on the great majority of products available in stores worldwide and electronic commerce standards. + + + + + + nationalityRU + + + + + has current member + true + + This relates a group to its members. + + has member + + true + + + Edited Book + + + -1 + + -1 + + + + true + Digital Object Identifier (DOI) + 1 + + The Digital Object Identifier (DOI) System provides for persistent identification of content objects in the digital environment. "DOI names are assigned to any entity for use on digital networks. They are used to provide current information, including where they (or information about them) can be found on the Internet. Information about a digital object may change over time, including where to find it, but its DOI name will not change." + 1 + + doi + true + + + Geopolitical Entity + + -1 + -1 + + + + short description + + + An account of the resource. + + + + isAdministeredBy + true + + + + + sponsors award or honor + + + 5 + true + + 71 + true + + + Room + -1 + + + -1 + + + + eRA Commons id + + + + 15 + + + volume + A volume number. + 1 + + + + 20 + + + abstract + + 1 + + A summary of the resource. + + 59 + + + School + + -1 + -1 + + + + + Principal Investigator Role + + + true + -1 + -1 + + + nameShortFR + + + + + area + -1 + + -1 + + + + codeFAOTERM + + + + + seriesForEvent + + + + true + true + 5 + + + award sponsored by + true + + + true + 20 + + 5 + + + Review + + + + -1 + -1 + + + codeCurrency + + + + + Global Citation Count + + + 5 + 5 + + + credits + + + Number of credits assigned a course by an learning institution. + 1 + 50 + + + issue + 21 + + 1 + + + + + + true + true + 50 + has translation + + 5 + Relates an original documents to a translation of that document. + + has translation + + + investigator role of + + + 60 + 5 + + true + + + University + + -1 + + + -1 + + + number + 1 + + 30 + + A generic item or document number. Not to be confused with issue number. A barcode, perhaps? + + + + Location + + + -1 + -1 + + + College + + + -1 + + -1 + + + nameShortES + + + + + isVersionOf + A related resource of which the described resource is a version, edition, or adaptation. Changes in version imply substantive changes in content rather than differences in format. + + true + isVersionOf + + + true + + + Working Paper + + + -1 + + -1 + + + hasStatistics + + + + + date issued + + + true + 4 + false + 5 + The date the patent was issued. + + + + GDP + + + + + + true + 5 + true + activityDescriptionFor + Relates a person to a role they play. + + 1 + role of + + + + populationUnit + + + + + teaching overview + + 1 + + + 10 + Please enter a single narrative summary description of your teaching activities, goals, and/or experience + + + 40 + 20 + 5 + Select a publication, patent or other type of information resource that has been produced as a result of this endeavor. + true + produces + + + true + + true + + + rank + + + enter the position in the list that you would like this item displayed + + + International Standard Serial Number (ISSN) + An International Standard Serial Number (ISSN) is a unique eight-digit number used to identify a periodical publication. + + + + + + patent number + + Unique number assigned to a patent application when the United States Patent and Trademark Office issues as a patent. + + + 1 + 1 + + + supports + + + true + 5 + + + 5 + true + This relates a person to a description of their teaching role, usually associated with an Event, Process, or Organization. These teaching roles can include courses previously taught, educational tutorials or workshops given, as well as activities related to enhancing teaching, such as developing a new course. Use core:teaches for the direct relationship between a Person and a Semester Class (usually imported from a system of record). + true + + hasTeachingActivity + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddTeacherRoleToPersonGenerator + 20 + + teaching activities + + + + Newspaper + -1 + + -1 + + + + Journal + + -1 + -1 + + + + + clinical role of + + true + 70 + 5 + + + + + nationalityAR + + + + + Court Reporter + + -1 + -1 + + + + false + defaultLinkForm.jsp + true + + + Presenter Role + -1 + + -1 + + true + + + Primary Position + 5 + 5 + + + + + contact information + + + The contact information for a particular event. This could be a name, email, phone number, or method(s) of contacting someone to gain information about the event. + + 1 + 50 + + + nameListEN + + + + + overview + + + + 10 + 1 + A short narrative summary to be used as a single descriptive overview statement. + + + description + + + An account of the resource. + + 3 + 30 + + + Information Resource + + -1 + + -1 + + + primary phone + + + + 1 + 60 + + + editor + + 5 + true + + 20 + true + + + + hasCode + + + + + has global count value + + + + + + Award or Honor + + + + 1 + 1 + + + true + outreach and community service + This relates a person or an organization to a role they perform in outreach or community service, as distinct from service to the profession + + true + 30 + true + + 5 + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator + + hasOutreachActivity + + + subcontracted through + + + + grantSubcontractedThrough + 60 + This relates a grant to the organization awarding the sub-contract for the grant. + 5 + true + + + + webpageOf + + 40 + true + webpageOf + true + 5 + The core:webpage relates to an intermediate node (of type core:URLLink) that allows specifying the homepage URL as a literal, as well as a human-readable label ("anchor text") for the link. + + + + first name + The legal first name of a person as indicated in data loaded most likely from their institution. Only 1 first name can be displayed for each individual. + + 1 + + 10 + + + + Service + + -1 + + -1 + + + + receipt of + + 5 + true + + + true + + + identifier + + + A parent property for institutional and other identifiers. This data property is not seen or updated by anyone. + + 1 + 1 + + + populationNotes + + + + + product of + true + + 40 + true + 5 + + + + current member of + true + + + A person's formal or informal affiliation with a group. + + member of + true + + + Campus + -1 + -1 + + + + + + recipient + + true + + recipient + + true + This relates a communication document to the agent who receives that communication document. + + + Event Series + -1 + + -1 + + + + true + This relates a person's educational training to the person. + educational background of + 5 + + true + 10 + + + education or training of + + + Building + -1 + -1 + + + + + + has subject area + true + + 20 + 5 + + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAssociatedConceptGenerator + + + attendee role of + 5 + true + 1 + + true + + + + Slide + -1 + -1 + + + + + total award amount + This includes the direct cost being used for the grant activity plus indirect costs associated with administering the grant. + + 1 + + 60 + + + + + 80 + true + + true + 5 + This relates an agent to their mailing address. + mailing address + mailingAddress + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasMailingAddressGenerator + + + Code + -1 + -1 + + + + + linked information resource + linked information resource + Relates information about its authors to the information resource that was created by the authors. Information about the authors would include, but is not limited to, the author's rank in the list of authors and whether or not that author was a corresponding author. + + + + true + 5 + 10 + true + + + geographic focus of + + 20 + true + 5 + + + + + keywords + + 56 + Intended for a word or short phrase only where no instance of a controlled vocabulary can be identified. Can also be used to help in highlighting subtle difference in work. + 10 + + + + Library + + -1 + + + -1 + + + true + + international geographic focus of + This relates a specific international geographic region to something. + 5 + + + 30 + true + true + geographic focus of + + + outcome of + + + true + 5 + + + Performance + + + -1 + -1 + + + + identifier + + + Unique identifier of a document or collection. This data property is not seen or updated by anyone. + + 1 + 1 + + + Credential + + + + 5 + 5 + + + reviewOf + + 60 + + true + + Relates a review document to a reviewed thing (resource, item, etc.). + true + 5 + review of + + + supported by + 5 + true + true + + + + + Letter + 3 + + + + 15 + + + nameCurrencyZH + + + + + distributes + + 70 + true + This can relate anything to the thing it distributes. The inverse of this is distributor and the foaf definition for distributor is as follows - Distributor of a document or a collection of documents. + 5 + distributes + + + + + advising contribution to + + + 50 + + true + 5 + + + + 70 + clinical activities + 5 + true + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddClinicalRoleToPersonGenerator + true + + + + Educational Training + -1 + -1 + + + + + Conference Paper + + -1 + -1 + + + + + landAreaYear + + + + + Website + + -1 + + + -1 + + + nationalityIT + + + + + phone + + + Please enter your complete phone number, with country code if outside the U.S. and Canada + + 10 + 60 + + + preferredNamespacePrefix + + + A prefix to be used, instead of the full namespace URI, use when indicating terms from the specified vocabulary. + + + Collected Document + + -1 + + -1 + + + Relationship + + + -1 + -1 + + + email + + + + 9 + 1 + + + provenance support + pvs + + + Division + -1 + + + -1 + + + + Erratum + + + + 5 + 5 + + + outcome + + + true + 5 + + + Newsletter + -1 + + + + -1 + + + Agent + + -1 + -1 + + + + reviewed in + + + Relates something to the review of that thing. + 5 + 60 + true + reviewedIn + + + city + 1 + 20 + An incorporated municipality, usually governed by a mayor and a board of aldermen or councilmen. + + + + + + contributor + + + 5 + true + + + + Clinical Organization + -1 + + + -1 + + + + Team + + -1 + -1 + + + + + issuance of + true + + 8 + + 5 + + true + + + + Relates a person to a professional service role they hold. + 5 + true + 20 + professionalActivityBy + + service provider role of + + true + + + Program + -1 + + + + -1 + + + Thesis Degree + + -1 + + -1 + + + Hospital + -1 + + + -1 + + + + Person As Listed + + + 1 + 90 + + + Center + -1 + -1 + + + + + + countryArea + + + + + Date/Time Value Precision + + + -1 + -1 + + + Graduate Advising Relationship + + + 1 + 1 + + + preferred title + + Enter the title you would prefer to use. This would be different from, and in addition to, your HR job title. + + 10 + 1 + + + + Thesis + + + -1 + + -1 + + + 5 + true + true + + + This relates the proceedings to the conference that produced the proceedings. + proceedingsOf + + 30 + proceedings of + + + Graduate Student + + + + -1 + -1 + + + publication venue for + + + true + 5 + 60 + + + codeAGROVOC + + + + + contributor + contributor + An entity responsible for making contributions to the resource. Examples of a Contributor include a person, an organization, or a service. Typically, the name of a Contributor should be used to indicate the entity. + + + true + true + + + + isSuccessorOf + true + + + + + Role + + + -1 + -1 + true + + + agriculturalAreaUnit + + + + + agent + 5 + + agent + true + Upper level property that is not displayed or updated by anyone. Sub-object properties of this one should be used. + true + + + + + date/time precision + + + true + 5 + 5 + + + + 11 + 5 + + true + organization within + true + + Relates an sub-organization to the organization that contains it. + subOrganizationWithin + + + teacher role of + + teachingActivityBy + true + 20 + 5 + + + + + link anchor text + + + Used to provide a visible, clickable text to a hyperlink in VIVO. + + + + Research Organization + + + + -1 + -1 + + + Map + + + -1 + -1 + + + self_governing + + -1 + -1 + + + + Database + -1 + + + -1 + + + + has prerequisite + + + hasPrerequisite + true + + + valid in + + true + + true + 5 + 2 + + + Translation + + + -1 + -1 + + + HR job title + 3 + + A specific designation of a post within a human resource organization, normally associated with a job description that details the tasks and responsibilities that go with it. + + + 9 + + + landAreaTotal + + + + + Conference + + + -1 + + -1 + + + outreach provider role of + + true + 5 + + Relates a person to an outreach role they hold. + 30 + outreachActivityBy + + + + research areas + + true + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAssociatedConceptGenerator + 5 + 10 + + + + Department + + -1 + + + -1 + + + hasCoordinate + + + + + preferredNamespaceUri + + + The full URI for the namespace. + + + Report + + + -1 + + -1 + + + agriculturalAreaNotes + + + + + nameListZH + + + + + F1000 Link + + + 5 + 6 + + + nameListAR + + + + + Blog Posting + + + + -1 + -1 + + + Collection + + -1 + -1 + + + + Private Company + + + -1 + -1 + + + + Document Status + -1 + + -1 + + + + has sub grant + true + + true + + 5 + 1 + + + + subject area for + true + true + + 5 + 20 + + + + + date/time interval + 5 + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.DateTimeIntervalFormGenerator + + + + true + 5 + + + selected publications + true + + true + false + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator + 5 + 1 + true + + has authorship + + This relates a person to their authorship information. + + + Academic Degree + + + -1 + -1 + + + principal investigator on + + 5 + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator + + + 40 + true + + + Legislation + -1 + + + -1 + + + credentials + 5 + + true + true + + + 6 + + + economic_region + + + -1 + -1 + + + State Or Province + + + -1 + + -1 + + + Reviewer Role + -1 + -1 + + true + + + + is defined by + + + + true + + + end page + + + 50 + + 1 + Ending page number within a continuous page range. + + + + hasResearchActivity + 5 + 30 + + Use to represent any research-related role in an activity -- typically a Process such as a Project -- or for a general statement about research, not necessarily linked to anything but the person. + research activities + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddResearcherRoleToPersonGenerator + true + true + + + position for person + + + + true + 40 + This relates a person's position information to the person themselves. + involves employee + true + + + currently headed by + + + 5 + true + 20 + true + + + + Audio Document + + + + -1 + -1 + + + isPredecessorOf + + true + + + + Librarian Emeritus + + + + -1 + -1 + + + Decision + + + -1 + -1 + + + in event series + + true + + + true + 5 + + + has global citation frequency + + true + + + true + 5 + 5 + + + Professor Emeritus + + -1 + + + -1 + + + nameListIT + + + + + cites + + true + 5 + true + + 4 + + + + subcontractsGrant + 5 + + true + subcontracts grant + + This relates the agency, entity or individual awarding the sub-contract for a grant to the grant itself. + + 62 + true + + + Audio-Visual Document + + -1 + + -1 + + + Country + + + + -1 + -1 + + + Geographic Region + + -1 + -1 + + + + + Conference Series + + + -1 + + -1 + + + Speech + + + + -1 + 5 + + + Undergraduate Student + + + + -1 + -1 + + + true + translation of + + Relates a translated document to the original document. + translation of + true + 5 + 50 + + + + + last name + + + The legal last name of a person as indicated in data loaded most likely from their institution. Only 1 last name can be displayed for each individual. + 1 + + 30 + + + Quote + -1 + + -1 + + + + domesticGeographicFocus + + true + 5 + + true + domestic geographic focus + + 70 + true + + + FileByteStream + + + -1 + -1 + + + hasBorderWith + + true + + + + performer + This relates a performance to the person who or organization that carries out the performance. + + true + performer + true + + + + + Non-Faculty Academic Position + -1 + -1 + + + true + + + landAreaUnit + + + + + Personal Communication Document + + + 2 + 15 + + + Funding Organization + + -1 + -1 + + + + + researcher role of + 30 + + researchActivityBy + + + true + 5 + + + + + 5 + has geographic location + + 60 + true + true + nearestGeographicLocation + This relates something to its geographic location, for example, an organization to its geographic location. + + + + + true + 4 + date filed + desc + 5 + false + + + The date the patent was filed. + + + Publisher + + -1 + + -1 + + + + Outreach Provider Role + + -1 + true + -1 + + + + Series + + -1 + + + -1 + + + + 80 + + 5 + This relates something to a specific international geographic region as its focus. + + geographic focus + international geographic focus + true + true + + + link URI + + + Provides the URL for a hyperlink in VIVO. + + + + Foundation + + + -1 + -1 + + + + subsequentLegalDecision + subsequentLegalDecision + + A legal decision on appeal that takes action on a case (affirming it, reversing it, etc.). + + true + true + + + + Student Organization + + -1 + + -1 + + + + editor role of + 5 + 2 + + + coden + + + CODEN – according to ASTM standard E250 – is a six character, alphanumeric bibliographic code, that provides concise, unique and unambiguous identification of the titles of serials and non-serial publications from all subject areas. + + + + country + + 40 + + 3 + + An area of land distinguished by its political autonomy. Politically independent territories. + + + linkShortView.jsp + + + 2 + + true + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddReviewerRoleToPersonGenerator + + use this property to indicate ongoing reviewer responsibility for a bibo:Collection, such as a Journal or Series, and also to record a review performed for a bibo:Document such as a book, academic article or conference paper. + reviewer of + true + 5 + + + offered by + + + 5 + 5 + true + + + + mailing address for + + + true + 80 + This relates a mailing address to an agent. + mailingAddressFor + 5 + + + awards grant + + + + funds + true + 61 + true + This relates an organization to a grant that it has awarded. + + + nameListRU + + + + + supported publications + + true + + 5 + enter a publication or document supported by this grant + true + + + + Organizer Role + + + 10 + 4 + + + rooms + + + true + Relates a building to the rooms within that building. + + room + 5 + true + + + URLLink + + -1 + -1 + + + + Exhibit + + + + -1 + -1 + + + validUntil + + + + + hasMember + + + true + + + primary email + + + + 1 + 50 + + + hasMinLatitude + + + + + County + + -1 + + + -1 + + + Certificate + + 5 + 5 + + + + + Electronic International Standard Serial Number (EISSN) + + + + An International Standard Serial Number (ISSN) is a unique eight-digit number used to identify a periodical publication. The eissn is an issn for electronic periodicals. + 90 + + + Scopus id + + 30 + + 2 + + The numeric digit assigned to an author in Scopus. In Scopus it's call the "Author Identifier". + + + Statute + + + -1 + -1 + + + provides funding for + + + true + 5 + + + associated role + 5 + + + + true + + + nameOfficialEN + + + + + Proceedings + -1 + + -1 + + + + + true + + + publisher + Relates published materials to an entity that is engaged in publishing. + 51 + 5 + publisher + + true + + + Document Part + + + -1 + -1 + + + Book + -1 + + + -1 + + + + 1 + geographically within + 5 + geographicallyWithin + Relates a geographic location with the geographic location that contains it. + + true + + + true + + + Institute + -1 + + + -1 + + + + Organization + + -1 + individual--foaf-organization.ftl + + -1 + + + + Project + + -1 + + -1 + + + + nationalityZH + + + + + Postdoctoral Training + + + 10 + 10 + + + credential of + 6 + + 5 + + true + + + + currently head of + true + + + true + 20 + 5 + + + + Postdoc + + + + -1 + -1 + + + preferred display order + + + + + + seating capacity + + + 50 + + 1 + Number of people who can be seated in a specific room, by physical space available or limitations set by law. + + + 5 + + This relates the organization to the equipment it owns. + + has equipment + true + true + + 80 + has equipment + + + organizer of + + true + + true + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator + + 3 + 5 + + + sponsor award id + + Identifier of the organization that sponsored the award. + + 1 + + 70 + + + Conference Poster + + + + -1 + -1 + + + number of pages + + + + + + editor + + true + 5 + + + 20 + + + Association + -1 + + -1 + + + + + Workshop Series + -1 + + + -1 + + + + middle name or initial + + 1 + + 20 + The middle name or initial with which you normally identify yourself. Only one may be entered. + + + + Postdoctoral Position + + + true + -1 + -1 + + + is agent in + This relates an active agent to an event. + true + isAgentIn + 5 + true + + + + + + agriculturalAreaTotal + + + + + advisee + + 30 + 5 + true + + + + + Event + + -1 + + + -1 + + + + 1 + position in organization + + true + involves employer + true + + 15 + This relates a person's position to the organization that has that position. + + + 5 + true + + This relates an advisory relationship to an academic degree. + true + degree candidacy + + + degreeCandidacy + 25 + + + landAreaNotes + + + + + organization for training + + + true + 5 + desc + + + hasMaxLongitude + + + + + nationalityEN + + + + + organizer role of + + 3 + + 5 + true + true + + + predecessor organization + + 60 + 5 + + + true + + + hasOfficialName + + + + + codeDBPediaID + + + + + term type + + + + 1 + + + advisor + true + 40 + 5 + + + + + + + hasProceedings + true + proceedings + 5 + This relates a conference proceeding to the conference that produced the proceeding. + 30 + + + true + + + Image + + -1 + + -1 + + + This relates the educational background to the academic degree obtained through that educational background. + 10 + degree type + + 5 + true + degree earned + true + + + + + GDPUnit + + + + + Dublin Core terms + dcterms + + + edition + + The name defining a special edition of a document. Normally its a literal value composed of a version number and words. + 70 + + 3 + + + + Award or Honor Receipt + true + + + + + member role of + 50 + 5 + + + + true + + + Citation Counting and Context Characterization Ontology + c4o + + + nameShortZH + + + + + Faculty Mentoring Relationship + + + 1 + 1 + + + Bill + -1 + + -1 + + + + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddMemberRoleToPersonGenerator + member of + 50 + true + + 5 + + true + + true + + + Co-Principal Investigator Role + + + true + -1 + -1 + + + license number + + + license number + + 1 + 4 + + + VIVO core + vivo + + + Faculty Position + -1 + true + + + -1 + + + date/time + + + Use when a single date and time is appropriate versus a start date and time and end date and time, or when multiple dates and times are relevant. + 5 + 5 + + + FRBR-aligned Bibliographic Ontology + fabio + + + gtin14 + 80 + + + Global Trade Item Number (GTIN) is an identifier for trade items developed by GS1 (comprising the former EAN International and Uniform Code Council). GTIN is an "umbrella" term used to describe the entire family of GS1 data structures for trade items (products and services) identification. GTINs may be 8, 12, 13 or 14 digits long. + 1 + + + + codeUN + + + + + Advising Relationship + true + + + -1 + -1 + + + entry term + + + + 40 + + + Clinical Guideline + + + 5 + + 5 + + + status + 5 + + + 250 + + true + + + Catalog + -1 + + + + -1 + + diff --git a/rdf/tbox/filegraph/geopolitical.tbox.ver1.1-11-18-11.owl b/productMods/WEB-INF/ontologies/update/oldVersion/geopolitical.tbox.ver1.1-11-18-11.owl similarity index 100% rename from rdf/tbox/filegraph/geopolitical.tbox.ver1.1-11-18-11.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/geopolitical.tbox.ver1.1-11-18-11.owl diff --git a/rdf/tbox/filegraph/isDefinedBy-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/isDefinedBy-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/isDefinedBy-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/isDefinedBy-1.5.owl diff --git a/rdf/tbox/filegraph/scires-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/scires-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/scires-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/scires-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-bibo-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-bibo-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-bibo-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-bibo-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-c4o-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-c4o-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-c4o-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-c4o-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-core-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-core-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-core-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-core-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-dcelements-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcelements-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-dcelements-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcelements-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-dcterms-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcterms-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-dcterms-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcterms-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-event-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-event-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-event-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-event-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-fabio-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-fabio-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-fabio-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-fabio-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-foaf-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-foaf-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-foaf-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-foaf-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-pws-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-pws-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-pws-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-pws-1.5.owl diff --git a/rdf/tbox/filegraph/vivo-skos-1.5.owl b/productMods/WEB-INF/ontologies/update/oldVersion/vivo-skos-1.5.owl similarity index 100% rename from rdf/tbox/filegraph/vivo-skos-1.5.owl rename to productMods/WEB-INF/ontologies/update/oldVersion/vivo-skos-1.5.owl diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/AdvisingRelationship.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/AdvisingRelationship.sparql new file mode 100644 index 00000000..b30bbc43 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/AdvisingRelationship.sparql @@ -0,0 +1,23 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?advisee _:AdviseeRole . + _:AdviseeRole ?advisee . + _:AdviseeRole a vivo:AdviseeRole . + ?advisor _:AdvisorRole . + _:AdvisorRole ?advisor . + _:AdvisorRole a vivo:AdvisorRole . + _:AdviseeRole vivo:relatedBy ?advisingRelationship . + ?advisingRelationship vivo:relates _:AdviseeRole . + _:AdvisorRole vivo:relatedBy ?advisingRelationship . + ?advisingRelationship vivo:relates _:AdvisorRole . + ?advisingRelationship vivo:relates ?advisee . + ?advisingRelationship vivo:relates ?advisor . + ?advisee vivo:relatedBy ?advisingRelationship . + ?advisor vivo:relatedBy ?advisingRelationship . +} WHERE { + ?advisee vivo:adviseeIn ?advisingRelationship . + ?advisor vivo:advisorIn ?advisingRelationship . +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/Editorship.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/Editorship.sparql new file mode 100644 index 00000000..0720c346 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/Editorship.sparql @@ -0,0 +1,17 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?person vivo:relatedBy _:Editorship . + _:Editorship a vivo:Editorship . + _:Editorship vivo:relates ?person . + _:Editorship vivo:relates ?document . + ?document vivo:relatedBy _:Editorship . +} WHERE { + { + ?person vivo:editorOf ?document + } UNION { + ?document vivo:editor ?person + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/LeaderRole.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/LeaderRole.sparql new file mode 100644 index 00000000..f9582fae --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/LeaderRole.sparql @@ -0,0 +1,15 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?person _:leaderRole . + _:leaderRole ?person . + _:leaderRole a vivo:LeaderRole . + _:leaderRole vivo:roleContributesTo ?org . + ?org vivo:contributingRole _:leaderRole . +} WHERE { + { ?person vivo:currentlyHeadOf ?org } + UNION + { ?org vivo:currentlyHeadedBy ?person } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/MemberRole.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/MemberRole.sparql new file mode 100644 index 00000000..c9582a84 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/MemberRole.sparql @@ -0,0 +1,15 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?person _:memberRole . + _:memberRole ?person . + _:memberRole a vivo:MemberRole . + _:memberRole vivo:roleContributesTo ?org . + ?org vivo:contributingRole _:memberRole . +} WHERE { + { ?person vivo:currentMemberOf ?org } + UNION + { ?org vivo:hasCurrentMember ?person } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/grantAdmin.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/grantAdmin.sparql new file mode 100644 index 00000000..123edd1c --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/grantAdmin.sparql @@ -0,0 +1,17 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?agent _:adminRole . + _:adminRole a vivo:AdministratorRole . + _:adminRole ?agent . + _:adminRole vivo:relatedBy ?grant . + ?grant vivo:relates _:adminRole . + ?grant vivo:relates ?agent . + ?agent vivo:relatedBy ?grant . +} WHERE { + { ?agent vivo:administers ?grant } + UNION + { ?grant vivo:administeredBy ?agent } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/orcid.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/orcid.sparql new file mode 100644 index 00000000..4914dca2 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/orcid.sparql @@ -0,0 +1,11 @@ +PREFIX vivo: +PREFIX owl: + +CONSTRUCT { + ?s vivo:orcidId ?orcidURI . + ?orcidURI a owl:Thing . +} WHERE { + ?s vivo:orcidId ?orcidString + FILTER(isLiteral(?orcidString)) + BIND(IRI(concat("http://orcid.org/", str(?orcidString))) AS ?orcidURI) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/Grant.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/Grant.sparql new file mode 100644 index 00000000..fc71407d --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/Grant.sparql @@ -0,0 +1,12 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?agent vivo:relatedBy ?grant . + ?grant vivo:relates ?agent +} WHERE { + ?agent ?role . + ?role vivo:relatedBy ?grant + FILTER NOT EXISTS { ?grant vivo:relates ?agent } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/awardedDegree.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/awardedDegree.sparql new file mode 100644 index 00000000..51fd1680 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/post/awardedDegree.sparql @@ -0,0 +1,31 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?educationalProcess _:awardedDegree . + _:awardedDegree ?educationalProcess . + _:awardedDegree a vivo:AwardedDegree . + _:awardedDegree vivo:relates ?degree . + ?degree vivo:relatedBy _:awardedDegree . + _:awardedDegree vivo:relates ?person . + ?person vivo:relatedBy _:awardedDegree . + _:awardedDegree vivo:assignedBy ?org . + ?org vivo:assigns _:awardedDegree . + ?educationalProcess ?role . + ?role ?educationalProcess . +} WHERE { + ?person ?educationalProcess . + ?educationalProcess a vivo:EducationalProcess . + ?educationalProcess ?degree . + ?degree a vivo:AcademicDegree . + OPTIONAL { + ?educationalProcess ?org . + ?org a foaf:Organization + } + OPTIONAL { + ?educationalProcess vivo:contributingAdvising ?advising . + ?advising vivo:relates ?role . + ?role a . + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-0.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-0.sparql new file mode 100644 index 00000000..a9262a27 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-0.sparql @@ -0,0 +1,24 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?s arg:ARG_2000028 _:vcard . + _:vcard arg:ARG_2000029 ?s . + _:vcard a v:Individual . +} WHERE { + ?s a foaf:Person + FILTER ( + EXISTS { ?s foaf:firstName ?firstName } || + EXISTS { ?s foaf:lastName ?lastName } || + EXISTS { ?s vivo:middleName ?middleName } || + EXISTS { ?s vivo:email ?email } || + EXISTS { ?s vivo:primaryEmail ?primaryEmail } || + EXISTS { ?s vivo:phoneNumber ?phoneNumber } || + EXISTS { ?s vivo:primaryPhoneNumber ?primaryPhoneNumber } || + EXISTS { ?s vivo:faxNumber ?faxNumber } || + EXISTS { ?s vivo:mailingAddress ?address } || + EXISTS { ?s vivo:webpage ?webpage } + ) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-1.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-1.sparql new file mode 100644 index 00000000..a15d4d0f --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-1.sparql @@ -0,0 +1,21 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?s arg:ARG_2000028 _:vcard . + _:vcard arg:ARG_2000029 ?s . + _:vcard a v:Organization . +} WHERE { + ?s a foaf:Organization + FILTER ( + EXISTS { ?s vivo:email ?email } || + EXISTS { ?s vivo:primaryEmail ?primaryEmail } || + EXISTS { ?s vivo:phoneNumber ?phoneNumber } || + EXISTS { ?s vivo:primaryPhoneNumber ?primaryPhoneNumber } || + EXISTS { ?s vivo:faxNumber ?faxNumber } || + EXISTS { ?s vivo:mailingAddress ?address } || + EXISTS { ?s vivo:webpage ?webpage } + ) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-2.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-2.sparql new file mode 100644 index 00000000..b966a2a3 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-2.sparql @@ -0,0 +1,21 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?s arg:ARG_2000028 _:vcard . + _:vcard arg:ARG_2000029 ?s . + _:vcard a v:Group . +} WHERE { + ?s a foaf:Group + FILTER ( + EXISTS { ?s vivo:email ?email } || + EXISTS { ?s vivo:primaryEmail ?primaryEmail } || + EXISTS { ?s vivo:phoneNumber ?phoneNumber } || + EXISTS { ?s vivo:primaryPhoneNumber ?primaryPhoneNumber } || + EXISTS { ?s vivo:faxNumber ?faxNumber } || + EXISTS { ?s vivo:mailingAddress ?address } || + EXISTS { ?s vivo:webpage ?webpage } + ) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-3.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-3.sparql new file mode 100644 index 00000000..96076c4f --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard1-3.sparql @@ -0,0 +1,15 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: +PREFIX owl: + +CONSTRUCT { + ?s arg:ARG_2000028 _:vcard . + _:vcard arg:ARG_2000029 ?s . + _:vcard a v:Individual . +} WHERE { + ?s vivo:webpage ?webpage + FILTER NOT EXISTS { ?s a foaf:Agent } + FILTER NOT EXISTS { ?s arg:ARG_2000028 ?existingvcard } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard2.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard2.sparql new file mode 100644 index 00000000..499d0bbb --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard2.sparql @@ -0,0 +1,36 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: +PREFIX bibo: + +CONSTRUCT { + ?vcard v:hasName _:name . + _:name a v:Name . + _:name v:givenName ?firstName . + _:name vivo:middleName ?middleName . + _:name v:familyName ?lastName . + _:name v:honorificPrefix ?prefix . + _:name v:honorificSuffix ?suffix . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + OPTIONAL { + ?s foaf:firstName ?firstName . + BIND("yes" as ?test) + } + OPTIONAL { + ?s foaf:lastName ?lastName . + BIND("yes" as ?test) + } + OPTIONAL { + ?s vivo:middleName ?middleName + BIND("yes" as ?test) + } + OPTIONAL { + ?s bibo:prefixName ?prefix + } + OPTIONAL { + ?s bibo:suffixName ?suffix + } + FILTER(bound(?test)) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard22.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard22.sparql new file mode 100644 index 00000000..9107814a --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard22.sparql @@ -0,0 +1,14 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: +PREFIX bibo: + +CONSTRUCT { + ?vcard v:hasTitle _:title . + _:title a v:Title . + _:title v:title ?preferredTitle . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s ?preferredTitle . +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard3.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard3.sparql new file mode 100644 index 00000000..91991c9e --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard3.sparql @@ -0,0 +1,13 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasEmail _:email . + _:email a v:Email . + _:email v:email ?email . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:email ?email +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard4.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard4.sparql new file mode 100644 index 00000000..b6f9409f --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard4.sparql @@ -0,0 +1,14 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasEmail _:primaryEmail . + _:primaryEmail a v:Email . + _:primaryEmail a v:Work . + _:primaryEmail v:email ?primaryEmail . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:primaryEmail ?primaryEmail +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard5.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard5.sparql new file mode 100644 index 00000000..6deedc83 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard5.sparql @@ -0,0 +1,14 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasTelephone _:telephone . + _:telephone a v:Telephone . + _:telephone a v:Voice . + _:telephone v:telephone ?phoneNumber . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:phoneNumber ?phoneNumber +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard6.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard6.sparql new file mode 100644 index 00000000..d5c0f26e --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard6.sparql @@ -0,0 +1,15 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasTelephone _:primaryTelephone . + _:primaryTelephone a v:Telephone . + _:primaryTelephone a v:Voice . + _:primaryTelephone a v:Work . + _:primaryTelephone v:telephone ?primaryPhoneNumber . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:primaryPhoneNumber ?primaryPhoneNumber +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard7.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard7.sparql new file mode 100644 index 00000000..39982679 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard7.sparql @@ -0,0 +1,14 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasTelephone _:fax . + _:fax a v:Telephone . + _:fax a v:Fax. + _:fax v:telephone ?faxNumber . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:faxNumber ?faxNumber +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard8.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard8.sparql new file mode 100644 index 00000000..eb88f650 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard8.sparql @@ -0,0 +1,37 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasAddress _:address . + _:address a v:Address . + _:address v:streetAddress ?streetAddress . + _:address v:locality ?addressCity . + _:address v:region ?addressState . + _:address v:postalCode ?addressPostalCode . + _:address v:country ?addressCountry . +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:mailingAddress ?address . + ?address vivo:addressCity ?addressCity . + ?address vivo:addressState ?addressState . + ?address vivo:addressCountry ?addressCountry . + ?address vivo:addressPostalCode ?addressPostalCode . + OPTIONAL { + ?address vivo:address1 ?address1 . + ?address vivo:address2 ?address2 . + ?address vivo:address3 ?address3 . + BIND (CONCAT(?address1, ", ", ?address2, ", ", ?address3) AS ?streetAddress) + } + OPTIONAL { + ?address vivo:address1 ?address1 . + ?address vivo:address2 ?address2 . + FILTER NOT EXISTS { ?address vivo:address3 ?address3 } + BIND (CONCAT(?address1, ", ", ?address2) AS ?streetAddress) + } + OPTIONAL { + ?address vivo:address1 ?address1 + BIND(?address1 as ?streetAddress) + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard9.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard9.sparql new file mode 100644 index 00000000..d400de8f --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/vcard9.sparql @@ -0,0 +1,19 @@ +PREFIX arg: +PREFIX foaf: +PREFIX rdfs: +PREFIX v: +PREFIX vivo: + +CONSTRUCT { + ?vcard v:hasURL _:url . + _:url a v:URL . + _:url v:url ?linkURI . + _:url rdfs:label ?linkAnchorText +} WHERE { + ?s arg:ARG_2000028 ?vcard . + ?s vivo:webpage ?webpage . + ?webpage vivo:linkURI ?linkURI . + OPTIONAL { + ?webpage vivo:linkAnchorText ?linkAnchorText + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/AdvisingRelationshipDel.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/AdvisingRelationshipDel.sparql new file mode 100644 index 00000000..485c7328 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/AdvisingRelationshipDel.sparql @@ -0,0 +1,19 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?advisee vivo:adviseeIn ?advisingRelationship . + ?advisingRelationship vivo:advisee ?advisee . + ?advisor vivo:advisorIn ?advisingRelationship . + ?advisingRelationship vivo:advisor ?advisor +} WHERE { + ?advisee vivo:adviseeIn ?advisingRelationship . + OPTIONAL { + ?advisingRelationship vivo:advisee ?advisee . + } + ?advisor vivo:advisorIn ?advisingRelationship . + OPTIONAL { + ?advisingRelationship vivo:advisor ?advisor + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/EditorshipDel.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/EditorshipDel.sparql new file mode 100644 index 00000000..dd934496 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/EditorshipDel.sparql @@ -0,0 +1,14 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?person vivo:editorOf ?document . + ?document vivo:editor ?person +} WHERE { + { + ?person vivo:editorOf ?document + } UNION { + ?document vivo:editor ?person + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/orcidDel.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/orcidDel.sparql new file mode 100644 index 00000000..9cf17806 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/orcidDel.sparql @@ -0,0 +1,9 @@ +PREFIX vivo: +PREFIX owl: + +CONSTRUCT { + ?s vivo:orcidId ?orcidString . +} WHERE { + ?s vivo:orcidId ?orcidString + FILTER(isLiteral(?orcidString)) +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/post/awardedDegreeDel.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/post/awardedDegreeDel.sparql new file mode 100644 index 00000000..5d2ad1c6 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/post/awardedDegreeDel.sparql @@ -0,0 +1,19 @@ +PREFIX vivo: +PREFIX owl: +PREFIX foaf: + +CONSTRUCT { + ?educationalProcess ?degree . + ?degree ?educationalProcess . + ?educationalProcess ?org . + ?org ?educationalProcess . +} WHERE { + ?educationalProcess ?degree . + ?person ?educationalProcess . + ?degree a vivo:AcademicDegree . + OPTIONAL { ?degree ?educationalProcess } + OPTIONAL { + ?educationalProcess ?org . + ?org a foaf:Organization . + } +} diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/vcardDel.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/vcardDel.sparql new file mode 100644 index 00000000..439b7599 --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/deletions/vcardDel.sparql @@ -0,0 +1,67 @@ +PREFIX arg: +PREFIX foaf: +PREFIX v: +PREFIX vivo: +PREFIX bibo: + +CONSTRUCT { + ?s foaf:firstName ?firstName . + ?s foaf:lastName ?lastName . + ?s vivo:middleName ?middleName . + ?s bibo:prefixName ?prefix . + ?s bibo:suffixName ?suffix . + ?s vivo:email ?email . + ?s vivo:primaryEmail ?primaryEmail . + ?s vivo:phoneNumber ?phoneNumber . + ?s vivo:primaryPhoneNumber ?primaryPhoneNumber . + ?s vivo:faxNumber ?faxNumber . + ?s vivo:mailingAddress ?address . + ?address ?addressP ?addressO . + ?s vivo:webpage ?webpage . + ?webpage ?webpageP ?webpageO . +} WHERE { + { + ?s foaf:firstName ?firstName . + } + UNION { + ?s foaf:lastName ?lastName . + } + UNION { + ?s vivo:middleName ?middleName + } + UNION { + ?s bibo:prefixName ?prefix + } + UNION { + ?s bibo:suffixName ?suffix + } + UNION { + ?s vivo:email ?email + } + UNION { + ?s vivo:primaryEmail ?primaryEmail + } + UNION { + ?s vivo:phoneNumber ?phoneNumber + } + UNION { + ?s vivo:primaryPhoneNumber ?primaryPhoneNumber + } + UNION { + ?s vivo:faxNumber ?faxNumber + } + UNION { + ?s vivo:mailingAddress ?address . + } + UNION { + ?s vivo:mailingAddress ?address . + ?address ?addressP ?addressO + } + UNION { + ?s vivo:webpage ?webpage + } + UNION { + ?s vivo:webpage ?webpage . + ?webpage ?webpageP ?webpageO + } +} diff --git a/productMods/WEB-INF/ontologies/update/success.n3 b/productMods/WEB-INF/ontologies/update/success.n3 index 14e94531..d24d34f6 100644 --- a/productMods/WEB-INF/ontologies/update/success.n3 +++ b/productMods/WEB-INF/ontologies/update/success.n3 @@ -2,9 +2,9 @@ @prefix owl: . @prefix rdf: . - vitro:updatedToOntology . - rdf:type owl:Thing . - vitro:updatedOntology . - vitro:fromOntologyVersion "1.4" . - vitro:toOntologyVersion "1.5" . - \ No newline at end of file + vitro:updatedToOntology . + rdf:type owl:Thing . + vitro:updatedOntology . + vitro:fromOntologyVersion "1.5" . + vitro:toOntologyVersion "1.6" . + diff --git a/productMods/WEB-INF/resources/startup_listeners.txt b/productMods/WEB-INF/resources/startup_listeners.txt index cd298849..b0cb3e8d 100644 --- a/productMods/WEB-INF/resources/startup_listeners.txt +++ b/productMods/WEB-INF/resources/startup_listeners.txt @@ -32,14 +32,14 @@ edu.cornell.mannlib.vitro.webapp.web.images.PlaceholderUtil$Setup # Update the URIs on Permission Sets on UserAccounts from model (1.4) to 1.5. edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdatePermissionSetUris -# Invokes process to perform updates to align with ontology changes if needed --> -# Needs to run before submodels are attached and Pellet is set up --> -#edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase - edu.cornell.mannlib.vitro.webapp.servlet.setup.FileGraphSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.SimpleReasonerSetup +# Invokes process to perform updates to align with ontology changes if needed --> +# Needs to run before submodels are attached and Pellet is set up --> +edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase + # Must run after JenaDataSourceSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.ThemeInfoSetup diff --git a/productMods/config/listViewConfig-additionalEmail.xml b/productMods/config/listViewConfig-additionalEmail.xml new file mode 100644 index 00000000..50dc4188 --- /dev/null +++ b/productMods/config/listViewConfig-additionalEmail.xml @@ -0,0 +1,42 @@ + + + + + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT DISTINCT ?vcard ?email + ?emailAddress + WHERE { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email + OPTIONAL { ?email vcard:email ?emailAddress } + MINUS {?email a vcard:Work} + } + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + CONSTRUCT { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email ?emailProperty ?emailValue + } WHERE { + { + ?subject ?property ?vcard + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email ?emailProperty ?emailValue + } + } + + + + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor + diff --git a/productMods/config/listViewConfig-advisorIn.xml b/productMods/config/listViewConfig-advisorIn.xml index 662acc78..30f83e1e 100644 --- a/productMods/config/listViewConfig-advisorIn.xml +++ b/productMods/config/listViewConfig-advisorIn.xml @@ -1,159 +1,183 @@ - - - - - - - - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass - ?advisory - ?advisoryLabel - ?localName - ?advisee - ?adviseeLabel - ?degreeLabel - ?degreeAbbr - ?dateTimeStart - ?dateTimeEnd - - WHERE { - ?subject ?property ?advisory - LET ( ?localName := afn:localname(?advisory) ) - OPTIONAL { ?advisory rdfs:label ?advisoryLabel } - OPTIONAL { ?advisory core:advisee ?advisee - OPTIONAL { ?advisee rdfs:label ?adviseeLabel } - } - OPTIONAL { ?advisory core:degreeCandidacy ?degree - OPTIONAL { ?degree rdfs:label ?degreeLabel } - OPTIONAL { ?degree core:abbreviation ?degreeAbbr } - } - - OPTIONAL { ?advisory vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf core:AdvisingRelationship - } - - OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - } - OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - - - } ORDER BY ?subclass DESC(?dateTimeEnd) - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subclass rdfs:subClassOf core:AdvisingRelationship - } WHERE { - ?subclass rdfs:subClassOf core:AdvisingRelationship - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?advisory . - ?advisory ?advisoryProperty ?advisoryValue . - ?advisory rdfs:label ?advisoryLabel - } WHERE { - { - ?subject ?property ?advisory - } UNION { - ?subject ?property ?advisory . - ?advisory ?advisoryProperty ?advisoryValue - } UNION { - ?subject ?property ?advisory . - ?advisory ?advisoryProperty ?advisoryValue . - ?advisory rdfs:label ?advisoryLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - - CONSTRUCT { - ?subject ?property ?advisory . - ?advisory core:advisee ?advisee . - ?advisee rdfs:label ?adviseeLabel . - ?advisory core:degreeCandidacy ?degree . - ?degree rdfs:label ?degreeLabel . - ?degree core:abbreviation ?degreeAbbr - } WHERE { - { - ?subject ?property ?advisory - } UNION { - ?subject ?property ?advisory. - ?advisory core:advisee ?advisee - } UNION { - ?subject ?property ?advisory . - ?advisory core:advisee ?advisee . - ?advisee rdfs:label ?adviseeLabel - } UNION { - ?subject ?property ?advisory . - ?advisory core:degreeCandidacy ?degree - } UNION { - ?subject ?property ?advisory . - ?advisory core:degreeCandidacy ?degree . - ?degree rdfs:label ?degreeLabel - } UNION { - ?subject ?property ?advisory . - ?advisory core:degreeCandidacy ?degree . - ?degree rdfs:label ?degreeLabel . - ?degree core:abbreviation ?degreeAbbr - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?award . - ?award core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?award . - ?award core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?award . - ?award core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?award . - ?award core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - - - - + + + + + + + + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + ?advisory + ?advisoryLabel + ?localName + ?advisee + ?adviseeLabel + ?degreeLabel + ?degreeAbbr + ?dateTimeStart + ?dateTimeEnd + + WHERE { + ?subject ?property ?advisory + LET ( ?localName := afn:localname(?advisory) ) + OPTIONAL { ?advisory rdfs:label ?advisoryLabel } + OPTIONAL { ?advisory core:relates ?advisee . + ?advisee a foaf:Person . + OPTIONAL { ?advisee rdfs:label ?adviseeLabel } + } + OPTIONAL { ?advisory core:relates ?degree . + ?degree a core:AcademicDegree . + OPTIONAL { ?degree rdfs:label ?degreeLabel } + OPTIONAL { ?degree core:abbreviation ?degreeAbbr } + } + + OPTIONAL { ?advisory vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf core:AdvisingRelationship + } + + OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + } + OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + + FILTER ( ?subject != ?advisee ) + } ORDER BY ?subclass DESC(?dateTimeEnd) + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subclass rdfs:subClassOf core:AdvisingRelationship + } WHERE { + ?subclass rdfs:subClassOf core:AdvisingRelationship + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory ?advisoryProperty ?advisoryValue . + ?advisory rdfs:label ?advisoryLabel + } WHERE { + { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory ?advisoryProperty ?advisoryValue + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory ?advisoryProperty ?advisoryValue . + ?advisory rdfs:label ?advisoryLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + CONSTRUCT { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?advisee . + ?advisee a foaf:Person . + ?advisee rdfs:label ?adviseeLabel . + ?advisory core:relates ?degree . + ?degree a core:AcademicDegree . + ?degree rdfs:label ?degreeLabel . + ?degree core:abbreviation ?degreeAbbr + } WHERE { + { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + } UNION { + ?subject ?property ?advisory. + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?advisee . + ?advisee a foaf:Person . + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?advisee . + ?advisee a foaf:Person . + ?advisee rdfs:label ?adviseeLabel + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?degree . + ?degree a core:AcademicDegree . + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?degree . + ?degree a core:AcademicDegree . + ?degree rdfs:label ?degreeLabel + } UNION { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?advisory core:relates ?degree . + ?degree a core:AcademicDegree . + ?degree rdfs:label ?degreeLabel . + ?degree core:abbreviation ?degreeAbbr + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?award core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?award core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?award core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?advisory . + ?advisory a core:AdvisingRelationship . + ?award core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml index 15b952c9..51f0a127 100644 --- a/productMods/config/listViewConfig-authorInAuthorship.xml +++ b/productMods/config/listViewConfig-authorInAuthorship.xml @@ -10,6 +10,7 @@ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> PREFIX bibo: <http://purl.org/ontology/bibo/> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT DISTINCT ?subclass ?authorship @@ -27,7 +28,8 @@ ?hideThis WHERE { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Document . ?infoResource rdfs:label ?infoResourceName OPTIONAL { ?infoResource bibo:volume ?volume } @@ -40,7 +42,8 @@ OPTIONAL { ?infoResource core:publisher ?publisherObj . ?publisherObj rdfs:label ?publisher } - OPTIONAL { ?infoResource core:editor ?editorObj . + OPTIONAL { ?infoResource core:relatedBy ?editorship . + ?editorObj core:relatedBy ?editorship . ?editorObj rdfs:label ?editor } OPTIONAL { ?infoResource core:partOf ?partOfObj . @@ -80,7 +83,8 @@ CONSTRUCT { ?subject ?property ?authorship . ?authorship ?authorshipProperty ?authorshipValue . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Document . ?infoResource rdfs:label ?infoResourceName . ?infoResource core:hasPublicationVenue ?publishedIn . ?publishedIn rdfs:label ?journal @@ -116,6 +120,7 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?subject ?property ?authorship . ?authorship ?authorshipProperty ?authorshipValue . @@ -123,7 +128,10 @@ ?infoResource ?infoResourceProperty ?infoResourceValue . ?infoResource bibo:reproducedIn ?appearsInObj . ?infoResource core:publisher ?publisherObj . - ?infoResource core:editor ?editorObj . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . ?infoResource core:partOf ?partOfObj . ?appearsInObj rdfs:label ?appearsIn . ?publisherObj rdfs:label ?publisher . @@ -138,29 +146,31 @@ ?authorship ?authorshipProperty ?authorshipValue } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource + ?authorship core:relates ?infoResource } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Document . ?infoResource ?infoResourceProperty ?infoResourceValue } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . ?infoResource bibo:reproducedIn ?appearsInObj . ?appearsInObj rdfs:label ?appearsIn } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . ?infoResource core:publisher ?publisherObj . ?publisherObj rdfs:label ?publisher } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . - ?infoResource core:editor ?editorObj . + ?authorship core:relates ?infoResource . + ?infoResource core:relatedBy ?editorship . + ?editorship core:relates ?editorObj . ?editorObj rdfs:label ?editor } UNION { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . ?infoResource core:partOf ?partOfObj . ?partOfObj rdfs:label ?partOf } @@ -170,14 +180,17 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX bibo: <http://purl.org/ontology/bibo/> CONSTRUCT { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Document . ?infoResource core:dateTimeValue ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime } WHERE { ?subject ?property ?authorship . - ?authorship core:linkedInformationResource ?infoResource . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Document . ?infoResource core:dateTimeValue ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime } diff --git a/productMods/config/listViewConfig-awardOrHonor.xml b/productMods/config/listViewConfig-awardOrHonor.xml index d118b4fd..14e49603 100644 --- a/productMods/config/listViewConfig-awardOrHonor.xml +++ b/productMods/config/listViewConfig-awardOrHonor.xml @@ -1,147 +1,167 @@ - - - - - - - - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?awardReceipt - ?receiptLabel - ?award - ?awardLabel - ?conferredBy - ?conferredByLabel - ?dateTimeStart - ?dateTimeEnd - ?dateTime - - WHERE { - ?subject ?property ?awardReceipt . - OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel } - OPTIONAL { ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt - OPTIONAL { ?award rdfs:label ?awardLabel } - OPTIONAL { ?award core:awardConferredBy ?conferredBy - OPTIONAL { ?conferredBy rdfs:label ?conferredByLabel } - } - } - OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - } - OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue - OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } - } - } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - - CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt . - ?award rdfs:label ?awardLabel . - ?award core:awardConferredBy ?conferredBy . - ?conferredBy rdfs:label ?conferredByLabel - } WHERE { - { - ?subject ?property ?awardReceipt - } UNION { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel - } UNION { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt - } UNION { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt . - ?award rdfs:label ?awardLabel - } UNION { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt . - ?award rdfs:label ?awardLabel . - ?award core:awardConferredBy ?conferredBy - } UNION { - ?subject ?property ?awardReceipt . - ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:receiptOf ?award . - ?award core:receipt ?awardReceipt . - ?award rdfs:label ?awardLabel . - ?award core:awardConferredBy ?conferredBy . - ?conferredBy rdfs:label ?conferredByLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } WHERE { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } - - - - + + + + + + + + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?awardReceipt + ?receiptLabel + ?award + ?awardLabel + ?assignedBy + ?assignedByLabel + ?dateTimeStart + ?dateTimeEnd + ?dateTime + + WHERE { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel } + OPTIONAL { ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt + OPTIONAL { ?award rdfs:label ?awardLabel } + OPTIONAL { ?award core:assignedBy ?assignedBy + OPTIONAL { ?assignedBy rdfs:label ?assignedByLabel } + } + } + OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + } + OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue + OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } + } + } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + CONSTRUCT { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel . + ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt . + ?award rdfs:label ?awardLabel . + ?award core:assignedBy ?assignedBy . + ?assignedBy rdfs:label ?assignedByLabel + } WHERE { + { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + } UNION { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel + } UNION { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel . + ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt + } UNION { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel . + ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt . + ?award rdfs:label ?awardLabel + } UNION { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel . + ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt . + ?award rdfs:label ?awardLabel . + ?award core:assignedBy ?assignedBy + } UNION { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt rdfs:label ?receiptLabel . + ?awardReceipt core:relates ?award . + ?award a core:Award . + ?award core:relatedBy ?awardReceipt . + ?award rdfs:label ?awardLabel . + ?award core:assignedBy ?assignedBy . + ?assignedBy rdfs:label ?assignedByLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } WHERE { + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . + ?awardReceipt core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } + + + + diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml index 986356f3..5334d50d 100644 --- a/productMods/config/listViewConfig-educationalTraining.xml +++ b/productMods/config/listViewConfig-educationalTraining.xml @@ -20,12 +20,19 @@ ?majorField ?deptOrSchool ?info ?dateTimeStart ?dateTimeEnd WHERE { - ?subject ?property ?edTraining + ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess OPTIONAL {?edTraining vitro:mostSpecificType ?trainingType . - ?trainingType rdfs:subClassOf core:EducationalTraining . + ?trainingType rdfs:subClassOf core:EducationalProcess . ?trainingType rdfs:label ?typeName } - OPTIONAL { ?edTraining core:trainingAtOrganization ?org . + OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree . + ?degree a core:AcademicDegree + OPTIONAL { ?degree rdfs:label ?degreeName } + OPTIONAL { ?degree core:abbreviation ?degreeAbbr } + } + OPTIONAL { ?awardedDegree core:assignedBy ?org . ?org rdfs:label ?orgName OPTIONAL { ?org vitro:mostSpecificType ?subclass . @@ -33,10 +40,6 @@ } } - OPTIONAL { ?edTraining core:degreeEarned ?degree - OPTIONAL { ?degree rdfs:label ?degreeName } - OPTIONAL { ?degree core:abbreviation ?degreeAbbr } - } OPTIONAL { ?edTraining core:majorField ?majorField } OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool } OPTIONAL { ?edTraining core:supplementalInformation ?info } @@ -69,30 +72,44 @@ CONSTRUCT { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining ?edTrainingProp ?edTrainingValue . - ?edTraining core:trainingAtOrganization ?org . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:assignedBy ?org . ?org rdfs:label ?orgName . - ?edTraining core:degreeEarned ?degree . + ?awardedDegree core:relates ?degree . ?edTraining core:dateTimeInterval ?dateTimeInterval } WHERE { { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess } UNION { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining ?edTrainingProp ?edTrainingValue } UNION { ?subject ?property ?edTraining . - ?edTraining core:trainingAtOrganization ?org . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + } + UNION { + ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:assignedBy ?org . ?org rdfs:label ?orgName } UNION { ?subject ?property ?edTraining . - ?edTraining core:degreeEarned ?degree . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree } UNION { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining core:dateTimeInterval ?dateTimeInterval } } @@ -104,17 +121,20 @@ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> CONSTRUCT { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining vitro:mostSpecificType ?trainingType . ?trainingType rdfs:subClassOf core:EducationalTraining . ?trainingType rdfs:label ?typeName } WHERE { { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining vitro:mostSpecificType ?trainingType . ?trainingType rdfs:subClassOf core:EducationalTraining } UNION { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining vitro:mostSpecificType ?trainingType . ?trainingType rdfs:subClassOf core:EducationalTraining . ?trainingType rdfs:label ?typeName @@ -127,16 +147,23 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { + ?degree a core:AcademicDegree . ?degree rdfs:label ?degreeName . ?degree core:abbreviation ?degreeAbbr } WHERE { { ?subject ?property ?edTraining . - ?edTraining core:degreeEarned ?degree . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree . + ?degree a core:AcademicDegree . ?degree rdfs:label ?degreeName } UNION { ?subject ?property ?edTraining . - ?edTraining core:degreeEarned ?degree . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree . + ?degree a core:AcademicDegree . ?degree core:abbreviation ?degreeAbbr } } @@ -151,6 +178,7 @@ ?dateTimeStartValue core:dateTime ?dateTimeStart . } WHERE { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart . @@ -166,6 +194,7 @@ ?dateTimeEndValue core:dateTime ?dateTimeEnd } WHERE { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . ?dateTimeEndValue core:dateTime ?dateTimeEnd diff --git a/productMods/config/listViewConfig-fullName.xml b/productMods/config/listViewConfig-fullName.xml new file mode 100644 index 00000000..c986c87c --- /dev/null +++ b/productMods/config/listViewConfig-fullName.xml @@ -0,0 +1,46 @@ + + + + + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT DISTINCT ?vcard ?fullName + ?firstName + ?middleName + ?lastName + WHERE { + ?subject ?property ?vcard . + ?vcard vcard:hasName ?fullName + OPTIONAL { ?fullName vcard:givenName ?firstName } + OPTIONAL { ?fullName vcard:middleName ?middleName } + OPTIONAL { ?fullName vcard:familyName ?lastName } + + } + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + CONSTRUCT { + ?subject ?property ?vcard . + ?vcard vcard:hasName ?fullName . + ?fullName ?fullNameProperty ?fullNameValue + } WHERE { + { + ?subject ?property ?vcard + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasName ?fullName + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasName ?fullName . + ?fullName ?fullNameProperty ?fullNameValue + } + } + + + + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor + diff --git a/productMods/config/listViewConfig-hasAttendeeRole.xml b/productMods/config/listViewConfig-hasAttendeeRole.xml index 39ce6996..9e5a407f 100644 --- a/productMods/config/listViewConfig-hasAttendeeRole.xml +++ b/productMods/config/listViewConfig-hasAttendeeRole.xml @@ -1,354 +1,385 @@ - - - - - - - - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - PREFIX event: <http://purl.org/NET/c4dm/event.owl#> - - SELECT DISTINCT ?subclass - ?role ?roleLabel - ?event1 ?event1Name ?event1Label - ?event2 ?event2Label - ?series ?seriesLabel - ?event3 - ?dateTimeStart - ?dateTimeEnd - - WHERE { - - ?subject ?property ?role - - OPTIONAL { ?role rdfs:label ?roleLabel } - - OPTIONAL { ?role vivo:roleRealizedIn ?event1 - LET (?event1Name := afn:localname(?event1)) - - OPTIONAL { ?event1 rdfs:label ?event1Label } - - OPTIONAL { ?event2 a event:Event . - OPTIONAL { ?event2 rdfs:label ?event2Label } - - { - ?event1 vivo:eventWithin ?event2 - } UNION { - ?event2 vivo:includesEvent ?event1 - } - } - OPTIONAL { - { - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:eventWithin ?event2 - } UNION { - ?event2 vivo:includesEvent ?event3 . - ?event3 vivo:includesEvent ?event1 - - } - OPTIONAL { ?event2 rdfs:label ?event2Label } - } - - - OPTIONAL { ?series a vivo:EventSeries . - OPTIONAL { ?series rdfs:label ?seriesLabel } - - { - ?event1 vivo:inEventWithin ?series - } UNION { - ?series vivo:seriesForEvent ?event1 - } - } - OPTIONAL { - { - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:inEventSeries ?series - } UNION { - ?event3 vivo:includesEvent ?event1 . - ?series vivo:seriesForEvent ?event3 - } - OPTIONAL { ?series rdfs:label ?seriesLabel } - } - - - ?event1 vitro:mostSpecificType ?subclass . - - { - ?subclass rdfs:subClassOf event:Event - } UNION { - ?subclass owl:equivalentClass event:Event - } - - - } - - OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval vivo:end ?dateTimeEndValue . - ?dateTimeEndValue vivo:dateTime ?dateTimeEnd - } - } - - - FILTER ( bound(?event1) ) - - - } ORDER BY ?subclass DESC(?dateTime) ?event1Label ?event1Name - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - PREFIX event: <http://purl.org/NET/c4dm/event.owl#> - - CONSTRUCT { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event1 vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf event:Event . - ?subclass owl:equivalentClass event:Event . - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event1 vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf event:Event - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event1 vitro:mostSpecificType ?subclass . - ?subclass owl:equivalentClass event:Event - } - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?event1 rdfs:label ?event1Label - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event1 rdfs:label ?event1Label - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX event: <http://purl.org/NET/c4dm/event.owl#> - - CONSTRUCT { - ?subject ?property ?role . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event2 . - ?event2 vivo:includesEvent ?event1 . - ?event2 rdfs:label ?event2Label - } WHERE { - - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event2 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event2 . - ?event2 rdfs:label ?event2Label - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event2 vivo:includesEvent ?event1 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event2 vivo:includesEvent ?event1 . - ?event2 rdfs:label ?event2Label - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX event: <http://purl.org/NET/c4dm/event.owl#> - - CONSTRUCT { - ?subject ?property ?role . - ?event3 vivo:eventWithin ?event2 . - ?event2 vivo:includesEvent ?event3 . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:includesEvent ?event1 . - ?event2 rdfs:label ?event2Label - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:eventWithin ?event2 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:eventWithin ?event2 . - ?event2 rdfs:label ?event2Label - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event2 vivo:includesEvent ?event3 . - ?event3 vivo:includesEvent ?event1 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?event2 a event:Event . - ?event2 vivo:includesEvent ?event3 . - ?event3 vivo:includesEvent ?event1 . - ?event2 rdfs:label ?event2Label - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX event: <http://purl.org/NET/c4dm/event.owl#> - - CONSTRUCT { - ?subject ?property ?role . - ?series a vivo:EventSeries . - ?event1 vivo:inEventSeries ?series . - ?series vivo:seriesForEvent ?event1 . - ?series rdfs:label ?seriesLabel - } WHERE { - - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?event1 vivo:inEventSeries ?series - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?event1 vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?event1 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?event1 . - ?series rdfs:label ?seriesLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?workshop vivo:inEventSeries ?series . - ?series vivo:seriesForEvent ?event3 . - ?series a vivo:EventSeries . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:includesEvent ?event1 . - ?series rdfs:label ?seriesLabel - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:inEventSeries ?series - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?event1 vivo:eventWithin ?event3 . - ?event3 vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?event3 . - ?workshop vivo:includesEvent ?event1 - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?event1 . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?event3 . - ?event3 vivo:includesEvent ?event1 . - ?series rdfs:label ?seriesLabel - } - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTimeStart - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:end ?dateTimeEndValue . - ?dateTimeEndValue vivo:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:end ?dateTimeEndValue . - ?dateTimeEndValue vivo:dateTime ?dateTimeEnd - } - - - + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX event: <http://purl.org/NET/c4dm/event.owl#> + + SELECT DISTINCT ?subclass + ?role ?roleLabel + ?event1 ?event1Name ?event1Label + ?event2 ?event2Label + ?series ?seriesLabel + ?event3 + ?dateTimeStart + ?dateTimeEnd + + WHERE { + + ?subject ?property ?role + + OPTIONAL { ?role rdfs:label ?roleLabel } + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 + LET (?event1Name := afn:localname(?event1)) + + OPTIONAL { ?event1 rdfs:label ?event1Label } + + OPTIONAL { ?event2 a event:Event . + OPTIONAL { ?event2 rdfs:label ?event2Label } + + { + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 + } UNION { + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } + } + OPTIONAL { + { + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 + } UNION { + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + + } + OPTIONAL { ?event2 rdfs:label ?event2Label } + } + + + OPTIONAL { ?series a vivo:EventSeries . + OPTIONAL { ?series rdfs:label ?seriesLabel } + + { + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series + } UNION { + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } + } + OPTIONAL { + { + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?series + } UNION { + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 + } + OPTIONAL { ?series rdfs:label ?seriesLabel } + } + + + ?event1 vitro:mostSpecificType ?subclass . + + { + ?subclass rdfs:subClassOf event:Event + } UNION { + ?subclass owl:equivalentClass event:Event + } + + + } + + OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval vivo:end ?dateTimeEndValue . + ?dateTimeEndValue vivo:dateTime ?dateTimeEnd + } + } + + + FILTER ( bound(?event1) ) + + + } ORDER BY ?subclass DESC(?dateTime) ?event1Label ?event1Name + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX event: <http://purl.org/NET/c4dm/event.owl#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event1 vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf event:Event . + ?subclass owl:equivalentClass event:Event . + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event1 vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf event:Event + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event1 vitro:mostSpecificType ?subclass . + ?subclass owl:equivalentClass event:Event + } + } + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue . + ?event1 rdfs:label ?event1Label + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event1 rdfs:label ?event1Label + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX event: <http://purl.org/NET/c4dm/event.owl#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?event2 rdfs:label ?event2Label + } WHERE { + + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 . + ?event2 rdfs:label ?event2Label + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?event2 rdfs:label ?event2Label + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX event: <http://purl.org/NET/c4dm/event.owl#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?event2 rdfs:label ?event2Label + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 . + ?event2 rdfs:label ?event2Label + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?event2 a event:Event . + ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?event2 rdfs:label ?event2Label + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX event: <http://purl.org/NET/c4dm/event.owl#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?series rdfs:label ?seriesLabel + } WHERE { + + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series . + ?series rdfs:label ?seriesLabel + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?series rdfs:label ?seriesLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?series . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?series rdfs:label ?seriesLabel + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?series + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?series . + ?series rdfs:label ?seriesLabel + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 . + ?series a vivo:EventSeries . + ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 . + ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1 . + ?series rdfs:label ?seriesLabel + } + } + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTimeStart + } + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:end ?dateTimeEndValue . + ?dateTimeEndValue vivo:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:end ?dateTimeEndValue . + ?dateTimeEndValue vivo:dateTime ?dateTimeEnd + } + + + diff --git a/productMods/config/listViewConfig-hasEditReviewRole.xml b/productMods/config/listViewConfig-hasEditReviewRole.xml deleted file mode 100644 index 96770d26..00000000 --- a/productMods/config/listViewConfig-hasEditReviewRole.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass ?subclassLabel - # send the property to the template, since this view supports multiple role properties - ?property - ?role - ?activity ?activityName - ?activityLabel - ?infoResource ?infoResourceName - ?infoResourceLabel - ?dateTimeStart ?dateTimeEnd WHERE { - - ?subject ?property ?role - - OPTIONAL { ?role core:roleContributesTo ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - } - - OPTIONAL { ?role core:roleRealizedIn ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - } - - - # NB Currently we can only retrieve subclass for either the - # infoResource or the activity, but not both. Later, we could have - # the query retrieve both and write a custom preprocessor to merge - # the results into a single subclass column. - ?infoResource vitro:mostSpecificType ?subclass . - - ?subclass rdfs:subClassOf ?superclass - FILTER ( ( ?property = core:hasEditorRole && ?superclass = bibo:Collection ) || - ( ?property = core:hasReviewerRole && ?superclass = core:InformationResource ) - ) - - # Get subclass label for display in uncollated view - ?subclass rdfs:label ?subclassLabel - - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - - FILTER ( bound(?infoResource) ) - - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleContributesTo ?infoResource . - ?infoResource vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf ?superclass . - ?subclass rdfs:label ?subclassLabel - } WHERE { - ?subject ?property ?role . - ?role core:roleContributesTo ?infoResource . - ?infoResource vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf ?superclass . - ?subclass rdfs:label ?subclassLabel - FILTER ( ?superclass = bibo:Collection || ?superclass = core:InformationResource ) - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?activity rdfs:label ?activityName - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity rdfs:label ?activityName - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?infoResource rdfs:label ?infoResourceLabel - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?infoResource . - ?infoResource rdfs:label ?infoResourceLabel . - } - } - - - - \ No newline at end of file diff --git a/productMods/config/listViewConfig-hasEditorRole.xml b/productMods/config/listViewConfig-hasEditorRole.xml new file mode 100644 index 00000000..fbae2795 --- /dev/null +++ b/productMods/config/listViewConfig-hasEditorRole.xml @@ -0,0 +1,122 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + ?role + ?subclassLabel + ?activity + (afn:localname(?activity) AS ?activityLocal) + ?activityName + ?dateTimeStart + ?dateTimeEnd + WHERE { + + ?subject ?property ?role + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + OPTIONAL { ?activity rdfs:label ?activityName } + OPTIONAL { ?subclass rdfs:label ?subclassLabel } + } + + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role vitro:mostSpecificType ?roleSubclass . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName . + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } WHERE { + { + ?subject ?property ?role . + ?role a core:EditorRole . + } UNION { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role vitro:mostSpecificType ?roleSubclass + } UNION { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:roleContributesTo ?activity + } UNION { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName . + } UNION { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + } UNION { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a core:EditorRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + \ No newline at end of file diff --git a/productMods/config/listViewConfig-hasInvestigatorRole.xml b/productMods/config/listViewConfig-hasInvestigatorRole.xml index 3b9b1490..98344214 100644 --- a/productMods/config/listViewConfig-hasInvestigatorRole.xml +++ b/productMods/config/listViewConfig-hasInvestigatorRole.xml @@ -1,222 +1,243 @@ - - - - - - - - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT - ?role - ?activity ?activityName - ?activityLabel - ?awardedBy - ?adminedBy - ?awardedByLabel - ?adminedByLabel - ?dateTimeStartRole ?dateTimeEndRole - ?dateTimeStartGrant ?dateTimeEndGrant - ?hideThis - WHERE { - - ?subject ?property ?role - - OPTIONAL { ?role core:roleRealizedIn ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - } - OPTIONAL { ?role core:roleContributesTo ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - } - OPTIONAL { ?activity core:grantAwardedBy ?awardedBy . - ?awardedBy rdfs:label ?awardedByLabel - } - OPTIONAL { ?activity core:administeredBy ?adminedBy . - ?adminedBy rdfs:label ?adminedByLabel - } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole - OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . - ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole - } - OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . - ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole - } - } - OPTIONAL { ?role core:roleContributesTo ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant - OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . - ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant - } - OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . - ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant - } - } - OPTIONAL { ?role core:hideFromDisplay ?hideThis } - # NOT EXISTS { ?role core:hideFromDisplay ?hideThis } - - FILTER ( bound(?activity) ) - - } ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity rdfs:label ?activityLabel - } WHERE { - { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity - } UNION - { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity rdfs:label ?activityLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity rdfs:label ?activityLabel - } WHERE { - { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity - } UNION - { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity rdfs:label ?activityLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?activity rdfs:label ?activityName . - ?activity core:grantAwardedBy ?awardedBy . - ?awardedBy rdfs:label ?awardedByLabel . - ?activity core:administeredBy ?adminedBy . - ?adminedBy rdfs:label ?adminedByLabel - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity core:grantAwardedBy ?awardedBy - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity core:grantAwardedBy ?awardedBy . - ?awardedBy rdfs:label ?awardedByLabel - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity core:administeredBy ?adminedBy - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity core:administeredBy ?adminedBy . - ?adminedBy rdfs:label ?adminedByLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeIntervalRole . - ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . - ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeIntervalRole . - ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . - ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeIntervalRole . - ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . - ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeIntervalRole . - ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . - ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole - } - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleContributesTo ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . - ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . - ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant - } WHERE { - ?subject ?property ?role . - ?role core:roleContributesTo ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . - ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . - ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleContributesTo ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . - ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . - ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant - } WHERE { - ?subject ?property ?role . - ?role core:roleContributesTo ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . - ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . - ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant - } - - - - + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT + ?role + ?activity ?activityName + ?activityLabel + ?awardedBy + ?adminedBy + ?awardedByLabel + ?adminedByLabel + ?dateTimeStartRole ?dateTimeEndRole + ?dateTimeStartGrant ?dateTimeEndGrant + ?hideThis + WHERE { + + ?subject ?property ?role . + ?role a ?objectType . + ?role vitro:mostSpecificType ?subclass + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity + LET (?activityName := afn:localname(?activity)) + OPTIONAL { ?activity rdfs:label ?activityLabel } + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity + LET (?activityName := afn:localname(?activity)) + OPTIONAL { ?activity rdfs:label ?activityLabel } + } + OPTIONAL { ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } + OPTIONAL { ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole + OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . + ?grant core:dateTimeInterval ?dateTimeIntervalGrant + OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + } + OPTIONAL { ?role core:hideFromDisplay ?hideThis } + FILTER ( bound(?activity) && ?subclass = ?objectType) + } ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity + } UNION + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity rdfs:label ?activityLabel + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity + } UNION + { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity rdfs:label ?activityLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } WHERE { + { + ?subject ?property ?role + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:grantAwardedBy ?awardedBy + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:administeredBy ?adminedBy + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . + ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . + ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . + ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . + ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + + + + diff --git a/productMods/config/listViewConfig-hasPresenterRole.xml b/productMods/config/listViewConfig-hasPresenterRole.xml index facd5c18..a6c58288 100644 --- a/productMods/config/listViewConfig-hasPresenterRole.xml +++ b/productMods/config/listViewConfig-hasPresenterRole.xml @@ -1,333 +1,363 @@ - - - - - - - - - - - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass - ?role ?roleLabel - ?presentation ?presentationName ?presentationLabel - ?conference ?conferenceLabel - ?series ?seriesLabel - ?workshop - ?dateTime - - WHERE { - - ?subject ?property ?role - - OPTIONAL { ?role rdfs:label ?roleLabel } - - OPTIONAL { ?role vivo:roleRealizedIn ?presentation - LET (?presentationName := afn:localname(?presentation)) - - OPTIONAL { ?presentation rdfs:label ?presentationLabel } - - OPTIONAL { ?conference a bibo:Conference . - OPTIONAL { ?conference rdfs:label ?conferenceLabel } - - { - ?presentation vivo:eventWithin ?conference - } UNION { - ?conference vivo:includesEvent ?presentation - } - } - OPTIONAL { - { - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:eventWithin ?conference - } UNION { - ?workshop vivo:includesEvent ?presentation . - ?conference vivo:includesEvent ?workshop - } - OPTIONAL { ?conference rdfs:label ?conferenceLabel } - } - - - OPTIONAL { ?series a vivo:EventSeries . - OPTIONAL { ?series rdfs:label ?seriesLabel } - - { - ?presentation vivo:inEventWithin ?series - } UNION { - ?series vivo:seriesForEvent ?presentation - } - } - OPTIONAL { - { - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:inEventSeries ?series - } UNION { - ?workshop vivo:includesEvent ?presentation . - ?series vivo:seriesForEvent ?workshop - } - OPTIONAL { ?series rdfs:label ?seriesLabel } - } - - - ?presentation vitro:mostSpecificType ?subclass . - - { - ?subclass rdfs:subClassOf vivo:Presentation - } UNION { - ?subclass owl:equivalentClass vivo:Presentation - } - - - } - - OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTime - } - } - - - FILTER ( bound(?presentation) ) - - - } ORDER BY ?subclass DESC(?dateTime) ?presentationLabel ?presentationName - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf vivo:Presentation . - ?subclass owl:equivalentClass vivo:Presentation . - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf vivo:Presentation - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass owl:equivalentClass vivo:Presentation - } - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?presentation rdfs:label ?presentationLabel - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?presentation rdfs:label ?presentationLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?conference . - ?conference vivo:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } WHERE { - - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?conference - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?conference . - ?conference rdfs:label ?conferenceLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?conference vivo:includesEvent ?presentation - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?conference vivo:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?workshop vivo:eventWithin ?conference . - ?conference vivo:includesEvent ?workshop . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:eventWithin ?conference - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:eventWithin ?conference . - ?conference rdfs:label ?conferenceLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?conference vivo:includesEvent ?workshop . - ?workshop vivo:includesEvent ?presentation - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?conference a bibo:Conference . - ?conference vivo:includesEvent ?workshop . - ?workshop vivo:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?series a vivo:EventSeries . - ?presentation vivo:inEventSeries ?series . - ?series vivo:seriesForEvent ?presentation . - ?series rdfs:label ?seriesLabel - } WHERE { - - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?presentation vivo:inEventSeries ?series - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?presentation vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?presentation - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?presentation . - ?series rdfs:label ?seriesLabel - } - } - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?workshop vivo:inEventSeries ?series . - ?series vivo:seriesForEvent ?workshop . - ?series a vivo:EventSeries . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:includesEvent ?presentation . - ?series rdfs:label ?seriesLabel - } WHERE { - { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:inEventSeries ?series - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?presentation vivo:eventWithin ?workshop . - ?workshop vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?workshop . - ?workshop vivo:includesEvent ?presentation - } UNION { - ?subject ?property ?role . - ?role vivo:roleRealizedIn ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?workshop . - ?workshop vivo:includesEvent ?presentation . - ?series rdfs:label ?seriesLabel - } - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?role . - ?role vivo:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTimeStart - } - - - - + + + + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + ?role ?roleLabel + ?presentation ?presentationName ?presentationLabel + ?conference ?conferenceLabel + ?series ?seriesLabel + ?workshop + ?dateTime + + WHERE { + + ?subject ?property ?role . + ?role a vivo:PresenterRole + + OPTIONAL { ?role rdfs:label ?roleLabel } + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation + LET (?presentationName := afn:localname(?presentation)) + + OPTIONAL { ?presentation rdfs:label ?presentationLabel } + + OPTIONAL { ?conference a bibo:Conference . + OPTIONAL { ?conference rdfs:label ?conferenceLabel } + + { + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference + } UNION { + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation + } + } + OPTIONAL { + { + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference + } UNION { + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop + } + OPTIONAL { ?conference rdfs:label ?conferenceLabel } + } + + + OPTIONAL { ?series a vivo:EventSeries . + OPTIONAL { ?series rdfs:label ?seriesLabel } + + { + ?presentation vivo:inEventWithin ?series + } UNION { + ?series vivo:seriesForEvent ?presentation + } + } + OPTIONAL { + { + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop vivo:inEventSeries ?series + } UNION { + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?series vivo:seriesForEvent ?workshop + } + OPTIONAL { ?series rdfs:label ?seriesLabel } + } + + + ?presentation vitro:mostSpecificType ?subclass . + + { + ?subclass rdfs:subClassOf vivo:Presentation + } UNION { + ?subclass owl:equivalentClass vivo:Presentation + } + + + } + + OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTime + } + } + + + FILTER ( bound(?presentation) ) + + + } ORDER BY ?subclass DESC(?dateTime) ?presentationLabel ?presentationName + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf vivo:Presentation . + ?subclass owl:equivalentClass vivo:Presentation . + } WHERE { + { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf vivo:Presentation + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation vitro:mostSpecificType ?subclass . + ?subclass owl:equivalentClass vivo:Presentation + } + } + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role ?roleProperty ?roleValue . + ?presentation rdfs:label ?presentationLabel + } WHERE { + { + ?subject ?property ?role . + ?role a vivo:PresenterRole + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation rdfs:label ?presentationLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference rdfs:label ?conferenceLabel + } WHERE { + + { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference rdfs:label ?conferenceLabel + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference rdfs:label ?conferenceLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference rdfs:label ?conferenceLabel + } WHERE { + { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference rdfs:label ?conferenceLabel + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?conference a bibo:Conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference rdfs:label ?conferenceLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?series a vivo:EventSeries . + ?presentation vivo:inEventSeries ?series . + ?series vivo:seriesForEvent ?presentation . + ?series rdfs:label ?seriesLabel + } WHERE { + + { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?presentation vivo:inEventSeries ?series + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?presentation vivo:inEventSeries ?series . + ?series rdfs:label ?seriesLabel + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?series vivo:seriesForEvent ?presentation + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?series vivo:seriesForEvent ?presentation . + ?series rdfs:label ?seriesLabel + } + } + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vivo: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?workshop vivo:inEventSeries ?series . + ?series vivo:seriesForEvent ?workshop . + ?series a vivo:EventSeries . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?series rdfs:label ?seriesLabel + } WHERE { + { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop vivo:inEventSeries ?series + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop vivo:inEventSeries ?series . + ?series rdfs:label ?seriesLabel + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?series vivo:seriesForEvent ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?series a vivo:EventSeries . + ?series vivo:seriesForEvent ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?series rdfs:label ?seriesLabel + } + } + + + + PREFIX vivo: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTimeStart + } + + + + diff --git a/productMods/config/listViewConfig-hasReviewerRole.xml b/productMods/config/listViewConfig-hasReviewerRole.xml new file mode 100644 index 00000000..e65fcada --- /dev/null +++ b/productMods/config/listViewConfig-hasReviewerRole.xml @@ -0,0 +1,122 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + ?role + ?subclassLabel + ?activity + (afn:localname(?activity) AS ?activityLocal) + ?activityName + ?dateTimeStart + ?dateTimeEnd + WHERE { + + ?subject ?property ?role + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + OPTIONAL { ?activity rdfs:label ?activityName } + OPTIONAL { ?subclass rdfs:label ?subclassLabel } + } + + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role vitro:mostSpecificType ?roleSubclass . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName . + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } WHERE { + { + ?subject ?property ?role . + ?role a core:ReviewerRole . + } UNION { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role vitro:mostSpecificType ?roleSubclass + } UNION { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:roleContributesTo ?activity + } UNION { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName . + } UNION { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + } UNION { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a core:ReviewerRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + \ No newline at end of file diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index a54c13b2..471b748e 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -1,149 +1,175 @@ - - - - - - - - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass - # send the property to the template, since this view supports multiple role properties - ?property - ?role - ?roleLabel - ?activity ?activityName - ?activityLabel - ?dateTimeStart ?dateTimeEnd - ?hideThis - WHERE { - ?subject ?property ?role . - ?role a ?objectType - - OPTIONAL { ?role core:roleRealizedIn ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - - - ?activity vitro:mostSpecificType ?subclass - - } - - OPTIONAL { ?role core:roleContributesTo ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - - - ?activity vitro:mostSpecificType ?subclass - - } - - OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { ?role core:hideFromDisplay ?hideThis } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - # NOT EXISTS { ?role core:hideFromDisplay ?hideThis } - - FILTER ( bound(?activity) ) - - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity vitro:mostSpecificType ?subclass . - } WHERE { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity vitro:mostSpecificType ?subclass - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity vitro:mostSpecificType ?subclass . - } WHERE { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity vitro:mostSpecificType ?subclass - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?activity rdfs:label ?activityName - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role core:roleContributesTo ?activity . - ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role core:roleRealizedIn ?activity . - ?activity rdfs:label ?activityName - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?role . - ?role core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - - - - + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + # send the property to the template, since this view supports multiple role properties + ?property + ?role + ?roleLabel + ?activity ?activityName + ?activityLabel + ?dateTimeStart ?dateTimeEnd + ?hideThis + ?objectType + WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role vitro:mostSpecificType ?roleSubclass + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity + LET (?activityName := afn:localname(?activity)) + OPTIONAL { ?activity rdfs:label ?activityLabel } + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role core:relates ?activity + LET (?activityName := afn:localname(?activity)) + OPTIONAL { ?activity rdfs:label ?activityLabel } + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role core:roleContributesTo ?activity + LET (?activityName := afn:localname(?activity)) + OPTIONAL { ?activity rdfs:label ?activityLabel } + + + ?activity vitro:mostSpecificType ?subclass + + } + + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:hideFromDisplay ?hideThis } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + FILTER ( bound(?activity) && ?objectType = ?roleSubclass ) + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role core:relates ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role core:relates ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName + } WHERE { + { + ?subject ?property ?role + } UNION { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role core:relates ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index 63c3f474..43d2c320 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -1,72 +1,80 @@ - - - - - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass - ?authorship - ?person ?personName WHERE { - ?subject ?property ?authorship - OPTIONAL { ?authorship core:authorRank ?rank } - OPTIONAL { ?authorship core:linkedAuthor ?person . - ?person rdfs:label ?personName - - OPTIONAL { ?person vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf foaf:Person - } - - } - - FILTER ( bound(?person) ) - - } ORDER BY ?subclass ?rank ?personName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - CONSTRUCT { - ?subclass rdfs:subClassOf foaf:Person - } WHERE { - ?subclass rdfs:subClassOf foaf:Person - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - CONSTRUCT { - ?subject ?property ?authorship . - ?authorship ?authorshipProperty ?authorshipValue . - ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass - } WHERE { - { - ?subject ?property ?authorship - } UNION { - ?subject ?property ?authorship . - ?authorship ?authorshipProperty ?authorshipValue - } UNION { - ?subject ?property ?authorship . - ?authorship core:linkedAuthor ?person . - ?person rdfs:label ?personName - } UNION { - ?subject ?property ?authorship . - ?authorship core:linkedAuthor ?person . - ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass - } - } - - - - + + + + + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + ?authorship + ?person ?personName + WHERE { + ?subject ?property ?authorship . + ?authorship a core:Authorship + OPTIONAL { ?authorship core:rank ?rank } + OPTIONAL { ?authorship core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName + + OPTIONAL { ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person + } + + } + + FILTER ( bound(?person) ) + + } ORDER BY ?subclass ?rank ?personName + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CONSTRUCT { + ?subclass rdfs:subClassOf foaf:Person + } WHERE { + ?subclass rdfs:subClassOf foaf:Person + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CONSTRUCT { + ?subject ?property ?authorship . + ?authorship ?authorshipProperty ?authorshipValue . + ?authorship core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName . + ?person vitro:mostSpecificType ?subclass + } WHERE { + { + ?subject ?property ?authorship + } UNION { + ?subject ?property ?authorship . + ?authorship ?authorshipProperty ?authorshipValue + } UNION { + ?subject ?property ?authorship . + ?authorship core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName + } UNION { + ?subject ?property ?authorship . + ?authorship core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName . + ?person vitro:mostSpecificType ?subclass + } + } + + + + diff --git a/productMods/config/listViewConfig-mailingAddress.xml b/productMods/config/listViewConfig-mailingAddress.xml index 75049f33..a16c9a6b 100644 --- a/productMods/config/listViewConfig-mailingAddress.xml +++ b/productMods/config/listViewConfig-mailingAddress.xml @@ -1,71 +1,51 @@ - - - - - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - - SELECT DISTINCT ?subclass - ?address - ?localName - ?label - ?street1 - ?street2 - ?street3 - ?city - ?state - ?postalCode - ?country - - WHERE { - ?subject ?property ?address - LET ( ?localName := afn:localname(?address) ) - OPTIONAL { ?address rdfs:label ?label } - OPTIONAL { ?address vivo:address1 ?street1 } - OPTIONAL { ?address vivo:address2 ?street2 } - OPTIONAL { ?address vivo:address3 ?street3 } - OPTIONAL { ?address vivo:addressCity ?city } - OPTIONAL { ?address vivo:addressState ?state } - OPTIONAL { ?address vivo:addressPostalCode ?postalCode } - OPTIONAL { ?address vivo:addressCountry ?country } - - OPTIONAL { ?address vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf vivo:Address - } - - } ORDER BY ?country ?label - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vivo: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subclass rdfs:subClassOf vivo:Address - } WHERE { - ?subclass rdfs:subClassOf vivo:Address - } - - - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?address . - ?address ?addressProperty ?addressValue - } WHERE { - { - ?subject ?property ?address - } UNION { - ?subject ?property ?address . - ?address ?addressProperty ?addressValue - } - } - - - - + + + + + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT DISTINCT ?vcard ?address + ?street + ?locality + ?region + ?postalCode + ?country + + WHERE { + ?subject ?property ?vcard . + ?vcard vcard:hasAddress ?address + OPTIONAL { ?address vcard:streetAddress ?street } + OPTIONAL { ?address vcard:locality ?locality } + OPTIONAL { ?address vcard:region ?region } + OPTIONAL { ?address vcard:postalCode ?postalCode } + OPTIONAL { ?address vcard:country ?country } + + } ORDER BY ?country ?region ?street + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + CONSTRUCT { + ?subject ?property ?vcard . + ?vcard vcard:hasAddress ?address . + ?address ?addressProperty ?addressValue + } WHERE { + { + ?subject ?property ?vcard + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasAddress ?address + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasAddress ?address . + ?address ?addressProperty ?addressValue + } + } + + + + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor + diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml index ec122fe2..a49f0889 100644 --- a/productMods/config/listViewConfig-organizationForPosition.xml +++ b/productMods/config/listViewConfig-organizationForPosition.xml @@ -1,116 +1,128 @@ - - - - - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - SELECT DISTINCT ?subclass - ?position - ?positionTitle - ?person ?personName - ?dateTimeStart ?dateTimeEnd - ?hideThis - WHERE { - ?subject ?property ?position - OPTIONAL { ?position core:positionForPerson ?person . - ?person rdfs:label ?personName - } - - OPTIONAL { ?position vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf core:Position - } - - OPTIONAL { ?position rdfs:label ?positionTitle } - OPTIONAL { ?position core:hideFromDisplay ?hideThis } - OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - # Get current positions only: end date is either null or not in the past - } - # NOT EXISTS { ?position core:hideFromDisplay ?hideThis } - FILTER ( !bound(?dateTimeEnd) || - afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) - - FILTER ( bound(?person) ) - - } ORDER BY ?subclass ?personName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - CONSTRUCT { - ?subject ?property ?position . - ?position vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf core:Position - } WHERE { - ?subject ?property ?position . - ?position vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf core:Position - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?position . - ?position ?positionProperty ?positionValue . - ?person rdfs:label ?personName - } WHERE { - { - ?subject ?property ?position - } UNION { - ?subject ?property ?position . - ?position ?positionProperty ?positionValue - } UNION { - ?subject ?property ?position . - ?position core:positionForPerson ?person . - ?person rdfs:label ?personName - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?position . - ?position core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } WHERE { - ?subject ?property ?position . - ?position core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subject ?property ?position . - ?position core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } WHERE { - ?subject ?property ?position . - ?position core:dateTimeInterval ?dateTimeInterval . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - - - - + + + + + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + SELECT DISTINCT ?subclass + ?position + ?positionTitle + ?person ?personName + ?dateTimeStart ?dateTimeEnd + ?hideThis + WHERE { + ?subject ?property ?position + OPTIONAL { ?position core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName + } + + OPTIONAL { ?position vitro:mostSpecificType ?subclass . + } + + OPTIONAL { ?position rdfs:label ?positionTitle } + OPTIONAL { ?position core:hideFromDisplay ?hideThis } + OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + # Get current positions only: end date is either null or not in the past + } + # NOT EXISTS { ?position core:hideFromDisplay ?hideThis } + FILTER ( !bound(?dateTimeEnd) || + afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) + + FILTER ( bound(?person) ) + + } ORDER BY ?subclass ?personName + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + CONSTRUCT { + ?subject ?property ?position . + ?position a core:Position . + ?position vitro:mostSpecificType ?subclass + } WHERE { + ?subject ?property ?position . + ?position a core:Position . + ?position vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CONSTRUCT { + ?subject ?property ?position . + ?position a core:Position . + ?position ?positionProperty ?positionValue . + ?position core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName + } WHERE { + { + ?subject ?property ?position . + ?position a core:Position . + } UNION { + ?subject ?property ?position . + ?position a core:Position . + ?position ?positionProperty ?positionValue + } UNION { + ?subject ?property ?position . + ?position core:relates ?person . + ?person a foaf:Person . + ?person rdfs:label ?personName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position a core:Position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?position . + ?position a core:Position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position a core:Position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?position . + ?position a core:Position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-personInPosition.xml b/productMods/config/listViewConfig-personInPosition.xml index e3d5b07e..6c161705 100644 --- a/productMods/config/listViewConfig-personInPosition.xml +++ b/productMods/config/listViewConfig-personInPosition.xml @@ -20,7 +20,7 @@ ?outerOrg ?outerOrgName ?dateTimeStart ?dateTimeEnd WHERE { ?subject ?property ?position - OPTIONAL { ?position core:positionInOrganization ?org . + OPTIONAL { ?position core:relates ?org . ?org rdfs:label ?orgName OPTIONAL { ?org core:subOrganizationWithin ?middleOrg . ?middleOrg rdfs:label ?middleOrgName @@ -61,6 +61,7 @@ ?subclass rdfs:subClassOf core:Position } WHERE { ?subject ?property ?position . + ?position a core:Position . ?position vitro:mostSpecificType ?subclass . ?subclass rdfs:subClassOf core:Position } @@ -69,8 +70,10 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?subject ?property ?position . + ?position a core:Position . ?position ?positionProperty ?positionValue . ?org rdfs:label ?orgName . ?org core:subOrganizationWithin ?middleOrg . @@ -79,34 +82,47 @@ ?outerOrg rdfs:label ?outerOrgName } WHERE { { - ?subject ?property ?position + ?subject ?property ?position . + ?position a core:Position . } UNION { ?subject ?property ?position . + ?position a core:Position . ?position ?positionProperty ?positionValue } UNION { ?subject ?property ?position . + ?position a core:Position . ?position core:rank ?rank } UNION { ?subject ?property ?position . - ?position core:positionInOrganization ?org . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org rdfs:label ?orgName } UNION { ?subject ?property ?position . - ?position core:positionInOrganization ?org . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org core:subOrganizationWithin ?middleOrg } UNION { ?subject ?property ?position . - ?position core:positionInOrganization ?org . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org core:subOrganizationWithin ?middleOrg . ?middleOrg rdfs:label ?middleOrgName } UNION { ?subject ?property ?position . - ?position core:positionInOrganization ?org . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org core:subOrganizationWithin ?middleOrg . ?middleOrg core:subOrganizationWithin ?outerOrg } UNION { ?subject ?property ?position . - ?position core:positionInOrganization ?org . + ?position a core:Position . + ?position core:positionInOrganization ?org . + ?org a foaf:Organization . ?org core:subOrganizationWithin ?middleOrg . ?middleOrg core:subOrganizationWithin ?outerOrg . ?outerOrg rdfs:label ?outerOrgName @@ -117,12 +133,14 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { - ?subject ?property ?position . + ?subject ?property ?position . + ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart } WHERE { ?subject ?property ?position . + ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart @@ -133,11 +151,13 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?position . + ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . ?dateTimeEndValue core:dateTime ?dateTimeEnd } WHERE { ?subject ?property ?position . + ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . ?dateTimeEndValue core:dateTime ?dateTimeEnd @@ -145,4 +165,4 @@ - \ No newline at end of file + diff --git a/productMods/config/listViewConfig-primaryEmail.xml b/productMods/config/listViewConfig-primaryEmail.xml new file mode 100644 index 00000000..7f749dd4 --- /dev/null +++ b/productMods/config/listViewConfig-primaryEmail.xml @@ -0,0 +1,46 @@ + + + + + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT DISTINCT ?vcard ?email + ?emailAddress + WHERE { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email a vcard:Work + OPTIONAL { ?email vcard:email ?emailAddress } + + } + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + CONSTRUCT { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email a vcard:Work . + ?email ?emailProperty ?emailValue + } WHERE { + { + ?subject ?property ?vcard + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email a vcard:Work + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasEmail ?email . + ?email a vcard:Work . + ?email ?emailProperty ?emailValue + } + } + + + + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor + diff --git a/productMods/config/listViewConfig-relatedRole.xml b/productMods/config/listViewConfig-relatedRole.xml index e3de6ddf..86460c02 100644 --- a/productMods/config/listViewConfig-relatedRole.xml +++ b/productMods/config/listViewConfig-relatedRole.xml @@ -20,22 +20,24 @@ http://vivoweb.org/ontology/core#realizedRole and http://vivoweb.org/ontology/co ?roleLabel ?roleTypeLabel ?indivInRole (afn:localname(?indivInRole) AS ?indivName) ?indivLabel - ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE { + ?dateTimeInterval ?dateTimeStart ?dateTimeEnd ?objectType + WHERE { - ?subject ?property ?role + ?subject ?property ?role . + ?role a ?objectType OPTIONAL { ?role rdfs:label ?roleLabel } # We need ?subclass in the uncollated query to get the roleTypeLabel - # for roles that have no label (e.g., InvestigatorRole and its subclasses). + # for roles that have no label. OPTIONAL { ?role vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf core:Role OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } - ?roleProp rdfs:subPropertyOf core:roleOf ; - rdfs:domain ?subclass . - OPTIONAL { ?role ?roleProp ?indivInRole + OPTIONAL { ?role <http://purl.obolibrary.org/obo/RO_0000052> ?indivInRole OPTIONAL { ?indivInRole rdfs:label ?indivLabel } } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000055> ?indivInRole + OPTIONAL { ?indivInRole rdfs:label ?indivLabel } + } } OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval @@ -52,46 +54,43 @@ http://vivoweb.org/ontology/core#realizedRole and http://vivoweb.org/ontology/co } ORDER BY ?subclass ?indivLabel ?roleLabel ?roleTypeLabel ?indivName - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - CONSTRUCT { - ?subclass rdfs:subClassOf core:Role . - ?roleProp rdfs:subPropertyOf core:roleOf . - ?roleProp rdfs:domain ?subclass - } WHERE { - ?subclass rdfs:subClassOf core:Role . - ?roleProp rdfs:subPropertyOf core:roleOf ; - rdfs:domain ?subclass - } - - PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> CONSTRUCT { ?subject ?property ?role . + ?role a ?objectType . ?role ?roleProperty ?roleValue . ?role vitro:mostSpecificType ?subclass . ?subclass rdfs:label ?roleTypeLabel . ?indivInRole rdfs:label ?indivLabel } WHERE { { - ?subject ?property ?role + ?subject ?property ?role . + ?role a ?objectType } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role ?roleProperty ?roleValue } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role vitro:mostSpecificType ?subclass } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role vitro:mostSpecificType ?subclass . ?subclass rdfs:label ?roleTypeLabel } UNION { ?subject ?property ?role . - ?role ?roleProp ?indivInRole . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/RO_0000052> ?indivInRole . + ?indivInRole rdfs:label ?indivLabel + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000055> ?indivInRole . ?indivInRole rdfs:label ?indivLabel } } @@ -101,11 +100,13 @@ http://vivoweb.org/ontology/core#realizedRole and http://vivoweb.org/ontology/co PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?role . + ?role a ?objectType . ?role core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart } WHERE { ?subject ?property ?role . + ?role a ?objectType . ?role core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart diff --git a/productMods/config/listViewConfig-telephoneNumber.xml b/productMods/config/listViewConfig-telephoneNumber.xml new file mode 100644 index 00000000..6ab383cb --- /dev/null +++ b/productMods/config/listViewConfig-telephoneNumber.xml @@ -0,0 +1,42 @@ + + + + + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT DISTINCT ?vcard ?phone + ?number + WHERE { + ?subject ?property ?vcard . + ?vcard vcard:hasTelephone ?phone + OPTIONAL { ?phone vcard:telephone ?number } + + } + + + + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + CONSTRUCT { + ?subject ?property ?vcard . + ?vcard vcard:hasTelephone ?phone . + ?phone ?phoneProperty ?phoneValue + } WHERE { + { + ?subject ?property ?vcard + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasTelephone ?phone + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasTelephone ?phone . + ?phone ?phoneProperty ?phoneValue + } + } + + + + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor + diff --git a/productMods/config/listViewConfig-webpage.xml b/productMods/config/listViewConfig-webpage.xml index e1c26599..58ddf13c 100644 --- a/productMods/config/listViewConfig-webpage.xml +++ b/productMods/config/listViewConfig-webpage.xml @@ -9,35 +9,55 @@ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> - SELECT ?link + SELECT ?vcard ?link (afn:localname(?link) AS ?linkName) - ?anchor + ?label ?url ?rank WHERE { - ?subject ?property ?link - OPTIONAL { ?link core:linkAnchorText ?anchor } - OPTIONAL { ?link core:linkURI ?url } + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link + OPTIONAL { ?link rdfs:label ?label } + OPTIONAL { ?link vcard:url ?url } OPTIONAL { ?link core:rank ?rank } FILTER ( bound(?url) ) - } ORDER BY ?rank ?anchor + } ORDER BY ?rank ?label + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> CONSTRUCT { - ?subject ?property ?link . - ?link ?linkProp ?linkObj + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link . + ?link vcard:url ?url . + ?link core:rank ?rank . + ?link rdfs:label ?label } WHERE { { - ?subject ?property ?link + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link } UNION { - ?subject ?property ?link . - ?link ?linkProp ?linkObj + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link . + ?link vcard:url ?url + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link . + ?link core:rank ?rank + } UNION { + ?subject ?property ?vcard . + ?vcard vcard:hasURL ?link . + ?link rdfs:label ?label } } + edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor diff --git a/productMods/images/individual/manage-icon.png b/productMods/images/individual/manage-icon.png deleted file mode 100644 index 18ab5756..00000000 Binary files a/productMods/images/individual/manage-icon.png and /dev/null differ diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl index d3a63df8..4b3887df 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl @@ -10,6 +10,9 @@ <#if !labelCount??> <#assign labelCount = 0 > +<#if !localesCount??> + <#assign localesCount = 1> + <#assign qrCodeIcon = "qr-code-icon.png"> <#assign visRequestingTemplate = "foaf-person-2column">

    @@ -40,7 +43,7 @@ <#else>

    style="float:left;border-right:1px solid #A6B1B0;"> <#-- Label --> - <@p.label individual editable labelCount/> + <@p.label individual editable labelCount localesCount/>

    <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> @@ -51,7 +54,7 @@
    ${statement.value}
    <#else> ${statement.value} - <@p.editingLinks "${title.name}" statement editable /> + <@p.editingLinks "${title.name}" "" statement editable /> diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl index 810250b5..f957f097 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl @@ -12,6 +12,9 @@ <#if !labelCount??> <#assign labelCount = 0 > +<#if !localesCount??> + <#assign localesCount = 1> + <#assign qrCodeIcon = "qr-code-icon.png"> <#assign individualImage> <@p.image individual=individual @@ -52,7 +55,7 @@
    ${individualImage}

    style="float:left;border-right:1px solid #A6B1B0;"> <#-- Label --> - <@p.label individual editable labelCount/> + <@p.label individual editable labelCount localesCount/>

    <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> @@ -63,7 +66,7 @@
    ${statement.value}
    <#else> ${statement.value} - <@p.editingLinks "${title.name}" statement editable /> + <@p.editingLinks "${title.name}" "" statement editable /> diff --git a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl index 9c0985ed..aa3ea7f7 100644 --- a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl +++ b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl @@ -8,6 +8,12 @@

    + <#--TODO: With ISF changes, add middle name input--> + + +

    diff --git a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl index c5b8b144..833f5e99 100644 --- a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl +++ b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl @@ -5,6 +5,9 @@ <#--Get existing value for specific data literals and uris, in case the form is returned because of an error--> <#assign firstNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "firstName")/> <#assign lastNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "lastName")/> +<#--With ISF changes, we also have a niddle name value, also add error field below--> +<#--assign middleNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "middleName") /--> + <#assign labelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "label")/> <#assign newLabelLanguageValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "newLabelLanguage")/> diff --git a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualTerms.ftl b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualTerms.ftl new file mode 100644 index 00000000..cca1dcb6 --- /dev/null +++ b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualTerms.ftl @@ -0,0 +1,4 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#--Some values for labels etc. may be different between vitro and other systems --> +<#assign returnText = "${i18n().return_to_profile}" /> \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl index a221398a..5a02ac66 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl @@ -1,9 +1,9 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- Contact info on individual profile page --> -<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!> -<#assign pEmail = propertyGroups.pullProperty("${core}primaryEmail")!> -<#assign email = propertyGroups.pullProperty("${core}email")!> +<#assign phone = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Telephone")!> +<#assign pEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Work")!> +<#assign email = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Email")!> <#if editable || ( phone?has_content || pEmail?has_content || email?has_content ) >

    ${i18n().contact_capitalized}

    @@ -39,8 +39,8 @@
      <#list phone.statements as statement>
    • style="padding-left:10px;"> - ${statement.value} - <@p.editingLinks "${phone.localName}" statement editable /> + ${statement.number!} + <@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
    @@ -65,8 +65,8 @@ <#list email.statements as statement>
  • style="padding-left:10px;"> - - <@p.editingLinks "${email.localName}" statement editable /> + + <@p.editingLinks "${email.localName}" "${email.name}" statement editable />
  • diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index 05003ce9..065a9aa6 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -2,19 +2,19 @@ <#-- Contact info on individual profile page --> -<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!> -<#assign primaryEmail = propertyGroups.pullProperty("${core}primaryEmail")!> -<#assign addlEmail = propertyGroups.pullProperty("${core}email")!> +<#assign phone = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Telephone")!> +<#assign primaryEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Work")!> +<#assign addlEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Email")!> <#if phone?has_content || primaryEmail?has_content || addlEmail?has_content >
    • ${i18n().contact_info}
    <#-- Primary Email --> -<@emailLinks "${core}primaryEmail" primaryEmail /> +<@emailLinks "primaryEmail" primaryEmail /> <#-- Additional Emails --> -<@emailLinks "${core}email" addlEmail /> +<@emailLinks "email" addlEmail /> <#-- Phone --> @@ -24,8 +24,8 @@
      style="list-style:none;margin-left:0;"> <#list phone.statements as statement>
    • - ${statement.value} - <@p.editingLinks "${phone.localName}" statement editable /> + ${statement.number!} + <@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
    @@ -33,7 +33,7 @@ <#macro emailLinks property email> - <#if property == "${core}primaryEmail"> + <#if property == "primaryEmail"> <#local listId = "primary-email"> <#local label = "${i18n().primary_email_capitalized}"> <#else> @@ -46,8 +46,8 @@
      style="list-style:none;margin-left:0;"> <#list email.statements as statement>
    • - - <@p.editingLinks "${email.localName}" statement editable /> + + <@p.editingLinks "${email.localName}" "${email.name}" statement editable />
    diff --git a/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl b/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl index 584bcbc9..ae3d0136 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl @@ -10,7 +10,7 @@
    ${statement.value}
    - <@p.editingLinks "${overview.name}" statement editable /> + <@p.editingLinks "${overview.name}" "" statement editable /> - \ No newline at end of file + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl index b74aab68..76611713 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl @@ -1,11 +1,11 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#-- List of positions for the individual --> -<#assign positions = propertyGroups.pullProperty("${core}personInPosition")!> +<#-- List of positions for the individual --> +<#assign positions = propertyGroups.pullProperty("${core}relatedBy", "${core}Position")!> <#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#assign localName = positions.localName>

    ${positions.name?capitalize} <@p.addLink positions editable /> <@p.verboseDisplay positions />

      <@p.objectProperty positions editable />
    - \ No newline at end of file + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl b/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl index d0a0b826..e6bbac81 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl @@ -1,14 +1,7 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#-- This snippet will be included in lib-vivo-properties.ftl, so users will be able to have a - different view when extending wilma theme - <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> - <@p.objectPropertyListing webpage editable /> - - ---> - <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> +<#assign webpage = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#URL")!> <#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#if !editable && individual.person() >
    • ${i18n().websites}
    @@ -19,4 +12,3 @@ <@p.objectProperty webpage editable /> - diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl index 826fc1ab..1813bc2b 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl @@ -29,5 +29,5 @@ - ${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> + ${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl index 2818d208..937c930b 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl @@ -15,9 +15,9 @@ <#local linkedIndividual> <#if statement.award??> - ${statement.awardLabel!statement.localName} + ${statement.awardLabel!statement.localName!} <#else> - ${statement.receiptLabel!statement.localName} + ${statement.receiptLabel!statement.localName!} @@ -29,12 +29,12 @@ - <#local conferredByOrg> - <#if statement.conferredBy?has_content && statement.conferredByLabel?has_content> - ${i18n().conferred_by} ${statement.conferredByLabel} + <#local assignedByOrg> + <#if statement.assignedBy?has_content && statement.assignedByLabel?has_content> + ${i18n().conferred_by} ${statement.assignedByLabel} - <@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] /> + <@s.join [ linkedIndividual, assignedByOrg!, dateTimeVal! ] /> diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-emailAddress.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-emailAddress.ftl new file mode 100644 index 00000000..05799c7e --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-emailAddress.ftl @@ -0,0 +1,17 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. + --> +<@showAdditionalEmail statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the + next statement --> +<#macro showAdditionalEmail statement> + + <#if statement.emailAddress?has_content> + ${statement.emailAddress} + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-fullName.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-fullName.ftl new file mode 100644 index 00000000..8352bf1a --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-fullName.ftl @@ -0,0 +1,17 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. + --> +<@showFullName statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the + next statement --> +<#macro showFullName statement> + + <#if statement.fullName?has_content> + ${statement.firstName!} ${statement.middleName!} ${statement.lastName!} + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl index 3381100f..b7210b9f 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl @@ -15,7 +15,7 @@ <#macro showRole statement property> <#local linkedIndividual> <#if statement?has_content && statement.activity?has_content> - ${statement.activityLabel!statement.activityName} + ${statement.activityLabel!statement.activityName!} @@ -24,6 +24,5 @@ <#-- If property is collated, then subclass label is redundant information --> - ${linkedIndividual} <#if ! property.collatedBySubclass>${statement.subclassLabel!} ${dateTime!} - + ${linkedIndividual} <#if ! property.collatedBySubclass> (${statement.subclassLabel!}) ${dateTime!} \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl index 8898a608..2f4ca74c 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl @@ -47,6 +47,6 @@ - ${linkedIndividual} ${awardOrAdminBy} ${dateTime!} ${statement.subclass!} + ${linkedIndividual} ${awardOrAdminBy} ${dateTime!} \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl index cb001c38..f5a45eec 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl @@ -12,61 +12,40 @@ next statement --> <#macro showAddress statement> - <#if ( statement.street1?has_content || statement.street2?has_content || statement.street3?has_content || statement.city?has_content || - statement.state?has_content ||statement.postalCode?has_content || statement.country?has_content )> - <#-- until the custom form is ready, provide a link to the address profile for editing --> -
    - <#if statement.street1?has_content> - - - - <#if statement.street2?has_content> - <#if !statement.street1?has_content> - - <#else> -
    ${statement.street2}
    - - - - <#if statement.street3?has_content> - <#if !statement.street1?has_content && !statement.street2?has_content> - - <#else> -
    ${statement.street3}
    - - + <#if statement.street?has_content> +

    + ${statement.street} +

    + - <#-- If the subclass is vivo:US Postal Address, or if the country is - the US, display the city, state, and postal code on a single line. --> - <#if ( statement.subclass?? && statement.subclass?contains("USPostalAddress") ) || - ( statement.country?? && ( statement.country?contains("United States") || - statement.country == "US" || - statement.country == "USA" ) )> - <#local cityState><@s.join [statement.city!, statement.state!], ", " /> - <#local cityStateZip><@s.join [ cityState!, statement.postalCode!], " " /> - <#if cityStateZip?has_content> -
    ${cityStateZip}
    - - <#else> - <#if statement.city?has_content>
    ${statement.city!}
    - <#if statement.state?has_content>
    ${statement.state}
    - <#if statement.postalCode?has_content>
    ${statement.postalCode}
    - - - <#if statement.country?has_content> -
    ${statement.country}
    - -
    - - <#-- Pre-1.4 addresses may only have an rdfs:label, since users using the default - object property form sometimes entered the entire address as the label. Display that when - there's no address data. --> - <#elseif statement.editable> - <#-- This can be removed when the custom form is available. Until then, provide a link to the - address profile so the data can be edited. --> - ${statement.label!statement.localName} - <#else> - ${statement.label!} + <#if ( statement.country?has_content && (statement.country == "US" || statement.country?contains("United States") || statement.country?contains("U.S.") || statement.country?contains("U.S.A.") || statement.country?contains("USA")))> + <#local cityState><@s.join [statement.locality!, statement.region!], ", " /> + <#local cityStateZip><@s.join [ cityState!, statement.postalCode!], " " /> + <#if cityStateZip?has_content> +

    ${cityStateZip}

    +

    ${statement.country!}

    + + <#else> + <#if statement.locality?has_content> +

    + ${statement.locality} +

    + + <#if statement.region?has_content> +

    + ${statement.region} +

    + + <#if statement.postalCode?has_content> +

    + ${statement.postalCode} +

    + + <#if statement.country?has_content> +

    + ${statement.country} +

    + - - \ No newline at end of file + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-telephoneNumber.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-telephoneNumber.ftl new file mode 100644 index 00000000..2e97990b --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-telephoneNumber.ftl @@ -0,0 +1,17 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. + --> +<@showTelephone statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the + next statement --> +<#macro showTelephone statement> + + <#if statement.number?has_content> + ${statement.number} + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl index 725603c6..0fc71494 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl @@ -26,7 +26,7 @@ <#macro showWebpage statement count identifier> <#local linkText> - <#if statement.anchor?has_content>${statement.anchor}<#t> + <#if statement.label?has_content>${statement.label}<#t> <#elseif statement.url?has_content>${statement.url}<#t> diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-webpage.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage.ftl index 55084052..2c2fde31 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-webpage.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage.ftl @@ -7,7 +7,7 @@ --> <#assign linkText> - <#if statement.anchor?has_content>${statement.anchor}<#t> + <#if statement.label?has_content>${statement.label}<#t> <#elseif statement.url?has_content>${statement.url}<#t> diff --git a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl index f08e0f35..316683c6 100644 --- a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl +++ b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl @@ -1,6 +1,6 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#import "lib-vivo-form.ftl" as lvf> - +<#include "addAssociatedConceptVocabSpecificDisplay.ftl" > <#assign existingConcepts = editConfiguration.pageData.existingConcepts/> <#assign userDefinedConceptUrl = editConfiguration.pageData.userDefinedConceptUrl/> <#assign sources = editConfiguration.pageData.searchServices/> @@ -35,26 +35,44 @@ -
      +
        + <#if (existingConcepts?size > 0)> +
      • +
        +
        +

        Concept (Type)

        +
        +
        +

        Vocabulary Source

        +
        +
          +
        +
        +
      • + <#list existingConcepts as existingConcept> -
      • - - - - - ${existingConcept.conceptLabel} - <#if existingConcept.vocabURI?has_content && existingConcept.vocabLabel?has_content> - (${existingConcept.vocabLabel}) +
      • +
        +
        ${existingConcept.conceptLabel} + <#if existingConcept.conceptSemanticTypeLabel?has_content> + (${existingConcept.conceptSemanticTypeLabel}) - - -  ${i18n().remove_capitalized} - +
        +
        + <#if existingConcept.vocabURI?has_content && existingConcept.vocabLabel?has_content> + ${existingConcept.vocabLabel} + +
        + +
      • @@ -148,6 +179,7 @@ ${stylesheets.add('')} ${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/productMods/templates/freemarker/edit/forms/addAssociatedConceptVocabSpecificDisplay.ftl b/productMods/templates/freemarker/edit/forms/addAssociatedConceptVocabSpecificDisplay.ftl new file mode 100644 index 00000000..43ab963e --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/addAssociatedConceptVocabSpecificDisplay.ftl @@ -0,0 +1,14 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#--The original concept javascript is service independent, i.e. all vocabulary service information is returned from the servlet +and the template itself generates the same display for all the services. Right now we would like to show a different label +in the search results based on the service. I am storing that information here and later we can consider how the display +can return to being independent of vocabulary service-specific display options. +These values will be passed to the javascript--> + +<#assign vocabSpecificDisplay = { +"http://link.informatics.stonybrook.edu/umls":"${i18n().label_type}", +"http://aims.fao.org/aos/agrovoc/agrovocScheme":"${i18n().label_altLabels}", +"http://www.eionet.europa.eu/gemet/gemetThesaurus":"${i18n().label_type}", +"http://id.loc.gov/authorities/subjects":"${i18n().label_altLabels}" +}/> diff --git a/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl b/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl index a19b9e21..bf818392 100644 --- a/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl +++ b/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl @@ -13,7 +13,7 @@ <#--Retrieve variables needed--> <#assign url = lvf.getFormFieldValue(editSubmission, editConfiguration, "url")/> <#assign urlTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "urlType")/> -<#assign anchor = lvf.getFormFieldValue(editSubmission, editConfiguration, "anchor") /> +<#assign label = lvf.getFormFieldValue(editSubmission, editConfiguration, "label") /> <#assign newRank = editConfiguration.pageData.newRank!"" /> <#if url?has_content> @@ -66,8 +66,8 @@ - - + + <#if editMode="add"> diff --git a/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl b/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl new file mode 100644 index 00000000..5f448533 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl @@ -0,0 +1,102 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- this is in request.subject.name --> + +<#-- leaving this edit/add mode code in for reference in case we decide we need it --> + +<#import "lib-vivo-form.ftl" as lvf> + +<#--Retrieve certain edit configuration information--> +<#if editConfiguration.objectUri?has_content> + <#assign editMode = "edit"> +<#else> + <#assign editMode = "add"> + + +<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> + +<#--Retrieve variables needed--> +<#assign firstNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "firstName") /> +<#assign middleNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "middleName") /> +<#assign lastNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "lastName") /> + + +<#--If edit submission exists, then retrieve validation errors if they exist--> +<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#assign submissionErrors = editSubmission.validationErrors/> + + +<#if editMode == "edit"> + <#assign titleVerb="${i18n().edit_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().full_name}"> + <#assign disabledVal="disabled"> +<#else> + <#assign titleVerb="${i18n().create_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().full_name}"> + <#assign disabledVal=""/> + + +<#assign requiredHint = " *" /> + +

        ${titleVerb} ${i18n().full_name_for} ${editConfiguration.subjectName}

        + +<#--Display error messages if any--> +<#if submissionErrors?has_content> + + + +<@lvf.unsupportedBrowser urls.base /> + +
        + +
        + +

        + + +

        + +

        + + +

        + +

        + + +

        + + + +

        + ${i18n().or} + ${i18n().cancel_link} +

        + +

        * ${i18n().required_fields}

        + +
        + +
        + +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} + +${scripts.add('', + '', + '', + '')} + + diff --git a/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl index e889d511..241b3c2a 100644 --- a/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl @@ -1,28 +1,28 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#--Two stage form for service provider role--> - -<#-- -Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are: -roleDescriptor. -The other required values (roleType, optionsType, objectClassUri, and literalOptions are -set in the JAVA class corresponding to the form, e.g. AddOrganizerRoleToPersonGenerator.java. - -Optional values can be set, but each of these has default values -set in addRoleToPersonTwoStage.ftl: - -buttonText -typeSelectorLabel -numDateFields -showRoleLAbelField -roleExamples--> - - -<#--Variable assignments--> -<#assign roleDescriptor = "${i18n().organizer_of}" /> -<#assign typeSelectorLabel = "${i18n().organizer_of}" /> -<#assign genericLabel = "${i18n().event_capitalized}" /> -<#assign acMultipleTypes = "'true'" /> -<#assign acTypes = "{activity: 'http://vivoweb.org/ontology/core#EventSeries,http://purl.org/NET/c4dm/event.owl#Event'}" - -<#--Each of the two stage forms will include the form below--> +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#--Two stage form for service provider role--> + +<#-- +Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are: +roleDescriptor. +The other required values (roleType, optionsType, objectClassUri, and literalOptions are +set in the JAVA class corresponding to the form, e.g. AddOrganizerRoleToPersonGenerator.java. + +Optional values can be set, but each of these has default values +set in addRoleToPersonTwoStage.ftl: + +buttonText +typeSelectorLabel +numDateFields +showRoleLAbelField +roleExamples--> + + +<#--Variable assignments--> +<#assign roleDescriptor = "${i18n().organizer_of}" /> +<#assign typeSelectorLabel = "${i18n().organizer_of}" /> +<#assign genericLabel = "${i18n().event_capitalized}" /> +<#assign acMultipleTypes = "'true'" /> +<#assign acTypes = "{activity: 'http://vivoweb.org/ontology/core#EventSeries,http://purl.org/NET/c4dm/event.owl#Event'}"> + +<#--Each of the two stage forms will include the form below--> <#include "addRoleToPersonTwoStage.ftl"> \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/addReviewerRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addReviewerRoleToPerson.ftl index b5616f07..6d1f8e9f 100644 --- a/productMods/templates/freemarker/edit/forms/addReviewerRoleToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addReviewerRoleToPerson.ftl @@ -1,29 +1,29 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#--Two stage form for service provider role--> - -<#-- -Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are: -roleDescriptor. -The other required values (roleType, optionsType, objectClassUri, and literalOptions are -set in the JAVA class corresponding to the form, e.g. AddReviewerRoleToPersonGenerator.java. - -Optional values can be set, but each of these has default values -set in addRoleToPersonTwoStage.ftl: - -buttonText -typeSelectorLabel -numDateFields -showRoleLAbelField -roleExamples--> - - -<#--Variable assignments for Add Clinical Role To Person--> -<#assign roleDescriptor = "${i18n().reviewer_of}" /> -<#assign typeSelectorLabel = "${i18n().reviewer_of}" /> -<#assign genericLabel = "${i18n().item_capitalized}" /> - -<#assign acTypes = "{activity: 'http://vivoweb.org/ontology/core#InformationResource'}" /> - -<#--Each of the two stage forms will include the form below--> -<#include "addRoleToPersonTwoStage.ftl"> - +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#--Two stage form for service provider role--> + +<#-- +Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are: +roleDescriptor. +The other required values (roleType, optionsType, objectClassUri, and literalOptions are +set in the JAVA class corresponding to the form, e.g. AddReviewerRoleToPersonGenerator.java. + +Optional values can be set, but each of these has default values +set in addRoleToPersonTwoStage.ftl: + +buttonText +typeSelectorLabel +numDateFields +showRoleLAbelField +roleExamples--> + + +<#--Variable assignments for Add Clinical Role To Person--> +<#assign roleDescriptor = "${i18n().reviewer_of}" /> +<#assign typeSelectorLabel = "${i18n().reviewer_of}" /> +<#assign genericLabel = "${i18n().item_capitalized}" /> + +<#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Document'}" /> + +<#--Each of the two stage forms will include the form below--> +<#include "addRoleToPersonTwoStage.ftl"> + diff --git a/productMods/templates/freemarker/edit/forms/css/addConcept.css b/productMods/templates/freemarker/edit/forms/css/addConcept.css index 967571ab..225b86bf 100644 --- a/productMods/templates/freemarker/edit/forms/css/addConcept.css +++ b/productMods/templates/freemarker/edit/forms/css/addConcept.css @@ -1,5 +1,9 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ +.conceptsListContainer { + overflow:hidden; + width:100%; +} .concepts .column { float:left; padding-right:3px; @@ -44,4 +48,29 @@ form#addConceptForm { form#addConceptForm span#createOwnOne{ float:left; margin-top:24px +} + +/*For existing concepts, display will also be tabular with columns*/ + +.existingConcept .row, .conceptHeadings .row { + clear:both; + float:left; +} + +.existingConcept .column , .conceptHeadings .column { + float:left; + padding-right:3px; + clear:none !important; /*Overriding customFor div's clearing*/ +} +/*label and semantic type if it exists*/ +.existingConcept .conceptLabelInfo, .conceptHeadings .conceptLabelInfo { + width:220px; +} + +.existingConcept .conceptVocabSource, .conceptHeadings .conceptVocabSource { + width:220px; +} + +.conceptHeadings .row { + border-bottom: 1px solid #5F6464; } \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/js/addConcept.js b/productMods/templates/freemarker/edit/forms/js/addConcept.js index d650d349..606a981b 100644 --- a/productMods/templates/freemarker/edit/forms/js/addConcept.js +++ b/productMods/templates/freemarker/edit/forms/js/addConcept.js @@ -55,12 +55,19 @@ var addConceptForm = { this.externalConceptLabel = $('#conceptLabel'); this.externalConceptSource = $('#conceptSource'); this.externalConceptSemanticTypeLabel = $("#conceptSemanticTypeLabel"); + this.externalConceptBroaderUris = $("#conceptBroaderURI"); + this.externalConceptNarrowerUris = $("#conceptNarrowerURI"); //remove links this.removeConceptLinks = $('a.remove'); this.errors = $('#errors'); this.createOwn1 = $('#createOwnOne'); this.createOwn2 = $('#createOwnTwo'); this.orSpan = $('span.or') + this.loadingIndicator = $("#indicator"); + this.showHideSearchResults = $("#showHideResults"); + //Value we are setting to cut off length of alternate labels string + this.maxNumberAlternateLabels = 4; + this.numberOfMaxInitialSearchResults = 7; }, initPage: function() { @@ -87,6 +94,10 @@ var addConceptForm = { addConceptForm.removeExistingConcept(this); return false; }); + this.showHideSearchResults.find("a#showHideLink").click(function() { + addConceptForm.showHideMultipleSearchResults(this); + return false; + }); }, initForm: function() { // Hide the button that shows the form @@ -99,7 +110,9 @@ var addConceptForm = { //Also clear the search input this.searchTerm.val(""); this.cancel.unbind('click'); - + //make sure results loading indicator is hidden + this.loadingIndicator.addClass("hidden"); + this.showHideSearchResults.hide(); // Show the form this.form.show(); }, @@ -114,6 +127,8 @@ var addConceptForm = { }, clearSearchResults:function() { $('#selectedConcept').empty(); + //Hide the indicator icon if still there + $("#indicator").addClass("hidden"); }, clearErrors:function() { addConceptForm.errors.empty(); @@ -134,6 +149,25 @@ var addConceptForm = { this.hideForm(); this.showFormButtonWrapper.show(); }, + showHideMultipleSearchResults: function(link) { + if($(link).hasClass("showmore")) { + //if clicking and already says show more then need to show the rest of the results + $("li.concepts").show(); //show everything + $(link).html("Show fewer results"); + $(link).removeClass("showmore"); + } else { + //if clicking and does not say show more than need to show less + $("li.concepts").slice(addConceptForm.numberOfMaxInitialSearchResults).hide(); + $(link).html("Show more results"); + $(link).addClass("showmore"); + } + }, + //reset this to default, which is hidden with show more link + resetShowHideMultipleSearchResults: function() { + addConceptForm.showHideSearchResults.hide(); + addConceptForm.showHideSearchResults.find("a#showHideLink").html("Show more results"); + addConceptForm.showHideSearchResults.find("a#showHideLink").addClass("showmore"); + }, submitSearchTerm: function() { //Get value of search term var searchValue = this.searchTerm.val(); @@ -145,7 +179,11 @@ var addConceptForm = { } var vocabSourceValue = checkedVocabSource.val(); var dataServiceUrl = addConceptForm.dataServiceUrl + "?searchTerm=" + encodeURIComponent(searchValue) + "&source=" + encodeURIComponent(vocabSourceValue); - //This should return an object including the concept list or any errors if there are any + //Show the loading icon until the results appear + addConceptForm.loadingIndicator.removeClass("hidden"); + //Hide and reset the show more button + addConceptForm.resetShowHideMultipleSearchResults(); + //This should return an object including the concept list or any errors if there are any $.getJSON(dataServiceUrl, function(results) { var htmlAdd = ""; var vocabUnavailable = "

        " + addConceptForm.vocServiceUnavailable + "

        "; @@ -166,7 +204,7 @@ var addConceptForm = { //For each result, display if(numberTotalMatches > 0) { htmlAdd = "
          "; - htmlAdd+= addConceptForm.addResultsHeader(); + htmlAdd+= addConceptForm.addResultsHeader(vocabSourceValue); //Show best matches first for(i = 0; i < numberBestMatches; i++) { var conceptResult = bestMatchResults[i]; @@ -184,6 +222,8 @@ var addConceptForm = { } if(htmlAdd.length) { + //hide the loading icon again + addConceptForm.loadingIndicator.addClass("hidden"); $('#selectedConcept').html(htmlAdd); if (htmlAdd.indexOf("No search results") >= 0) { addConceptForm.showHiddenElements(hasResults); @@ -191,6 +231,8 @@ var addConceptForm = { else { hasResults = true; addConceptForm.showHiddenElements(hasResults); + //Here, tweak the display based on the number of results + addConceptForm.displayUptoMaxResults(); } } }); @@ -203,9 +245,12 @@ var addConceptForm = { var definedBy = conceptResult.definedBy; var type = conceptResult.type; var uri = conceptResult.uri; + //also adding broader and narrower uris wherever they exist + var broaderUris = conceptResult.broaderURIList; + var narrowerUris = conceptResult.narrowerURIList; //this will be null if there are no alternate labels var altLabels = conceptResult.altLabelList; - return addConceptForm.generateIndividualConceptDisplay(uri, label, altLabels, definition, type, definedBy, isBestMatch); + return addConceptForm.generateIndividualConceptDisplay(uri, label, altLabels, definition, type, definedBy, isBestMatch, broaderUris, narrowerUris); }, //This should now return all best matches in one array and other results in another parseResults:function(resultsArray) { @@ -225,10 +270,19 @@ var addConceptForm = { } return {"bestMatch":bestMatchResults, "alternate":alternateResults}; }, - addResultsHeader:function() { - var htmlAdd = "
        • " + addConceptForm.labelTypeString + " " + addConceptForm.definitionString + "" + addConceptForm.bestMatchString + "
        • "; + addResultsHeader:function(vocabSourceValue) { + var htmlAdd = "
        • " + + addConceptForm.getVocabSpecificColumnLabel(vocabSourceValue) + " " + addConceptForm.definitionString + "" + addConceptForm.bestMatchString + "
        • "; return htmlAdd; }, + //currently just the first column label depends on which service has been utilized + getVocabSpecificColumnLabel: function(vocabSourceValue) { + var columnLabel = addConceptForm.vocabSpecificLabels[vocabSourceValue]; + if(columnLabel == undefined) { + columnLabel = addConceptForm.defaultLabelTypeString; + } + return columnLabel; + }, hideSearchResults:function() { this.selectedConcept.hide(); }, @@ -239,11 +293,14 @@ var addConceptForm = { } var i; var len = checkedElements.length; - var checkedConcept, checkedConceptElement, conceptLabel, conceptSource, conceptSemanticType; + var checkedConcept, checkedConceptElement, conceptLabel, conceptSource, conceptSemanticType, + conceptBroaderUri, conceptNarrowerUri; var conceptNodes = []; var conceptLabels = []; var conceptSources = []; var conceptSemanticTypes = []; + var conceptBroaderUris = []; //each array element can be a string which is comma delimited for multiple uris + var conceptNarrowerUris = [];//same as above checkedElements.each(function() { checkedConceptElement = $(this); @@ -251,22 +308,32 @@ var addConceptForm = { conceptLabel = checkedConceptElement.attr("label"); conceptSource = checkedConceptElement.attr("conceptDefinedBy"); conceptSemanticType = checkedConceptElement.attr("conceptType"); + conceptBroaderUri = checkedConceptElement.attr("broaderUris"); + conceptNarrowerUri = checkedConceptElement.attr("narrowerUris"); conceptNodes.push(checkedConcept); conceptLabels.push(conceptLabel); conceptSources.push(conceptSource); conceptSemanticTypes.push(conceptSemanticType); + conceptBroaderUris.push(conceptBroaderUri); + conceptNarrowerUris.push(conceptNarrowerUri); }); this.externalConceptURI.val(conceptNodes); this.externalConceptLabel.val(conceptLabels); this.externalConceptSource.val(conceptSources); this.externalConceptSemanticTypeLabel.val(conceptSemanticTypes); + //Using JSON here because there may be multiple broader and narrower uris per concept + //and using a regular string representation does not differentiate between which set of uris + //would belong to which concept + this.externalConceptBroaderUris.val(JSON.stringify(conceptBroaderUris)); + this.externalConceptNarrowerUris.val(JSON.stringify(conceptNarrowerUris)); + return true; }, - generateIndividualConceptDisplay: function(cuiURI, label, altLabels, definition, type, definedBy, isBestMatch) { + generateIndividualConceptDisplay: function(cuiURI, label, altLabels, definition, type, definedBy, isBestMatch, broaderUris, narrowerUris) { var htmlAdd = "
        • " + "
          " + "
          " + - addConceptForm.generateIndividualCUIInput(cuiURI, label, type, definedBy) + + addConceptForm.generateIndividualCUIInput(cuiURI, label, type, definedBy, broaderUris, narrowerUris) + addConceptForm.generateIndividualLabelsDisplay(label, altLabels) + addConceptForm.generateIndividualTypeDisplay(type) + "
          " + addConceptForm.generateIndividualDefinitionDisplay(definition) + addConceptForm.generateBestOrAlternate(isBestMatch) + @@ -274,14 +341,23 @@ var addConceptForm = { "
        • "; return htmlAdd; }, - generateIndividualCUIInput:function(cuiURI, label, type, definedBy) { - return ""; + generateIndividualCUIInput:function(cuiURI, label, type, definedBy, broaderUris, narrowerUris) { + return ""; }, //In case there are multiple labels display those generateIndividualLabelsDisplay:function(label, altLabels) { var labelDisplay = label; + var displayAltLabels = altLabels; if(altLabels != null && altLabels.length > 0) { - labelDisplay += "
          [" + altLabels + "]"; + //Certain vocabulary services might return a long list of alternate labels, in which case we will show fewer + //display only upto a certain number of alternate labels and use an ellipsis to signify there + //are additional terms + if(altLabels.length > addConceptForm.maxNumberAlternateLabels) { + displayAltLabels = altLabels.slice(0, addConceptForm.maxNumberAlternateLabels) + ",..."; + } + labelDisplay += "
          (" + displayAltLabels + ")"; } return labelDisplay; }, @@ -307,6 +383,18 @@ var addConceptForm = { } return "
           
          "; }, + //Certain vocabulary services return a great number of results, we would like the ability to show more or less of those results + displayUptoMaxResults:function() { + var numberConcepts = $("li.concepts").length; + if(numberConcepts > addConceptForm.numberOfMaxInitialSearchResults) { + $("li.concepts").slice(addConceptForm.numberOfMaxInitialSearchResults).hide(); + //Hide the link for showing/hiding search results + addConceptForm.showHideSearchResults.show(); + addConceptForm.showHideSearchResults.find("a#showHideLink").html("Show more results"); + addConceptForm.showHideSearchResults.find("a#showHideLink").addClass("showmore"); + } + + }, validateConceptSelection:function(checkedElements) { var numberElements = checkedElements.length; if(numberElements < 1) { diff --git a/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js b/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js index 518dc706..6a5ed540 100644 --- a/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js +++ b/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js @@ -91,8 +91,14 @@ var awardReceiptUtils = { buildAwardReceiptLabel: function() { var rdfsLabel = ""; + var $acSelection = $("div.acSelection[acGroupName='award']") if ( this.editMode == "edit" ) { - rdfsLabel = this.awardDisplay.val(); + if ( $acSelection.find("span.acSelectionInfo").text().length > 0 ) { + rdfsLabel = $("span.acSelectionInfo").text(); + } + else { + rdfsLabel = this.award.val(); + } } else { rdfsLabel = this.award.val(); diff --git a/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js b/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js new file mode 100644 index 00000000..85e6dc8d --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js @@ -0,0 +1,31 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + + +var educationalTrainingUtils = { + + onLoad: function(href, blankSentinel) { + this.initObjectReferences(); + this.bindEventListeners(); + $.extend(this, customFormData); + }, + + initObjectReferences: function() { + + this.form = $('#personHasEducationalTraining'); + this.aDLabel = $('#awardedDegreeLabel'); + this.degreeSelector = $('#degreeUri'); + }, + + bindEventListeners: function() { + + this.degreeSelector.change(function() { + educationalTrainingUtils.setAwardedDegreeLabel(); + }); + + }, + + setAwardedDegreeLabel: function() { + var degreeLabel = this.subjectName + ": " + this.degreeSelector.find(":selected").text(); + this.aDLabel.val(degreeLabel); + } +} diff --git a/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js b/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js deleted file mode 100644 index 037ab0f9..00000000 --- a/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js +++ /dev/null @@ -1,147 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -var mailingAddressUtils = { - - onLoad: function(mode,country) { - this.initObjectReferences(); - this.bindEventListeners(); - this.sortCountrySelector(mode,country); - $.extend(this, i18nStrings); - - if ( mode == "add" && !this.errorSection.attr('id') ) { - this.containerDiv.hide(); - this.submitButton.hide(); - } - else { - this.processCountryRelatedFields(); - } - }, - - initObjectReferences: function() { - this.form = $('#personHasMailingAddress'); - - // The external auth ID field and messages - this.countrySelector = $('#country'); - this.countrySelectorOptions = $('#country option'); - this.address1Field = $('#addrLineOne'); - this.cityField = $('#city'); - this.stateField = $('#state'); - this.stateSelector= $('#stateSelect'); - this.stateLabel = $('#stateLabel'); - this.postalCodeField = $('#postalCode'); - this.postalCodeLabel = $('#postalCodeLabel'); - this.subjectField = $('#subjectName'); - this.rdfsLabel = $('#addrLabel'); - this.addrTypeField = $('#addressType'); - this.submitButton = $('#submit'); - this.containerDiv = $('#addressDetails'); - this.orSpan = $('span.or'); - this.errorSection = $('section#error-alert'); - }, - - bindEventListeners: function() { - this.idCache = {}; - - this.countrySelector.change(function() { - mailingAddressUtils.processCountryRelatedFields(); - mailingAddressUtils.showHiddenElements(); - }); - - this.form.submit(function() { - mailingAddressUtils.buildAddressLabel(); - }); - - this.stateSelector.change(function() { - mailingAddressUtils.setStateValue(); - }); - }, - - addressClassIsNonUS: function() { - var country = this.countrySelector.val(); - if ( country.search( 'United States' ) == -1 ) { - return true; - } - else { - return false; - } - }, - - buildAddressLabel: function() { - if ( mailingAddressUtils.addressClassIsNonUS() ) { - this.rdfsLabel.val(this.address1Field.val() + " " + this.cityField.val() + " " + this.countrySelector.val()); - } - else { - this.rdfsLabel.val(this.address1Field.val() + " " + this.cityField.val() + " " + this.stateField.val()); - } - }, - - processCountryRelatedFields: function() { - if ( mailingAddressUtils.addressClassIsNonUS() ) { - this.stateLabel.text(mailingAddressUtils.provinceOrRegion); - this.postalCodeField.attr('size', '40'); - this.stateSelector.hide(); - this.stateField.show(); - this.addrTypeField.val("http://vivoweb.org/ontology/core#Address"); - } - else { - this.stateLabel.text(mailingAddressUtils.stateString); - this.postalCodeField.attr('size', '8'); - this.stateField.hide(); - this.stateSelector.show(); - this.addrTypeField.val("http://vivoweb.org/ontology/core#USPostalAddress"); - } - }, - - showHiddenElements: function() { - this.containerDiv.show(); - this.submitButton.show(); - this.orSpan.show(); - }, - - setStateValue: function() { - this.stateField.val(this.stateSelector.val()); - }, - - // in the ftl we remove the "the" that precedes some countries, so we need to - // re-sort them alphabetically - sortCountrySelector: function(mode,country) { - // Get options from select box - var the_options = this.countrySelectorOptions; - // sort alphabetically - the_options.sort(function(a,b) { - if (a.text > b.text) return 1; - else if (a.text < b.text) return -1; - else return 0 - }) - //replace with sorted the_options; - this.countrySelector.append( the_options ); - - // if it's add mode, add the "select one" option have it be selected; - // if it's edit mode, add the "Select one" option but have the correct country selected. - // if it's repair mode, add the "Select one" option but only select it if there's no country - - if ( this.errorSection.is(':visible') ) { - this.countrySelector.prepend($("") - .attr("value","") - .text(mailingAddressUtils.selectOne)); - this.countrySelector.val(country); - } - else if ( mode == "add" ) { - this.countrySelector.prepend($("") - .attr("value","") - .text(mailingAddressUtils.selectOne)); - } - else if ( mode == "edit" || country.length > 1 ) { - this.countrySelector.prepend($("") - .attr("value","") - .text(mailingAddressUtils.selectOne)); - this.countrySelector.val(country); - } - else if ( country.length == 0 ) { - this.countrySelector.prepend($("") - .attr("value","") - .text(mailingAddressUtils.selectOne)); - this.countrySelector.val(country); - } - } -} \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/js/newIndividualFormUtils.js b/productMods/templates/freemarker/edit/forms/js/newIndividualFormUtils.js new file mode 100644 index 00000000..d1cbbf33 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/js/newIndividualFormUtils.js @@ -0,0 +1,37 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +var newIndividualFormUtils = { + + onLoad: function(mode,country) { + this.initObjectReferences(); + this.bindEventListeners(); + }, + + initObjectReferences: function() { + this.form = $('#newIndividual'); + + // The external auth ID field and messages + this.fName = $('#firstName'); + this.lName = $('#lastName'); + this.rdfsLabel = $('#label'); + }, + + bindEventListeners: function() { + this.idCache = {}; + + this.form.submit(function() { + newIndividualFormUtils.buildRDFSLabel(); + }); + + }, + + buildRDFSLabel: function() { + if ( this.fName.length > 0 ) { + this.rdfsLabel.val(this.lName.val() + ", " + this.fName.val()); + } + }, +} + +$(document).ready(function() { + newIndividualFormUtils.onLoad(); +}); diff --git a/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl b/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl index d480933e..c4f0b1d0 100644 --- a/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl +++ b/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl @@ -29,8 +29,8 @@
            <#list editConfiguration.pageData.webpages as webpage>
          • - <#if webpage.anchor??> - <#assign anchor=webpage.anchor > + <#if webpage.label??> + <#assign anchor=webpage.label > <#else> <#assign anchor=webpage.url > @@ -39,7 +39,7 @@ ${anchor} - ${i18n().edit_capitalized} | + ${i18n().edit_capitalized} | ${i18n().delete_button}
          • diff --git a/productMods/templates/freemarker/edit/forms/newIndividualForm.ftl b/productMods/templates/freemarker/edit/forms/newIndividualForm.ftl index 28dadfc1..286b4b8b 100644 --- a/productMods/templates/freemarker/edit/forms/newIndividualForm.ftl +++ b/productMods/templates/freemarker/edit/forms/newIndividualForm.ftl @@ -56,6 +56,8 @@

            + + <#else>

            @@ -75,3 +77,4 @@

    ${stylesheets.add('')} +${scripts.add('')} \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl b/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl index b2e06895..d7ab5d20 100644 --- a/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl +++ b/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl @@ -33,16 +33,18 @@ Set this flag on the input acUriReceiver where you would like this behavior to o <#assign deptValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "dept") /> <#assign infoValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "info") /> <#assign majorFieldValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "majorField") /> -<#assign degreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "degree") /> +<#assign degreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "degreeType") /> +<#assign awardedDegreeLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "awardedDegreeLabel") /> <#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrg") /> <#assign trainingTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "trainingType")/> +<#assign existingADLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingAwardedDegreeLabel") /> <#--If edit submission exists, then retrieve validation errors if they exist--> <#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> <#assign submissionErrors = editSubmission.validationErrors/> -<#if editMode == "edit"> +<#if editMode == "edit" || editMode == "repair"> <#assign titleVerb="${i18n().edit_capitalized}"> <#assign submitButtonText="${i18n().save_changes}"> <#assign disabledVal="disabled"> @@ -56,7 +58,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o <#assign yearHint = "(${i18n().year_hint_format})" /> -

    ${titleVerb} ${i18n().educational_training_for} ${subjectName}${editConfiguration.subjectName}

    +

    ${titleVerb} ${i18n().educational_training_for} ${editConfiguration.subjectName}

    <#--Display error messages if any--> <#if submissionErrors?has_content> @@ -155,13 +157,19 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
    - <#assign degreeOpts = editConfiguration.pageData.degree /> - <#list degreeOpts?keys as key> - + + <#if editMode == "edit" || editMode == "repair"> + + + <#else> + +

    @@ -208,13 +216,18 @@ var customFormData = { defaultTypeName: 'organization', baseHref: '${urls.base}/individual?uri=', blankSentinel: '${blankSentinel}', - flagClearLabelForExisting: '${flagClearLabelForExisting}' + flagClearLabelForExisting: '${flagClearLabelForExisting}', + subjectName: '${editConfiguration.subjectName}' }; var i18nStrings = { selectAnExisting: '${i18n().select_an_existing}', orCreateNewOne: '${i18n().or_create_new_one}', selectedString: '${i18n().selected}' }; + +$(document).ready(function() { + educationalTrainingUtils.onLoad(); +}); @@ -229,6 +242,7 @@ ${scripts.add('', '', '', + '', '')} diff --git a/productMods/templates/freemarker/edit/forms/personHasEmailAddress.ftl b/productMods/templates/freemarker/edit/forms/personHasEmailAddress.ftl new file mode 100644 index 00000000..8d498191 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/personHasEmailAddress.ftl @@ -0,0 +1,86 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- this is in request.subject.name --> + +<#-- leaving this edit/add mode code in for reference in case we decide we need it --> + +<#import "lib-vivo-form.ftl" as lvf> + +<#--Retrieve certain edit configuration information--> +<#if editConfiguration.objectUri?has_content> + <#assign editMode = "edit"> +<#else> + <#assign editMode = "add"> + + +<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> + +<#--Retrieve variables needed--> +<#assign emailAddressValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "emailAddress") /> + +<#--If edit submission exists, then retrieve validation errors if they exist--> +<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#assign submissionErrors = editSubmission.validationErrors/> + + +<#if editMode == "edit"> + <#assign titleVerb="${i18n().edit_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().email_address}"> + <#assign disabledVal="disabled"> +<#else> + <#assign titleVerb="${i18n().create_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().email_address}"> + <#assign disabledVal=""/> + + +<#assign requiredHint = " *" /> + +

    ${titleVerb} ${i18n().email_address_for} ${editConfiguration.subjectName}

    + +<#--Display error messages if any--> +<#if submissionErrors?has_content> + + + +<@lvf.unsupportedBrowser urls.base /> + +
    + +
    + +

    + + +

    + + + +

    + ${i18n().or} + ${i18n().cancel_link} +

    + +

    * ${i18n().required_fields}

    + +
    + +
    + +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} + +${scripts.add('', + '', + '', + '')} + + diff --git a/productMods/templates/freemarker/edit/forms/personHasMailingAddress.ftl b/productMods/templates/freemarker/edit/forms/personHasMailingAddress.ftl index 029872a5..99236069 100644 --- a/productMods/templates/freemarker/edit/forms/personHasMailingAddress.ftl +++ b/productMods/templates/freemarker/edit/forms/personHasMailingAddress.ftl @@ -16,13 +16,9 @@ <#assign htmlForElements = editConfiguration.pageData.htmlForElements /> <#--Retrieve variables needed--> -<#assign addrLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLabel") /> -<#assign addressTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addressType") /> -<#assign addrLineOneValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineOne") /> -<#assign addrLineTwoValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineTwo") /> -<#assign addrLineThreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineThree") /> -<#assign cityValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "city") /> -<#assign stateValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "state") /> +<#assign streetAddressValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "streetAddress") /> +<#assign localityValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "locality") /> +<#assign regionValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "region") /> <#assign postalCodeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "postalCode") /> <#assign countryValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "country") /> @@ -52,13 +48,13 @@

    <#--Checking if any required fields are empty--> <#if lvf.submissionErrorExists(editSubmission, "country")> - ${i18n().select_a_country}
    + ${i18n().enter_a_country}
    - <#if lvf.submissionErrorExists(editSubmission, "addrLineOne")> - ${i18n().enter_address1_value}
    + <#if lvf.submissionErrorExists(editSubmission, "streetAddress")> + ${i18n().enter_street_address}
    - <#if lvf.submissionErrorExists(editSubmission, "city")> - ${i18n().enter_a_city}
    + <#if lvf.submissionErrorExists(editSubmission, "locality")> + ${i18n().enter_a_locality}
    <#if lvf.submissionErrorExists(editSubmission, "postalCode")> ${i18n().enter_postal_code} @@ -74,138 +70,43 @@

    +

    + + +

    -

    - - <#assign countryOpts = editConfiguration.pageData.country /> - -

    +

    + + +

    - +

    + + +

    + +

    + + +

    + +

    + + +

    -
    -

    - - -

    - -

    - - -

    - -

    - - -

    + -

    - - -

    +

    + ${i18n().or} + ${i18n().cancel_link} +

    -

    - - - -

    +

    * ${i18n().required_fields}

    -

    - - -

    - -
    - - - - - -

    - ${i18n().or} - ${i18n().cancel_link} -

    - -

    * ${i18n().required_fields}

    - -
    + - - - - - - ${stylesheets.add('')} ${stylesheets.add('')} @@ -214,7 +115,6 @@ ${stylesheets.add('', '', '', - '', '')} diff --git a/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl b/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl new file mode 100644 index 00000000..c3493c29 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl @@ -0,0 +1,86 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- this is in request.subject.name --> + +<#-- leaving this edit/add mode code in for reference in case we decide we need it --> + +<#import "lib-vivo-form.ftl" as lvf> + +<#--Retrieve certain edit configuration information--> +<#if editConfiguration.objectUri?has_content> + <#assign editMode = "edit"> +<#else> + <#assign editMode = "add"> + + +<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> + +<#--Retrieve variables needed--> +<#assign telephoneNumberValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "telephoneNumber") /> + +<#--If edit submission exists, then retrieve validation errors if they exist--> +<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#assign submissionErrors = editSubmission.validationErrors/> + + +<#if editMode == "edit"> + <#assign titleVerb="${i18n().edit_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}"> + <#assign disabledVal="disabled"> +<#else> + <#assign titleVerb="${i18n().create_capitalized}"> + <#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}"> + <#assign disabledVal=""/> + + +<#assign requiredHint = " *" /> + +

    ${titleVerb} ${i18n().mailing_address_for} ${editConfiguration.subjectName}

    + +<#--Display error messages if any--> +<#if submissionErrors?has_content> + + + +<@lvf.unsupportedBrowser urls.base /> + +
    + +
    + +

    + + +

    + + + +

    + ${i18n().or} + ${i18n().cancel_link} +

    + +

    * ${i18n().required_fields}

    + +
    + +
    + +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} + +${scripts.add('', + '', + '', + '')} + + diff --git a/rdf/abox/filegraph/us-states.rdf b/rdf/abox/filegraph/us-states.rdf index 3fdbdaad..eacb0984 100644 --- a/rdf/abox/filegraph/us-states.rdf +++ b/rdf/abox/filegraph/us-states.rdf @@ -1,308 +1,309 @@ + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > Alabama - + Alaska - + Arizona - + Arkansas - + California - + Colorado - + Connecticut - + Delaware - + Florida - + Georgia - + Hawaii - + Idaho - + Illinois - + Indiana - + Iowa - + Kansas - + Kentucky - + Louisiana - + Maine - + Maryland - + Massachusetts - + Michigan - + Minnesota - + Mississipi - + Missouri - + Montana - + Nebraska - + Nevada - + New Hampshire - + New Jersey - + New Mexico - + New York - + North Carolina - + North Dakota - + Ohio - + Oklahoma - + Oregon - + Pennsylvania - + Rhode Island - + South Carolina - + South Dakota - + Tennessee - + Texas - + Utah - + Vermont - + Virginia - + Washington - + West Virginia - + Wisconsin - + Wyoming - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rdf/abox/filegraph/vocabularySource.n3 b/rdf/abox/filegraph/vocabularySource.n3 index 97690dd7..cb51ff84 100644 --- a/rdf/abox/filegraph/vocabularySource.n3 +++ b/rdf/abox/filegraph/vocabularySource.n3 @@ -1,3 +1,8 @@ . . - . \ No newline at end of file + . + "UMLS"^^ . + "AGROVOC"^^ . + "GEMET"^^ . + . + "LCSH"^^ . diff --git a/rdf/abox/firsttime/vocabularySource-labels.n3 b/rdf/abox/firsttime/vocabularySource-labels.n3 deleted file mode 100644 index a0a7966e..00000000 --- a/rdf/abox/firsttime/vocabularySource-labels.n3 +++ /dev/null @@ -1,3 +0,0 @@ - "UMLS"^^ . - "AGROVOC"^^ . - "GEMET"^^ . \ No newline at end of file diff --git a/rdf/display/everytime/.PropertyConfig.n3.swp b/rdf/display/everytime/.PropertyConfig.n3.swp new file mode 100644 index 00000000..17d5e92c Binary files /dev/null and b/rdf/display/everytime/.PropertyConfig.n3.swp differ diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3 new file mode 100644 index 00000000..764cfbec --- /dev/null +++ b/rdf/display/everytime/PropertyConfig.n3 @@ -0,0 +1,481 @@ +@prefix xsd: . +@prefix owl: . +@prefix : . +@prefix display: . +@prefix rdf: . +@prefix rdfs: . +@prefix datagetter: . +@prefix vitro: . +@prefix role: . +@prefix local: . +@prefix vivo: . + +@base . + + +# warning: don't use blank nodes; the display model doesn't currently support them. + +local:personInPositionContext a :ConfigContext ; + :hasConfiguration local:personInPositionConfig ; + :configContextFor vivo:relatedBy ; + :qualifiedByDomain ; + :qualifiedBy vivo:Position . + +local:personInPositionConfig a :ObjectPropertyDisplayConfig ; + :displayName "positions" ; + :listViewConfigFile "listViewConfig-personInPosition.xml"^^xsd:string ; + :propertyGroup ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasPositionHistoryGenerator"^^xsd:string . + +local:organizationForPositionContext a :ConfigContext ; + :hasConfiguration local:organizationForPositionConfig ; + :configContextFor vivo:relatedBy ; + :qualifiedByDomain ; + :qualifiedBy vivo:Position . + +local:organizationForPositionConfig a :ObjectPropertyDisplayConfig ; + :displayName "people" ; + :listViewConfigFile "listViewConfig-organizationForPosition.xml"^^xsd:string ; + :propertyGroup ; + vitro:displayRankAnnot 15; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.OrganizationHasPositionHistoryGenerator"^^xsd:string . + +local:authorInAuthorshipContext a :ConfigContext ; + :hasConfiguration local:authorInAuthorshipConfig ; + :configContextFor vivo:relatedBy ; + :qualifiedByDomain ; + :qualifiedBy vivo:Authorship . + +local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-authorInAuthorship.xml"^^xsd:string ; + :displayName "selected publications" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator"^^xsd:string ; + :propertyGroup . + +local:hasServiceProviderRoleContext a :ConfigContext ; + :hasConfiguration local:hasServiceProviderRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "service to the profession" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddServiceProviderRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasClinicalRoleContext a :ConfigContext ; + :hasConfiguration local:hasClinicalRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "clinical activities" ; + vitro:displayRankAnnot 70; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddClinicalRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasLeaderRoleContext a :ConfigContext ; + :hasConfiguration local:hasLeaderRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "head of" ; + vitro:displayRankAnnot 30; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddHeadOfRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasMemberRoleContext a :ConfigContext ; + :hasConfiguration local:hasMemberRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "member of" ; + vitro:displayRankAnnot 50; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddMemberRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasTeacherRoleContext a :ConfigContext ; + :hasConfiguration local:hasTeacherRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "teaching activities" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddTeacherRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasEditorRoleContext a :ConfigContext ; + :hasConfiguration local:hasEditorRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasEditorRole.xml"^^xsd:string ; + :displayName "collection or series editor for" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasReviewerRoleContext a :ConfigContext ; + :hasConfiguration local:hasReviewerRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasReviewerRole.xml"^^xsd:string ; + :displayName "reviewer of" ; + vitro:displayRankAnnot 3; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddReviewerRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasOrganizerRoleContext a :ConfigContext ; + :hasConfiguration local:hasOrganizerRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "organizer of" ; + vitro:displayRankAnnot 4; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasOutreachProviderRoleContext a :ConfigContext ; + :hasConfiguration local:hasOutreachProviderRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "outreach and community service" ; + vitro:displayRankAnnot 50; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasAttendeeRoleContext a :ConfigContext ; + :hasConfiguration local:hasAttendeeRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasAttendeeRole.xml"^^xsd:string ; + :displayName "attended" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasResearcherRoleContext a :ConfigContext ; + :hasConfiguration local:hasResearcherRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :displayName "research activities" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddResearcherRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasInvestigatorRoleContext a :ConfigContext ; + :hasConfiguration local:hasInvestigatorRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ; + :displayName "investigator on" ; + vitro:displayRankAnnot 25; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasPrincipalInvestigatorRoleContext a :ConfigContext ; + :hasConfiguration local:hasPrincipalInvestigatorRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ; + :displayName "principal investigator on" ; + vitro:displayRankAnnot 15; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ; + :hasConfiguration local:hasCo-PrincipalInvestigatorRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ; + :displayName "co-principal investigator on" ; + vitro:displayRankAnnot 20; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:hasPresenterRoleContext a :ConfigContext ; + :hasConfiguration local:hasPresenterRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-hasPresenterRole.xml"^^xsd:string ; + :displayName "presentations" ; + vitro:displayRankAnnot 30; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator"^^ ; + :propertyGroup . + +local:awardOrHonorContext a :ConfigContext ; + :hasConfiguration local:awardOrHonorConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-awardOrHonor.xml"^^xsd:string ; + :displayName "awards and honors" ; + vitro:displayRankAnnot 20; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAwardOrHonorGenerator"^^ ; + :propertyGroup . + +local:educationalTrainingContext a :ConfigContext ; + :hasConfiguration local:educationalTrainingConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-educationalTraining.xml"^^xsd:string ; + :displayName "education and training" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining"^^ ; + :propertyGroup . + +local:advisorRoleContext a :ConfigContext ; + :hasConfiguration local:advisorRoleConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:advisorRoleConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-advisorIn.xml"^^xsd:string ; + :displayName "advisees" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAdvisingRelationshipGenerator"^^ ; + :propertyGroup . + + +local:informationResourceInAuthorshipContext a :ConfigContext ; + :hasConfiguration local:informationResourceInAuthorshipConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-informationResourceInAuthorship.xml"^^xsd:string ; + :displayName "authors" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAuthorsToInformationResourceGenerator"^^ ; + :propertyGroup . + +### vcard properties ### +local:mailingAddressContext a :ConfigContext ; + :hasConfiguration local:mailingAddressConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:mailingAddressConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-mailingAddress.xml"^^xsd:string ; + :displayName "mailing address" ; + vitro:displayRankAnnot 80; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasMailingAddressGenerator"^^ ; + :propertyGroup . + +local:telephoneContext a :ConfigContext ; + :hasConfiguration local:telephoneConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:telephoneConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-telephoneNumber.xml"^^xsd:string ; + :displayName "phone" ; + vitro:displayRankAnnot 60; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasTelephoneNumberGenerator"^^ ; + :propertyGroup . + +local:additionalEmailContext a :ConfigContext ; + :hasConfiguration local:additionalEmailConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:additionalEmailConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-additionalEmail.xml"^^xsd:string ; + :displayName "additional emails" ; + vitro:displayRankAnnot 30; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEmailGenerator"^^ ; + :propertyGroup . + +local:primaryEmailContext a :ConfigContext ; + :hasConfiguration local:primaryEmailConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:primaryEmailConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-primaryEmail.xml"^^xsd:string ; + :displayName "primary email" ; + vitro:displayRankAnnot 20; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEmailGenerator"^^ ; + :propertyGroup . + +local:webpageContext a :ConfigContext ; + :hasConfiguration local:webpageConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:webpageConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-webpage.xml"^^xsd:string ; + :displayName "webpage" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; + :propertyGroup . + +local:fullNameContext a :ConfigContext ; + :hasConfiguration local:fullNameConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:fullNameConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-fullName.xml"^^xsd:string ; + :displayName "full name" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddFullNameToPersonGenerator"^^ ; + :propertyGroup . + +### properties using default editing form ## + +local:eventWithinContext a :ConfigContext ; + :hasConfiguration local:eventWithinConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:eventWithinConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "event within" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:includesEventContext a :ConfigContext ; + :hasConfiguration local:includesEventConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:includesEventConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "includes event" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:inEventSeriesContext a :ConfigContext ; + :hasConfiguration local:inEventSeriesConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:includesEventConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "in event series" ; + vitro:displayRankAnnot 3; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + diff --git a/rdf/display/everytime/PropertyConfigSupp.n3 b/rdf/display/everytime/PropertyConfigSupp.n3 new file mode 100644 index 00000000..86a5fcbe --- /dev/null +++ b/rdf/display/everytime/PropertyConfigSupp.n3 @@ -0,0 +1,22 @@ +@prefix xsd: . +@prefix owl: . +@prefix : . +@prefix display: . +@prefix rdf: . +@prefix rdfs: . +@prefix datagetter: . +@prefix vitro: . +@prefix role: . +@prefix local: . +@prefix vivo: . + +@base . + + +# warning: don't use blank nodes; the display model doesn't currently support them. + +local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ; + :deleteLinkSuppressed "true"^^xsd:boolean . + +local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ; + :deleteLinkSuppressed "true"^^xsd:boolean . diff --git a/rdf/display/everytime/vivoListViewConfig.rdf b/rdf/display/everytime/vivoListViewConfig.rdf index dc89515b..4e11905f 100644 --- a/rdf/display/everytime/vivoListViewConfig.rdf +++ b/rdf/display/everytime/vivoListViewConfig.rdf @@ -49,100 +49,16 @@ listViewConfig-advisorIn.xml - - - listViewConfig-hasRole.xml - - + listViewConfig-hasRole.xml - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasRole.xml - - - - listViewConfig-hasEditReviewRole.xml - - - - listViewConfig-hasEditReviewRole.xml - - - - listViewConfig-hasPresenterRole.xml - - - - listViewConfig-hasAttendeeRole.xml - - - - - listViewConfig-hasInvestigatorRole.xml - - - - listViewConfig-hasInvestigatorRole.xml - - - - listViewConfig-hasInvestigatorRole.xml - - listViewConfig-researchAreaOf.xml - - - + listViewConfig-relatedRole.xml @@ -150,10 +66,6 @@ listViewConfig-relatedRole.xml - - listViewConfig-relatedRole.xml - - listViewConfig-dateTimeInterval.xml diff --git a/rdf/tbox/filegraph/agent.owl b/rdf/tbox/filegraph/agent.owl new file mode 100644 index 00000000..ee0868ad --- /dev/null +++ b/rdf/tbox/filegraph/agent.owl @@ -0,0 +1,892 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + topic weight measurement + + + + + + + + + expertise measurement + + + + + + + + + topic weight measurement process + + + + + + + + + expertise measurement process + + + + + + + + + experience + + + + + + + + + specialty + + + + + + + + + technology transfer office + + An organization that provides services for commercialization and licensing of technologies at an institution. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + Technology Transfer Office + + + + + + + + + manufacturer + + + + + + + + + + + + + + + + + + A person or organization that has a manufacturer role + + + + + + + + + academic department + + A distinct, usually specialized educational unit within an educational organization. + Endodontics (department within a College of Dentistry); English (department within a College of Liberal Arts) + + + + + + + + + association + + A formal organization of people or groups of people around a subject or practice. + A group of persons or organizations organized for a common purpose. + Special Libraries Association; Association for Computing Machinery(ACM); American Medical Informatics Association(AMIA) + + + + + + + + + center + + A place where a particular activity or service is concentrated. + Alchohol Education Center; Center for Arts and Public Policy; Hearing Research Center + An organization where a specified activity is concentrated. + Short Definition take from http://www.thefreedictionary.com/center. + + + + + + + + + clinical organization + + Any organization that offers significant health services or routinely provides medical care to patients. + Any organization with a significant clinical function as a matter of course and not just through occasional clinical roles + In the future we may be able to make this a defined class that would not need to be directly asserted, but the consensus seems to be that some organizations "are" clinical and some "are" research organizations and that the distinction is important enough to warrant the additional class and class assertions + + + + + + + + + college + + A primary academic unit within a University or a free-standing higher education organization without graduate degree programs + A primary academic unit within a University or a free-standing higher education organization without graduate degree programs. + College of Arts & Sciences; Ivy Tech Community College + + + + + + + + + committee + + A group of people organized for a specific purpose (e.g., a reporting or advisory role), often with a charge and for a specific duration + A group of people organized for a specific purpose, whose members are often selected from a larger group to serve for designated periods of time. + Curriculum Steering Committee; PhD Advisory Committee + There could be many subclasses such as thesis committee or tenure committee, but these may typically be differentiated via the moniker unless distinct properties become important. + + + + + + + + + company + + A legally-recognized business organization + A legally-recognized business organization. + from Wikipedia: "A company is a form of business organization. It is an association or collection of individual real persons and/or other companies ... This collection, group or association of persons can be made to exist in law and then a company is itself considered a "legal person". The name company arose because, at least originally, it represented or was owned by more than one real or legal person." + + + + + + + + + consortium + + A group of independent organizations working together toward a common goal, under an expressed agreement. + Committee on Institutional Cooperation (CIC); The Five Colleges of Ohio + + + + + + + + + core laboratory + + A lab providing services such as training, protocols, or access to instruments or software + + + + + + + + department + + A unit within a larger organization that addresses a specific subject or area of activity. + Definition modified from the definition here: http://dictionary.reference.com/browse/department. It is difficult to tell the difference between and department and a division. + Legal (department within a company); Use for any non-academic department + + + + + + + + + division + + + A major unit or section within a larger organization. + Cardiovascular Medicine (division within medicine) + Definition modified from http://www.thefreedictionary.com/division. It is difficult to tell the difference between a division and a department. + + + + + + + + + extension unit + + A unit devoted primarily to extension activities, whether for outreach or research + A unit devoted primarily to extension activities, whether for outreach or research. + Alachua County Extension Office + + + + + + + + + foundation + + An institution founded with an endowment to support educational, research, artistic or other charitable activities. + Definition take from: http://dictionary.reference.com/browse/foundation. + The Ford Foundation + + + + + + + + + funding organization + + A defined class of organizations that fund Grants + An organization that provides financial support to individuals or organizations to carry out specified activities. + National Institute of Health (NIH) + + + + + + + + + government agency + + A unit of government responsible for oversight and regulation of certain activities or the administration and provision of specific services. + Definition take from: http://en.wikipedia.org/wiki/Government_agency. + United States Library of Congress + + + + + + + + + graduate student + + A person who has already received a bachelor's degree and is working toward a Master's or Doctoral degree. + + + + + + + + hospital + + An institution that provides medical, surgical, psychiatric or nursing care. + Definition take from: http://dictionary.reference.com/browse/hospital. + Shands at the University of Florida + + + + + + + + + institute + + An Institute normally has a research focus but may also fulfill instructional or outreach roles + An organization founded to pursue or promote certain research, educational or public policy interests or activities. + Institute for Fundamental Theory + + + + + + + + + laboratory + + An organization unit that facilitates or conduits observation, testing, experimentation, or research in a field of study or practice. + An organizational unit (as opposed to the physical facility) that performs research, provides services, or processes materials + + + + + + + + + library + + An organization maintaining one or more collections of physical and/or electronic information resources for access or lending. + Marston Science Library + Used information from this definition: http://dictionary.reference.com/browse/library. + + + + + + + + + museum + + An organization devoted to the acquisition, conservation, study, exhibition, and educational interpretation of objects having scientific, historical, cultural or artistic value. + Definition was take from here: http://dictionary.reference.com/browse/museum + The Getty Museum + + + + + + + + + private company + + A private company is one that is privately-owned, and thus, is not publicly-traded in the stock market. Members of the general public cannot purchase stock in a private company unless that company chooses to go public and become a public company. + Definition obtained here: http://answers.ask.com/Business/Finance/what_is_a_private_company. Examples of private companies found here: http://www.forbes.com/2008/11/03/largest-private-companies-biz-privates08-cx_sr_1103private_land.html + Publix Super Markets; Ernst & Young; PricewaterhouseCoopers + + + + + + + + + program + + A Cornell graduate field (http://vivo.cornell.edu/index.jsp?home=65535&collection=820) + An ongoing academic initiative not formalized with department or division status. + + + + + + + + + publisher (vivo) + + A person or company whose business is the publishing of books, periodicals, engravings, computer software, etc. + Definition found here: http://dictionary.reference.com/browse/publisher + Elsevier; Harper & Row; Indiana University Press + + + + + + + + + research organization + + Any organization (likely also asserted as another class of Organization) with a primary, ongoing research function, not just through occasional roles + + + + + + + + + school + + An institution for instruction in a particular skill or field. + Definition take from here: http://dictionary.reference.com/browse/school. + School of Architecture; School of Music + + + + + + + + + service providing lab + + A laboratory that provides services + Ideally a defined class -- a Laboratory the provides some Service via the property + + + + + + + + + student + + A person who is enrolled in an educational institution. + Use only if no specific subclasses of core:Student describe the person. + + + + + + + + student organization + + A student organization is an organization, operated by students at a university, whose membership normally consists only of students. + Dancin' Gators + Definition take from here: http://en.wikipedia.org/wiki/Student_society + + + + + + + + + team + + A group of people working together. + An informal organization brought together for the purposes of a project or event + VIVO Outreach Team; VIVO Ontology Team + + + + + + + + + undergraduate student + + A person registered in an undergraduate program leading to a bachelor's degree or an undergraduate diploma or certificate. + + + + + + + + university + + An institution of higher education and research, which grants academic degrees in a variety of subjects, and provides both undergraduate education and postgraduate education. + Definition taken from: http://en.wikipedia.org/wiki/University + University of Florida; Washington University in St. Louis + + + + + + + + + + + + + + + agent (foaf) + + + Agents are things that do stuff + An agent + PERSON: Scott Hoffmann + Things that do stuff. + agent + see: http://xmlns.com/foaf/spec/#term_Agent + Used to describe any "agent" related to bibliographic items. Such agents can be persons, organizations or groups of any kind. + + + + + + + + group (foaf) + + A collection of individual agents (and may itself play the role of a Agent, ie. something that can perform actions). + A collection of individual agents. + A group + A group can also be an organization but need not be; typically used for looser associations of people or organizations acting together in some fashion, not necessarily through formal agreement or on a long-term basis. Added to the VIVO ontology to be able to support informal and perhaps even private groups of people around an idea, funding opportunity, or event. + +see: http://xmlns.com/foaf/spec/#term_Group + PERSON: Scott Hoffmann + group + + + + + + + + organization + + + A generic class encompassing several types of organizations. + A kind of Agent corresponding to social instititutions such as companies, societies etc. + An organization + Only use if no specific subclasses of foaf:organization desribe the organization. + PERSON: Scott Hoffmann + This class will display all the instances in the subclasses below it, as well as any organizations that were added as part of this generic class because there wasn't a specific class available. + organization + Ued to describe an organization related to bibliographic items such as a publishing company, etc. + + + + + + + + person + + + A person + An instance of a human being (Homo sapiens) + PERSON: Melissa Haendel + The most general classification of a person + person + + + + + + + + + + + + + + american board of allergy and immunology + + + + + + + + + american board of anesthesiology + + + + + + + + + american board of colon and rectal surgery + + + + + + + + + american board of dermatology + + + + + + + + + american board of emergency medicine + + + + + + + + + american board of family medicine + + + + + + + + + american board of internal medicine + + + + + + + + + american board of medical genetics + + + + + + + + + american board of neurological surgery + + + + + + + + + american board of nuclear medicine + + + + + + + + + american board of obstetrics and gynecology + + + + + + + + + american board of ophthalmology + + + + + + + + + american board of orthopaedic surgery + + + + + + + + + american board of otolaryngology + + + + + + + + + american board of pathology + + + + + + + + + american board of pediatrics + + + + + + + + + american board of physical medicine and rehabilitation + + + + + + + + + american board of plastic surgery + + + + + + + + + american board of preventive medicine + + + + + + + + + american board of psychiatry and neurology + + + + + + + + + american board of radiology + + + + + + + + + american board of surgery + + + + + + + + + american board of thoracic surgery + + + + + + + + + american board of urology + + + + + + + diff --git a/rdf/tbox/filegraph/appControls-temp.n3 b/rdf/tbox/filegraph/appControls-temp.n3 new file mode 100644 index 00000000..ef20a291 --- /dev/null +++ b/rdf/tbox/filegraph/appControls-temp.n3 @@ -0,0 +1,67 @@ +@prefix hr: . +@prefix afn: . +@prefix : . +@prefix scires: . +@prefix aka: . +@prefix pubmed: . +@prefix vann: . +@prefix owl2: . +@prefix wcmc: . +@prefix dcterms: . +@prefix rdfs: . +@prefix swrl: . +@prefix vitro: . +@prefix event: . +@prefix wos: . +@prefix vivoc: . +@prefix swvs: . +@prefix rdf: . +@prefix c4o: . +@prefix cce: . +@prefix dcelem: . +@prefix vivo: . +@prefix dc: . +@prefix geo: . +@prefix pvs: . +@prefix foaf: . +@prefix aktp: . +@prefix far: . +@prefix fabio: . +@prefix skco: . +@prefix ospcu: . +@prefix acti: . +@prefix ai: . +@prefix sce: . +@prefix stars: . +@prefix bibo: . +@prefix xsd: . +@prefix swrlb: . +@prefix owl: . +@prefix core: . +@prefix socsci: . +@prefix rdfsyn: . +@prefix local: . +@prefix vitro-public: . +@prefix mann: . +@prefix skos: . +@prefix ero: . + +foaf:Agent + rdfs:subClassOf + [ a owl:Restriction ; + owl:allValuesFrom core:Relationship ; + owl:onProperty core:relatedBy + ] . + + +foaf:Person + rdfs:subClassOf + [ a owl:Restriction ; + owl:someValuesFrom ; + owl:onProperty + ] ; + rdfs:subClassOf + [ a owl:Restriction ; + owl:onProperty ; + owl:allValuesFrom + ] . diff --git a/rdf/tbox/filegraph/bfo-bridge.owl b/rdf/tbox/filegraph/bfo-bridge.owl new file mode 100644 index 00000000..d3f42a1a --- /dev/null +++ b/rdf/tbox/filegraph/bfo-bridge.owl @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + entity + + + + + + + + continuant + + + + + + + + + occurrent + + + + + + + + + independent_continuant + + + + + + + + + spatial region + + + + + + + + + temporal region + + + + + + + + + process + + + + + + + + + disposition (bfo) + + + + + + + + + + + + + + + + + quality + + + + + + + + + specifically_dependent_continuant + + + + + + + + + role (bfo) + + + + + + + + + site + + + + + + + + + generically dependent continuant + + + + + + + + + function + + + + + + + + + one-dimensional temporal region + + + + + + + + + material_entity + + + + + + + + + immaterial entity + + + + + + + + + zero-dimensional temporal region + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + administrator role + + + + + + + + + advising process + + + + + + + + + + + + + + + + + attending process + + + + + + + + + + + + + + + + + + + + + + + + + editor role + + + + + + + + + educational process + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + organizer role + + + + + + + + + organizing process + + + + + + + + + outreach provider role + + + + + + + + + presenter role + + + + + + + + + presenting process + + + + + + + + + + + + + + + + + + + + + + + + + reviewer role + + + + + + + + + teacher role + + + + + + + + diff --git a/rdf/tbox/filegraph/bfo.owl b/rdf/tbox/filegraph/bfo.owl new file mode 100644 index 00000000..7bdff289 --- /dev/null +++ b/rdf/tbox/filegraph/bfo.owl @@ -0,0 +1,32 @@ + + + + + + + realizable entity + + + (forall (x t) (if (RealizableEntity x) (exists (y) (and (IndependentContinuant y) (not (SpatialRegion y)) (bearerOfAt y x t))))) // axiom label in BFO2 CLIF: [060-002] + (forall (x) (if (RealizableEntity x) (and (SpecificallyDependentContinuant x) (exists (y) (and (IndependentContinuant y) (not (SpatialRegion y)) (inheresIn x y)))))) // axiom label in BFO2 CLIF: [058-002] + RealizableEntity + All realizable dependent continuants have independent continuants that are not spatial regions as their bearers. (axiom label in BFO2 Reference: [060-002]) + To say that b is a realizable entity is to say that b is a specifically dependent continuant that inheres in some independent continuant which is not a spatial region and is of a type instances of which are realized in processes of a correlated type. (axiom label in BFO2 Reference: [058-002]) + realizable + the disposition of this piece of metal to conduct electricity. + the disposition of your blood to coagulate + the function of your reproductive organs + the role of being a doctor + the role of this boundary to delineate where Utah and Colorado meet + + + + diff --git a/rdf/tbox/filegraph/classes-additional.owl b/rdf/tbox/filegraph/classes-additional.owl new file mode 100644 index 00000000..4ad99647 --- /dev/null +++ b/rdf/tbox/filegraph/classes-additional.owl @@ -0,0 +1,1185 @@ + + + + ${eaglei.ontology.version} + A file to hold VIVO application specific entities, and original VIVO entities that are being considered to be application specific when merging into ARG. + + + + + + + + + research opportunity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Event + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Academic Article + + + + + + + + + + + + + + + + + + + + Article + + + + + + + + + + + + + + + + + + + + + + + + + + Audio Document + + + + + + + + + + + + + + Audio-Visual Document + + + + + + + + + + + + + + Book + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Book Section + + + + + + + + + + + + + + + + + + + + + + + + + + Collected Document + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + Conference + + + + + + + + + + + + + + document (IAO) + Document + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document Part + + + + + + + + + + + + + + + + + + + + + + + + + + Document Status + + + + + + + + Edited Book + + + + + + + + + + + + + + + + + + + + + + + + + + Image + + + + + + + + + Journal + + + + + + + + + + + + + + Patent + + + + + + + + + + + + + + + + + + + + Periodical + + + + + + + + + + + + + + + + + + + + + + + + + + Proceedings + + + + + + + + Report + + + + + + + + + + + + + + Series + + + + + + + + + + + + + + + + + + + + Thesis + + + + + + + + + + + + + + + + + + + + Thesis Degree + + + + + + + + Website + + + + + + + + + + + + + + Bibliographic Information Source + + A source of information about bibliographic citations, such as Google Scholar, Web of Science or Scopus. + + + + + + + + Global Citation Count + The number of times a work has been cited globally, as determined from a particular bibliographic information source on a particular date. + + + + + + + + Academic Degree + + + + 1 + + + + + + + + + + + + + + + + Academic Department + + + + + + + + + + + + + + + + + + + + + + Advising Relationship + + + + + + + + + + + + + + + + + + + + + Authorship + + + + + + + + + + + + + + + + + Award or Honor Receipt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Blog Posting + + + + + + + + + + + + + + + Catalog + + + + + + + + + + + + + + + + + + + + + College + + + + + + + + + + + + + + + + Conference Paper + + + + + + + + + + + + + + + Course + + + + + + + + + + + + + + Credential + + + + + + + + + + + + + + + + + + + + + + + + + + Database + + + + + + + + + + + + + + Educational Process + + + + + + + + + + + + + + Currently any abstract name is given to individuals of this class. This could change in the future. + Represents educational training that has been received. + This connects person to their academic degree through this educational training, but can also be used when the training does not result in a degree. + + + + + + + + Event Series + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Funding Organization + + + + + + + + + + + + + + + + Grant + + + + + + + + + + + + + + + + + + + + + + + + + + + Information Resource + + + + + + + + + + + + + + + + + + + + + + + + + The most general classification of an information resource + + + + + + + + + Issued Credential + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Laboratory + + + + + + + + + + + + + + Position + + + + + + + + + + + + + + + + + + + + + + Project + + + + + + + + + + + + + + + + + + + + + + + + + + + Role + + + + + + + + + + + + + + + + + + + A person's, group's or organization's role in an endeavor + Only use if no specific subclasses of core:Role describe the role. + Only use this broad role class if no subclasses of role describe the item being classified. + + + + + + + + + Software + + + + + + + + + Computer program and its related documentation; directs the operation of a computer + + + + + + + + + University + + + + + + + + + + + + + + Working Paper + + + + + + + + + + + + + + + Agent + + + + + + + + + + + + + + + + + + + + + + + Organization + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Person + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/clinical.owl b/rdf/tbox/filegraph/clinical.owl new file mode 100644 index 00000000..4d36738a --- /dev/null +++ b/rdf/tbox/filegraph/clinical.owl @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + human study + + A clinical trial. + OCRe + PERSON: Melissa Haendel + Research project that uses or collects measurements or assessments about humans. + This should be imported from OCRE- but they currently have no generic human study type. Def is modified. + human study + + + + + + + + + clinical trial + + + + + + + + + + + + + A clinical trial to evaluate the efficacy of a new drug. + An interventional study that contains a set of procedures in medical research and drug development that are conducted to allow safety (or more specifically, information about adverse drug reactions and adverse effects of other treatments) and efficacy data to be collected for health interventions (e.g., drugs, diagnostics, devices, therapy protocols) that is performed over phases. + PERSON: Nicole Vasilevsky + http://en.wikipedia.org/wiki/Clinical_trial + + + + + + + phase (ocre) + + Phase describes the level of a trial required of drugs before (and after) they are routinely used in clinical practice: +- Phase I trials assess toxic effects on humans (not many people participate in them, and usually without controls); +- Phase ll trials assess therapeutic benefit (usually involving a few hundred people, usually with controls, but not always); +- Phase III trials compare the new treatment against standard (or placebo) treatment (usually a full randomised controlled trial). At this point, a drug can be approved for community use. +- Phase IV monitors a new treatment in the community, often to evaluate longterm safety and effectiveness. [Glossary of Terms in The Cochrane Collaboration] + +A trial can be of a combination phase (e.g., I/II). +The concept of phase is not applicable to trials studying certain interventions (e.g., device, procedure, behavioral) + Simona + + + + + + + + phase 0 + + A Phase 0 trial is an exploratory trial involving very limited human exposure, with no therapeutic or diagnostic intent (e.g., screening study, microdose study). [http://prsinfo.clinicaltrials.gov/definitions.html] + Simona + + + + + + + + phase 1 + + A Phase I trial assesses toxic effects on humans (not many people participate, and usually without controls) [Glossary of Terms in The Cochrane Collaboration] + Simona + + + + + + + + phase 2 + + A Phase ll trial assesses therapeutic benefit (usually involving a few hundred people, usually with controls, but not always) [Glossary of Terms in The Cochrane Collaboration] + Simona + + + + + + + + phase 3 + + A Phase III trial compares the new treatment against standard (or placebo) treatment (usually a full +randomised controlled trial). At this point, a drug can be approved for community use. [Glossary of Terms in The Cochrane Collaboration] + Simona + + + + + + + + phase 4 + + A Phase IV study monitors a new treatment in the community, often to evaluate longterm safety and effectiveness. [Glossary of Terms in The Cochrane Collaboration] + Simona + + + + + + + + single group study + + A single group study is an interventional study that has only a single allocation group and no contemporaneuos comparison group. +A study in which an individual acts has his/her own comparison does not fall into this category, since an individual is not a group. + Simona + Simona: to be reviewed + + + + + + + + clinical role + + A role of observing or treating patients + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/contact-vcard.owl b/rdf/tbox/filegraph/contact-vcard.owl new file mode 100644 index 00000000..31b94cf7 --- /dev/null +++ b/rdf/tbox/filegraph/contact-vcard.owl @@ -0,0 +1,2139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + acquaintance + + + + + + + + + address + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + To specify the components of the delivery address for the vCard object + + + + + + + + addressing + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + These types are concerned with information related to the delivery addressing or label for the vCard object + + + + + + + + agent (vcard c) + + + + + + + + + calendar + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + calendar busy (vcard c) + + + + + + + + + + 1 + + + + + + To specify the URI for the busy time associated with the object that the vCard represents. +Was called FBURI in vCard + + + + + + + + calendar link (vcard c) + + + + + + + + + + 1 + + + + + + To specify the URI for a calendar associated with the object represented by the vCard. +Was called CALURI in vCard. + + + + + + + + calendar request (vcard c) + + + + + + + + + + 1 + + + + + + To specify the calendar user address [RFC5545] to which a scheduling request [RFC5546] should be sent for the object represented by the vCard. +Was called CALADRURI in vCard + + + + + + + + category (vcard c) + + + + + + + + + + 1 + + + + + + To specify application category information about the vCard, also known as tags. This was called CATEGORIES in vCard. + + + + + + + + cell + + Also called mobile telephone + + + + + + + + child + + + + + + + + + code (vcard c) + Contains all the Code related Classes that are used to indicate vCard Types + + + + + + + + colleague + + + + + + + + + communication + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + These properties describe information about how to communicate with the object the vCard represents + + + + + + + + contact (vcard c) + + + + + + + + + coresident + + + + + + + + + coworker + + + + + + + + + crush + + + + + + + + + date + + + + + + + + + email (vcard c) + + + + + + + + + + 1 + + + + + + To specify the electronic mail address for communication with the object the vCard represents + + + + + + + + emergency + + + + + + + + + explanatory + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + These properties are concerned with additional explanations, such as that related to informational notes or revisions specific to the vCard + + + + + + + + fax + + + + + + + + + female (vcard) + + + + + + + + + formatted name + + + + + + + + + + 1 + + + + + + Specifies the formatted text corresponding to the name of the object the vCard represents + + + + + + + + friend + + + + + + + + + gender (vcard c) + + + + + + + + + geo (vcard c) + + + + + + + + + + 1 + + + + + + Used to indicate global positioning information that is specific to an address + + + + + + + + geographical + + + + + + + + + + 1 + + + + + These properties are concerned with information associated with geographical positions or regions associated with the object the vCard represents + + + + + + + + group (vcard c) + + + + + + + + + + 1 + + + + + + Defines all the properties required to be a Group of Individuals or Organizations + + + + + + + + home + + This implies that the property is related to an individual's personal life + + + + + + + + identification + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + These types are used to capture information associated with the identification and naming of the entity associated with the vCard + + + + + + + + individual + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + Defines all the properties required to be an Individual + + + + + + + + messaging + + + + + + + + + + 1 + + + + + + To specify the URI for instant messaging and presence protocol communications with the object the vCard represents. +Was called IMPP in vCard. + + + + + + + + key (vcard c) + + + + + + + + + + 1 + + + + + + + + + + + + + kin + + + + + + + + + vcard kind + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + The parent class for all vCard Objects + + + + + + + + language + + + + + + + + + + 1 + + + + + + To specify the language(s) that may be used for contacting the entity associated with the vCard. + + + + + + + + location (vcard c) + + Defines all the properties required to be a Location + + + + + + + + logo (vcard c) + + + + + + + + + + 1 + + + + + + To specify a graphic image of a logo associated with the object the vCard represents + + + + + + + + male (vcard c) + + + + + + + + + me + + + + + + + + + met + + + + + + + + + muse + + + + + + + + + name + + + + + + + + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + Specifies the components of the name of the object the vCard represents + + + + + + + + neighbor + + + + + + + + + nickname + + + + + + + + + + 1 + + + + + + Specifies the text corresponding to the nickname of the object the vCard represents + + + + + + + + none + + + + + + + + + note (vcard c) + + + + + + + + + + 1 + + + + + + To specify supplemental information or a comment that is associated with the vCard + + + + + + + + organization (vcard c) + + Defines all the properties required to be an Organization + To specify the organizational name associated with the vCard + + + + + + + + organization name (vcard c) + + + + + + + + + + 1 + + + + + + + + + + + + + organizational unit name (vcard c) + + + + + + + + + + 1 + + + + + + + + + + + + + organisational + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + These properties are concerned with information associated with characteristics of the organization or organizational units of the object that the vCard represents + + + + + + + + other + + + + + + + + + pager + + + + + + + + + parent + + + + + + + + + photo (vcard c) + + + + + + + + + + 1 + + + + + + Specifies an image or photograph information that annotates some aspect of the object the vCard represents + + + + + + + + related (vcard c) + + + + + + + + + + 1 + + + + + + To specify a relationship between another entity and the entity represented by this vCard + + + + + + + + relation type + + + + + + + + + + + security + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + Contains all the Security related Classes + + + + + + + + sibling + + + + + + + + + sound (vcard c) + + + + + + + + + + 1 + + + + + + To specify a digital sound content information that annotates some aspect of the vCard. This property is often used to specify the proper pronunciation of the name property value of the vCard + + + + + + + + spouse + + + + + + + + + sweetheart + + + + + + + + + telephone (vcard c) + + + + + + + + + + 1 + + + + + + + + + + + + + phone + + + + + + + + + text + + Also called sms telephone + + + + + + + + text phone + + + + + + + + + time zone + + + + + + + + + + 1 + + + + + + Used to indicate time zone information that is specific to a location or address + + + + + + + + title (vcard c) + + + + + + + + + + 1 + + + + + + To specify the position or job of the object the vCard represents + + + + + + + + type + + This is called TYPE in vCard but renamed here to Context for less confusion (with types/class) + + + + + + + + url (vcard c) + + + + + + + + + + 1 + + + + + + To specify a uniform resource locator associated with the object to which the vCard refers. Examples for individuals include personal web sites, blogs, and social networking site identifiers. + + + + + + + + f1000 link + + F1000 is a place where faculty go to critique papers published in PubMed. Any given record in F1000 might have anywhere from one to dozens of reviews. + + + + + + + + unknown + + + + + + + + + video (vcard c) + + + + + + + + + voice + + + + + + + + + work (vcard c) + + This implies that the property is related to an individual's work place + + + + + + + diff --git a/rdf/tbox/filegraph/contact.owl b/rdf/tbox/filegraph/contact.owl new file mode 100644 index 00000000..1670a0b9 --- /dev/null +++ b/rdf/tbox/filegraph/contact.owl @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + contact qualifier + + + + + + + + + foaf profile + + + + + + + + + contact + + + + + + + + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/data-properties.owl b/rdf/tbox/filegraph/data-properties.owl new file mode 100644 index 00000000..2026d144 --- /dev/null +++ b/rdf/tbox/filegraph/data-properties.owl @@ -0,0 +1,2437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2010-12-16 + GDP at purchaser's prices is the sum of gross value added by all resident producers in the economy plus any product taxes and minus any subsidies not included in the value of the products. It is calculated without making deductions for depreciation of fabricated assets or for depletion and degradation of natural resources. Data are in current U.S. dollars. Dollar figures for GDP are converted from domestic currencies using single year official exchange rates. For a few countries where the official exchange rate does not reflect the rate effectively applied to actual foreign exchange transactions, an alternative conversion factor is used. Source: World Bank national accounts data, and OECD National Accounts data files. http://data.worldbank.org/indicator/NY.GDP.MKTP.CD + World Bank + World Bank http://data.worldbank.org/indicator/NY.GDP.MKTP.CD + http://data.worldbank.org/indicator/NY.GDP.MKTP.CD + http://data.albankaldawli.org/indicator/NY.GDP.MKTP.CD + http://data.worldbank.org/indicator/NY.GDP.MKTP.CD + ttp://datos.bancomundial.org/indicador/NY.GDP.MKTP.CD + http://donnees.banquemondiale.org/indicateur/NY.GDP.MKTP.CD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + composite index measuring average achievement in three basic dimensions of human development-a long and healthy life, knowledge and a decent standard of living. Source: Calculated based on data from UNDESA (2009d), Barro and Lee (2010), UNESCO Institute for Statistics (2010b), World Bank (2010b) and IMF(2010a) . http://hdrstats.undp.org/en/indicators/49806.html + composite index measuring average achievement in three basic dimensions of human development—a long and healthy life, knowledge and a decent standard of living. Source: Calculated based on data from UNDESA (2009d), Barro and Lee (2010), UNESCO Institute for Statistics (2010b), World Bank (2010b) and IMF(2010a) . http://hdrstats.undp.org/en/indicators/49806.html + 2010-11-04 + UNDP - HDRO + UNDP - HDRO http://hdrstats.undp.org/en/indicators/49806.html + http://hdrstats.undp.org/en/indicators/49806.html + http://hdrstats.undp.org/en/indicators/49806.html + http://hdrstats.undp.org/es/indicadores/49806.html + http://hdrstats.undp.org/fr/indicateurs/49806.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2010-07-21 + Agricultural area, this category is the sum of areas under a) arable land - land under temporary agricultural crops (multiple-cropped areas are counted only once), temporary meadows for mowing or pasture, land under market and kitchen gardens and land temporarily fallow (less than five years). The abandoned land resulting from shifting cultivation is not included in this category. Data for “Arable land” are not meant to indicate the amount of land that is potentially cultivable; (b) permanent crops - land cultivated with long-term crops which do not have to be replanted for several years (such as cocoa and coffee); land under trees and shrubs producing flowers, such as roses and jasmine; and nurseries (except those for forest trees, which should be classified under "forest"); and (c) permanent meadows and pastures - land used permanently (five years or more) to grow herbaceous forage crops, either cultivated or growing wild (wild prairie or grazing land). Data are expressed in 1000 hectares. http://faostat.fao.org/site/375/default.aspx + FAOSTAT + FAOSTAT http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=es#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=fr#ancor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AGROVOC + AGROVOC http://aims.fao.org/website/Search-AGROVOC/sub + http://aims.fao.org/ar/website/Search-AGROVOC/sub + http://aims.fao.org/website/Search-AGROVOC/sub + http://aims.fao.org/es/website/Search-AGROVOC/sub + http://aims.fao.org/fr/website/Search-AGROVOC/sub + http://aims.fao.org/zh-hans/website/Search-AGROVOC/sub + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-04-28 + DBpedia + DBpedia http://dbpedia.org/About + http://dbpedia.org/About + + + + + + + + FAOSTAT + FAOSTAT http://faostat.fao.org + http://faostat.fao.org + http://faostat.fao.org/default.aspx?lang=es + http://faostat.fao.org/default.aspx?lang=fr + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2008-12-10 + Global Administrative Unit Layers + Global Administrative Unit Layers http://www.fao.org/geonetwork/srv/en/metadata.show?id=12691 + http://www.fao.org/geonetwork/srv/en/metadata.show?id=12691 + + + + + + + + ISO 3166-1 + ISO 3166-1 http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm + http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm + + + + + + + + 2010-04-01 + United Nations Statistics Division + United Nations Statistics Division http://unstats.un.org/unsd/methods/m49/m49alpha.htm + http://unstats.un.org/unsd/methods/m49/m49alpha.htm + http://unstats.un.org/unsd/methods/m49/m49alphaf.htm + + + + + + + + 2010-04-01 + United Nations Statistics Division + United Nations Statistics Division http://unstats.un.org/unsd/methods/m49/m49alpha.htm + http://unstats.un.org/unsd/methods/m49/m49alpha.htm + http://unstats.un.org/unsd/methods/m49/m49alphaf.htm + + + + + + + + + + + + + + 2011-07-21 + Country area, area of the country including area under inland water bodies, but excluding offshore territorial waters. Possible variations in the data may be due to updating and revisions of the country data and not necessarily to any change of area. Data are expressed in 1000 hectares. http://faostat.fao.org/site/375/default.aspx + FAOSTAT + FAOSTAT http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=es#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=fr#ancor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2011-07-21 + FAOSTAT + FAOSTAT http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + Land area is the total area of the country excluding area under inland water bodies. Possible variations in the data may be due to updating and revisions of the country data and not necessarily to any change of area. Data are expressed in 1 000 hectares. http://faostat.fao.org/site/375/default.aspx + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=es#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=377&lang=fr#ancor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2010-06-24 + FAO terminology + FAO terminology http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/en/ + http://www.fao.org/termportal/contr/ar/ + http://www.fao.org/termportal/contr/en/ + http://www.fao.org/termportal/contr/es/ + http://www.fao.org/termportal/contr/fr/ + http://www.fao.org/termportal/contr/zh/ + + + + + + + + 2009-09-21 + FAOSTAT + FAOSTAT http://faostat.fao.org/site/550/default.aspx + The total population usually refers to the present-in-area (de facto) population which includes all persons physically present within the present geographical boundaries of countries at the mid-point of the reference period. http://faostat.fao.org/site/375/default.aspx + http://faostat.fao.org/DesktopDefault.aspx?PageID=550&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=550&lang=en#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=550&lang=es#ancor + http://faostat.fao.org/DesktopDefault.aspx?PageID=550&lang=fr#ancor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The value of the datatype property *validSince* associated to a particular area (territory or group) indicates the area's first year of validity. The geopolitical ontology traces back historic changes only until 1985, therefore, if an area has a validSince = 1985, this indicates that the area is/was valid since 1985 or before. + + + + + + + + The value of the datatype property *validUntil* associated to a particular area (territory or group) indicates the area's last year of validity. In case the area is currently valid, this value is set by default to 9999. + + + + + + + + + is_template + The document can be used as a template for the creation of other documents. + + + + + + + + + + user_defined_tag + A free text field for recording topics which relate to the resource. + + + + + + + + + patient_id + + + + + + + + + + + health care provider id + + + + + + + + + + + measurement_label + + + + + + + + has_inventory_number + An example inventory number can be in the form: 12345 + Inventory identifier for the resource. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + has inventory number + + + + + + + + + + + + + + + + + + + + + + + + + + + + has_restriction + A restriction on service availability, such as university or consortium affiliation, geographical location, professional certification, or other factors. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Resource is only available to researchers in the department. + has restriction + + + + + + + + + + + + + + + + + + + + + + + + + + has_geographic_restriction + Any service limitation tied to geographically-defined areas such as metro areas, counties, states, or regions. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Resource is only available to researchers in Boston area. + has geographic restriction + + + + + + + + + + + + model_number + ABI 9000 + Instrument model number, which may be a name, number, or both. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + model number + + + + + + + + + + + lab_data_format + Current method or software used to inventory a lab's resources. Examples include Excel, index cards, FileMaker, 3-ring binder, etc. + Excel spreadsheet + PERSON: Melissa Haendel + PERSON: Melissa Haendel + lab data format + + + + + + + + + + + + + + + + + + version + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Software edition, typically a numeral followed by a decimal and another numeral, such as 2.1. + v 1.0 + + + + + + + + + + + + + + + + + + has_accession_number + PERSON: Melissa Haendel + PERSON: Melissa Haendel + The accession number for a gene. + Unique identifier of a biological polymer sequence (DNA, RNA, protein) when it is submitted to a sequence database. + accession number + + + + + + + + + + + + + + + + + + + has_study_population + African american study population. + Characteristics of the human population being studied. May include number, demographic or geographic information, inclusion or exclusion criteria, or other descriptive information. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + study population + + + + + + + + + + + has_eligibility_requirment + A grade point average above 3.5 is an eligibility requirement. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Requirements for research opportunity eligibility. Requirements include: coursework, minimum gradepoint average, state residency, under-represented group status, field of study, or matriculation status. + has eligibility requirement + + + + + + + + + + + abstract + http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/dc/terms/ + A summary of the resource. + stable + + + + + + + + asin + 020530902X + Amazon standard identification number. Source: http://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number. + http://purl.org/ontology/bibo/ + Amazon Standard Identification Number + stable + + + + + + + + chapter (bibo dp) + Title of the chapter (this individual) currently should be entered in the individual name (rdfs:label). Title of the book belongs on a separate Book individual related to the chapter via the core:partOf property (or its child property bibo:reproducedIn). The core:title field is deprecated and should no longer be used as of version 1.1 -- we will want to map rdfs:label to dc:title for query or linked data requests in the future + http://purl.org/ontology/bibo/ + An chapter number + unstable + + + + + + + + coden + CODEN became particularly common in the scientific community as a citation system for periodicals cited in technical- as well in chemistry-related publications and as a search tool in many bibliographic catalogues. +Definition and description came from Wikipedia here: http://en.wikipedia.org/wiki/CODEN + http://purl.org/ontology/bibo/ + An identifier of serials, still in use by libraries, but replaced by ISSN for any new work + stable + + + + + + + + digital object identifier (doi) + http://purl.org/ontology/bibo/ + stable + Digital Object Identifier + + + + + + + + ean international-uniform code council (ean-ucc) 13 + Definition source: http://en.wikipedia.org/wiki/European_Article_Numbering-Uniform_Code_Council. +The Uniform Code Council (UCC) was the Numbering Organization in the USA to administer and manage the EAN.UCC System. In 2005 the UCC changed its name to GS1 US. + http://purl.org/ontology/bibo/ + European Article Number/Uniform Commercier Code 13 + stable + + + + + + + + edition + http://purl.org/ontology/bibo/ + The name defining a special edition of a document. Normally its a literal value composed of a version number and words. + stable + + + + + + + + electronic international standard serial number (eissn) + eissn stands for Electronic International Standard Serial Number. source: http://www.definition-of.com/EISSN + http://purl.org/ontology/bibo/ + stable + The electronic ISSN number of a periodical. + + + + + + + + gtin14 + http://en.wikipedia.org/wiki/Global_Trade_Item_Number. + http://purl.org/ontology/bibo/ + stable + Global Trade Item Number 14 + + + + + + + + identifier (bibo) + + + + + + + + international standard book number (isbn) 10 + http://en.wikipedia.org/wiki/Isbn. + + + + + + + + international standard book number (isbn) 13 + source: http://en.wikipedia.org/wiki/Isbn. + + + + + + + + international standard serial number (issn) + http://purl.org/ontology/bibo/ + source: http://en.wikipedia.org/wiki/Issn + stable + International Standard Serial Number + + + + + + + + issue (bibo dp) + Bibo has the domain of bibo:issue as the class Issue, but an example on their site uses it with Article, referring to the issue number "4" + + + + + + + + library of congress control number (lccn) + Source: http://en.wikipedia.org/wiki/Library_of_Congress_Control_Number. + http://purl.org/ontology/bibo/ + stable + Library of Congress Control Number + + + + + + + + locator + definition from: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/ontology/bibo/ + stable + A description (often numeric) that locates an item within a containing document or collection. + + + + + + + + number of pages + + + + + + + + number + Definition from here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + + + + + + + + online computer library center (oclc) number + http://info-uri.info/registry/OAIHandler?verb=GetRecord&metadataPrefix=reg&identifier=info:oclcnum/. + + +bibo has the domain of this property set to the union of Collection and Document. + http://purl.org/ontology/bibo/ + stable + OCLC Identifier + + + + + + + + end page + http://purl.org/ontology/bibo/ + stable + Ending page number within a continuous page range. + + + + + + + + start page + http://purl.org/ontology/bibo/ + stable + Starting page number within a continuous page range. + + + + + + + + pubmed identifier + The PubMed ID (PMID) identifies a citation record (rather than full-text) in the PubMed database. It is not evidence of compliance with the NIH Public Access Policy, because it does not identify a full-text submission of any kind. + http://purl.org/ontology/bibo/ + stable + PubMed Identifier + + + + + + + + name prefix + Mr; Ms; Mrs + http://dictionary.reference.com/browse/prefix + http://purl.org/ontology/bibo/ + stable + The prefix of a name + + + + + + + + section + http://purl.org/ontology/bibo/ + An section number + Di Rado, Alicia. 1995. Trekking through college: Classes explore +modern society using the world of Star trek. Los Angeles Times, March +15, sec. A, p. 3. + unstable + + + + + + + + short description + http://purl.org/ontology/bibo/ + A short description of the resource. + The idea here is that while dcterms:description may involve length descriptions, this for short (two or three word) descriptions that could go in a bibliographic entry. + unstable + + + + + + + + sici + A sub property of identifier (http://en.wikipedia.org/wiki/SICI). + http://purl.org/ontology/bibo/ + Serial Item and Contribution Identifier + stable + + + + + + + + name suffix + Jr.; III;; M.D. + http://purl.org/ontology/bibo/ + stable + The suffix of a name + + + + + + + + upc + http://purl.org/ontology/bibo/ + source for public description: http://en.wikipedia.org/wiki/Universal_Product_Code. + stable + Universal Product Code + + + + + + + + uri + Definition from: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + + + + + + + + volume (bibo) + + + + + + + + has global count date + The date on which the global citation count of the cited entity was recorded from a named bibliographic information source. + + + + + + + + has global count value + An integer defining the value of the global citation count of a cited entity recorded from a named bibliographic information source on a particular date. + + + + + + + + + abbreviation + A short form for an longer title or name. + B.A. + + + + + + + + published us classification class/subclass (ccl) code + + + + + + + + + + credits + + + + + + + + date/time + + + + + + + + + era commons id + + + + + + + + + keywords + conservation + +use one freetextKeyword assertion for each keyword or phrase. + one keyword or phrase per freetextKeyword assertion + + + + + + + + + direct costs + + + + + + + + has_monetary_amount + + + + + + + + has_value + + + + + + + + international classification (icl) code + The International classification(s) to which the published application has been assigned. + + + + + + + + + + identifier (vivo) + + + + + + + + license number + + + + + + + + + link uri + + + + + + + + + local award id + core:localAwardId has a domain of core:Grant, and should be public since that's its public identifier for local use by OSP, accounting, department admins, and the PI + + + + + + + + + major field of degree + Information Science; Computer Science; Anthropology + + + + + + + + middle name or initial + + + + + + + + nih manuscript submission system id + + + + + + + + + + + + outreach overview + My extension program consists of developing and reporting disease management strategies that are both economically and environmentally sound for fresh market vegetable production. We hope that some of this testing will result in practices adaptable for organic production. + Used for a single narrative summary of outreach, typically covering a wide range of activities and time periods; use Outreach Provider Role for information on individual activities + + + + + + + + + overview + + + + + + + + + patent number + source of definition: http://www.uspto.gov/main/glossary/#p . The following site has patent number formats: http://www.uspto.gov/patents/ebc/kindcodesum.jsp . + + + + + + + + + + + place of publication + + + + + + + + pubmed central id + A PMCID is a unique PubMed Central reference number, which is assigned to each full-text record made available A PMCID is a unique PubMed Central reference number, which is assigned to each full-text record made available in PubMed Central. The PMCID is issued shortly after the PI or author approves the PubMed Central formatted web version of the submission. + + + + + + + + + + rank + this number indicates a position in a list + + + + + + + + + + report identifier + + + + + + + + + + + research overview + Used for a single narrative summary of research, typically covering a wide range of activities and time periods; use Researcher Role for information on individual activities + + + + + + + + isi researcher id + RearcherID is a Thomson Reuters project where researchers have a place to manage and share their professional information. It will allow them to solve author identity issues while simultaneously adding dynamic citation metrics and collaboration networks to your personal profile. +Definition source: http://isiwebofknowledge.com/researcherid/ + + + + + + + + + scopus id + Home page for Scopus: http://www.scopus.com/home.url + + + + + + + + + + seating capacity + 55 + definition modified from: source (http://en.wikipedia.org/wiki/Seating_capacity). + + + + + + + + + + sponsor award id + Has a domain of Grant. There is not a strong reason have this be publically visible, since most users would care more about the name of the sponsoring agency than its identifier, but it does no harm to be public. + + +See also core:localAwardId. + + + + + + + + + + supplemental information + + + + + + + + + teaching overview + Used for a single narrative summary of teaching, typically covering a wide range of courses including for credit and non-credit teaching over multiple semesters; the "teaches" property links a person directly with an instance of a Semester Class, typically from an institutional database of record; then use Teacher Role for information about a person's role in non-credit teaching or their specific contribution to individual courses + + + + + + + + + total award amount + + + + + + + + institutional review board (irb) number + Every clinical trial in the United States must be approved and monitored by an Institutional Review Board (IRB). An IRB is an independent committee of physicians, statisticians, community advocates and others whose objective is to ensure that a clinical trial is ethical and the rights of study participants are protected. + + + + + + + + national clinical trials (nct) number + ClinicalTrials.gov is an ICMJE-acceptable public registry, offering up-to-date information for locating clinical trials for a wide range of diseases and conditions. The U.S. National Institutes of Health (NIH), through its National Library of Medicine (NLM), developed this site in collaboration with the Food and Drug Administration (FDA), as a result of the FDA Modernization Act, which was passed into law in November 1997. This property should be publically visible since it is one of the principal identifiers in a national registry of clinical trials + NCT00000419 + + + + + + + + study population count + number of human participants in the study (trial). + + + + + + + + additional name + + + + + + + + + + anniversary + The date of marriage, or equivalent, of the object the vCard represents + + + + + + + + + + birthdate + To specify the birth date of the object the vCard represents + + + + + + + + + + calendar busy (vcard dp) + + + + + + + + + + calendar link (vcard dp) + + + + + + + + + + calendar request (vcard dp) + + + + + + + + + + category (vcard dp) + + + + + + + + + + country (vcard dp) + + + + + + + + + + email (vcard dp) + + + + + + + + + + has last name + Called Family Name in vCard + + + + + + + + + + has format name + + + + + + + + + + gender (vcard dp) + To specify the components of the sex and gender identity of the object the vCard represents. +To enable other Gender/Sex codes to be used, this dataproperty has range URI. The vCard gender code classes are defined under Code/Gender + + + + + + + + + + geo (vcard dp) + Must use the geo URI scheme RFC5870 + + + + + + + + + + first name + called Given Name invCard + + + + + + + + + + has prefix name + Called Honorific Prefix in vCard + + + + + + + + + + honorific suffix name + + + + + + + + + + instant message + + + + + + + + + + key (vcard dp) + + + + + + + + + + has language (vcard dp) + Use 2 char language code from RFC5646 + + + + + + + + + locality + + + + + + + + + + logo (vcard dp) + + + + + + + + + + nick name + + + + + + + + + + note (vcard dp) + + + + + + + + + + organization name (vcard dp) + + + + + + + + + + organizational unit name (vcard dp) + + + + + + + + + + photo (vcard dp) + + + + + + + + + + postal code + + + + + + + + + + product id + + + + + + + + + region + + + + + + + + + + related (vcard dp) + + + + + + + + + + revision + + + + + + + + + role (vcard) + + + + + + + + + + sort as + + + + + + + + + sound (vcard dp) + + + + + + + + + + source + + + + + + + + + street address + + + + + + + + + + telephone (vcard dp) + + + + + + + + + timezone + + + + + + + + + + title (vcard dp) + + + + + + + + + + uid + To specify a value that represents a globally unique identifier corresponding to the entity associated with the vCard + + + + + + + + + url (vcard dp) + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/date-time.owl b/rdf/tbox/filegraph/date-time.owl new file mode 100644 index 00000000..b08b108f --- /dev/null +++ b/rdf/tbox/filegraph/date-time.owl @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + academic term + + An explicit individual academic term, quarter, or semester rather than the generic fall, spring or summer semester. + + + + + + + + academic year + + An explicit individual period considered by an academic institution to be its primary academic cycle. + + + + + + + + date/time interval + a specific period or duration, defined by (optional) start and end date/times. + + + + + + + + date/time value instance + A date and/or time + + + + + + + + + + + + + yearmonthdayvalue + + + + + + + + yearmonthdaytimevalue + + + + + + + + yearmonthvalue + + + + + + + + yearvalue + + + + + + + diff --git a/rdf/tbox/filegraph/dateTimeValuePrecision.owl b/rdf/tbox/filegraph/dateTimeValuePrecision.owl new file mode 100644 index 00000000..76ab465a --- /dev/null +++ b/rdf/tbox/filegraph/dateTimeValuePrecision.owl @@ -0,0 +1,91 @@ + + + + Datetime value precision + + + + + + + + + + + + + + + + + + + + + + + YearMonthDayValue + + + + + + + + YearMonthDayTimeValue + + + + + + + + YearMonthValue + + + + + + + + YearValue + + + + + + + diff --git a/rdf/tbox/filegraph/documentStatus.owl b/rdf/tbox/filegraph/documentStatus.owl new file mode 100644 index 00000000..8a9b1702 --- /dev/null +++ b/rdf/tbox/filegraph/documentStatus.owl @@ -0,0 +1,91 @@ + + + + Document status + + + + + + + + + + + + + + + + + + + unpublished + + + rejected + + + draft + + + peer reviewed + &nbsp;Peer review is the process by which articles are chosen to be included in a refereed journal. An editorial board consisting of experts in the same field as the author review the article and decide if it is authoritative enough for publication. + + + in press + Document to be published + + + accepted + Accepted for publication after peer reviewing + + + submitted + + + invited + + + published + Published document + + + + + + + diff --git a/rdf/tbox/filegraph/education.owl b/rdf/tbox/filegraph/education.owl new file mode 100644 index 00000000..d9f46c0d --- /dev/null +++ b/rdf/tbox/filegraph/education.owl @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + funding role + + A role inhering in a person or organization that is realized when the bearer participates in providing funding to a person or an organization for academic or business purposes. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + The NIH is a funding agency. + + + + + + + + + educator role + + A role inhering in a person or organization that is realized when the bearer participates in providing education to a student or group of students. + A teacher. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + research opportunity + A planned process carried out by a person or organization with the objective of performing research. + An offering through an ongoing program or single request of research support: internships, positions, financial awards or other forms of tangible or intangible support + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + Training grant to perform post-doctoral research. + student research opportunity + + + + + + + + + us resident role + + A role that inheres in a person who maintains residency in the United states. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + us citizen role + + A US resident role that inheres in an individual that is a legally recognized as a member of a state, with associated rights and obligations. + PERSON: Nicole Vasilevsky + http://en.wiktionary.org/wiki/citizen + + + + + + + + + non-us citizen + + A US resident role that inheres in an individual who is not a legally recognized subject or national of the United States. + PERSON: Nicole Vasilevsky + https://www.google.com/search?q=residency+status&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#hl=en&client=firefox-a&hs=Bcx&rls=org.mozilla:en-US:official&q=citizen&tbs=dfn:1&tbo=u&sa=X&ei=micXT_DwMIjUiAK15tDUDw&ved=0CCgQkQ4&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=7b67128a22f602af&biw=1609&bih=794 + + + + + + + + + permanent resident role + + An role that inheres in an individual who is not a citizen but who legally resides in another nation on a permanent or extended basis. + PERSON: Nicole Vasilevsky + http://connection.ebscohost.com/us/immigration-restrictions/overview-legal-and-illegal-immigration + + + + + + + + + non-permanent resident role + + A non-US citizen role that inheres in an individual who is residing in a country, but is neither a citizen nor a permanent resident. + PERSON: Nicole Vasilevsky + http://www.irs.gov/taxtopics/tc851.html + + + + + + + + + student role + + A college student. + A role inhering in a person that is realized when the bearer participates a course of study, as in a school, college, university, etc. + PERSON: Nicole Vasilevsky + http://www.thefreedictionary.com/student + + + + + + + + + undergraduate student role + + A college student. + A student role inhering in a person that is realized when the bearer participates in a course of study at a college, university, etc. in pursuit of an associate or bachelor degree. + PERSON: Nicole Vasilevsky + http://www.thefreedictionary.com/student + + + + + + + + + graduate student role + + A PhD student at a university. + A student role inhering in a person that is realized when the bearer participates a course of study at a university or institution in pursuit of an graduate or professional degree. + PERSON: Nicole Vasilevsky + http://www.thefreedictionary.com/student + + + + + + + + + high school student role + + A freshman in high school. + A student role inhering in a person that is realized when the bearer participates in a course of study at a secondary learning institution. + PERSON: Nicole Vasilevsky + http://www.thefreedictionary.com/student + + + + + + + + + employee role + + A role inhering in a person that is realized when the bearer participates in an occupation by which a person earns a living or spends their time. + An employee at a university. + PERSON: Nicole Vasilevsky + http://dictionary.reference.com/browse/employment + + + + + + + + + faculty role + + A professor at a university. + An employee role inhering in a person that is realized when the bearer participates in the teaching and/or administrative force of a university, college, or school. + PERSON: Nicole Vasilevsky + http://dictionary.reference.com/browse/faculty + + + + + + + + + staff role + + A research technician in a lab. + An employee role inhering in a person that is realized when the bearer is employed by an employer. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + post-baccalaureate trainee + + A student role inhering in a person that is realized when the bearer participates in a post-baccalaureate training program in pursuit of an additional bachelor degree or new or additional training in a particular field. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + post-graduate student trainee role + + A post-doctoral fellow. + A student role inhering in a person that is realized when the bearer participates in a post-graduate training program in pursuit of new or additional training in a particular field, such as a post-doctoral fellowship. + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + regulatory role + + GROUP: Role branch + OBI, CDISC + Regulatory agency, Ethics committee, Approval letter; example: Browse these EPA Regulatory Role subtopics http://www.epa.gov/ebtpages/enviregulatoryrole.html Feb 29, 2008 + a role which inheres in material entities and is realized in the processes of making, enforcing or being defined by legislation or orders issued by a governmental body. + regulatory role + + + + + + + + + + advising relationship + + A dual relationship of one person being advised or mentored by another person, typically including start and end dates + + + + + + + + certification + + An issued certificate + see also core:Certificate + + + + + + + + educational process + + + + + + + + faculty mentoring relationship + + An advisory relationship in which one faculty member mentors another faculty member. + + + + + + + + graduate advising relationship + + An advisory relationship in which a professor advises a graduate student. + + + + + + + + internship + + Typically a student or a recent graduate undergoing supervised practical training. + + + + + + + + issued credential + + + + + + + + + licensure + + A granted license, which gives a 'permission to practice.' + A granted license, which gives a 'permission to practice.' Such licenses are usually issued in order to regulate some activity that is deemed to be dangerous or a threat to the person or the public or which involves a high level of specialized skill. See also core:License. + + + + + + + + medical residency + + Residency is a stage of graduate medical training. + + + + + + + + postdoc or fellow advising relationship + + An advisory relationship in which the advisee is a Postdoc or Fellow. + + + + + + + + postdoctoral training + + Postdoctoral research is academic or scholarly research conducted by a person who has completed his or her doctoral studies, normally within the following five years. It is intended to further deepen expertise in a specialist subject. + + + + + + + + + + + + + + undergraduate advising relationship + + An advisory relationship in which a professor advises an undergraduate student. + + + + + + + diff --git a/rdf/tbox/filegraph/event.owl b/rdf/tbox/filegraph/event.owl new file mode 100644 index 00000000..b2e2cf4a --- /dev/null +++ b/rdf/tbox/filegraph/event.owl @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + event + Only use if no specific subclasses of event:Event are appropriate. + Something that happens at a given place and time. + This class will also display instances of subclasses under Event, e.g. Philosophy Department Discussion Club; 2009 Racker Lecture; screening of a documentary. In addition to a location in space and time, an event may have any or all the following qualities: actively participating agents, passive factors, work products. Also, it may be in a virtual space or part of a series such as a lecture series. + +The previous short definition was: "An arbitrary classification of a space/time region, by a cognitive agent." + + + + + + + + + + + + + + + + attendee role + A role of attending an Event or EventSeries + + + + + + + + competition + + An occasion on which a winner is selected from among two or more contestants. + Intel Talent Search; poetry contest + Not the same as an award or distinction. + + + + + + + + conference series + + An organized series of a meeting for consultation or discussion. + For individual, separate conferences, use conference instead. core:ConferenceSeries and core:SeminarSeries are very similar. + + + + + + + + event series + A generic class which may include a conference series, a course section, a seminar series, or a workshop series. When possible, use one of these more specific classes. + Only use if no specific subclasses of core:EventSeries desribe the activity. + Two or more events that occur at different times and are connected to each other. + + + + + + + + exhibit + + The showing of an object or a collection of objects, in an organized manner. + + + + + + + + meeting + + A gathering of people for a defined purpose, not necessarily public or announced + + + + + + + + organizer role + A role of organizing + + + + + + + + presentation + + Encompasses talk, speech, lecture, slide lecture, conference presentation + + + + + + + + presenter role + A role of presenting information + Are we assuming that a PresenterRole is in a Presentation? Or could you have a PresenterRole in, say, a committee? + + + + + + + + seminar series + + An organized series of a meeting for an exchange of ideas, typically put on by a department or center. + Applied Microeconomics Seminars; Future of Rural New York Seminar Series + For individual seminars, use seminar instead. core:ConferenceSeries and core:SeminarSeries are very similar. + + + + + + + + workshop series + + An organized series of workshop events, whether repetitions of the same workshop or multiple different workshops. + Use workshop for individual events. + + + + + + + diff --git a/rdf/tbox/filegraph/geo-political.owl b/rdf/tbox/filegraph/geo-political.owl new file mode 100644 index 00000000..02921744 --- /dev/null +++ b/rdf/tbox/filegraph/geo-political.owl @@ -0,0 +1,1176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + United Nations statistics department http://unstats.un.org/unsd/methods/m49/m49regin.htm + + + + + + + + group (geo) + + + + + + + + + + + + + + + + + + + 1 + + + + + + 1 + + + UN Cartographic Section, Department of Field Support http://www.un.org/Depts/Cartographic/map/profile/world00.pdf + + + + + + + + organization (geo) + + + + + + + + + + + + + + + + + self governing + + + + United Nations Map Library http://www.un.org/depts/dhl/maplib/countinfo.htm + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + + + continent + + A large contiguous landmass that is at least partially surrounded by water, together with any islands on its continental shelf. + Short Definition take from http://en.wiktionary.org/wiki/continent. + The seven commonly recognized continents are Africa; Antarctica; Asia; Australia; Europe; North America; South America + + + + + + + + country (vivo) + + Afghanistan; Antigua and Barbuda; Cameroon; Iceland; Jamaica; Nigeria; United States of America + An area of land distinguished by its political autonomy. Politically independent territories. + Source of the Short Definition: http://www.thefreedictionary.com/country. This is also the same as geopolitical.owl:self_governing. + + + + + + + + county + + Alachua; Baker; Bradford; Kenora; Ottawa; Waterloo + Short Definition modified from the one found here: http://www.thefreedictionary.com/county. + The largest administrative division of most states or provinces. + + + + + + + + + + + + + + geopolitical entity + + A geographical area which is associated with some sort of political structure. + Short definition obtained here: http://en.wiktionary.org/wiki/geopolitical_entity. + Use subclasses of core:GeopoliticalEntity subclasses instead of this class if possible. + + + + + + + + state or province + + Minnesota; Michigan; Indiana; New York; Quebec; Manitoba; Ontario + One of a number of areas or communities having their own governments and forming a federation under a sovereign government, as in the US. + Source of the Short Definition: http://www.thefreedictionary.com/state. + + + + + + + + subnational region + + Boroughs; townships; districts; the Midwest + For example, the Midwest, northeast U.S. + Short definition was partially taken from http://en.wikipedia.org/wiki/Subnational_entity. + Smaller administrative division into which a country may be divided. + + + + + + + + transnational region + + Any region that goes beyond national boundaries and does not fit into any subclass of core:TransnationalRegion. + None as yet. + Not sure how to access the "Editor's Comments". But as North America is a continent, it would be placed directly into the continent subclass and viewable through this class along with any other subclass entities. + sub-Saharan Africa, North America + + + + + + + diff --git a/rdf/tbox/filegraph/grant.owl b/rdf/tbox/filegraph/grant.owl new file mode 100644 index 00000000..f84e1b08 --- /dev/null +++ b/rdf/tbox/filegraph/grant.owl @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + co-principal investigator role + + Role of co-principal investigator of an Agreement (for example, a grant), who devotes a specified percentage of time and is considered key personnel. + + + + + + + + contract + An agreement involving specific deliverables and payment + + + + + + + + grant + + An intramural or extramural award to support scholarly work, such as UF09179 (VIVO) + Financial assistance mechanism providing money, property, or both to an eligible entity to carry out an approved project or activity + Short definition is from the Glossary of NIH Terms. + + + + + + + + investigator role + + A role in an Agreement (for example, a grant) as a named investigator or key personnel. + + + + + + + + principal investigator role + + Role of a person to direct a project or activity being supported by an Agreement (for example, a grant), and who is accountable to the grantee for the proper conduct of the project or activity. Also known as Program Director or Project Director. + + + + + + + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/linkSuppression.n3 b/rdf/tbox/filegraph/linkSuppression.n3 new file mode 100644 index 00000000..74cf53bd --- /dev/null +++ b/rdf/tbox/filegraph/linkSuppression.n3 @@ -0,0 +1,12 @@ +@prefix core: . +@prefix config: . +@prefix xsd: . + +core:webpageOf config:addLinkSuppressed "true"^^xsd:boolean . +core:webpageOf config:editLinkSuppressed "true"^^xsd:boolean . +core:webpageOf config:deleteLinkSuppressed "true"^^xsd:boolean . +core:webpage config:deleteLinkSuppressed "true"^^xsd:boolean . +core:hasResearchArea config:deleteLinkSuppressed "true"^^xsd:boolean . +core:researchAreaOf config:deleteLinkSuppressed "true"^^xsd:boolean . +core:hasSubjectArea config:deleteLinkSuppressed "true"^^xsd:boolean . +core:subjectAreaFor config:deleteLinkSuppressed "true"^^xsd:boolean . diff --git a/rdf/tbox/filegraph/location.owl b/rdf/tbox/filegraph/location.owl new file mode 100644 index 00000000..0650cecf --- /dev/null +++ b/rdf/tbox/filegraph/location.owl @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + building + + Building that provides a particular service or is used for a particular activity. + Enter building name. If the building's name is a number (as in many governmental organizations such as national laboratories and military bases), then enter it. Do not confuse with the number that appears in a postal address. + Martha Van Rensselaer Hall (VR); Caldwell Hall (CD); University Auditorium + + + + + + + + campus + + Cornell Ithaca; Cornell Geneva; Cornell New York City; Cornell Qatar + Definition taken from dictionary.com (http://dictionary.reference.com/browse/campus). + The grounds of a school, college, university, or hospital. Or, a large, usually suburban, landscaped business or industrial site. + + + + + + + + facility + Distinct from the organization that runs it; e.g., a laboratory may be an organization but may be run by another organization and only consist of facilities housing equipment or services. Can be a building or place that provides a particular service or is used for a particular activity. Use the specific Building or Room whenever possible. Short definition from http://dictionary.reference.com/browse/facility. + Something designed, built, installed, etc., to serve a specific function or activity affording a convenience or service. + Use subclasses of core:Facility subclasses instead of this class if possible + + + + + + + + geographic location + + A location having coordinates in geographic space. + Removed the word "stable" because disputed territories from geopolitical.owl are included. This could imply that the geographic coordinates could change. I've also copied this definition to core:Geographic Location. I think core:Geographic Location and core:Geographic Region are both the same and only one is needed. There is also geopolitical.owl:geographical_region which further causes confusion. + Use subclasses of core:Geographic Location subclasses instead of this class if possible. + + + + + + + + geographic region + + A location having coordinates in geographic space. + Removed the word "stable" because disputed territories from geopolitical.owl are included. This could imply that the geographic coordinates could change. This definition was originally in core:Geographic Location. I simply copied the definition from there. I think core:Geographic Location and core:Geographic Region are both the same and only one is needed. There is also geopolitical.owl:geographical_region which further causes confusion. + Use subclasses of core:Geographic Region subclasses instead of this class if possible. + + + + + + + + + + + + + + location + It's anticipated that the subclasses will be used when classifying items. And, all locations can be viewable via this class. + Top level of all location classes. + Use subclasses of core:Location when classsifying items. + + + + + + + + populated place + + Either city or town - a thickly populated area having fixed boundaries and certain local powers of government. + + + + + + + + room + + 100 Caldwell Hall; 114 Martha Van Rensselaer (Rushmore Conference Room) + Enter room number of name. + Room that provides a particular service or is used for a particular activity. + + + + + + + diff --git a/rdf/tbox/filegraph/object-properties.owl b/rdf/tbox/filegraph/object-properties.owl new file mode 100644 index 00000000..9e16e277 --- /dev/null +++ b/rdf/tbox/filegraph/object-properties.owl @@ -0,0 +1,2117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2010-05-01 + United Nations cartographic maps + United Nations cartographic maps http://www.un.org/Depts/Cartographic/map/profile/world00.pdf + http://www.un.org/Depts/Cartographic/map/profile/world00.pdf + + + + + + + + + + + + + + 2010-05-01 + United Nations cartographic maps + United Nations cartographic maps http://www.un.org/Depts/Cartographic/map/profile/world00.pdf + http://www.un.org/Depts/Cartographic/map/profile/world00.pdf + + + + + + + + + + + + + + 2010-04-15 + United Nations Statistics Division + United Nations Statistics Division http://unstats.un.org/unsd/methods/m49/m49chang.htm + http://unstats.un.org/unsd/methods/m49/m49chang.htm + http://unstats.un.org/unsd/methods/m49/m49chgef.htm + + + + + + + + 2010-04-15 + United Nations Statistics Division + United Nations Statistics Division http://unstats.un.org/unsd/methods/m49/m49chang.htm + http://unstats.un.org/unsd/methods/m49/m49chang.htm + http://unstats.un.org/unsd/methods/m49/m49chgef.htm + + + + + + + + has_contact_info + + + + + + + + + contact_info_for + + + + + + + + + + context_for + + + + + + + + + has_context + + + + + + + + url_link_for + + + + + + + + + has_url_link + + + + + + + + has contact agent + + + + + + + + + part_of + + + + + + + + + has_part + + + + + + + + provides_access_to + An access service that provides access to a flow cytometer. + Instruments, reagents, organisms, or software for which the service provides access. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + change the domain tye to access service + + + + + + + + + + + + + + + + + + + + + uses + Here there are things to be fixed (for instance a service can use a technique...) + Microsoft powerpoint is commonly used in research laboratories to prepare presentations. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Software or protocol used by the laboratory. + uses + + + + + + + + + + + + + + + + + + + + has_expertise + Brian Druker has expertise in cancer research. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Technique in which the person is proficient. + has expertise + + + + + + + + + + + has_manufacturer + Organization or person that created the resource. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Santa Cruz Biotechnology is the manufacturer of many antibodies. + has manufacturer + + + + + + + + + + + + + + + + + + + + provides_service + A core lab providing cell sorting to individual labs. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Service offered by the organization. + provides services + + + + + + + + + + + + + + + + + + specifies_the_use_of + A protocol can specify the use of a flow cytometer. + Instruments, techniques, reagents, organisms, or software that are referenced in a protocol. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + specifies the use of + + + + + + + + + + + + + + + + + + + + + + used_by + A laboratory uses Microsoft Word. + Laboratory that uses the protocol or software. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + used by + + + + + + + + + + + + + + + + + + + has_input_type + Imaging processing software that requires .jpg format files for analysis. + PERSON: Carlo Torniai + PERSON: Melissa Haendel + Software data input format. + has input format + + + + + + + + + + + + + + + + + + has_output_type + Microsoft Excel arranges and saves data in .xlsx format. + PERSON: Carlo Torniai + PERSON: Melissa Haendel + Software data output type. + has output format + + + + + + + + + + + achieves_objective + ImageJ software measures characteristics of digital images. + PERSON: Carlo Torniai + PERSON: Melissa Haendel + Transformation objective of the software. + achieves objective + + + + + + + + + + + service_provided_by + A core laboratory provides a service. + Organization or laboratory performing the service. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + service provided by + + + + + + + + + + + + + + + + + + + performs + A cancer researcher performs apoptosis assays. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Technique carried out by the person or laboratory. + + + + + + + + + + + + + + + + + + is_performed_by + Confocal microscopy is performed by a confocal core laboratory. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Person or laboratory that performs the service or technique. + is performed by + + + + + + + + + + + + + + + + + + + has_documentation + An antibody has documentation describing attributes of the antibody. + Document that contains relevant resource information. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + has documentation + + + + + + + + + + + + + + + + + + + + + + + + + realizes_protocol + A sequencing protocol used for next generation sequencing. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Protocol used to perform the service. + placeholder: need to be modeled for the proper kind of service (production services) + realizes protocol + + + + + + + + + + + + + + + + + + uses_software + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Placeholder needs to be redesign + Sequence analysis software. + Software used to perform the service. + true + uses software + + + + + + + + + + + + + + related_technique + Flow cytometry is a related technique for a flow cytometer instrument. + Method in which the resource can be used. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + related technique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + used_to_study + A study of hibernation in bears. + Biological process studied in the organism. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + used to study + + + + + + + + + + + + has_residency_requirement + A research opportunity requires applicants to be US citizens. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + US residency status of applicants that may apply for the student research opportunity. + has residency requirement + + + + + + + + + + + + related_research_project + A research project studying breast cancer. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Research project during which the biological specimen was collected. + related research project + + + + + + + + + + + + related_biological_specimen + A breast cancer specimen. + Biological specimen collected as part of the research project. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + related biological specimen + + + + + + + + + + + + has_preparation_technique + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Paraffin embedding of tissue. + Technique used to prepare the biological specimen. + has preparation technique + + + + + + + + + + + + + has_phase + PERSON: Melissa Haendel + PERSON: Melissa Haendel + Phase 1 clinical trial. + Phase of a clinical trial to evaluate risk and to clinically evaluate the efficacy of drugs or biologicals. + has phase + + + + + + + + + + + performs_human_study + Human study performed by the organization. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + The Jackson Heart Institute performs human studies on heart disease. + performs human study + + + + + + + + + + + + + human_study_performed_by + Jackson State University performs human studies on heart disease. + Organization that performs the human study. + PERSON: Melissa Haendel + PERSON: Melissa Haendel + human study performed by + + + + + + + + + + + + + has_format + + + + + + + + + + has_software_license + Is a legal instrument (usually by way of contract law) governing the usage or redistribution of software. + PERSON: Scott Hoffmann + http://en.wikipedia.org/wiki/Software_license + + + + + + + + + + + objective_achieved_by_operation + Links an objective to a software operation whise execution achieves the objective. Is different from OBI:objective_achieved_by which links an objective to the process that achieves it. + PERSON:Matthew Brush + PERSON:Matthew Brush + a relation between a software objective (data transformation objective) and an operation whose execution in a software tool achieves the objective + software relation expanding to something like: + +objective_achieved_by some ('software/algorithm execution' and (specified_by some 'data processing operation')) + + + + + + + + + + + has measurement unit label + + + + + + + + + + is about + 7/6/2009 Alan Ruttenberg. Following discussion with Jonathan Rees, and introduction of "mentions" relation. Weaken the is_about relationship to be primitive. + +We will try to build it back up by elaborating the various subproperties that are more precisely defined. + +Some currently missing phenomena that should be considered "about" are predications - "The only person who knows the answer is sitting beside me" , Allegory, Satire, and other literary forms that can be topical without explicitly mentioning the topic. + Smith, Ceusters, Ruttenberg, 2000 years of philosophy + This document is about information artifacts and their representations + is_about is a (currently) primitive relation that relates an information artifact to an entity. + person:Alan Ruttenberg + + + + + + + + + + mentions + + + + + + + + + is quality measurement of + 8/6/2009 Alan Ruttenberg: The strategy is to be rather specific with this relationship. There are other kinds of measurements that are not of qualities, such as those that measure time. We will add these as separate properties for the moment and see about generalizing later + Alan Ruttenberg + From the second IAO workshop [Alan Ruttenberg 8/6/2009: not completely current, though bringing in comparison is probably important] + +This one is the one we are struggling with at the moment. The issue is what a measurement measures. On the one hand saying that it measures the quality would include it "measuring" the bearer = referring to the bearer in the measurement. However this makes comparisons of two different things not possible. On the other hand not having it inhere in the bearer, on the face of it, breaks the audit trail. + +Werner suggests a solution based on "Magnitudes" a proposal for which we are awaiting details. +-- +From the second IAO workshop, various comments, [commented on by Alan Ruttenberg 8/6/2009] + +unit of measure is a quality, e.g. the length of a ruler. + +[We decided to hedge on what units of measure are, instead talking about measurement unit labels, which are the information content entities that are about whatever measurement units are. For IAO we need that information entity in any case. See the term measurement unit label] + +[Some struggling with the various subflavors of is_about. We subsequently removed the relation represents, and describes until and only when we have a better theory] + +a represents b means either a denotes b or a describes + +describe: +a describes b means a is about b and a allows an inference of at least one quality of b + +We have had a long discussion about denotes versus describes. + From the second IAO workshop: An attempt at tieing the quality to the measurement datum more carefully. + +a is a magnitude means a is a determinate quality particular inhering in some bearer b existing at a time t that can be represented/denoted by an information content entity e that has parts denoting a unit of measure, a number, and b. The unit of measure is an instance of the determinable quality. + From the second meeting on IAO: + +An attempt at defining assay using Barry's "reliability" wording + +assay: +process and has_input some material entity +and has_output some information content entity +and which is such that instances of this process type reliably generate +outputs that describes the input. + This one is the one we are struggling with at the moment. The issue is what a measurement measures. On the one hand saying that it measures the quality would include it "measuring" the bearer = referring to the bearer in the measurement. However this makes comparisons of two different things not possible. On the other hand not having it inhere in the bearer, on the face of it, breaks the audit trail. + +Werner suggests a solution based on "Magnitudes" a proposal for which we are awaiting details. + m is a quality measurement of q at t when +q is a quality +there is a measurement process p that has specified output m, a measurement datum, that is about q + + + + + + + + + + + is quality measured as + 2009/10/19 Alan Ruttenberg. Named 'junk' relation useful in restrictions, but not a real instance relationship + Person:Alan Ruttenberg + inverse of the relation of is quality measurement of + + + + + + + + + + has_specified_input + 8/17/09: specified inputs of one process are not necessarily specified inputs of a larger process that it is part of. This is in contrast to how 'has participant' works. + PERSON: Bjoern Peters + PERSON: Larry Hunter + PERSON: Melanie Coutot + has_specified_input + A relation between a planned process and a continuant participating in that process that is not created during the process. The presence of the continuant during the process is explicitly specified in the plan specification which the process realizes the concretization of. + PERSON: Alan Ruttenberg + see is_input_of example_of_usage + + + + + + + + + + has_specified_output + PERSON: Bjoern Peters + PERSON: Larry Hunter + PERSON: Melanie Courtot + has_specified_output + A relation between a planned process and a continuant participating in that process. The presence of the continuant at the end of the process is explicitly specified in the objective specification which the process realizes the concretization of. + PERSON: Alan Ruttenberg + + + + + + + + + + + + + is_manufactured_by + Alan Ruttenberg + Liju Fan + c is_manufactured_by o means that there was a process p in which c was built in which a person, or set of people or machines did the work(bore the "Manufacturer Role", and those people/and or machines were members or of directed by the organization to do this. + has_make + has_manufacturer + http://www.affymetrix.com/products/arrays/specific/hgu133.affx is_manufactered_by http://www.affymetrix.com/ (if we decide to use these URIs for the actual entities) + is_manufactured_by + + + + + + + + + + + + + + + + + + is_specified_output_of + PERSON:Bjoern Peters + is_specified_output_of + A relation between a planned process and a continuant participating in that process. The presence of the continuant at the end of the process is explicitly specified in the objective specification which the process realizes the concretization of. + Alan Ruttenberg + + + + + + + + + + achieves_planned_objective + A cell sorting process achieves the objective specification 'material separation objective' + BP, AR, PPPB branch + PPPB branch derived + This relation obtains between a planned process and a objective specification when the criteria specified in the objective specification are met at the end of the planned process. + modified according to email thread from 1/23/09 in accordince with DT and PPPB branch + + + + + + + + + + has grain + PAPER: Granularity, scale and collectivity: When size does and does not matter, Alan Rector, Jeremy Rogers, Thomas Bittner, Journal of Biomedical Informatics 39 (2006) 333-349 + has grain + the relation of the cells in the finger of the skin to the finger, in which an indeterminate number of grains are parts of the whole by virtue of being grains in a collective that is part of the whole, and in which removing one granular part does not nec- essarily damage or diminish the whole. Ontological Whether there is a fixed, or nearly fixed number of parts - e.g. fingers of the hand, chambers of the heart, or wheels of a car - such that there can be a notion of a single one being missing, or whether, by contrast, the number of parts is indeterminate - e.g., cells in the skin of the hand, red cells in blood, or rubber molecules in the tread of the tire of the wheel of the car. + Discussion in Karslruhe with, among others, Alan Rector, Stefan Schulz, Marijke Keet, Melanie Courtot, and Alan Ruttenberg. Definition take from the definition of granular parthood in the cited paper. Needs work to put into standard form + PERSON: Alan Ruttenberg + + + + + + + + + + objective_achieved_by + This relation obtains between a a objective specification and a planned process when the criteria specified in the objective specification are met at the end of the planned process. + definition needs clean up to indicate directionality + + + + + + + + + + + + inheres in + This clarifies that only specifically dependent continuants inhere in (specifically) one independent continuant over all time. For GDCs, there in implicitly inherence to all the independent continuants in which the concretizations inhere. Should add a 'cardinality 1' restriction to the definition of specifically dependent continuant. + This relation belongs in BFO/RO, and will be in BFO 2 + + + + + + + + + + + bearer_of + + + + + + + + + + participates in + + + + + + + + + + has participant + + + + + + + + + + derives from (ro) + + + + + + + + location of + + + + + + + + contained in + + + + + + + + contains + + + + + + + + located in + + + + + + + + adjacent to + + + + + + + + has input + + + + + + + + + has output + + + + + + + + + member of + + + + + + + + + has_member + + + + + + + + output_of + + + + + + + + + produces + Melissa Haendel + a produces b if some process that occurs_in a has_output b, where a and b are material entities. Examples: hybridoma cell line produces monoclonal antibody reagent; chondroblast produces avascular GAG-rich matrix. + + + + + + + + + + + produced_by + + + + + + + + + + + is agent in + + + + + + + + + + + + + + + + role_of + A relation between a role R and an entity E. R role_of E iff: R inheres_in E and R is a role + GROUP:OBI:<http://obi.sourceforge.net> + PERSON: Chris Mungall + role_of + + + + + + + + + + + affirmedby + The public description was taken from here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/ontology/bibo/ + A legal decision that affirms a ruling. + + + + + + + + annotates + The public description source is: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html. + http://purl.org/ontology/bibo/ + stable + Critical or explanatory note for a Document. + + + + + + + + cited by + + + + + + + + cites + + + + + + + + court + Public description take from: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html. Bibo considers this property "unstable". + http://purl.org/ontology/bibo/ + unstable + A court associated with a legal document; for example, that which issues a decision. + + + + + + + + related degree + The source of the public description and this info is found here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html. Bibo considers this term "unstable". The bibo editorial note is: "We are not defining, using an enumeration, the range of the bibo:degree to the defined list of bibo:ThesisDegree. We won't do it because we want people to be able to define new degress if needed by some special usecases. Creating such an enumeration would restrict this to happen." + http://purl.org/ontology/bibo/ + The thesis degree. + We are not defining, using an enumeration, the range of the bibo:degree to the defined list of bibo:ThesisDegree. We won't do it because we want people to be able to define new degress if needed by some special usecases. Creating such an enumeration would restrict this to happen. + unstable + + + + + + + + director + Definition take from this site: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . + http://purl.org/ontology/bibo/ + A Film director. + stable + + + + + + + + interviewee + http://purl.org/ontology/bibo/ + stable + An agent that is interviewed by another agent. + + + + + + + + interviewer + http://purl.org/ontology/bibo/ + stable + An agent that interview another agent. + + + + + + + + performer + http://purl.org/ontology/bibo/ + stable + + + + + + + + related documents + Public Description from source: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . Bibo considers the bibo:presents and the bibo:presentedAt unstable terms. It also indicates that bibo:presents is a sub-property of event:product. + http://purl.org/ontology/bibo/ + Relates an event to associated documents; for example, conference to a paper. + unstable + + + + + + + + recipient + http://purl.org/ontology/bibo/ + stable + An agent that receives a communication document. + + + + + + + + reproduced in + + + + + + + + reversedby + The first sentence of the public description was taken from here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/ontology/bibo/ + A legal decision that reverses a ruling. + + + + + + + + review of + The bibo:reviewOf public description was found here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . As of 26 May 2010, bibo:reviewOf is used with the class Review, but core:reviewIn doesn't seem to be being used. + + + + + + + + status + paraphrased editorial note from the bibo ontology: We are not defining, using an enumeration, the range of the bibo:status to be a defined list of bibo:DocumentStatus. This is because we want people to be able to define new statuses if needed; and creating such an enumeration would prevent this. + + + + + + + + subsequentlegaldecision + Public description is from comments of this object property in bibo ontology located here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/ontology/bibo/ + A legal decision on appeal that takes action on a case (affirming it, reversing it, etc.). + + + + + + + + transcript of + The bibo:transcriptOf public description was found here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . Bibo considers this term unstable. + http://purl.org/ontology/bibo/ + Relates a document to some transcribed original. + unstable + + + + + + + + translation of + Examples shows a book has French language version. Public description source: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . + http://purl.org/ontology/bibo/ + Relates a translated document to the original document. + stable + + + + + + + + translator + + + + + + + + has_global_citation_frequency + A property linking a publication entity to an instance of c40:GlobalCitationCount that specifies how many times a work has been cited by others, according to a particular information source on a particular date. + + + + + + + + has global count source + A property linking an instance of c40:GlobalCitationCount to the bibliographic information source providing the global citation count information for a particular publication on a particular date. + + + + + + + + assigned by + Relates a Relationship (as a predicate or n-ary relation over one or more Thing) to an Agent that defined or instantiated the predicate instance. + + + + + + + + assigns + + + + + + + + + date filed + + + + + + + + + + + date issued + + + + + + + + + + has date/time interval + + + + + + + + + date/time precision + + + + + + + + + date/time value + + + + + + + + + end date value + + + + + + + + + + + expiration date + + + + + + + + + features + This is done through a restriction on the foaf:Person class. + + + + + + + + geographic focus + + + + + + + + + geographic focus of + + + + + + + + + geographic_location_of + + + + + + + + subcontracted through + + + + + + + + + + associated concept + + + + + + + + has geographic location + Currently being used by a restriction on organization. + + + + + + + + + has prerequisite + + + + + + + + + + published in + + + + + + + + successor organization + + + + + + + + + + has translation + Examples shows a book has French language version. Public description source: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . + + + + + + + + offered by + + + + + + + + offers + + + + + + + + prerequisite for + + + + + + + + + + provides funding through + For example, National Science Foundation providesFundingThrough Graduate Research Fellowship Program; National Institutes of Health providesFundingThrough National Center for Research Resources. + + + + + + + + + + publication venue for + + + + + + + + publisher (vivo op) + Public Definition source (http://www.answers.com/topic/publisher). + + + + + + + + + publisher of + Public Definition source (http://www.answers.com/topic/publisher). + + + + + + + + + related by + Relates a Thing to a Relationship as a Thing that is somehow related to other Thing in the same Relationship instance. A Relationship instnace is a predicate over Thing and is created by an Agent. + + + + + + + + relates + Relates a Relationship instance to the one or more Thing of the Relationship. There is a separate property (assigned by) to relate to the Agent that defines the Relationship. + + + + + + + + + reviewed_in + + + + + + + + start date value + + + + + + + + + + + subcontracts grant + + + + + + + + + + translator of + + + + + + + + access provided by + + + + + + + + documentation for + + + + + + + + protocol realized by + + + + + + + + implements + + + + + + + + is_encoded_in + + + + + + + + + + + + + + + + + has_agent + + + + + + + + deprecatedproperty + + + + + + + + + + + + + + broader term + Public description modified from the information on this page: http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20050510/#sechierarchy . + + + + + + + + narrower term + Public description modified from the information on this page: http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20050510/#sechierarchy . + + + + + + + + related (skos) + + + + + + + + has address + + + + + + + + + has calendar link + + + + + + + + + has calendar request + + + + + + + + + has calender busy + + + + + + + + + has category + + + + + + + + + has email + + + + + + + + + has formatted name + + + + + + + + + has geo + + + + + + + + + has messaging + + + + + + + + + has key + + + + + + + + + has language (vcard op) + + + + + + + + + has logo + + + + + + + + + member + To include a member in the group this vCard represents + + + + + + + + + + + + + + + + + + has name + + + + + + + + + has nickname + + + + + + + + + has note + + + + + + + + + has organization name + + + + + + + + + has organisational unit name + + + + + + + + + has photo + + + + + + + + + has related (vcard op) + + + + + + + + + has role + + + + + + + + + has sound + + + + + + + + + has telephone + + + + + + + + + has time zone + + + + + + + + + has title + + + + + + + + + has url + + + + + + + + + orcid id + This is now an object property where the object value is a resource of the form <http://orcid.org/NNNN-NNNN-NNNN-NNNN>. This is to support connecting VIVO and ORCID in the linked data web. Note: a person can have multiple ORCID iDs. + + + + + + + + contributes to + + + + + + + + contributor + + + + + + + + research areas + + + + + + + + research area of + + + + + + + diff --git a/rdf/tbox/filegraph/object-properties2.owl b/rdf/tbox/filegraph/object-properties2.owl new file mode 100644 index 00000000..3307c9f2 --- /dev/null +++ b/rdf/tbox/filegraph/object-properties2.owl @@ -0,0 +1,45 @@ + + + + + + + + realized in + (forall (x y z t) (if (and (RealizableEntity x) (Process y) (realizesAt y x t) (bearerOfAt z x t)) (hasParticipantAt y z t))) // axiom label in BFO2 CLIF: [106-002] + [copied from inverse property 'realizes'] to say that b realizes c at t is to assert that there is some material entity d & b is a process which has participant d at t & c is a disposition or role of which d is bearer_of at t& the type instantiated by b is correlated with the type instantiated by c. (axiom label in BFO2 Reference: [059-003]) + if a realizable entity b is realized in a process p, then p stands in the has_participant relation to the bearer of b. (axiom label in BFO2 Reference: [106-002]) + realized-in + realizedIn + + + + + + + + + + realizes + (forall (x y t) (if (realizesAt x y t) (and (Process x) (or (Disposition y) (Role y)) (exists (z) (and (MaterialEntity z) (hasParticipantAt x z t) (bearerOfAt z y t)))))) // axiom label in BFO2 CLIF: [059-003] + realizes + realizes + to say that b realizes c at t is to assert that there is some material entity d & b is a process which has participant d at t & c is a disposition or role of which d is bearer_of at t& the type instantiated by b is correlated with the type instantiated by c. (axiom label in BFO2 Reference: [059-003]) + + + + + + + diff --git a/rdf/tbox/filegraph/object-properties3.owl b/rdf/tbox/filegraph/object-properties3.owl new file mode 100644 index 00000000..9f87aa0c --- /dev/null +++ b/rdf/tbox/filegraph/object-properties3.owl @@ -0,0 +1,3245 @@ + + + + ${eaglei.ontology.version} + A file to hold VIVO application specific entities, and original VIVO entities that are being considered to be application specific when merging into ARG. + + + + + + + + is defined by + + + + + + + + + + description + + + name suffix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + related degree + + + + + + + + director + + + + + + + + distributor + Public Description for bibo:distributor taken from here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . + + + + + + + + + interviewee + + + + + + + + interviewer + + + + + + + + issuer + An entity responsible for issuing often informally published documents such as press releases, reports, etc. This term is classified as unstable by bibo. + http://purl.org/ontology/bibo/ + An entity responsible for issuing often informally published documents such as press releases, reports, etc. + unstable + + + + + + + + + performer + + + + + + + + + presented at + Public Description from source: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . Bibo considers the bibo:presents and the bibo:presentedAt unstable terms. It also indicates that bibo:presents is a sub-property of event:product. + http://purl.org/ontology/bibo/ + Relates a document to an event; for example, a paper to a conference. + unstable + + + + + + + + + + + + related documents + + + + + + + + recipient + + + + + + + + reproduced in + + + + + + + + + status + + + + + + + + + subsequentLegalDecision + + + + + + + + translation of + + + + + + + + translator + + + + + + + + + + has global citation frequency + A property linking a publication entity to the property c40:GlobalCitationCount that specify how many times a work has been cited by others, according to a particular information source on a particular date. + + + + + + + + + has global count source + A property linking the property c40:GlobalCitationCount to the bibliographic information source providing the global citation count information for a particular publication on a particular date. + + + + + + + + + + + + assignee + + + + + + + + + + assignee for + + + + + + + + + + + + degree candidacy + + + + + + + + + + + + distributes + Public Description for bibo:distributor taken from here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . + + + + + + + + + distributes funding from + For example, National Science Foundation providesFundingThrough Graduate Research Fellowship Program; National Institutes of Health providesFundingThrough National Center for Research Resources. + + + + + + + + + + + + eligible for + + + + + + + + + equipment for + + + + + + + + + + facility for + + + + + + + + + + featured in + This is done through a restriction on the foaf:Person class. + + + + + + + + + + features + + + + + + + + + provides funding for + + + + + + + + + + + governing authority for + + + + + + + + + + + predecessor organization + + + + + + + + + + proceedings + A possible working example: The conference proceeding of the SPIE was generated from the conference - International Society for Optical Engineering. + + + + + + + + + + published in + + + + + + + + research areas + + + + + + + + + + + has subject area + + + + + + + + + successor organization + + + + + + + + + + supported by + an information resource (typically a publication) supported by (typically via funding) an agreement (such as a grant) + + + + + + + + + + proceedings of + A possible working example: The conference proceeding of the SPIE was generated from the conference - International Society for Optical Engineering. + + + + + + + + + + + + + reproduces + + + + + + + + + + + + research area of + + + + + + + + + researcher role of + + + + + + + + + + + reviewed in + The bibo:reviewOf public description was found here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html . As of 26 May 2010, bibo:reviewOf is used with the class Review, but core:reviewIn doesn't seem to be being used. + + + + + + + + + reviewer role of + + + + + + + + + + + + contributes to + + + + + + + + + + award sponsored by + + + + + + + + + + + sponsors award or honor + + + + + + + + + + + + + supported by + general relationship of support + + + + + + + + + + supported publications + an information resource (typically a publication) supported by (typically via funding) an agreement (such as a grant) + + + + + + + + + + + + supports + general relationship of support + + + + + + + + + + translator of + + + + + + + + + valid in + + + + + + + + + + has broader + broader term + Public description modified from the information on this page: http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20050510/#sechierarchy . + + + + + + + + + + has narrower + narrower term + Public description modified from the information on this page: http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20050510/#sechierarchy . + + + + + + + + + + has related + related + + + + + + + + + + + + + + abstract + + + + + + + + Digital Object Identifier (DOI) + + + + + + + + EAN International-Uniform Code Council (EAN-UCC) 13 + + + + + + + + edition + + + + + + + + Electronic International Standard Serial Number (EISSN) + + + + + + + + International Standard Serial Number (ISSN) + + + + + + + + Library of Congress Control Number (LCCN) + + + + + + + + number of pages + + + + + + + + Online Computer Library Center (OCLC) number + + + + + + + + end page + + + + + + + + start page + + + + + + + + has global count date + The date on which the global citation count of the cited entity was recorded from a named bibliographic information source. + + + + + + + + + + + has global count value + An integer defining the value of the global citation count of a cited entity recorded from a named bibliographic information source on a particular date. + + + + + + + + + + + preferredNamespaceUri + + + + + + + + + abbreviation + + + + + + + + + credits + + + + + + + + department or school name within institution + Not intended to be an institution name. + + + + + + + + + + description + + + + + + + + + entry term + + + + + + + + + + keywords + + + + + + + + direct costs + + + + + + + + + + hide from display + + + + + + + + + + HR job title + Definition http://en.wikipedia.org/wiki/Job_title#Job_title. + administrative secretary + + + + + + + + + + + is this person a corresponding author? + True; False + + + + + + + + + + + major field of degree + + + + + + + + + + + place of publication + + + + + + + + preferred display order + + + + + + + + + + rank + + + + + + + + supplemental information + + + + + + + + term label + + + + + + + + + term type + + + + + + + + + + + + + + + + + + + + + + + + research opportunity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Event + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Academic Article + + + + + + + + + + + + + + + + + + + + Article + + + + + + + + + + + + + + + + + + + + + + + + + + Audio Document + + + + + + + + + + + + + + Audio-Visual Document + + + + + + + + + + + + + + Book + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Book Section + + + + + + + + + + + + + + + + + + + + + + + + + + Collected Document + + + + + + + + + + + + + + Collection + + + + + + + + + + + + + + + Conference + + + + + + + + + + + + + + document (IAO) + Document + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document Part + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document Status + + + + + + + + Edited Book + + + + + + + + + + + + + + + + + + + + + + + + + + Image + + + + + + + + + Journal + + + + + + + + + + + + + + Patent + + + + + + + + + + + + + + + + + + + + Periodical + + + + + + + + + + + + + + + + + + + + + + + + + + Proceedings + + + + + + + + Report + + + + + + + + + + + + + + Series + + + + + + + + + + + + + + + + + + + + Thesis + + + + + + + + + + + + + + + + + + + + Thesis Degree + + + + + + + + Website + + + + + + + + + + + + + + Bibliographic Information Source + + A source of information about bibliographic citations, such as Google Scholar, Web of Science or Scopus. + + + + + + + + Global Citation Count + The number of times a work has been cited globally, as determined from a particular bibliographic information source on a particular date. + + + + + + + + Clinical Guideline + + + A recommendation on the appropriate treatment and care of people with a specific disease or condition, based on the best available evidence, designed to help healthcare professionals in their work. + A recommendation on the appropriate treatment and care of people with a specific disease or condition, based on the best available evidence, designed to help healthcare professionals in their work. + + + + + + + + Comment + + + A verbal or written remark concerning some entity. In written form, a comment is often appended to that entity and termed an annotation. Within computer programs or ontologies, comments are added to enhance human understanding, and are usually prefaced by + A verbal or written remark concerning some entity. In written form, a comment is often appended to that entity and termed an annotation. Within computer programs or ontologies, comments are added to enhance human understanding, and are usually prefaced by a special syntactic symbol that ensures they are ignored during execution of the program. + +has super-classes + + + + + + + + Erratum + + + A formal correction to an error introduced by the publisher into a previously published document. + A formal correction to an error introduced by the publisher into a previously published document. + + + + + + + + Academic Degree + + + + 1 + + + + + + 1 + + + + + + + + + + + + + + + + Academic Department + + + + + + + + + + + + + + + + + + + + Address + + + + + + + + 200 University Avenue West, Waterloo, Ontario, Canada N2L 3G1 + A specification of a location. To classify US specific addresses, use core:US Postal Code. + Address has properties for department name, street, city, state or province, postal code, and country. For US specific address, classify using core:US Postal Code. core:Address will display all addresses. + + + + + + + + Advising Relationship + + + + + + + + + + + + + + + + + + + + Agreement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A negotiated arrangement between two or more parties regarding a course of action + + + + + + + + Attendee Role + + + + + + + + + Authorship + + + + + + + + + + + + + + + + + + + + Award or Honor + + + + + + + + + + + + + + + + + + + + Award or Honor Receipt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Blog + + + + + + + + Blog Posting + + + + + + + + + + + + + + Building + + + + + + + + Catalog + + + + + + + + + + + + + + + + + + + + Center + + + + + + + + + + + + + + Clinical Role + + + + + + + + + Co-Principal Investigator Role + + + + + + + + College + + + + + + + + + + + + + + Committee + + + + + + + + + + + + + + Conference Paper + + + + + + + + + + + + + + Consortium + + + + 2 + + + + + + + + + + + + + + + + Contract + + + + + + + + + County + + + + + + + + + + + + + + Course + + + + + + + + + + + + + + Credential + + + + + + + + + + + + + + + + + + + + + + + + + + Database + + + + + + + + + + + + + + Dataset + + + + + + + + + Date/Time Interval + + + + + + + + Date/Time Value + + + + + + + + Date/Time Value Precision + + + + + + + + Department + + + + + + + + + + + + + + Division + + + + + + + + + + + + + + Editor Role + + + + + + + + + Educational Training + + + + + + + + + + + + + + Currently any abstract name is given to individuals of this class. This could change in the future. + Represents educational training that has been received. + This connects person to their academic degree through this educational training, but can also be used when the training does not result in a degree. + + + + + + + + Faculty Member Emeritus + + + A retired faculty member who has retained their rank, title and privileges. + + + + + + + + Librarian Emeritus + + + A retired librarian who has retained their rank, title and privileges. + + + + + + + + Professor Emeritus + + + + A retired professor who has retained their rank, title and privileges. + + + + + + + + Equipment + + + + + + + + + + + + + + + + + + + + Event Series + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Facility + + + + + + + + + Faculty Administrative Position + + + + + + + + + + + + + + + + + + + + Faculty Member + + + A person with at least one academic appointment to a specific faculty of a university or institution of higher learning. + Definition from here: http://research.carleton.ca/htr/defs.php. + + + + + + + + Faculty Position + + + + + + + + + + + + + + + + + + + + Funding Organization + + + + + + + + + + + + + + Geographic Location + + + + + + + + Geographic Region + + + + + + + + Grant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Information Resource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The most general classification of an information resource + + + + + + + + Internship + + + + + + + + + Investigator Role + + + + + + + + Issued Credential + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Laboratory + + + + + + + + + + + + + + Leader Role + + + + + + + + + Librarian + + + A person working in a position of librarian or information professional, or academic or technical expert in support of providing information services or materials. + + + + + + + + Librarian Position + + + + + + + + + + + + + + + + + + + + Library + + + + + + + + + + + + + + Medical Residency + + + + + + + + + Member Role + + + + + + + + + Non-Academic + + + A person holding a position that is not considered to be an academic appointment. + + + + + + + + Non-Academic Position + + + + + + + + + + + + + + + + + + + + Non-Faculty Academic + + + A person not considered a faculty member but holding an academic appointment. + + + + + + + + Non-Faculty Academic Position + + + + + + + + + + + + + + + + + + + + Organizer Role + + + + + + + + + Outreach Provider Role + + + + + + + + + Position + + + + + + + + + + + + + + + + + + + + + + + + + + Postdoc + + + A Person holding an academic employment appointment focused on research rather than teaching; temporary (or for some defined term) + + + + + + + + Postdoctoral Training + + + + + + + + + Presenter Role + + + + + + + + + + + + + + + Principal Investigator Role + + + + + + + + Project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Publisher + + + + + + + + + + + + + + Researcher Role + + + + + + + + + Review + + + + + + + + Reviewer Role + + + + + + + + + Role + + + + + + + + + + + + + + + + + + + + A person's, group's or organization's role in an endeavor + Only use if no specific subclasses of core:Role describe the role. + Only use this broad role class if no subclasses of role describe the item being classified. + + + + + + + + Room + + + + + + + + Service + + + + + + + + + + + + + + A regularly offered service in support of an academic, research, or administrative function (not personal or professional service by an individual) + UITS service + UITS service is the information technology services provided by Indiana University. SC. + + + + + + + + Service Provider Role + + + An role of an individual within his or her profession or institution; use outreach provider role for community service or other activities outside the profession. + Member of the International Conference on Complex Systems Organizing Committee + + + + + + + + Software + + + + + + + + + Computer program and its related documentation; directs the operation of a computer + + + + + + + + State Or Province + + + + + + + + Teacher Role + + + + + + + + + Team + + + + + + + + + + + + + + URLLink + + + + 1 + + + + + + + + + + + + + + + + US Postal Address + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + 1320 East 10th Street, Wells Library 021 Bloomington, IN 47405 + Formal address in US postal address system. + US postal address follow the format street, apt or office number (optional), city, state, and zipcode. + + + + + + + + University + + + + + + + + + + + + + + Working Paper + + + + + + + + + + + + + + Person As Listed + + + For data ingest from authoritative sources to record the actual way a person was listed, as potentially valuable information for provenance and person disambiguation. + For data ingest from authoritative sources to record the actual way a person was listed, as potentially valuable information for provenance and person disambiguation. Represents one person's information from one source at one particular time. + + + + + + + + + + + + + + + + Concept + Concept + An idea or notion; a unit of thought. + + + + + + + + Agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Group + + + + + + + + + + + + + + Organization + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Person + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yearPrecision + + + relation + This term is intended to be used with non-literal values as defined in the DCMI Abstract Model (http://dublincore.org/documents/abstract-model/). As of December 2007, the DCMI Usage Board is seeking a way to express this intention with a formal range declaration. + + + yearMonthDayPrecision + + + Document to be published + + + yearMonthDayTimePrecision + + + &nbsp;Peer review is the process by which articles are chosen to be included in a refereed journal. An editorial board consisting of experts in the same field as the author review the article and decide if it is authoritative enough for publication. + + + Accepted for publication after peer reviewing + + + Published document + + + yearMonthPrecision + + + + + + + diff --git a/rdf/tbox/filegraph/other.owl b/rdf/tbox/filegraph/other.owl new file mode 100644 index 00000000..ee5c82e8 --- /dev/null +++ b/rdf/tbox/filegraph/other.owl @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rate measurement datum + + + + + + + + + rate unit + + + + + + + + + urllink + The full URL. + Uniform Resource Locator (URL) specifies where an identified resource is available and the mechanism for retrieving it. + http://info.slis.indiana.edu/~katy/ + + + + + + + + + + + + + + count per year + + + + + + + diff --git a/rdf/tbox/filegraph/outreach.owl b/rdf/tbox/filegraph/outreach.owl new file mode 100644 index 00000000..e0398e44 --- /dev/null +++ b/rdf/tbox/filegraph/outreach.owl @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + outreach provider role + An outreach or community service role directed outside a person's primary profession and institution + Communicating Astronomy to the Public + The example is one outreach role required by US space agency NASA, which is related with one project in NASA. Name of the outreach role should be put here. + + + + + + + diff --git a/rdf/tbox/filegraph/personTypes.n3 b/rdf/tbox/filegraph/personTypes.n3 new file mode 100644 index 00000000..42c233d7 --- /dev/null +++ b/rdf/tbox/filegraph/personTypes.n3 @@ -0,0 +1,97 @@ +@prefix afn: . +@prefix : . +@prefix hr: . +@prefix ns: . +@prefix scires: . +@prefix aka: . +@prefix scirr: . +@prefix vann: . +@prefix pubmed: . +@prefix owl2: . +@prefix dcterms: . +@prefix rdfs: . +@prefix swrl: . +@prefix vitro: . +@prefix event: . +@prefix vivoc: . +@prefix swvs: . +@prefix rdf: . +@prefix c4o: . +@prefix cce: . +@prefix vivo: . +@prefix dcelem: . +@prefix app: . +@prefix pvs: . +@prefix geo: . +@prefix foaf: . +@prefix aktp: . +@prefix far: . +@prefix fabio: . +@prefix skco: . +@prefix ospcu: . +@prefix acti: . +@prefix obo: . +@prefix skos2: . +@prefix stars: . +@prefix bibo: . +@prefix xsd: . +@prefix swrlb: . +@prefix owl: . +@prefix socsci: . +@prefix rdfsyn: . +@prefix core: . +@prefix vitro-public: . +@prefix local: . +@prefix mann: . +@prefix skos: . +@prefix ero: . + +core:FacultyMember + a owl:Class ; + rdfs:label "Faculty Member"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:descriptionAnnot + "Definition from here: http://research.carleton.ca/htr/defs.php."^^xsd:string ; + vitro:shortDef "A person with at least one academic appointment to a specific faculty of a university or institution of higher learning."^^xsd:string . + +core:Postdoc + a owl:Class ; + rdfs:label "Postdoc"@en-us ; + rdfs:subClassOf , core:NonFacultyAcademic ; + vitro:shortDef "A Person holding an academic employment appointment focused on research rather than teaching; temporary (or for some defined term)"^^xsd:string . + +core:NonFacultyAcademic + a owl:Class ; + rdfs:label "Non-Faculty Academic"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:shortDef "A person not considered a faculty member but holding an academic appointment."^^xsd:string . + +core:EmeritusLibrarian + a owl:Class ; + rdfs:label "Librarian Emeritus"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:shortDef "A retired librarian who has retained their rank, title and privileges."^^xsd:string . + +core:EmeritusFaculty + a owl:Class ; + rdfs:label "Faculty Member Emeritus"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:shortDef "A retired faculty member who has retained their rank, title and privileges."^^xsd:string . + +core:Librarian + a owl:Class ; + rdfs:label "Librarian"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:shortDef "A person working in a position of librarian or information professional, or academic or technical expert in support of providing information services or materials."^^xsd:string . + +core:EmeritusProfessor + a owl:Class ; + rdfs:label "Professor Emeritus"@en-us ; + rdfs:subClassOf core:EmeritusFaculty , foaf:Person , ; + vitro:shortDef "A retired professor who has retained their rank, title and privileges."^^xsd:string . + +core:NonAcademic + a owl:Class ; + rdfs:label "Non-Academic"@en-us ; + rdfs:subClassOf foaf:Person , ; + vitro:shortDef "A person holding a position that is not considered to be an academic appointment."^^xsd:string . diff --git a/rdf/tbox/filegraph/process.owl b/rdf/tbox/filegraph/process.owl new file mode 100644 index 00000000..56a049ad --- /dev/null +++ b/rdf/tbox/filegraph/process.owl @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + advising process + + + + + + + + attending process + + + + + + + + presenting process + + + + + + + + project + An endeavor, frequently collaborative, that occurs over a finite period of time and is intended to achieve a particular aim. + An endeavor, frequently collaborative, that occurs over a finite period of time and is intended to achieve a particular aim. + + + + + + + + diff --git a/rdf/tbox/filegraph/publication.owl b/rdf/tbox/filegraph/publication.owl new file mode 100644 index 00000000..e73e84a3 --- /dev/null +++ b/rdf/tbox/filegraph/publication.owl @@ -0,0 +1,1220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + journal article + + Examples are articles published in the journals, Nature and Science. The content can often be cited by reference to a paper based encoding, e.g. Authors, Title of article, Journal name, date or year of publication, volume and page number. + OBI_0000159 + a report that is published in a journal + group:OBI + journal article + person:Alan Ruttenberg + person:Chris Stoeckert + + + + + + + + + + + + + + + + + + + + + + + + + + + + academic article + + A specific academic journal article + Written by scholars for other scholars, typically published in an academic journal with an abstract and bibliography + http://purl.org/ontology/bibo/ + A scholarly academic article, typically published in a journal. + stable + + + + + + + + article + + A specific journal article + A written composition in prose, usually nonfiction, on a specific topic, forming an independent part of a periodical or book + Short Definition modified from the bibo ontology. + http://purl.org/ontology/bibo/ + stable + A written composition in prose, usually nonfiction, on a specific topic, forming an independent part of a book or other publication, as a newspaper or magazine. + + + + + + + + audio document + + Recorded audio in any format + http://purl.org/ontology/bibo/ + phonograph record; tape; CD; DVD; DAT + stable + An audio document; aka record. + + + + + + + + audio-visual document + + Audiovisual recording in any format + film; video; Blu-ray + http://purl.org/ontology/bibo/ + An audio-visual document; film, video, and so forth. + stable + + + + + + + + bill + + Draft legislation presented for discussion to a legal body + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + stable + Draft legislation presented for discussion to a legal body. + + + + + + + + book + + A written or printed work of fiction or nonfiction, usually on sheets of paper fastened or bound together within covers + Short Definition copied from bibo ontology + http://purl.org/ontology/bibo/ + A written or printed work of fiction or nonfiction, usually on sheets of paper fastened or bound together within covers. + stable + + + + + + + + book section + + A section of a book + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + unstable + A section of a book. + + + + + + + + brief + + A document stating the facts and points of law of a client's case + http://purl.org/ontology/bibo/ + unstable + A written argument submitted to a court. + + + + + + + + chapter (bibo) + + A main division of a book + http://purl.org/ontology/bibo/ + A chapter of a book. + unstable + + + + + + + + code (bibo) + + A work consisting of texts of rules and regulations related to statutes issued by executive or administrative agencies + Code of Federal Regulations + Short Definition from OCLC Input Standards, EntW + http://purl.org/ontology/bibo/ + A collection of statutes. + stable + + + + + + + + collected document + + Short Definition is the Medical Subject Heading (MeSH) definition + Work consisting of collections of previously published works + http://purl.org/ontology/bibo/ + stable + A document that simultaneously contains other documents. + + + + + + + + collection (bibo) + + Collection of information resources that have a unified identity + Collection of information resources that have a unified identity. Archives, museums and libraries often acquire collections on specific subjects and from distinguished authors or researchers. Also includes collections of resources bundled into a license. + Hill Ornithology Collection; Wiley Interscience Online Books Biochemisty Collection + http://purl.org/ontology/bibo/ + stable + A collection of Documents or Collections + + + + + + + + conference + + 2010 International Congress on Autoimmunity; American Libraries Association 2009 + A meeting for consultation or discussion. + core:Seminar and bibo:Conference are very similar. + http://purl.org/ontology/bibo/ + A meeting for consultation or discussion. + stable + + + + + + + + court reporter + + Collection of legal cases + Supreme Court Reporter + http://purl.org/ontology/bibo/ + stable + A collection of legal cases. + + + + + + + + document + + A bounded physical representation of a body of information designed with the capacity (and usually intent) to communicate + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + A collection of information content entities intended to be understood together as a whole + A document (noun) is a bounded physical representation of body of information designed with the capacity (and usually intent) to communicate. A document may manifest symbolic, diagrammatic or sensory-representational information. + A journal article, patent application, laboratory notebook, or a book + PERSON: Lawrence Hunter + document + + + + + + + + + + document part + + A distinct part of a larger document or collected document + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + a distinct part of a larger document or collected document. + unstable + + + + + + + + edited book + + An edited collection of stand-alone articles published as a book + Best American Science Writing 2009 + http://purl.org/ontology/bibo/ + stable + An edited book. + + + + + + + + excerpt + + A passage selected from a larger work + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + stable + A passage selected from a larger work. + + + + + + + + film + + Audiovisual recording in film format + http://purl.org/ontology/bibo/ + aka movie. + stable + + + + + + + + hearing + + An instance or a session in which testimony and arguments are presented, esp. before an official, as a judge in a lawsuit. + Definiton from Bibo here: http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html + http://purl.org/ontology/bibo/ + An instance or a session in which testimony and arguments are presented, esp. before an official, as a judge in a lawsuit. + stable + + + + + + + + image + + + + A visual representation such as a photograph or graph + http://purl.org/ontology/bibo/ + photograph; diagram + A document that presents visual or diagrammatic information. + stable + + + + + + + + interview + + A conversation between two or more people where questions are asked by the interviewer to obtain information from the interviewee. + http://purl.org/ontology/bibo/ + radio or newspaper interview + A formalized discussion between two or more people. + stable + + + + + + + + issue (bibo c) + + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + something that is printed or published and distributed, esp. a given number of a periodical + something that is printed or published and distributed, esp. a given number of a periodical + stable + + + + + + + + journal + + Articles usually contain abstracts and bibliographies. Includes peer-reviewed, non-peer-reviewed, and open access journals. Journals are usually indexed in the major academic databases such as PubMed and Web of Science. + Contains original scholarly research or review articles by experts in the field + Journal of Information Science; IEEE Intelligent System; Scientometrics + http://purl.org/ontology/bibo/ + stable + A periodical of scholarly journal Articles. + + + + + + + + legal case document + + Official court papers for a case + http://purl.org/ontology/bibo/ + A document accompanying a legal case. + unstable + + + + + + + + decision + + The written determination of a case, motion or claim by a court or tribunal + http://purl.org/ontology/bibo/ + unstable + A document containing an authoritative determination (as a decree or judgment) made after consideration of facts or law. + + + + + + + + legal document + + a document that states some contractual relationship or grants some right + http://purl.org/ontology/bibo/ + A legal document; for example, a court decision, a brief, and so forth. + stable + + + + + + + + legislation + + Enactments of legislative bodies, published in either statute or code form + From OCLC Input Standards, EntW + http://purl.org/ontology/bibo/ + A legal document proposing or enacting a law or a group of laws. + unstable + + + + + + + + letter + + A written or printed communication addressed to a person or organization and usually transmitted by mail + A written or printed communication addressed to a person or organization and usually transmitted by mail + + + + + + + + magazine + + Abstracts and bibliographies are usually not included in magazines. + Contains articles of current events or general interest, geared to the reading public as being informative or recreational + New Yorker + http://purl.org/ontology/bibo/ + A periodical of magazine Articles. A magazine is a publication that is issued periodically, usually bound in a paper cover, and typically contains essays, stories, poems, etc., by many writers, and often photographs and drawings, frequently specializing in a particular subject or area, as hobbies, news, or sports. + stable + + + + + + + + manual + + A book of instructions or guide to a specific topic + SDB User Manual + http://purl.org/ontology/bibo/ + A small reference book, especially one giving instructions. + unstable + + + + + + + + manuscript + + Short Definition is the Medical Subject Heading (MeSH) definition + Works prepared by hand including handwritten or typescript drafts of pre-publication papers or works not otherwise reproduced in multiple copies + http://purl.org/ontology/bibo/ + An unpublished Document, which may also be submitted to a publisher for publication. + stable + + + + + + + + map + + A graphical depiction of geographic features, scientific discipline, scientific data analytical results + The Short Definition is how the bibo ontology defines Map. It has been extended to include more broader concept of map which includes science maps, social network maps. + http://purl.org/ontology/bibo/ + A graphical depiction of geographic features. + unstable + + + + + + + + newspaper + + Contains news articles, opinions, features, advertising, and is usually issued daily or weekly + USA Today + http://purl.org/ontology/bibo/ + stable + A periodical of documents, usually issued daily or weekly, containing current news, editorials, feature articles, and usually advertising. + + + + + + + + note (bibo c) + + Notes or annotations about a resource + Short Definition from bibo ontology + http://purl.org/ontology/bibo/ + stable + Notes or annotations about a resource. + + + + + + + + patent + + (from BIBO) A document describing the exclusive right granted by a government to an inventor to manufacture, use, or sell an invention for a certain number of years + A patent is an exclusive right granted for an invention, which is a product or a process that provides, in general, a new way of doing something, or offers a new technical solution to a problem. In order to be patentable, the invention must fulfill certain conditions. (http://www.wipo.int/patentscope/en/) + http://purl.org/ontology/bibo/ + stable + A document describing the exclusive right granted by a government to an inventor to manufacture, use, or sell an invention for a certain number of years. + + + + + + + + performance + + Something carried out, acted or rendered. + http://purl.org/ontology/bibo/ + unstable + A public performance. + + + + + + + + periodical + + http://purl.org/ontology/bibo/ + stable + A group of related documents issued at regular intervals. + + + + + + + + personal communication document + + A personal communication manifested in some document. + A personal communication manifested in some document. + + + + + + + + proceedings + + A compilation of documents published from an event, such as a conference + Short Definition copied from bibo ontology + http://purl.org/ontology/bibo/ + unstable + A compilation of documents published from an event, such as a conference. + + + + + + + + quote + + An excerpted collection of words + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + An excerpted collection of words. + stable + + + + + + + + reference source + + A document that presents authoritative reference information, such as a dictionary or encylopedia + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + unstable + A document that presents authoritative reference information, such as a dictionary or encylopedia . + + + + + + + + report + + A document describing an account or statement describing in detail an event, situation, or the like, usually as the result of observation, inquiry, etc. + Medical Subject Heading (MeSH) definition of Technical Report: Work consisting of a formal report giving details of the investigation and results of a medical or other scientific problem. When issued by a government agency or comparable official body, its contents may be classified, unclassified, or declassified with regard to security clearance. This publication type may also cover a scientific paper or article that records the current state or current position of scientific research and development. If so labeled by the editor or publisher, this publication type may be properly used for journal articles. + http://purl.org/ontology/bibo/ + stable + A document describing an account or statement describing in detail an event, situation, or the like, usually as the result of observation, inquiry, etc.. + + + + + + + + series + + A thematic collection of documents, usually books, issued at regular or irregular intervals + Methods in Molecular Biology + http://purl.org/ontology/bibo/ + A loose, thematic, collection of Documents, often Books. + stable + + + + + + + + slide + + A slide in a slideshow + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + A slide in a slideshow + unstable + + + + + + + + slideshow + + A presentation of a series of slides, usually presented in front of an audience with written text and images + Short Definition from the bibo ontology + http://purl.org/ontology/bibo/ + A presentation of a series of slides, usually presented in front of an audience with written text and images. + stable + + + + + + + + standard + + A specification giving a precise statement of a process or a service requirement, often sanctioned by a nation or industry + Short Definition from OCLC Input Standards, EntW + http://purl.org/ontology/bibo/ + A document describing a standard + stable + + + + + + + + statute + + A bill enacted into law + Short Definition from bibo ontology + http://purl.org/ontology/bibo/ + A bill enacted into law. + stable + + + + + + + + thesis + + Short Definition from OCLC Input Standards, EntW + Works created to satisfy the requirements for an academic certification or degree; also called dissertation + http://purl.org/ontology/bibo/ + A document created to summarize research findings associated with the completion of an academic degree. + stable + + + + + + + + webpage + + One section of a website that appears at a unique address within the parent site's address or URL on the World Wide Web + http://purl.org/ontology/bibo/ + A web page is an online document available (at least initially) on the world wide web. A web page is written first and foremost to appear on the web, as distinct from other online resources such as books, manuscripts or audio documents which use the web primarily as a distribution mechanism alongside other more traditional methods such as print. + unstable + + + + + + + + website + + A group of webpages available within a specific parent address or URL on the World Wide Web + Facebook; VIVOweb.org; Flickr + http://purl.org/ontology/bibo/ + A group of Webpages accessible on the Web. + unstable + + + + + + + + workshop + + Bibo Definition: A seminar, discussion group, or the like, that emphasizes exchange of ideas and the demonstration and application of techniques, skills, etc. + http://purl.org/ontology/bibo/ + A seminar, discussion group, or the like, that emphasizes zxchange of ideas and the demonstration and application of techniques, skills, etc. + stable + + + + + + + + bibliographic information source + + A source of information about bibliographic citations, such as Google Scholar, Web of Science or Scopus. + + + + + + + + global citation count + + The number of times a work has been cited globally, as determined from a particular bibliographic information source on a particular date. + + + + + + + + clinical guideline + + A recommendation on the appropriate treatment and care of people with a specific disease or condition, based on the best available evidence, designed to help healthcare professionals in their work. + A recommendation on the appropriate treatment and care of people with a specific disease or condition, based on the best available evidence, designed to help healthcare professionals in their work. + + + + + + + + comment + + A verbal or written remark concerning some entity. In written form, a comment is often appended to that entity and termed an annotation. Within computer programs or ontologies, comments are added to enhance human understanding, and are usually prefaced by + A verbal or written remark concerning some entity. In written form, a comment is often appended to that entity and termed an annotation. Within computer programs or ontologies, comments are added to enhance human understanding, and are usually prefaced by a special syntactic symbol that ensures they are ignored during execution of the program. + +has super-classes + + + + + + + + erratum + + A formal correction to an error introduced by the publisher into a previously published document. + A formal correction to an error introduced by the publisher into a previously published document. + + + + + + + + authorship + + + Authorship of journal articles, books and other original works is a means by which academics communicate the results of their scholarly work, establish priority for their discoveries, and build their reputation among their peers. +This class allows for linking an author to a publication while indicating information about that author's authorship. + Contains the authors name, their rank in the publication, and whether or not they are a corresponding author on the publication. + Currently any abstract name is given to members of this class. This could change in the future. + + + + + + + + blog + + Blog is short for weblog. + Library of Congress Blog + Regularly updated online journal or newsletter by one or more writers, called bloggers, containing articles and commentary of interest to the blogger + + + + + + + + blog posting + + A specific blog posting + An online article or commentary appearing on a blog + + + + + + + + case study + + A form of qualitative descriptive research that is used to study individuals, a small group of participants, or a group as a whole. Medical usage (from MeSH): clinical presentations that may be followed by evaluative studies that eventually lead to a diagnosis. + A qualitative descriptive research study of individuals or a group + + + + + + + + catalog + + A list of items in a collection; an ordered compilation of item descriptions and sufficient information to afford access to them + NLM Catalog + Short Definition is the Medical Subject Heading (MeSH) definition + + + + + + + + conference paper + + A paper presented at a conference; optionally collected into a Proceedings or a special Journal issue + + + + + + + + conference poster + + The digital file (or physical equivalent), if available after the conference, vs. the act of attending/presenting: use ConferencePresentation for information about date/time/location/name of the event where the poster was presented + + + + + + + + database (vivo) + + A structured file of information or a set of logically related data stored and retrieved using computer-based means + PubMed + Short Definition is the Medical Subject Heading (MeSH) definition + + + + + + + + dataset + + A named collection of data, usually containing only one type of data + US Patent Data; US Job Data + + + + + + + + editor role + An ongoing editorial responsibility for a bibo:Collection, such as a Journal or Series + An ongoing editorial responsibility for a bibo:Collection, such as a Journal or Series + + + + + + + + editorial article + + An article of opinion, typically published in a newspaper. For academics, most commonly Op Ed pieces + + + + + + + + invited talk + + + + + + + + + news release + + A short written piece focused on an event or announcement of note, having a defined publication time and of less enduring interest than a news feature. + + + + + + + + newsletter + + The Ornithological Newsletter + Usually issued periodically, prepared by or for a group or institution to present information to a specific audience, often also made available to the press and public + + + + + + + + peer reviewer role + + A role of peer reviewing + is a generic term for a process of self-regulation by a profession or a process of evaluation involving qualified individuals within the relevant field. Peer review methods are employed to maintain standards, improve performance and provide credibility. In academia the term is often used to denote a prepublication review of academic papers; reviewing an academic paper is often called refereeing. +Contents +[hide] + + + + + + + + + + + + + + + + + + + + research proposal + + A proposal for a research grant that has been submitted but not approved; does not represent an existing activity + + + + + + + + review + + An article reviewing one or more other information resources (a book, one or more other articles, movies, etc) + + + + + + + + reviewer role + A role that encompasses both ongoing reviewer responsibility for a bibo:Collection, such as a Journal or Series, and also a review performed for a bibo:Document, such as a book, academic article or conference paper. + A role that encompasses both ongoing reviewer responsibility for a bibo:Collection, such as a Journal or Series, and also a review performed for a bibo:Document, such as a book, academic article or conference paper. + + + + + + + + score + + Written musical composition for voice or instruments or both + + + + + + + + screenplay + + Written script for a film production, including dialogue and descriptions of gestures, actions, shooting directions + + + + + + + + speech + + Text of a speech written in preparation for delivery of the speech. + + + + + + + + translation + + The result of rendering a work from one language to another + + + + + + + + + + + + + + video (vivo) + + Audiovisual recording in video format + + + + + + + + working paper + + A document created as a basis for discussion or a very early draft of a formal paper + + + + + + + + + + + + + accepted + Accepted for publication after peer reviewing + + + + + + + + peer reviewed + &nbsp;Peer review is the process by which articles are chosen to be included in a refereed journal. An editorial board consisting of experts in the same field as the author review the article and decide if it is authoritative enough for publication. + + + + + + + + published + Published document + + + + + + + + in press + Document to be published + + + + + + + diff --git a/rdf/tbox/filegraph/relationship.owl b/rdf/tbox/filegraph/relationship.owl new file mode 100644 index 00000000..336ede56 --- /dev/null +++ b/rdf/tbox/filegraph/relationship.owl @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + award or honor receipt + + The award bestowed may be represented with the Award class. + The bestowal of an award, honor, or distinction to a person or person's at a particular time. + + + + + + + + awarded degree + + The awarding of a degree by an agent to another agent. It is mostly for academic degrees. + + + + + + + + + + + + + + + + editorship + + A relationship that represents the recognition of an agent as an editor. + + + + + + + + faculty administrative position + + An academic administrative position (associate dean, etc.) as distinct from a professional administrative position (non-academic) + Associate Dean + That is a position held by an academic faculty member who works for administration. + + + + + + + + faculty position + + Academic position in a university or institution + Professor, associate professor and assistant professor are common positions for academic faculty. + Professor; Associate Professor; Assistant Professor + + + + + + + + librarian position + + A position held by library and information science professionals, or academic or technical experts, in support of providing information services or materials + It is the common position in libraries. + Librarian; Library Systems Analyst; Music Bibliographer + + + + + + + + non-academic position + + A position classified as professional, staff, support, or any other non-academic role + Accounting & Research Services Assistant; Director of Information Technology + Staff, support, and other non-academic positions. + + + + + + + + non-faculty academic position + + A position involving academic work but without faculty status + Researcher; Academic Extension Associate; Postdoctoral Associate + Those positions are held by people who do academic work but do not have faculty positions in universities or institutes. + + + + + + + + position (vivo) + + An employment activity, whether compensated or not. Short definition comes from http://en.wikipedia.org/wiki/Position, and has been modified. + Director of Admissions and Placement; Associate University Librarian + Particular position in an organization, commonly identified by job title, and normally associated with a job description that details the tasks and responsibilities that go with the position. + + + + + + + + postdoctoral position + + A postdoctoral training appointment (job) + + + + + + + + primary position + + A position designated as primary by the organization or group where it is held. This designation may be applied to zero or more of an agent's positions and may be asserted in conjunction with other subclasses of position. + A position designated as primary by the organization where it is held. + + + + + + + + relationship + a reified relationship + functions as an n-ary predicate + + + + + + + diff --git a/rdf/tbox/filegraph/research-resource-iao.owl b/rdf/tbox/filegraph/research-resource-iao.owl new file mode 100644 index 00000000..2b748398 --- /dev/null +++ b/rdf/tbox/filegraph/research-resource-iao.owl @@ -0,0 +1,702 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + measurement unit label + + 2009-03-16: provenance: a term measurement unit was +proposed for OBI (OBI_0000176) , edited by Chris Stoeckert and +Cristian Cocos, and subsequently moved to IAO where the objective for +which the original term was defined was satisfied with the definition +of this, different, term. + 2009-03-16: review of this term done during during the OBI workshop winter 2009 and the current definition was considered acceptable for use in OBI. If there is a need to modify this definition please notify OBI. + A measurement unit label is as a label that is part of a scalar measurement datum and denotes a unit of measure. + Examples of measurement unit labels are liters, inches, weight per volume. + PERSON: Alan Ruttenberg + PERSON: Melanie Courtot + measurement unit label + + + + + + + + + + objective specification + + Answers the question, why did you do this experiment? + OBI Plan and Planned Process/Roles Branch + OBI_0000217 + PERSON: Alan Ruttenberg + PERSON: Barry Smith + PERSON: Bjoern Peters + PERSON: Jennifer Fostel + a directive information entity that describes an intended process endpoint. When part of a plan specification the concretization is realized in a planned process in which the bearer tries to effect the world so that the process endpoint is achieved. + objective specification + purpose of a study; support of hypothesis, discovery of new information + + + + + + + + + + action specification + + Alan Ruttenberg + OBI Plan and Planned Process branch + Pour the contents of flask 1 into flask 2 + a directive information entity that describes an action the bearer will take + + + + + + + + + + datum label + + 9/22/11 BP: changed the rdfs:label for this class from 'label' to 'datum label' to convey that this class is not intended to cover all kinds of labels (stickers, radiolabels, etc.), and not even all kind of textual labels, but rather the kind of labels occuring in a datum. + + A label is a symbol that is part of some other datum and is used to either partially define the denotation of that datum or to provide a means for identifying the datum as a member of the set of data with the same label + GROUP: IAO + datum label + http://www.golovchenko.org/cgi-bin/wnsearch?q=label#4n + + + + + + + + + + data item + + 2/2/2009 Alan and Bjoern discussing FACS run output data. This is a data item because it is about the cell population. Each element records an event and is typically further composed a set of measurment data items that record the fluorescent intensity stimulated by one of the lasers. + 2009-03-16: data item deliberatly ambiguous: we merged data set and datum to be one entity, not knowing how to define singular versus plural. So data item is more general than datum. + 2009-03-16: removed datum as alternative term as datum specifically refers to singular form, and is thus not an exact synonym. + Data items include counts of things, analyte concentrations, and statistical summaries. + JAR: datum -- well, this will be very tricky to define, but maybe some +information-like stuff that might be put into a computer and that is +meant, by someone, to denote and/or to be interpreted by some +process... I would include lists, tables, sentences... I think I might +defer to Barry, or to Brian Cantwell Smith + +JAR: A data item is an approximately justified approximately true approximate belief + PERSON: Alan Ruttenberg + PERSON: Chris Stoeckert + PERSON: Jonathan Rees + a data item is an information content entity that is intended to be a truthful statement about something (modulo, e.g., measurement precision or other systematic errors) and is constructed/acquired by a method which reliably tends to produce (approximately) truthful statements. + data + data item + + + + + + + + + + information content entity + + + + + + + + Examples of information content entites include journal articles, data, graphical layouts, and graphs. + OBI_0000142 + PERSON: Chris Stoeckert + an information content entity is an entity that is generically dependent on some artifact and stands in relation of aboutness to some entity + information content entity + information_content_entity 'is_encoded_in' some digital_entity in obi before split (040907). information_content_entity 'is_encoded_in' some physical_document in obi before split (040907). + +Previous. An information content entity is a non-realizable information entity that 'is encoded in' some digital or physical entity. + + + + + + + + + + scalar measurement datum + + 10 feet. 3 ml. + 2009-03-16: we decided to keep datum singular in scalar measurement datum, as in +this case we explicitly refer to the singular form + PERSON: Alan Ruttenberg + PERSON: Melanie Courtot + Would write this as: has_part some 'measurement unit label' and has_part some numeral and has_part exactly 2, except for the fact that this won't let us take advantage of OWL reasoning over the numbers. Instead use has measurment value property to represent the same. Use has measurement unit label (subproperty of has_part) so we can easily say that there is only one of them. + a scalar measurement datum is a measurement datum that is composed of two parts, numerals and a unit label. + + + + + + + + + directive information entity + + 8/6/2009 Alan Ruttenberg: Changed label from "information entity about a realizable" after discussions at ICBO + An information content entity whose concretizations indicate to their bearer how to realize them in a process. + PERSON: Alan Ruttenberg + PERSON: Bjoern Peters + Werner pushed back on calling it realizable information entity as it isn't realizable. However this name isn't right either. An example would be a recipe. The realizable entity would be a plan, but the information entity isn't about the plan, it, once concretized, *is* the plan. -Alan + + + + + + + + + + curation status specification + + + + + + + + + + + + + + + + + Better to represent curation as a process with parts and then relate labels to that process (in IAO meeting) + GROUP:OBI:<http://purl.obolibrary.org/obo/obi> + OBI_0000266 + PERSON:Bill Bug + The curation status of the term. The allowed values come from an enumerated list of predefined terms. See the specification of these instances for more detailed definitions of each enumerated value. + curation status specification + + + + + + + + + data about an ontology part + + Person:Alan Ruttenberg + data about an ontology part is a data item about a part of an ontology, for example a term + + + + + + + + plan specification + + 2009-03-16: provenance: a term a plan was proposed for OBI (OBI_0000344) , edited by the PlanAndPlannedProcess branch. Original definition was " a plan is a specification of a process that is realized by an actor to achieve the objective specified as part of the plan". It has been subsequently moved to IAO where the objective for which the original term was defined was satisfied with the definitionof this, different, term. + Alan Ruttenberg + Alternative previous definition: a plan is a set of instructions that specify how an objective should be achieved + OBI Plan and Planned Process branch + OBI_0000344 + PMID: 18323827.Nat Med. 2008 Mar;14(3):226.New plan proposed to help resolve conflicting medical advice. + a directive information entity that when concretized it is realized in a process in which the bearer tries to achieve the objectives, in part by taking the actions specified. Plan specifications includes parts such as objective specification, action specifications and conditional specifications. + plan specification + + + + + + + + + + measurement datum + + 2/2/2009 is_specified_output of some assay? + A measurement datum is an information content entity that is a recording of the output of a measurement such as produced by a device. + Examples of measurement data are the recoding of the weight of a mouse as {40,mass,"grams"}, the recording of an observation of the behavior of the mouse {,process,"agitated"}, the recording of the expression level of a gene as measured through the process of microarray experiment {3.4,luminosity,}. + OBI_0000305 + group:OBI + measurement datum + person:Chris Stoeckert + + + + + + + + + conclusion textual entity + + 2009/09/28 Alan Ruttenberg. Fucoidan-use-case + 2009/10/23 Alan Ruttenberg: We need to work on the definition still + A textual entity that expresses the results of reasoning about a problem, for instance as typically found towards the end of scientific papers. + Person:Alan Ruttenberg + conclusion textual entity + that fucoidan has a small statistically significant effect on AT3 level but no useful clinical effect as in-vivo anticoagulant, a paraphrase of part of the last paragraph of the discussion section of the paper 'Pilot clinical study to evaluate the anticoagulant activity of fucoidan', by Lowenthal et. al.PMID:19696660 + + + + + + + + + + obsolescence reason specification + + + + + + + + + + + + + PERSON: Alan Ruttenberg + PERSON: Melanie Courtot + The creation of this class has been inspired in part by Werner Ceusters' paper, Applying evolutionary terminology auditing to the Gene Ontology. + The reason for which a term has been deprecated. The allowed values come from an enumerated list of predefined terms. See the specification of these instances for more detailed definitions of each enumerated value. + obsolescence reason specification + + + + + + + + + textual entity + + A textual entity is a part of a manifestation (FRBR sense), a generically dependent continuant whose concretizations are patterns of glyphs intended to be interpreted as words, formulas, etc. + AR, (IAO call 2009-09-01): a document as a whole is not typically a textual entity, because it has pictures in it - rather there are parts of it that are textual entities. Examples: The title, paragraph 2 sentence 7, etc. + MC, 2009-09-14 (following IAO call 2009-09-01): textual entities live at the FRBR (http://en.wikipedia.org/wiki/Functional_Requirements_for_Bibliographic_Records) manifestation level. Everything is significant: line break, pdf and html versions of same document are different textual entities. + PERSON: Lawrence Hunter + Words, sentences, paragraphs, and the written (non-figure) parts of publications are all textual entities + text + textual entity + + + + + + + + denotator type + + + + + + + + + + + A denotator type indicates how a term should be interpreted from an ontological perspective. + Alan Ruttenberg + Barry Smith, Werner Ceusters + The Basic Formal Ontology ontology makes a distinction between Universals and defined classes, where the formal are "natural kinds" and the latter arbitrary collections of entities. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + example to be eventually removed + + + + + + + + + failed exploratory term + Person:Alan Ruttenberg + The term was used used in an attempt to structure part of the ontology but in retrospect failed to do a good job + + + + + + + + + metadata complete + Class has all its metadata, but is either not guaranteed to be in its final location in the asserted IS_A hierarchy or refers to another class that is not complete. + + + + + + + + + organizational term + term created to ease viewing/sort terms for development purpose, and will not be included in a release + + + + + + + + + ready for release + Class has undergone final review, is ready for use, and will be included in the next release. Any class lacking "ready_for_release" should be considered likely to change place in hierarchy, have its definition refined, or be obsoleted in the next release. Those classes deemed "ready_for_release" will also derived from a chain of ancestor classes that are also "ready_for_release." + + + + + + + + + metadata incomplete + Class is being worked on; however, the metadata (including definition) are not complete or sufficiently clear to the branch editors. + + + + + + + + + uncurated + Nothing done yet beyond assigning a unique class ID and proposing a preferred term. + + + + + + + + + pending final vetting + All definitions, placement in the asserted IS_A hierarchy and required minimal metadata are complete. The class is awaiting a final review by someone other than the term editor. + + + + + + + + + core + Core is an instance of a grouping of terms from an ontology or ontologies. It is used by the ontology to identify main classes. + PERSON: Alan Ruttenberg + PERSON: Melanie Courtot + + + + + + + + + placeholder removed + + + + + + + + + terms merged + An editor note should explain what were the merged terms and the reason for the merge. + + + + + + + + + term imported + This is to be used when the original term has been replaced by a term imported from an other ontology. An editor note should indicate what is the URI of the new term to use. + + + + + + + + + term split + This is to be used when a term has been split in two or more new terms. An editor note should indicate the reason for the split and indicate the URIs of the new terms created. + + + + + + + + + universal + A Formal Theory of Substances, Qualities, and Universals, http://ontology.buffalo.edu/bfo/SQU.pdf + Alan Ruttenberg + Hard to give a definition for. Intuitively a "natural kind" rather than a collection of any old things, which a class is able to be, formally. At the meta level, universals are defined as positives, are disjoint with their siblings, have single asserted parents. + + + + + + + + + defined class + "definitions", in some readings, always are given by necessary and sufficient conditions. So one must be careful (and this is difficult sometimes) to distinguish between defined classes and universal. + A defined class is a class that is defined by a set of logically necessary and sufficient conditions but is not a universal + Alan Ruttenberg + + + + + + + + + named class expression + A named class expression is a logical expression that is given a name. The name can be used in place of the expression. + Alan Ruttenberg + named class expressions are used in order to have more concise logical definition but their extensions may not be interesting classes on their own. In languages such as OWL, with no provisions for macros, these show up as actuall classes. Tools may with to not show them as such, and to replace uses of the macros with their expansions + + + + + + + + + to be replaced with external ontology term + Alan Ruttenberg + Terms with this status should eventually replaced with a term from another ontology. + group:OBI + + + + + + + + + requires discussion + A term that is metadata complete, has been reviewed, and problems have been identified that require discussion before release. Such a term requires editor note(s) to identify the outstanding issues. + Alan Ruttenberg + group:OBI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/research-resource.owl b/rdf/tbox/filegraph/research-resource.owl new file mode 100644 index 00000000..796fdf84 --- /dev/null +++ b/rdf/tbox/filegraph/research-resource.owl @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + instrument + + + + + + + + A flow cytometer. + Material entity that is designed to have a function and play a role in scientific investigation. + PERSON: Melissa Haendel + See OBI listserv discussion for considerations in defining instrument. http://sourceforge.net/tracker/index.php?func=detail&aid=2894801&group_id=177891&atid=886178 + http://en.wikipedia.org/wiki/Scientific_instrument + instrument + + + + + + + + + service + + A DNA sequencing service performed by a core lab. + An information content entity that describes a service performed by a person or organization with the objective of performing a technique, providing training, providing storage of data or material entities, or providing access to resources for another person or organization + Coordinate with NIF. NIF ID: nlx_res_20090105 + PERSON: Melissa Haendel + PERSON: Melissa Haendel + service + + + + + + + + + reagent + + + + + + + + + + + + + + + + + + + + A plasmid can be used as a reagent. + PERSON: Melissa Haendel + Placeholder for class to be imported from the Reagent Ontology (ReO). + Processed material that is used in a chemical reaction or other experimental process to detect, measure, examine, or produce other substances. + http://www.yourdictionary.com/reagent + reagent + + + + + + + + + + technique + + A technique is a planned process used to accomplish a specific activity or task. + Flow cytometry is a technique. + PERSON: Melissa Haendel + Protocol is added to eagle-i temporarily until a relationship between the informatio entity "protocol" and these planned processes is created. This class refers to the axtual process not the document + http://en.wikipedia.org/wiki/Technique + + + + + + + + + service provider role + + A role inhering in a person or organization that is realized when the bearer participates in providing a service to meet the need of another person or thing. + A technician in a core laboratory. + An role of an individual within his or her profession or institution; use outreach provider role for community service or other activities outside the profession. + Member of the International Conference on Complex Systems Organizing Committee + PERSON: Nicole Vasilevsky + PERSON: Nicole Vasilevsky + + + + + + + + + research project + + + + + + + + A funded collection of investigations as described in a research proposal. + A project to study the role of a specific protein in cell signaling. + Maybe SameAs "Investigation" but is the subject of funding + PERSON: Melissa Haendel + PERSON: Melissa Haendel + + + + + + + + + biological specimen + + + + + + + + Heart tissue obtained from an organism. + Material entity that is a portion or quantity of a biological material for use in testing, examination, or study. A biological specimen can be an individual animal, a population of organisms, or is a part of or derived from an animal, plant, part of a plant, or microorganism. When a taxon is described, it is typically based on a single specimen and is referred to as the holotype. + PERSON: Melissa Haendel + Should have relationship to Organism + biological specimen + biospecimen + http://en.wikipedia.org/wiki/Specimen + + + + + + + + + software + + A general term primarily used for digitally stored data such as computer programs and other kinds of information read and written by computers. + IAO is a planned specification, in SWO is an Information artifact. In eagle-i, we have a need to collect material instances and is it thus currently classified as a material entity. + Microsoft Word is commonly used word processing software. + PERSON: Melissa Haendel + http://en.wikipedia.org/wiki/Computer_software + software + + + + + + + + + access service + + A service offering that describes a service in which the consumer receives the right to use a resource (instrument, database, software, etc) that is owned or managed by a service provider. Ownership of the accessed resource remains with the service provider during and after provision of service. + Allowing access to a microscope in a core lab. + Coordinate with NIF + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + storage service + + A computer server. + A service offering that describes a service in which the consumer provides some material or data as input which a service provider stores and returns as output. + PERSON: Matt Brush + PERSON: Matthew Brush + coordinate with NIF. NIF ID:nlx_res_20090419 + + + + + + + + + training service + + A service offering that describes a service in which the provider offers educational materials or events, such as courses, workshops or graduate programs, to the service consumer + Coordinate with NIF. NIF ID: nlx_res_20090444 + PERSON: Matt Brush + PERSON: Matthew Brush + Training a researcher to use a microscope. + + + + + + + + + material processing service + + A service offering that describes a service in which the provider makes physical changes to a specified input material entity with the objective of producing a new material entity form input materials, or modifying the input material entity, and returning this as output to the service consumer + Biopsy service. + Coordinate with NIF: NIF ID: nlx_res_20090416 + PERSON: Nicole Vasilevsky + http://neurolex.org/wiki/Category:Production_service_resource + + + + + + + + + material analysis service + + An analysis service offering that describes a service in which the consumer provides some input material and a service provider performs some analysis of this material to generate data that is returned to the service consumer. + Coordinate with NIF: NIF ID: nlx_res_20090420 + Flow cytometry analysis of T cells. + PERSON: Nicole Vasilevsky + http://neurolex.org/wiki/Category:Analysis_service_resource + + + + + + + + + material production service + + A material processing service offering that describes a service in which the provider makes physical changes to a specified input material that produce a new entity as specified output that is returned the service consumer. The specified output of a material production service can be contained within, derived from, or synthesized from specified input materials, but it represents a material entity that is of a distinct type from any of the specified input materials. + Coordinate with NIF. NIF ID: nlx_res_20090418 + PERSON: Matthew Brush + Production of monoclonal antibodies from a hybridoma. + http://neurolex.org/wiki/Category:Material_service_resource + + + + + + + + + + risk management + + A technique used for identification, assessment, and prioritization of risks followed by coordinated and economical application of resources to minimize, monitor, and control the probability and/or impact of unfortunate events or to maximize the realization of opportunities. + PERSON: Nicole Vasilevsky + http://en.wikipedia.org/wiki/Risk_management + + + + + + + + + + + research electronic datacapture + + A technique designed for the collection of clinical data in electronic format for use mainly in human clinical trials. + Electronic health records. + PERSON: Nicole Vasilevsky + clinical database development + http://en.wikipedia.org/wiki/Electronic_data_capture + + + + + + licensing + + A technique that authorizes a use (such as copying software or using a (patented) invention) to a licensee, sparing the licensee from a claim of infringement brought by the licensor. + Licensing of a new technology. + PERSON: Nicole Vasilevsky + http://en.wikipedia.org/wiki/License + + + + + + + + + transport service + + A service offering that describes a service in which the provider facilitates the transport of some material entity to a specified destination for the service consumer. + PERSON: Matt Brush + PERSON: Matthew Brush + Transport of a patient within a hospital. + + + + + + + + + support service + + A service offering that describes a service in which the provider assists the consumer in activities directly or indirectly associated with the production and analysis or experimental research data. + PERSON: Matt Brush + PERSON: Matthew Brush + Technical support. + + + + + + + + + material storage service + + A storage service offering that describes a service in which the consumer provides some material as input which a service provider stores and returns as output + Cryopreservation service. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + data storage service + + A storage service offering that describes a service in which the consumer provides data as input, which a service provider stores and returns as output in its original form. + PERSON: Matt Brush + PERSON: Matthew Brush + Storing data on a server. + + + + + + + + + maintenance service + + A service offering that describes a service in which the provider actively maintains a material or data resource (e.g. a model organism colony or database) for the service consumer. This may involved making physical alterations to the material or data with the goal of maintaining its integrity or features. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + material maintenance service + + A maintenance service offering that describes a service in which the provider actively maintains a material resource (e.g. a model organism colony) for the service consumer. A material maintenance service may or may not include storage of the material input. + Maintaining an animal coloy. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + data maintenance service + + A maintenance service offering that describes a service in which the provider actively manages or maintains data or a database for the service consumer. Maintenance of the data is performed to maintain its integrity or enhance its quality or utility for the consumer, but new data is not generated as a result of the maintenance. + Maintaining a database. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + analysis service + + A service offering that describes a service in which the consumer provides some input material or data and a service provider returns data about the input material or data. + Flow cytometry analysis service. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + + data analysis service + + An analysis service offering that describes a service in which the consumer provides some input data and a service provider transforms, models, or interprets the input data and returns this generated data as output + PERSON: Matt Brush + PERSON: Matthew Brush + Sequence data analysis. + data processing service + data transformation service + + + + + + + + + material modification service + + A material processing service offering that describes a service in which the provider makes physical modifications to a specified input material, such that at least one of the specified outputs of this process is a modified version of a specified input material. + Histology service. + PERSON: Matt Brush + PERSON: Matthew Brush + + + + + + + + database + + A database is an organized collection of data, today typically in digital form. + Just a place horder. It will probably be replaced by NIF term: http://ontology.neuinfo.org/NIF/DigitalEntities/NIF-Resource.owl#nlx_res_20090405 + PERSON: Carlo Torniai + http://en.wikipedia.org/wiki/Database + + + + + + planned process + + 'Plan' includes a future direction sense. That can be problematic if plans are changed during their execution. There are however implicit contingencies for protocols that an agent has in his mind that can be considered part of the plan, even if the agent didn't have them in mind before. Therefore, a planned process can diverge from what the agent would have said the plan was before executing it, by adjusting to problems encountered during execution (e.g. choosing another reagent with equivalent properties, if the originally planned one has run out.) + Bjoern Peters + Injecting mice with a vaccine in order to test its efficacy + branch derived + planned process + A processual entity that realizes a plan which is the concretization of a plan specification. + planned process + + + + + + diff --git a/rdf/tbox/filegraph/research.owl b/rdf/tbox/filegraph/research.owl new file mode 100644 index 00000000..104e0be3 --- /dev/null +++ b/rdf/tbox/filegraph/research.owl @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + study design + + A study design is a plan specification comprised of protocols (which may specify how and what kinds of data will be gathered) that are executed as part of an investigation and is realized during a study design execution. + study design + + + + + + + + + equipment + A network server is one example. Medical schools and research laboratories can list professional equipment, such as microscopes. + A physical object provided for specific purpose, task or occupation. + server; Bruker Vector-33 FT-IR + + + + + + + + phase 0 clinical trial + + Phase 0 Clinical Trial + Phase 0 is a recent designation for exploratory, first-in-human trials conducted in accordance with the United States Food and Drug Administration's (FDA) 2006 Guidance on Exploratory Investigational New Drug (IND) Studies. Phase 0 trials are also known as human microdosing studies and are designed to speed up the development of promising drugs or imaging agents by establishing very early on whether the drug or agent behaves in human subjects as was expected from preclinical studies. + + + + + + + + phase 1 clinical trial + + In Phase I trials, researchers test an experimental drug or treatment in a small group of people (20-80) for the first time to evaluate its safety, determine a safe dosage range, and identify side effects + Phase 1 Clinical Trial + + + + + + + + phase 2 clinical trial + + In Phase 2 trials, an experimental study drug or treatment is given to a larger group of people (100-300) to see if it is effective and to further evaluate its safety. + Phase 2 Clinical Trial + + + + + + + + phase 3 clinical trial + + In Phase 3 trials, an experimental study drug or treatment is given to large groups of people (1,000-3,000) to confirm its effectiveness, monitor side effects, compare it to commonly used treatments, and collect information that will allow the experimental drug or treatment to be used safely. + + Phase 3 Clinical Trial + + + + + + + + phase 4 clinical trial + + In Phase 4 trials, post marketing studies delineate additional information including the drug's or treatment's risks, benefits, and optimal use. + Phase 4 Clinical Trial + + + + + + + diff --git a/rdf/tbox/filegraph/role.owl b/rdf/tbox/filegraph/role.owl new file mode 100644 index 00000000..e1eb21b0 --- /dev/null +++ b/rdf/tbox/filegraph/role.owl @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + administrator role + + + + + + + + leader role + A broad-ranging leader concept, from leading a small temporary committee to head of a large international organization. + A leadership role + + + + + + + + member role + A role of being a member in a Process or an Organization + + + + + + + + researcher role + + A role of conducting funded or unfunded research, sometimes linked to an Agreement. + Examples of research can be seen at: http://www.ufl.edu/research/products/index.html. Note these may have been funded, but the research doesn't have to be funded. Also, the research may be linked to an Agreement (for example, a Grant), but does not need to be. + + + + + + + + Advisee Role + + + + + + + + + Advisor Role + + + + + + + + + + diff --git a/rdf/tbox/filegraph/service.owl b/rdf/tbox/filegraph/service.owl new file mode 100644 index 00000000..9d88862d --- /dev/null +++ b/rdf/tbox/filegraph/service.owl @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/rdf/tbox/filegraph/skos-vivo.owl b/rdf/tbox/filegraph/skos-vivo.owl new file mode 100644 index 00000000..8d3d1b3e --- /dev/null +++ b/rdf/tbox/filegraph/skos-vivo.owl @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + document status + + The status of a document with respect to its publication. + The status of a document with respect to its publication. The statuses are represented as individuals of this class. Use the "show all individuals of this class" button on the class control panel to see the currently defined statuses. + http://purl.org/ontology/bibo/ + submitted; accepted; in-press; published; invited; refereed. + stable + The status of the publication of a document. + + + + + + + + Thesis Degree + + Different from general academic degree, thesis degree is achieved through one's completed thesis. Thesis is a document submitted in support of candidature for a degree or professional qualification presenting the author's research and findings(http://en.wikipedia.org/wiki/Thesis_or_dissertation). + Doctor of Philosophy (Ph.D.) + The academic degree of a Thesis. + http://purl.org/ontology/bibo/ + The academic degree of a Thesis + stable + + + + + + + + academic degree + + An academic degree at any level, both as reported by individuals for employment and as offered by academic degree programs. + B.A. Bachelor of Arts + This list may have multiple abbreviations for some degrees. + + + + + + + + award or honor + + An Award or Honor + An Award or Honor + Wiley Prize in Biomedical Sciences + + + + + + + + Certificate + + A document confirming certain characteristics of a person or organization, usually provided by some form of external review, education, or assessment. + A document confirming certain characteristics of a person or organization, usually provided by some form of external review, education, or assessment. + + + + + + + + credential + + An attestation of qualification, competence, or authority issued to an individual by a third party with a relevant or de facto authority or assumed competence to do so. + An attestation of qualification, competence, or authority issued to an individual by a third party with a relevant or de facto authority or assumed competence to do so. + + + + + + + + date/time value precision + + Indicates the precision of the value of a DateTimeValue instance. + + + + + + + + License + + Licenses are usually issued in order to regulate some activity that is deemed to be dangerous or a threat to the person or the public or which involves a high level of specialized skill. See also core:Licensure. + Official or legal permission to do something + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdf/tbox/filegraph/teaching.owl b/rdf/tbox/filegraph/teaching.owl new file mode 100644 index 00000000..26aa6b04 --- /dev/null +++ b/rdf/tbox/filegraph/teaching.owl @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + course + + A course as taught in one time period (such as a semester; although note that a course could consist of only one meeting (teaching session)) by one or more instructors, normally but not always for credit. Does not represent either each meeting of the course or the course offering such as Biology 101 taught every semester from 1980 to 2010 + A course as taught in one time period by one or more instructors, normally but not always for credit. Does not represent either each meeting of the course or the course offering such as Biology 101 taught every semester from 1980 to 2010 + + + + + + + + teacher role + A role of serving as an educator + + + + + + + diff --git a/rdf/tbox/filegraph/vitroPublic.owl b/rdf/tbox/filegraph/vitroPublic.owl new file mode 100644 index 00000000..d1f51520 --- /dev/null +++ b/rdf/tbox/filegraph/vitroPublic.owl @@ -0,0 +1,69 @@ + + + +]> + + + + + + + Vitro public constructs + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java b/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java index 003aa26b..eb25fcf6 100644 --- a/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java +++ b/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java @@ -108,20 +108,23 @@ public class AgrovocService implements ExternalConceptService { String lang = ""; for (SKOSLiteral literal : skosConcept.getSKOSRelatedConstantByProperty(dataset, manager.getSKOSDataFactory().getSKOSPrefLabelProperty())) { - - if (!literal.isTyped()) { - // if it has language - SKOSUntypedLiteral untypedLiteral = literal.getAsSKOSUntypedLiteral(); - if (untypedLiteral.hasLang()) { - lang = untypedLiteral.getLang(); - } else { - lang = ""; - } - } - if (lang.equals("en")) { - //System.out.println("prefLabel: " + literal.getLiteral()); - - concept.setLabel(literal.getLiteral()); + if(literal != null) { + if (!literal.isTyped()) { + // if it has language + SKOSUntypedLiteral untypedLiteral = literal.getAsSKOSUntypedLiteral(); + if (untypedLiteral.hasLang()) { + lang = untypedLiteral.getLang(); + } else { + lang = ""; + } + } + if (lang.equals("en")) { + //System.out.println("prefLabel: " + literal.getLiteral()); + + concept.setLabel(literal.getLiteral()); + } + } else { + logger.debug("Literal returned for preferred label was null and was ignored"); } } @@ -130,21 +133,24 @@ public class AgrovocService implements ExternalConceptService { for (SKOSLiteral literal : skosConcept .getSKOSRelatedConstantByProperty(dataset, manager .getSKOSDataFactory().getSKOSAltLabelProperty())) { - - if (!literal.isTyped()) { - // if it has language - SKOSUntypedLiteral untypedLiteral = literal - .getAsSKOSUntypedLiteral(); - if (untypedLiteral.hasLang()) { - lang = untypedLiteral.getLang(); - } else { - lang = ""; + if(literal != null) { + if (!literal.isTyped()) { + // if it has language + SKOSUntypedLiteral untypedLiteral = literal + .getAsSKOSUntypedLiteral(); + if (untypedLiteral.hasLang()) { + lang = untypedLiteral.getLang(); + } else { + lang = ""; + } } - } - //System.out.println("literal: "+ literal.getLiteral()); - if (lang.equals("en")) { - //System.out.println("altLabel: " + literal.getLiteral()); - altLabelList.add(literal.getLiteral()); + //System.out.println("literal: "+ literal.getLiteral()); + if (lang.equals("en")) { + //System.out.println("altLabel: " + literal.getLiteral()); + altLabelList.add(literal.getLiteral()); + } + } else { + logger.debug("Literal retrieved for altlabel was null and was ignored"); } } concept.setAltLabelList(altLabelList); diff --git a/src/edu/cornell/mannlib/semservices/service/impl/LCSHService.java b/src/edu/cornell/mannlib/semservices/service/impl/LCSHService.java new file mode 100644 index 00000000..614bd356 --- /dev/null +++ b/src/edu/cornell/mannlib/semservices/service/impl/LCSHService.java @@ -0,0 +1,514 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.semservices.service.impl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLEncoder; +import java.rmi.RemoteException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.rpc.ServiceException; + +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.fao.www.webservices.AgrovocWS.ACSWWebService; +import org.fao.www.webservices.AgrovocWS.ACSWWebServiceServiceLocator; +import org.semanticweb.skos.SKOSAnnotation; +import org.semanticweb.skos.SKOSConcept; +import org.semanticweb.skos.SKOSDataFactory; +import org.semanticweb.skos.SKOSDataProperty; +import org.semanticweb.skos.SKOSDataRelationAssertion; +import org.semanticweb.skos.SKOSDataset; +import org.semanticweb.skos.SKOSEntity; +import org.semanticweb.skos.SKOSLiteral; +import org.semanticweb.skos.SKOSObjectRelationAssertion; +import org.semanticweb.skos.SKOSUntypedLiteral; +import org.semanticweb.skos.properties.*; +import org.semanticweb.skosapibinding.SKOSManager; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.RDFNode; +import com.hp.hpl.jena.rdf.model.Resource; + +import edu.cornell.mannlib.semservices.bo.Concept; +import edu.cornell.mannlib.semservices.exceptions.ConceptsNotFoundException; +import edu.cornell.mannlib.semservices.service.ExternalConceptService; +import edu.cornell.mannlib.semservices.util.XMLUtils; + +public class LCSHService implements ExternalConceptService { + + protected final Log log = LogFactory.getLog(getClass()); + private final String skosSuffix = ".skos.rdf"; + private final String hostUri = "http://id.loc.gov"; + private java.lang.String LCSHWS_address = hostUri + "/authorities/subjects"; + private final String schemeUri = hostUri + "/authorities/subjects"; + private final String baseUri = hostUri + "/search/"; + private final String ontologyName = "LCSH"; + private final String format = "SKOS"; + private final String lang = "en"; + private final String codeName = "hasCodeAgrovoc"; + private final String searchMode = "Exact Match"; + protected final String dbpedia_endpoint = " http://dbpedia.org/sparql"; + //Property uris used for SKOS + protected final String SKOSNotePropertyURI = "http://www.w3.org/2004/02/skos/core#note"; + protected final String SKOSPrefLabelURI = "http://www.w3.org/2004/02/skos/core#prefLabel"; + protected final String SKOSAltLabelURI = "http://www.w3.org/2008/05/skos-xl#altLabel"; + protected final String SKOSBroaderURI = "http://www.w3.org/2004/02/skos/core#broader"; + protected final String SKOSNarrowerURI = "http://www.w3.org/2004/02/skos/core#narrower"; + protected final String SKOSExactMatchURI = "http://www.w3.org/2004/02/skos/core#exactMatch"; + protected final String SKOSCloseMatchURI = "http://www.w3.org/2004/02/skos/core#closeMatch"; + + @Override + public List getConcepts(String term) throws Exception { + List conceptList = new ArrayList(); + String results = null; + String dataUrl = baseUri + "?q=" + URLEncoder.encode(term, "UTF-8") + + "&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects" + + "&format=XML"; + log.debug("dataURL " + dataUrl); + + try { + + StringWriter sw = new StringWriter(); + URL rss = new URL(dataUrl); + + BufferedReader in = new BufferedReader(new InputStreamReader( + rss.openStream())); + String inputLine; + while ((inputLine = in.readLine()) != null) { + sw.write(inputLine); + } + in.close(); + + results = sw.toString(); + log.debug(results); + } catch (Exception ex) { + log.error("error occurred in servlet", ex); + return null; + } + + if (StringUtils.isEmpty(results)) { + return conceptList; + } + + conceptList = processOutput(results); + + return conceptList; + } + + // Results are in json format (atom) - atom entries need to be extracted + // retrieve the URIs and get the SKOS version of the entry, getting broader + // and narrower terms as applicable as well as any description (skos:note) + // that might exist + private List processOutput(String results) throws Exception { + List conceptList = new ArrayList(); + SKOSManager manager = new SKOSManager(); + // Get uris from the results + // Properties we will be querying for + SKOSDataFactory sdf = manager.getSKOSDataFactory(); + + + List uris = getConceptURIFromXML(results); + String bestMatch = "true"; + int i = 0; + for (String uri : uris) { + if(i > 0) { + bestMatch = "false"; + } + log.debug("-" + uri + "-"); + String conceptUriString = getSKOSURI(uri); + URI conceptURI = null; + try { + conceptURI = new URI(conceptUriString); + } catch (URISyntaxException e) { + log.error("URI syntax exception in trying to get concept uri " + conceptUriString, e); + return conceptList; + } + log.debug("loading concept uri " + conceptUriString); + SKOSDataset dataset = manager.loadDataset(conceptURI); + Set skosConcepts = dataset.getSKOSConcepts(); + log.debug("Number of skos concepts " + skosConcepts.size()); + + for (SKOSConcept skosConcept : skosConcepts) { + + Concept c = this.createConcept(sdf, bestMatch, skosConcept, dataset); + if(c != null) { + conceptList.add(c); + } + + } + i++; + + } + return conceptList; + } + + + + //Will use skos if does not encounter error from skos api, otherwise will use regular XML parsing techniques + public Concept createConcept(SKOSDataFactory skosDataFactory, String bestMatch, SKOSConcept skosConcept, SKOSDataset dataset) { + + Concept concept = new Concept(); + String skosConceptURI = skosConcept.getURI().toString(); + log.debug("SKOSConceptURI is " + skosConceptURI); + // get skos version of uri + + concept.setUri(skosConceptURI); + concept.setConceptId(stripConceptId(skosConceptURI)); + concept.setBestMatch(bestMatch); + concept.setDefinedBy(schemeUri); + concept.setSchemeURI(schemeUri); + concept.setType(""); + + //Get the skos annotations first to see if there is an error triggered, if so try and see if we can instead utilize XML + //For some of the SKOS concepts, a null pointer exception occurs while XML processing still works + //I do not yet know the reasons, hjk54 + try { + Set skosAnnots = skosConcept + .getSKOSAnnotations(dataset); + } catch(NullPointerException ex) { + concept = createConceptUsingXML(concept, bestMatch, skosConcept); + return concept; + } catch(Exception ex) { + log.debug("Error occurred for annotation retrieval for skos concept " + skosConceptURI, ex); + return null; + } + + concept = this.createConceptUsingSKOS(skosDataFactory, concept, skosConcept, dataset); + return concept; + } + + private Concept createConceptUsingSKOS(SKOSDataFactory skosDataFactory, Concept concept, SKOSConcept skosConcept, SKOSDataset dataset) { + + SKOSPrefLabelProperty prefLabelProperty = skosDataFactory.getSKOSPrefLabelProperty(); + SKOSAltLabelProperty altLabelProperty = skosDataFactory.getSKOSAltLabelProperty(); + + try { + List labelLiterals = this.getSKOSLiteralValues(skosConcept + .getSKOSRelatedConstantByProperty(dataset, + prefLabelProperty)); + if(labelLiterals.size() > 0) { + concept.setLabel(labelLiterals.get(0)); + } else { + //This is an error because there should be at least one label returned + log.debug("The number of preferred labels is not greater than zero"); + } + + // get altLabels + List altLabelList = this.getSKOSLiteralValues(skosConcept + .getSKOSRelatedConstantByProperty(dataset, altLabelProperty)); + concept.setAltLabelList(altLabelList); + + // See if we can get a description as well + List notes = this.getSKOSAnnotationValues(skosConcept + .getSKOSAnnotationsByURI(dataset, new URI(this.SKOSNotePropertyURI))); + + concept.setDefinition(StringUtils.join(notes, ",")); + + // get the broader property URI + List broaderURIList = this.getSKOSAnnotationValues(skosConcept + .getSKOSAnnotationsByURI(dataset, new URI(this.SKOSBroaderURI))); + concept.setBroaderURIList(broaderURIList); + + // get the narrower property URI + List narrowerURIList = this.getSKOSAnnotationValues(skosConcept + .getSKOSAnnotationsByURI(dataset, new URI(this.SKOSNarrowerURI))); + concept.setNarrowerURIList(narrowerURIList); + + // exact match + List exactMatchURIList = this.getSKOSAnnotationValues(skosConcept + .getSKOSAnnotationsByURI(dataset, + new URI(this.SKOSExactMatchURI))); + concept.setExactMatchURIList(exactMatchURIList); + + // close match + List closeMatchURIList = this.getSKOSAnnotationValues(skosConcept + .getSKOSAnnotationsByURI(dataset, + new URI(this.SKOSCloseMatchURI))); + concept.setCloseMatchURIList(closeMatchURIList); + log.debug("add concept to list"); + } catch (Exception ex) { + log.debug("Exception occurred for -" + skosConcept.getURI() + + "- " + ex.getMessage(), ex); + return null; + } + return concept; + } + + + private List getSKOSLiteralValues(Set skosLiterals) { + String lang = ""; + List literalValues = new ArrayList(); + for (SKOSLiteral literal : skosLiterals) { + if(literal != null) { + if (!literal.isTyped()) { + // if it has language + SKOSUntypedLiteral untypedLiteral = literal + .getAsSKOSUntypedLiteral(); + if (untypedLiteral.hasLang()) { + lang = untypedLiteral.getLang(); + } else { + lang = ""; + } + } + // log.debug("literal: "+ literal.getLiteral()); + if (lang.equals("en")) { + log.debug("literal value: " + literal.getLiteral()); + literalValues.add(literal.getLiteral()); + } + } else { + log.debug("Literal returned was null so was ignored"); + } + } + return literalValues; + } + + //For a given set of annotations (for example, for a specific property) + private List getSKOSAnnotationValues(Set skosAnnotations) { + List valuesList = new ArrayList(); + for (SKOSAnnotation annotation : skosAnnotations) { + String value = this.getSKOSAnnotationStringValue(annotation); + valuesList.add(value); + } + return valuesList; + } + + //Get string value for annotation + private String getSKOSAnnotationStringValue(SKOSAnnotation annotation) { + String value = new String(); + if (annotation.isAnnotationByConstant()) { + SKOSLiteral literal = annotation + .getAnnotationValueAsConstant(); + value = literal.getLiteral(); + log.debug("broder uri: " + value); + } else { + // annotation is some resource + SKOSEntity entity = annotation.getAnnotationValue(); + value = entity.getURI().toString(); + } + return value; + } + + //this method relies on the XML of the single SKOS rdf concept in case the SKOS api throws a null pointer exception + private Concept createConceptUsingXML(Concept concept, String bestMatch, + SKOSConcept skosConcept) { + String conceptUriString = skosConcept.getURI().toString() + this.skosSuffix;; + + URL conceptURL = null; + try { + conceptURL = new URL(conceptUriString); + } catch (Exception e) { + log.error("Exception occurred in instantiating URL for " + conceptUriString, e); + //If the url is having trouble, just return null for the concept + return null; + } + log.debug("loading concept uri " + conceptUriString); + + + String results = null; + try { + + StringWriter sw = new StringWriter(); + + + BufferedReader in = new BufferedReader(new InputStreamReader( + conceptURL.openStream())); + String inputLine; + while ((inputLine = in.readLine()) != null) { + sw.write(inputLine); + } + in.close(); + + results = sw.toString(); + log.debug(results); + } catch (Exception ex) { + log.error("Error occurred in getting concept from the URL " + conceptUriString, ex); + return null; + } + + + try { + Document doc = XMLUtils.parse(results); + List labelLiterals = this.getValuesFromXMLNodes(doc, "skos:prefLabel", null); + if(labelLiterals.size() > 0) { + concept.setLabel(labelLiterals.get(0)); + } else { + //This is an error because there should be at least one label returned + log.debug("The number of preferred labels is not greater than zero"); + } + List altLabelList = this.getValuesFromXMLNodes(doc, "skos:altLabel", null); + concept.setAltLabelList(altLabelList); + + List broaderURIList = this.getValuesFromXMLNodes(doc, "skos:broader", "rdf:resource"); + concept.setBroaderURIList(broaderURIList); + List narrowerURIList = this.getValuesFromXMLNodes(doc, "skos:narrower", "rdf:resource"); + concept.setNarrowerURIList(narrowerURIList); + + List exactMatchURIList = this.getValuesFromXMLNodes(doc, "skos:exactMatch", "rdf:resource"); + concept.setExactMatchURIList(exactMatchURIList); + List closeMatchURIList = this.getValuesFromXMLNodes(doc, "skos:closeMatch", "rdf:resource"); + concept.setCloseMatchURIList(closeMatchURIList); + + + } catch (IOException e) { + log.error("error occurred in parsing " + results, e); + } catch (SAXException e) { + log.error("error occurred in parsing " + results, e); + } catch (ParserConfigurationException e) { + log.error("error occurred in parsing " + results, e); + } + + return concept; + + } + + private String getSKOSURI(String uri) { + // Strip .xml at the end and replace with .skos.rdf + String skosURI = uri; + if (uri.endsWith(".xml")) { + skosURI = uri.substring(0, uri.length() - 4); + skosURI += skosSuffix; + } + return hostUri + skosURI; + } + + public List getConceptURISFromJSON(String results) { + List uris = new ArrayList(); + try { + JSONObject json = (JSONObject) JSONSerializer.toJSON(results); + log.debug(json.toString()); + // Get atom entry elements + + } catch (Exception ex) { + log.error("Could not get concepts", ex); + throw ex; + } + return uris; + + } + + protected List getConceptURIFromXML(String rdf) { + List uris = new ArrayList(); + String conceptUri = new String(); + try { + Document doc = XMLUtils.parse(rdf); + NodeList nodes = doc.getElementsByTagName("search:result"); + int len = nodes.getLength(); + int i; + for (i = 0; i < len; i++) { + Node node = nodes.item(i); + NamedNodeMap attrs = node.getAttributes(); + Attr idAttr = (Attr) attrs.getNamedItem("uri"); + conceptUri = idAttr.getTextContent(); + log.debug("concept uri is " + conceptUri); + uris.add(conceptUri); + } + + } catch (IOException e) { + log.error("error occurred in parsing " +rdf, e); + } catch (SAXException e) { + log.error("error occurred in parsing " +rdf, e); + } catch (ParserConfigurationException e) { + log.error("error occurred in parsing " +rdf, e); + + } + return uris; + + } + + public List processResults(String term) throws Exception { + return getConcepts(term); + } + + /** + * @param uri + * @return + */ + protected String stripConceptId(String uri) { + String conceptId = new String(); + int lastslash = uri.lastIndexOf('/'); + conceptId = uri.substring(lastslash + 1, uri.length()); + return conceptId; + } + + /** + * @param str + * @return + */ + protected String extractConceptId(String str) { + try { + return str.substring(1, str.length() - 1); + } catch (Exception ex) { + log.error("Exception occurred in extracting concept id for " + str, ex); + return ""; + } + } + + @Override + public List getConceptsByURIWithSparql(String uri) + throws Exception { + // TODO Auto-generated method stub + return null; + } + + + + + public List getValuesFromXMLNodes(Document doc, String tagName, String attributeName) { + NodeList nodes = doc.getElementsByTagName(tagName); + + return getValuesFromXML(nodes, attributeName); + } + + //Returns list of values based on nodes and whether or not a specific attribute name should be used or just the text content + public List getValuesFromXML(NodeList nodes, String attributeName) { + int len = nodes.getLength(); + int i; + List values = new ArrayList(); + for (i = 0; i < len; i++) { + Node node = nodes.item(i); + if(attributeName != null && !attributeName.isEmpty()) { + NamedNodeMap attrs = node.getAttributes(); + Attr a = (Attr)attrs.getNamedItem(attributeName); + if(a != null) { + values.add(a.getTextContent()); + } + } else { + values.add(node.getTextContent()); + } + } + return values; + } + + + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/GeoFocusMapLocations.java b/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/GeoFocusMapLocations.java index d7f4de81..00055c34 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/GeoFocusMapLocations.java +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/GeoFocusMapLocations.java @@ -45,7 +45,7 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder { + " FILTER (NOT EXISTS {?location a core:StateOrProvince}) \n" + "} UNION { \n" + " ?location rdf:type core:GeographicRegion . \n" - + " ?location core:geographicallyContains ?sublocation . \n" + + " ?location ?sublocation . \n" + " ?location rdfs:label ?label . \n" + " ?sublocation core:geographicFocusOf ?person . \n" + " ?person rdf:type foaf:Person \n" diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java index a867a91e..7162b85e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java @@ -17,8 +17,16 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.hp.hpl.jena.ontology.OntModel; +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.rdf.model.Literal; import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.Resource; +import com.hp.hpl.jena.vocabulary.OWL; import com.hp.hpl.jena.vocabulary.RDF; import com.hp.hpl.jena.vocabulary.RDFS; import com.hp.hpl.jena.vocabulary.XSD; @@ -34,6 +42,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUti import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.AddAssociatedConceptsPreprocessor; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.ConceptSemanticTypesPreprocessor; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.utils.ConceptSearchService.ConceptSearchServiceUtils; /** @@ -50,13 +59,14 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements //TODO: Set this to a dynamic mechanism private static String VIVOCore = "http://vivoweb.org/ontology/core#"; private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept"; + private static String SKOSBroaderURI = "http://www.w3.org/2004/02/skos/core#broader"; + private static String SKOSNarrowerURI = "http://www.w3.org/2004/02/skos/core#narrower"; @Override public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); initBasics(editConfiguration, vreq); initPropertyParameters(vreq, session, editConfiguration); initObjectPropForm(editConfiguration, vreq); - editConfiguration.setTemplate(template); setVarNames(editConfiguration); @@ -86,7 +96,10 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements setTemplate(editConfiguration, vreq); // No validators required here // Add preprocessors - addPreprocessors(editConfiguration, ModelAccess.on(vreq).getJenaOntModel()); + //Passing from servlet context for now but will have to see if there's a way to pass vreq + addPreprocessors(editConfiguration, + ModelAccess.on(session.getServletContext()).getJenaOntModel(), + ModelAccess.on(session.getServletContext()).getWebappDaoFactory()); // Adding additional data, specifically edit mode addFormSpecificData(editConfiguration, vreq); // One override for basic functionality, changing url pattern @@ -178,7 +191,11 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements "?conceptNode <" + RDFS.isDefinedBy.getURI() + "> ?conceptSource .", "?conceptNode <" + RDF.type + "> ?conceptSemanticTypeURI ." + "?conceptSemanticTypeURI <" + RDFS.label.getURI() + "> ?conceptSemanticTypeLabel ." + - "?conceptSemanticTypeURI <" + RDFS.subClassOf + "> <" + SKOSConceptType + "> ." + "?conceptSemanticTypeURI <" + RDFS.subClassOf + "> <" + SKOSConceptType + "> .", + "?conceptNode <" + this.SKOSNarrowerURI + "> ?conceptNarrowerURI ." + + "?conceptNarrowerURI <" + this.SKOSBroaderURI + "> ?conceptNode .", + "?conceptNode <" + this.SKOSBroaderURI + "> ?conceptBroaderURI ." + + "?conceptBroaderURI <" + this.SKOSNarrowerURI + "> ?conceptNode ." ); } @@ -243,6 +260,8 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements urisOnForm.add("conceptNode"); urisOnForm.add("conceptSource"); urisOnForm.add("conceptSemanticTypeURI"); + urisOnForm.add("conceptBroaderURI"); + urisOnForm.add("conceptNarrowerURI"); editConfiguration.setUrisOnform(urisOnForm); //Also need to add the label of the concept literalsOnForm.add("conceptLabel"); @@ -277,8 +296,23 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements setVocabURIField(editConfiguration, vreq); setConceptSemanticTypeURIField(editConfiguration,vreq); setConceptSemanticTypeLabelField(editConfiguration,vreq); + setConceptBroaderURIField(editConfiguration, vreq); + setConceptNarrowerURIField(editConfiguration, vreq); } + private void setConceptNarrowerURIField( + EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + editConfiguration.addField(new FieldVTwo(). + setName("conceptNarrowerURI")); + } + + private void setConceptBroaderURIField( + EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + editConfiguration.addField(new FieldVTwo(). + setName("conceptBroaderURI")); + + } + //this field will be hidden and include the concept node URI private void setConceptNodeField(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { @@ -324,14 +358,15 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements //Add preprocessor - private void addPreprocessors(EditConfigurationVTwo editConfiguration, OntModel ontModel) { + private void addPreprocessors(EditConfigurationVTwo editConfiguration) { //An Edit submission preprocessor for enabling addition of multiple terms for a single search //TODO: Check if this is the appropriate way of getting model //Passing model to check for any URIs that are present editConfiguration.addEditSubmissionPreprocessor( - new AddAssociatedConceptsPreprocessor(editConfiguration, ontModel)); + new AddAssociatedConceptsPreprocessor(editConfiguration)); + editConfiguration.addModelChangePreprocessor(new ConceptSemanticTypesPreprocessor()); } @@ -383,48 +418,49 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements } + //To determine whether or not a concept is a user generated or one from an external vocab source. + //we cannot rely on whether or not it is a skos concept because incorporating UMLS semantic network classes as + //SKOS concept subclasses means that even concepts from an external vocab source might be considered SKOS concepts + //Instead, we will simply determine whether a concept is defined by an external vocabulary source and use that + //as the primary indicator of whether a concept is from an external vocabulary source or a user generated concept private List getAssociatedConceptInfo( List concepts, VitroRequest vreq) { List info = new ArrayList(); for ( Individual conceptIndividual : concepts ) { - boolean isSKOSConcept = false; + boolean userGenerated = true; + //Note that this isn't technically String conceptUri = conceptIndividual.getURI(); String conceptLabel = conceptIndividual.getName(); - //Check if SKOS Concept type - List osl = conceptIndividual.getObjectPropertyStatements(RDF.type.getURI()); - for(ObjectPropertyStatement os: osl) { - if(os.getObjectURI().equals(SKOSConceptType)) { - isSKOSConcept = true; - break; - } - } + //Check if defined by an external vocabulary source + List vocabList = conceptIndividual.getObjectPropertyStatements(RDFS.isDefinedBy.getURI()); + String vocabSource = null; + String vocabLabel = null; + if(vocabList != null && vocabList.size() > 0) { + userGenerated = false; + vocabSource = vocabList.get(0).getObjectURI(); + Individual sourceIndividual = EditConfigurationUtils.getIndividual(vreq, vocabSource); + //Assuming name will get label + vocabLabel = sourceIndividual.getName(); + } + - if(isSKOSConcept) { + + if(userGenerated) { //if the concept in question is skos - which would imply a user generated concept info.add(new AssociatedConceptInfo(conceptLabel, conceptUri, null, null, SKOSConceptType, null, null)); } else { - //Get the vocab source and vocab label - List vocabList = conceptIndividual.getObjectPropertyStatements(RDFS.isDefinedBy.getURI()); - String vocabSource = null; - String vocabLabel = null; - if(vocabList != null && vocabList.size() > 0) { - vocabSource = vocabList.get(0).getObjectURI(); - Individual sourceIndividual = EditConfigurationUtils.getIndividual(vreq, vocabSource); - //Assuming name will get label - vocabLabel = sourceIndividual.getName(); - } String conceptSemanticTypeURI = null; String conceptSemanticTypeLabel = null; //Can a concept have multiple semantic types? Currently we are only returning the first one - - List semanticTypeStatements = conceptIndividual.getObjectPropertyStatements(VIVOCore + "hasConceptSemanticType"); - if(semanticTypeStatements.size() > 0) { - conceptSemanticTypeURI = semanticTypeStatements.get(0).getObjectURI(); - Individual conceptSemanticTypeIndividual = EditConfigurationUtils.getIndividual(vreq, conceptSemanticTypeURI); - conceptSemanticTypeLabel = conceptSemanticTypeIndividual.getName(); - } - //get label + //TODO: Change this into a sparql query that returns all types for the concept that are subclasses of SKOS concepts + HashMap typeAndLabel = this.getConceptSemanticTypeQueryResults(conceptIndividual.getURI(), ModelAccess.on(vreq).getJenaOntModel()); + if(typeAndLabel.containsKey("semanticTypeURI")) { + conceptSemanticTypeURI = typeAndLabel.get("semanticTypeURI"); + } + if(typeAndLabel.containsKey("semanticTypeLabel")) { + conceptSemanticTypeLabel = typeAndLabel.get("semanticTypeLabel"); + } //Assuming this is from an external vocabulary source info.add(new AssociatedConceptInfo(conceptLabel, conceptUri, vocabSource, vocabLabel, null, conceptSemanticTypeURI, conceptSemanticTypeLabel)); @@ -434,6 +470,44 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements return info; } + private HashMap getConceptSemanticTypeQueryResults(String conceptURI, OntModel ontModel) { + HashMap typeAndLabel = new HashMap(); + String queryStr = "SELECT ?semanticTypeURI ?semanticTypeLabel WHERE { " + + "<" + conceptURI + "> <" + RDF.type.getURI() + "> ?semanticTypeURI . " + + "?semanticTypeURI <" + RDFS.subClassOf.getURI() + "> <" + this.SKOSConceptType + ">. " + + "?semanticTypeURI <" + RDFS.label.getURI() + "> ?semanticTypeLabel ." + + "}"; + QueryExecution qe = null; + try{ + Query query = QueryFactory.create(queryStr); + qe = QueryExecutionFactory.create(query, ontModel); + ResultSet results = null; + results = qe.execSelect(); + + while( results.hasNext()){ + QuerySolution qs = results.nextSolution(); + if(qs.get("semanticTypeURI") != null) { + Resource semanticTypeURI = qs.getResource("semanticTypeURI"); + log.debug("Semantic Type URI returned " + semanticTypeURI.getURI()); + typeAndLabel.put("semanticTypeURI", semanticTypeURI.getURI()); + } + if(qs.get("semanticTypeLabel") != null) { + Literal semanticTypeLabel = qs.getLiteral("semanticTypeLabel"); + log.debug("Semantic Type label returned " + semanticTypeLabel.getString()); + typeAndLabel.put("semanticTypeLabel", semanticTypeLabel.getString()); + } + + + } + }catch(Exception ex){ + throw new Error("Error in executing query string: \n" + queryStr + '\n' + ex.getMessage()); + }finally{ + if( qe != null) + qe.close(); + } + return typeAndLabel; + } + public class AssociatedConceptInfo { private String conceptLabel; private String conceptURI; 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..1f8227cf 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 @@ -8,9 +8,16 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import javax.servlet.http.HttpSession; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.RDFNode; import com.hp.hpl.jena.rdf.model.Literal; import com.hp.hpl.jena.vocabulary.RDFS; import com.hp.hpl.jena.vocabulary.XSD; @@ -19,6 +26,7 @@ import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyComparator; import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.PublicationHasAuthorValidator; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; @@ -33,6 +41,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators. * It is intended to always be an add, and never an update. */ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator implements EditConfigurationGenerator { + public static Log log = LogFactory.getLog(AddAuthorsToInformationResourceGenerator.class); @Override public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, @@ -58,6 +67,8 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator editConfiguration.addNewResource("authorshipUri", DEFAULT_NS_TOKEN); editConfiguration.addNewResource("newPerson", DEFAULT_NS_TOKEN); editConfiguration.addNewResource("newOrg", DEFAULT_NS_TOKEN); + editConfiguration.addNewResource("vcardPerson", DEFAULT_NS_TOKEN); + editConfiguration.addNewResource("vcardName", DEFAULT_NS_TOKEN); //In scope setUrisAndLiteralsInScope(editConfiguration, vreq); @@ -101,8 +112,8 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator private String getN3NewAuthorship() { return getN3PrefixString() + "?authorshipUri a core:Authorship ;\n" + - " core:linkedInformationResource ?infoResource .\n" + - "?infoResource core:informationResourceInAuthorship ?authorshipUri ."; + " core:relates ?infoResource .\n" + + "?infoResource core:relatedBy ?authorshipUri ."; } private String getN3AuthorshipRank() { @@ -128,45 +139,63 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator private String getN3NewPersonFirstName() { return getN3PrefixString() + - "?newPerson foaf:firstName ?firstName ."; + "@prefix vcard: . \n" + + "?newPerson ?vcardPerson . \n" + + "?vcardPerson ?newPerson . \n" + + "?vcardPerson a . \n" + + "?vcardPerson vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:givenName ?firstName ."; } private String getN3NewPersonMiddleName() { return getN3PrefixString() + - "?newPerson core:middleName ?middleName ."; + "@prefix vcard: . \n" + + "?newPerson ?vcardPerson . \n" + + "?vcardPerson ?newPerson . \n" + + "?vcardPerson a . \n" + + "?vcardPerson vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:middleName ?middleName ."; } private String getN3NewPersonLastName() { return getN3PrefixString() + - "?newPerson foaf:lastName ?lastName ."; + "@prefix vcard: . \n" + + "?newPerson ?vcardPerson . \n" + + "?vcardPerson ?newPerson . \n" + + "?vcardPerson a . \n" + + "?vcardPerson vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:familyName ?lastName ."; } private String getN3NewPerson() { 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 @@ -177,6 +206,8 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator HashMap newResources = new HashMap(); newResources.put("authorshipUri", DEFAULT_NS_TOKEN); newResources.put("newPerson", DEFAULT_NS_TOKEN); + newResources.put("vcardPerson", DEFAULT_NS_TOKEN); + newResources.put("vcardName", DEFAULT_NS_TOKEN); newResources.put("newOrg", DEFAULT_NS_TOKEN); return newResources; } @@ -245,7 +276,6 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setValidators(list("datatype:" + XSD.xstring.toString())). setRangeDatatypeUri(XSD.xstring.toString()) ); - } @@ -255,7 +285,6 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setValidators(list("datatype:" + XSD.xstring.toString())). setRangeDatatypeUri(XSD.xstring.toString()) ); - } @@ -265,20 +294,14 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setValidators(list("datatype:" + XSD.xstring.toString())). setRangeDatatypeUri(XSD.xstring.toString()) ); - } - - - - private void setLastNameField(EditConfigurationVTwo editConfiguration) { editConfiguration.addField(new FieldVTwo(). setName("lastName"). setValidators(list("datatype:" + XSD.xstring.toString())). setRangeDatatypeUri(XSD.xstring.toString()) ); - } private void setRankField(EditConfigurationVTwo editConfiguration) { @@ -287,7 +310,6 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setValidators(list("nonempty")). setRangeDatatypeUri(XSD.xint.toString()) ); - } @@ -296,7 +318,6 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setName("personUri") //.setObjectClassUri(personClass) ); - } private void setOrgUriField(EditConfigurationVTwo editConfiguration) { @@ -304,78 +325,131 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator setName("orgUri") //.setObjectClassUri(personClass) ); - } + private void setOrgNameField(EditConfigurationVTwo editConfiguration) { editConfiguration.addField(new FieldVTwo(). setName("orgName"). setValidators(list("datatype:" + XSD.xstring.toString())). setRangeDatatypeUri(XSD.xstring.toString()) ); - } + //Form specific data public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { HashMap formSpecificData = new HashMap(); //Get the existing authorships - formSpecificData.put("existingAuthorInfo", getExistingAuthorships(vreq)); - formSpecificData.put("newRank", getMaxRank(vreq) + 1); - formSpecificData.put("rankPredicate", authorRankPredicate); + formSpecificData.put("existingAuthorInfo", getExistingAuthorships(editConfiguration.getSubjectUri(), vreq)); + formSpecificData.put("newRank", getMaxRank(editConfiguration.getSubjectUri(), vreq) + 1); + formSpecificData.put("rankPredicate", "http://vivoweb.org/ontology/core#rank"); editConfiguration.setFormSpecificData(formSpecificData); } - - private List getExistingAuthorships(VitroRequest vreq) { - Individual infoResource = EditConfigurationUtils.getSubjectIndividual(vreq); - List authorships = infoResource.getRelatedIndividuals( - EditConfigurationUtils.getPredicateUri(vreq)); - //TODO: Check if sorted correctly - sortAuthorshipIndividuals(authorships); - - return getAuthorshipInfo(authorships); - } + + private static String AUTHORSHIPS_QUERY = "" + + "PREFIX core: \n" + + "PREFIX afn: \n" + + "PREFIX rdfs: \n" + + "PREFIX foaf: \n" + + "SELECT ?authorshipURI (afn:localname(?authorshipURI) AS ?authorshipName) ?authorURI ?authorName ?rank \n" + + "WHERE { \n" + + "?subject core:relatedBy ?authorshipURI . \n" + + "?authorshipURI a core:Authorship . \n" + + "?authorshipURI core:relates ?authorURI . \n" + + "?authorURI a foaf:Person . \n" + + "OPTIONAL { ?authorURI rdfs:label ?authorName } \n" + + "OPTIONAL { ?authorshipURI core:rank ?rank } \n" + + "} ORDER BY ?rank"; + + + private List getExistingAuthorships(String subjectUri, VitroRequest vreq) { + + String queryStr = QueryUtils.subUriForQueryVar(this.getAuthorshipsQuery(), "subject", subjectUri); + log.debug("Query string is: " + queryStr); + List> authorships = new ArrayList>(); + try { + ResultSet results = QueryUtils.getQueryResults(queryStr, vreq); + while (results.hasNext()) { + QuerySolution soln = results.nextSolution(); + RDFNode node = soln.get("authorshipURI"); + if (node.isURIResource()) { + authorships.add(QueryUtils.querySolutionToStringValueMap(soln)); + } + } + } catch (Exception e) { + log.error(e, e); + } + log.debug("authorships = " + authorships); + return getAuthorshipInfo(authorships); + } + + private static String MAX_RANK_QUERY = "" + + "PREFIX core: \n" + + "SELECT DISTINCT ?rank WHERE { \n" + + " ?subject core:relatedBy ?authorship . \n" + + " ?authorship a core:Authorship . \n" + + " ?authorship core:rank ?rank .\n" + + "} ORDER BY DESC(?rank) LIMIT 1"; + + private int getMaxRank(String subjectUri, VitroRequest vreq) { + + int maxRank = 0; // default value + String queryStr = QueryUtils.subUriForQueryVar(this.getMaxRankQueryStr(), "subject", subjectUri); + log.debug("maxRank query string is: " + queryStr); + try { + ResultSet results = QueryUtils.getQueryResults(queryStr, vreq); + if (results != null && results.hasNext()) { // there is at most one result + QuerySolution soln = results.next(); + RDFNode node = soln.get("rank"); + if (node != null && node.isLiteral()) { + // node.asLiteral().getInt() won't return an xsd:string that + // can be parsed as an int. + int rank = Integer.parseInt(node.asLiteral().getLexicalForm()); + if (rank > maxRank) { + log.debug("setting maxRank to " + rank); + maxRank = rank; + } + } + } + } catch (NumberFormatException e) { + log.error("Invalid rank returned from query: not an integer value."); + } catch (Exception e) { + log.error(e, e); + } + log.debug("maxRank is: " + maxRank); + return maxRank; + } private List getAuthorshipInfo( - List authorships) { + List> authorships) { List info = new ArrayList(); - for ( Individual authorship : authorships ) { - String authorshipUri = authorship.getURI(); - String authorshipName = authorship.getName(); - String authorUri = ""; - String authorName = ""; - Individual author = authorship.getRelatedIndividual(linkedAuthorPredicate); - if(author != null) { - authorUri = author.getURI(); - authorName = author.getName(); - } - AuthorshipInfo aaInfo = new AuthorshipInfo(authorshipUri, authorshipName, authorUri, authorName); - info.add(aaInfo); + String authorshipUri = ""; + String authorshipName = ""; + String authorUri = ""; + String authorName = ""; + + for ( Map authorship : authorships ) { + for (Entry entry : authorship.entrySet() ) { + if ( entry.getKey().equals("authorshipURI") ) { + authorshipUri = entry.getValue(); + } + else if ( entry.getKey().equals("authorshipName") ) { + authorshipName = entry.getValue(); + } + else if ( entry.getKey().equals("authorURI") ) { + authorUri = entry.getValue(); + } + else if ( entry.getKey().equals("authorName") ) { + authorName = entry.getValue(); + } + } + + AuthorshipInfo aaInfo = new AuthorshipInfo(authorshipUri, authorshipName, authorUri, authorName); + info.add(aaInfo); } + log.debug("info = " + info); return info; } - private int getMaxRank(VitroRequest vreq) { - Individual infoResource = EditConfigurationUtils.getSubjectIndividual(vreq); - List authorships = infoResource.getRelatedIndividuals( - EditConfigurationUtils.getPredicateUri(vreq)); - sortAuthorshipIndividuals(authorships); - int maxRank = 0; - for(Individual authorship: authorships) { - DataPropertyStatement rankStmt = authorship.getDataPropertyStatement(authorRankPredicate); - if (rankStmt != null) { - maxRank = Integer.parseInt(rankStmt.getData()); - } - } - return maxRank; - } - - - - - private void sortAuthorshipIndividuals(List authorships) { - DataPropertyComparator comp = new DataPropertyComparator(authorRankPredicate); - Collections.sort(authorships, comp); - } - //This is the information about authors the form will require public class AuthorshipInfo { //This is the authorship node information @@ -416,4 +490,12 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator static final String DEFAULT_NS_TOKEN=null; //null forces the default NS + protected String getMaxRankQueryStr() { + return MAX_RANK_QUERY; + } + + protected String getAuthorshipsQuery() { + return AUTHORSHIPS_QUERY; + } + } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddClinicalRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddClinicalRoleToPersonGenerator.java index 68bc2fd3..96c73793 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddClinicalRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddClinicalRoleToPersonGenerator.java @@ -1,61 +1,61 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.HashMap; - -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; - -public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private static String template = "addClinicalRoleToPerson.ftl"; - - //Should this be overridden - @Override - String getTemplate() { - return template; - } - - @Override - String getRoleType() { - return "http://vivoweb.org/ontology/core#ClinicalRole"; - } - - /** Clinical role involves hard-coded options for the "right side" of the role or activity. */ - @Override - FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { - return new ConstantFieldOptions( - "", "Select one", - "http://vivoweb.org/ontology/core#Project", "Project", - "http://vivoweb.org/ontology/core#Service", "Service" - ); - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - @Override - boolean isShowRoleLabelField(){ - return true; - } - - - /* - * Use the methods below to change the date/time precision in the - * custom form associated with this generator. When not used, the - * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, - * MINUTE, TIME and NONE. - */ - /* - public String getStartDatePrecision() { - String precision = VitroVocabulary.Precision.MONTH.uri(); - return precision; - } - - public String getEndDatePrecision() { - String precision = VitroVocabulary.Precision.DAY.uri(); - return precision; - } - */ - -} +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.HashMap; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; + +public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { + + private static String template = "addClinicalRoleToPerson.ftl"; + + //Should this be overridden + @Override + String getTemplate() { + return template; + } + + @Override + String getRoleType() { + return "http://vivoweb.org/ontology/core#ClinicalRole"; + } + + /** Clinical role involves hard-coded options for the "right side" of the role or activity. */ + @Override + FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { + return new ConstantFieldOptions( + "", "Select one", + "http://vivoweb.org/ontology/core#Project", "Project", + "http://purl.obolibrary.org/obo/ERO_0000005", "Service" + ); + } + + //isShowRoleLabelField remains true for this so doesn't need to be overwritten + @Override + boolean isShowRoleLabelField(){ + return true; + } + + + /* + * Use the methods below to change the date/time precision in the + * custom form associated with this generator. When not used, the + * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, + * MINUTE, TIME and NONE. + */ + /* + public String getStartDatePrecision() { + String precision = VitroVocabulary.Precision.MONTH.uri(); + return precision; + } + + public String getEndDatePrecision() { + String precision = VitroVocabulary.Precision.DAY.uri(); + return precision; + } + */ + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditWebpageFormGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditWebpageFormGenerator.java index b63fcc7d..c2b0b9a1 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditWebpageFormGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditWebpageFormGenerator.java @@ -39,7 +39,7 @@ Class: core:URLLink - the link to be added to the individual Data properties of core:URLLink: -core:linkURI +core:linkUrlPredicate core:linkAnchorText core:rank @@ -68,27 +68,32 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator initBasics(config, vreq); initPropertyParameters(vreq, session, config); initObjectPropForm(config, vreq); + String linkUri = getLinkUri(vreq); config.setVarNameForSubject("subject"); - config.setVarNameForObject("link"); + config.setVarNameForObject("vcard"); + config.addNewResource("vcard", DEFAULT_NS_FOR_NEW_RESOURCE); config.addNewResource("link", DEFAULT_NS_FOR_NEW_RESOURCE); config.setN3Required(list( this.getN3ForWebpage(), N3_FOR_URLTYPE )); config.setN3Optional(list( N3_FOR_ANCHOR, N3_FOR_RANK)); - config.addUrisInScope("webpageProperty", list( this.getWebpageProperty())); - config.addUrisInScope("inverseProperty", list( this.getWebpageOfProperty())); - config.addUrisInScope("linkClass", list( this.getURLLinkClass())); - config.addUrisInScope("linkURI", list( core + "linkURI" )); - config.addUrisInScope("linkAnchorPredicate", list( core + "linkAnchorText" )); + config.addUrisInScope("webpageProperty", list( "http://purl.obolibrary.org/obo/ARG_2000028" )); + config.addUrisInScope("inverseProperty", list( "http://purl.obolibrary.org/obo/ARG_2000029" )); + config.addUrisInScope("linkUrlPredicate", list( "http://www.w3.org/2006/vcard/ns#url" )); + config.addUrisInScope("linkLabelPredicate", list( "http://www.w3.org/2000/01/rdf-schema#label" )); config.addUrisInScope("rankPredicate", list( core + "rank")); + config.addSparqlForAdditionalUrisInScope("vcard", individualVcardQuery); + if ( config.isUpdate() ) { + config.addUrisInScope("link", list( linkUri )); + } config.setUrisOnForm("urlType"); - config.setLiteralsOnForm(list("url","anchor","rank")); + config.setLiteralsOnForm(list("url","label","rank")); config.addSparqlForExistingLiteral("url", URL_QUERY); - config.addSparqlForExistingLiteral("anchor", ANCHOR_QUERY); + config.addSparqlForExistingLiteral("label", ANCHOR_QUERY); config.addSparqlForExistingLiteral("rank", MAX_RANK_QUERY); config.addSparqlForExistingUris("urlType", URLTYPE_QUERY); @@ -101,10 +106,10 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator setName("urlType"). setValidators( list("nonempty") ). setOptions( - new ChildVClassesWithParent(this.getURLLinkClass()))); + new ChildVClassesWithParent("http://www.w3.org/2006/vcard/ns#URL"))); config.addField(new FieldVTwo(). - setName("anchor")); + setName("label")); config.addField(new FieldVTwo(). setName("rank"). @@ -133,16 +138,17 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator /* ********* N3 Assertions *********** */ static String N3_FOR_WEBPAGE = - "?subject ?webpageProperty ?link . \n"+ - "?link ?inverseProperty ?subject . \n"+ - "?link a ?linkClass . \n" + - "?link ?linkURI ?url ."; + "?subject ?webpageProperty ?vcard . \n"+ + "?vcard ?inverseProperty ?subject . \n"+ + "?vcard ?link ."+ + "?link a . \n" + + "?link ?linkUrlPredicate ?url ."; static String N3_FOR_URLTYPE = "?link a ?urlType ."; static String N3_FOR_ANCHOR = - "?link ?linkAnchorPredicate ?anchor ."; + "?link ?linkLabelPredicate ?label ."; static String N3_FOR_RANK = "?link ?rankPredicate ?rank ."; @@ -150,28 +156,35 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator /* *********** SPARQL queries for existing values ************** */ static String URL_QUERY = - "SELECT ?urlExisting WHERE { ?link ?linkURI ?urlExisting }"; + "SELECT ?urlExisting WHERE { ?link ?linkUrlPredicate ?urlExisting }"; static String URLTYPE_QUERY = "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + "SELECT ?linkClassExisting WHERE { ?link vitro:mostSpecificType ?linkClassExisting }"; static String ANCHOR_QUERY = - "SELECT ?anchorExisting WHERE { ?link ?linkAnchorPredicate ?anchorExisting }"; + "SELECT ?labelExisting WHERE { ?link ?linkLabelPredicate ?labelExisting }"; static String RANK_QUERY = "SELECT ?rankExisting WHERE { ?link ?rankPredicate ?rankExisting }"; static String core = "http://vivoweb.org/ontology/core#"; + static String individualVcardQuery = + "SELECT ?existingVcard WHERE { \n" + + "?subject ?existingVcard . \n" + + "}"; + /* Note on ordering by rank in sparql: if there is a non-integer value on a link, that will be returned, * since it's ranked highest. Preventing that would require getting all the ranks and sorting in Java, * throwing out non-int values. */ private static String MAX_RANK_QUERY = "" + "PREFIX core: \n" + + "PREFIX vcard: \n" + "SELECT DISTINCT ?rank WHERE { \n" - + " ?subject core:webpage ?link . \n" + + " ?subject ?vcard . \n" + + " ?vcard vcard:hasURL ?link . \n" + " ?link core:rank ?rank .\n" + "} ORDER BY DESC(?rank) LIMIT 1"; @@ -209,23 +222,10 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator return formTemplate; } - protected String getWebpageProperty() { - return core + "webpage"; - } - - protected String getWebpageOfProperty() { - return core + "webpageOf"; - } - protected String getMaxRankQueryStr() { return MAX_RANK_QUERY; } - - protected String getURLLinkClass() { - return core + "URLLink"; - } - protected String getN3ForWebpage() { return N3_FOR_WEBPAGE; } @@ -240,5 +240,9 @@ public class AddEditWebpageFormGenerator extends BaseEditConfigurationGenerator "&editForm=" + UrlBuilder.urlEncode(generatorName); } - + private String getLinkUri(VitroRequest vreq) { + String linkUri = vreq.getParameter("linkUri"); + + return linkUri; + } } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddFullNameToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddFullNameToPersonGenerator.java new file mode 100644 index 00000000..172d49ac --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddFullNameToPersonGenerator.java @@ -0,0 +1,130 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +public class AddFullNameToPersonGenerator extends VivoBaseGenerator implements + EditConfigurationGenerator { + private Log log = LogFactory.getLog(AddFullNameToPersonGenerator.class); + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, + HttpSession session) throws Exception { + + EditConfigurationVTwo conf = new EditConfigurationVTwo(); + + initBasics(conf, vreq); + initPropertyParameters(vreq, session, conf); + initObjectPropForm(conf, vreq); + String fullNameUri = getFullNameUri(vreq); + + conf.setTemplate("addFullNameToPerson.ftl"); + + conf.setVarNameForSubject("person"); + conf.setVarNameForPredicate("predicate"); + conf.setVarNameForObject("individualVcard"); + + conf.setN3Required( Arrays.asList( n3ForNewName ) ); + conf.setN3Optional( Arrays.asList( firstNameAssertion, middleNameAssertion, lastNameAssertion ) ); + + conf.addNewResource("fullName", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); + + conf.setLiteralsOnForm(Arrays.asList("firstName", "middleName", "lastName" )); + + conf.addSparqlForExistingLiteral("firstName", firstNameQuery); + conf.addSparqlForExistingLiteral("middleName", middleNameQuery); + conf.addSparqlForExistingLiteral("lastName", lastNameQuery); + conf.addSparqlForAdditionalUrisInScope("individualVcard", individualVcardQuery); + + if ( conf.isUpdate() ) { + HashMap> urisInScope = new HashMap>(); + urisInScope.put("fullName", Arrays.asList(new String[]{fullNameUri})); + conf.addUrisInScope(urisInScope); + } + + conf.addField( new FieldVTwo(). + setName("firstName") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("nonempty") )); + + conf.addField( new FieldVTwo(). + setName("middleName") + .setRangeDatatypeUri( XSD.xstring.toString()) ); + + conf.addField( new FieldVTwo(). + setName("lastName") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("nonempty") )); + + conf.addValidator(new AntiXssValidation()); + + prepare(vreq, conf); + return conf; + } + + /* N3 assertions */ + + final static String n3ForNewName = + "?person ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?person . \n" + + "?individualVcard ?fullName . \n" + + "?fullName a . " ; + + final static String firstNameAssertion = + "?fullName ?firstName ."; + + final static String middleNameAssertion = + "?fullName ?middleName ."; + + final static String lastNameAssertion = + "?fullName ?lastName ."; + + /* Queries for editing an existing entry */ + + final static String individualVcardQuery = + "SELECT ?existingIndividualVcard WHERE { \n" + + "?person ?existingIndividualVcard . \n" + + "}"; + + final static String firstNameQuery = + "SELECT ?existingFirstName WHERE {\n"+ + "?fullName ?existingFirstName . }"; + + final static String middleNameQuery = + "SELECT ?existingMiddleName WHERE {\n"+ + "?fullName ?existingMiddleName . }"; + + final static String lastNameQuery = + "SELECT ?existingLastName WHERE {\n"+ + "?fullName ?existingLastName . }"; + + private String getFullNameUri(VitroRequest vreq) { + String fullNameUri = vreq.getParameter("fullNameUri"); + + return fullNameUri; + } +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java index 4c0c0412..47d4d76c 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java @@ -1,753 +1,754 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.vivoweb.webapp.util.ModelUtils; - -import com.hp.hpl.jena.ontology.OntModel; -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.XSD; - -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; - -/** - * Custom form for adding a grant to an person for the predicates hasCo-PrincipalInvestigatorRole - and hasPrincipalInvestigatorRole. - -This is intended to create a set of statements like: - -?person core:hasPrincipalInvestigatorRole ?newRole. -?newRole rdf:type core:PrincipalInvestigatorRole ; - core:relatedRole ?someGrant . - - * - */ -public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator { - - private Log log = LogFactory.getLog(AddGrantRoleToPersonGenerator.class); - private String subjectUri = null; - private String predicateUri = null; - private String objectUri = null; - private String template = "addGrantRoleToPerson.ftl"; - - //Types of options to populate drop-down for types for the "right side" of the role - public static enum RoleActivityOptionTypes { - VCLASSGROUP, - CHILD_VCLASSES, - HARDCODED_LITERALS - }; - - @Override - public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { - EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); - - //process subject, predicate, object parameters - this.initProcessParameters(vreq, session, editConfiguration); - - //Assumes this is a simple case of subject predicate var - editConfiguration.setN3Required(this.generateN3Required(vreq)); - - //n3 optional - editConfiguration.setN3Optional(this.generateN3Optional(vreq)); - - //Todo: what do new resources depend on here? - //In original form, these variables start off empty - editConfiguration.setNewResources(generateNewResources(vreq)); - //In scope - this.setUrisAndLiteralsInScope(editConfiguration, vreq); - - //on Form - this.setUrisAndLiteralsOnForm(editConfiguration, vreq); - - editConfiguration.setFilesOnForm(new ArrayList()); - - //Sparql queries - this.setSparqlQueries(editConfiguration, vreq); - - //set fields - setFields(editConfiguration, vreq, EditConfigurationUtils.getPredicateUri(vreq)); - - // No need to put in session here b/c put in session within edit request dispatch controller instead - //placing in session depends on having edit key which is handled in edit request dispatch controller - // editConfiguration.putConfigInSession(editConfiguration, session); - - prepareForUpdate(vreq, session, editConfiguration); - - //Form title and submit label now moved to edit configuration template - //TODO: check if edit configuration template correct place to set those or whether - //additional methods here should be used and reference instead, e.g. edit configuration template could call - //default obj property form.populateTemplate or some such method - //Select from existing also set within template itself - setTemplate(editConfiguration, vreq); - //Set edit key - setEditKey(editConfiguration, vreq); - - //Add validators - editConfiguration.addValidator(new DateTimeIntervalValidationVTwo("startField","endField") ); - editConfiguration.addValidator(new AntiXssValidation()); - editConfiguration.addValidator(new AutocompleteRequiredInputValidator("existingGrant","grantLabel")); - //no preprocessors required here - //Adding additional data, specifically edit mode - addFormSpecificData(editConfiguration, vreq); - return editConfiguration; - } - - - - private void setEditKey(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - String editKey = EditConfigurationUtils.getEditKey(vreq); - editConfiguration.setEditKey(editKey); - } - - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - - } - - //Initialize setup: process parameters - //There will be specialized parameters as well, we may include them here or in a - //separate method - private void initProcessParameters(VitroRequest vreq, HttpSession session, EditConfigurationVTwo editConfiguration) { - String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); - - subjectUri = EditConfigurationUtils.getSubjectUri(vreq); - predicateUri = EditConfigurationUtils.getPredicateUri(vreq); - - editConfiguration.setFormUrl(formUrl); - - editConfiguration.setUrlPatternToReturnTo("/individual"); - - editConfiguration.setVarNameForSubject("person"); - editConfiguration.setSubjectUri(subjectUri); - editConfiguration.setEntityToReturnTo(subjectUri); - editConfiguration.setVarNameForPredicate("rolePredicate"); - editConfiguration.setPredicateUri(predicateUri); - //by definition, this is an object property - objectUri = EditConfigurationUtils.getObjectUri(vreq); - - this.processObjectPropForm(vreq, editConfiguration); - } - - private void processObjectPropForm(VitroRequest vreq, EditConfigurationVTwo editConfiguration) { - editConfiguration.setVarNameForObject("role"); - editConfiguration.setObject(objectUri); - //this needs to be set for the editing to be triggered properly, otherwise the 'prepare' method - //pretends this is a data property editing statement and throws an error - //TODO: Check if null in case no object uri exists but this is still an object property - } - - - /* - * N3 Required and Optional Generators as well as supporting methods - */ - - private String getPrefixesString() { - //TODO: Include dynamic way of including this - return "@prefix core: ."; - } - - //TODO: Check if single string or multiple strings - check rdfslabel form etc. for prefix - //processing - private List generateN3Required(VitroRequest vreq) { - List n3ForEdit = new ArrayList(); - String editString = getN3ForGrantRole(vreq); - n3ForEdit.add(editString); - return n3ForEdit; - } - - - private List generateN3Optional(VitroRequest vreq) { - List n3Optional = new ArrayList(); - //n3 for new grant - n3Optional.add(getN3ForNewGrant(vreq)); - //n3 for existing grant - n3Optional.add(getN3ForExistingGrant(vreq)); - //n3 for inverse - n3Optional.add("?role ?inverseRolePredicate ?person ."); - //N3ForStart - n3Optional.addAll(getN3ForStart()); - //N3 For End - n3Optional.addAll(getN3ForEnd()); - return n3Optional; - } - - public String getN3ForGrantRole(VitroRequest vreq) { - String editString = getPrefixesString(); - editString += "?person ?rolePredicate ?role ."; - editString += "?role a <" + getRoleType(vreq) + "> ."; - return editString; - } - - public String getN3ForNewGrant(VitroRequest vreq) { - String editString = getPrefixesString(); - editString += "?role <" + getRoleToGrantPredicate(vreq) + "> ?grant ."; - editString += "?grant a core:Grant . "; - editString += "?grant <" + getGrantToRolePredicate(vreq) + "> ?role ."; - editString += "?grant <" + RDFS.label.getURI() + "> ?grantLabel ."; - return editString; - } - - public String getN3ForExistingGrant(VitroRequest vreq) { - String editString = getPrefixesString(); - editString += "?role <" + getRoleToGrantPredicate(vreq) + "> ?existingGrant . "; - editString += "?existingGrant <" + getGrantToRolePredicate(vreq) + "> ?role ."; - return editString; - } - - //Method b/c used in two locations, n3 optional and n3 assertions - private List getN3ForStart() { - List n3ForStart = new ArrayList(); - n3ForStart.add("?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + - "?intervalNode <" + RDF.type.getURI() + "> <" + getIntervalTypeURI() + "> ." + - "?intervalNode <" + getIntervalToStartURI() + "> ?startNode ." + - "?startNode <" + RDF.type.getURI() + "> <" + getDateTimeValueTypeURI() + "> ." + - "?startNode <" + getDateTimeValueURI() + "> ?startField-value ." + - "?startNode <" + getDateTimePrecisionURI() + "> ?startField-precision ."); - return n3ForStart; - } - - private List getN3ForEnd() { - List n3ForEnd = new ArrayList(); - n3ForEnd.add("?role <" + getRoleToIntervalURI() + "> ?intervalNode . " + - "?intervalNode <" + RDF.type.getURI() + "> <" + getIntervalTypeURI() + "> ." + - "?intervalNode <" + getIntervalToEndURI() + "> ?endNode ." + - "?endNode <" + RDF.type.getURI() + "> <" + getDateTimeValueTypeURI() + "> ." + - "?endNode <" + getDateTimeValueURI() + "> ?endField-value ." + - "?endNode <" + getDateTimePrecisionURI() + "> ?endField-precision ."); - return n3ForEnd; - - } - - - /* - * Get new resources - */ - private Map generateNewResources(VitroRequest vreq) { - HashMap newResources = new HashMap(); - //TODO: Get default namespace - String defaultNamespace = vreq.getWebappDaoFactory().getDefaultNamespace(); - newResources.put("role", defaultNamespace + "individual"); - newResources.put("grant", defaultNamespace + "individual"); - newResources.put("intervalNode", defaultNamespace + "individual"); - newResources.put("startNode", defaultNamespace + "individual"); - newResources.put("endNode", defaultNamespace + "individual"); - return newResources; - } - - /* - * Set URIS and Literals In Scope and on form and supporting methods - */ - - private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - HashMap> urisInScope = new HashMap>(); - //note that at this point the subject, predicate, and object var parameters have already been processed - //these two were always set when instantiating an edit configuration object from json, - //although the json itself did not specify subject/predicate as part of uris in scope - urisInScope.put(editConfiguration.getVarNameForSubject(), - Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); - urisInScope.put(editConfiguration.getVarNameForPredicate(), - Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); - //Setting role type - urisInScope.put("roleType", - Arrays.asList(new String[]{getRoleType(vreq)})); - //Setting inverse role predicate - urisInScope.put("inverseRolePredicate", getInversePredicate(vreq)); - - editConfiguration.setUrisInScope(urisInScope); - //Uris in scope include subject, predicate, and object var - //literals in scope empty initially, usually populated by code in prepare for update - //with existing values for variables - editConfiguration.setLiteralsInScope(new HashMap>()); - } - - private List getInversePredicate(VitroRequest vreq) { - List inversePredicateArray = new ArrayList(); - ObjectProperty op = EditConfigurationUtils.getObjectProperty(vreq); - if(op != null && op.getURIInverse() != null) { - inversePredicateArray.add(op.getURIInverse()); - } - return inversePredicateArray; - } - - //n3 should look as follows - //?subject ?predicate ?objectVar - - private void setUrisAndLiteralsOnForm(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - List urisOnForm = new ArrayList(); - List literalsOnForm = new ArrayList(); - //add role activity and roleActivityType to uris on form - urisOnForm.add("grant"); - urisOnForm.add("existingGrant"); - editConfiguration.setUrisOnform(urisOnForm); - //activity label and role label are literals on form - literalsOnForm.add("grantLabel"); - literalsOnForm.add("grantLabelDisplay"); - editConfiguration.setLiteralsOnForm(literalsOnForm); - } - - - /** - * Set SPARQL Queries and supporting methods - */ - - - private void setSparqlQueries(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - //Sparql queries defining retrieval of literals etc. - editConfiguration.setSparqlForAdditionalLiteralsInScope(new HashMap()); - - Map urisInScope = new HashMap(); - editConfiguration.setSparqlForAdditionalUrisInScope(urisInScope); - - editConfiguration.setSparqlForExistingLiterals(generateSparqlForExistingLiterals(vreq)); - editConfiguration.setSparqlForExistingUris(generateSparqlForExistingUris(vreq)); - } - - - //Get page uri for object - private HashMap generateSparqlForExistingUris(VitroRequest vreq) { - HashMap map = new HashMap(); - //Queries for role activity, activity type query, interval node, start node, end node, start field precision, endfield precision - map.put("existingGrant", getExistingGrantQuery(vreq)); - map.put("intervalNode", getIntervalNodeQuery(vreq)); - map.put("startNode", getStartNodeQuery(vreq)); - map.put("endNode", getEndNodeQuery(vreq)); - map.put("startField-precision", getStartPrecisionQuery(vreq)); - map.put("endField-precision", getEndPrecisionQuery(vreq)); - return map; - } - - - - private String getEndPrecisionQuery(VitroRequest vreq) { - String query = "SELECT ?existingEndPrecision WHERE {" + - "?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ." + - "?intervalNode <" + getIntervalToEndURI() + "> ?endNode ." + - "?endNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> . " + - "?endNode <" + getDateTimePrecisionURI() + "> ?existingEndPrecision . }"; - return query; - } - - private String getStartPrecisionQuery(VitroRequest vreq) { - String query = "SELECT ?existingStartPrecision WHERE {" + - "?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ." + - "?intervalNode <" + getIntervalToStartURI() + "> ?startNode ." + - "?startNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> . " + - "?startNode <" + getDateTimePrecisionURI() + "> ?existingStartPrecision . }"; - return query; - } - - private String getEndNodeQuery(VitroRequest vreq) { - String query = "SELECT ?existingEndNode WHERE {"+ - "?role <" + getRoleToIntervalURI() + "> ?intervalNode ."+ - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ."+ - " ?intervalNode <" + getIntervalToEndURI() + "> ?existingEndNode . "+ - "?existingEndNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .}"; - return query; - } - - private String getStartNodeQuery(VitroRequest vreq) { - String query = "SELECT ?existingStartNode WHERE {"+ - "?role <" + getRoleToIntervalURI() + "> ?intervalNode ."+ - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ."+ - "?intervalNode <" + getIntervalToStartURI() + "> ?existingStartNode . "+ - "?existingStartNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .}"; - return query; - } - - private String getIntervalNodeQuery(VitroRequest vreq) { - String query = "SELECT ?existingIntervalNode WHERE { " + - "?role <" + getRoleToIntervalURI() + "> ?existingIntervalNode . " + - " ?existingIntervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> . }"; - return query; - } - - - - private HashMap generateSparqlForExistingLiterals(VitroRequest vreq) { - HashMap map = new HashMap(); - //Queries for activity label, role label, start Field value, end Field value - map.put("grantLabel", getGrantLabelQuery(vreq)); - map.put("startField-value", getExistingStartDateQuery(vreq)); - map.put("endField-value", getExistingEndDateQuery(vreq)); - return map; - } - - private String getGrantLabelQuery(VitroRequest vreq) { - String query = "PREFIX core: <" + getVivoCoreNamespace() + ">" + - "PREFIX rdfs: <" + RDFS.getURI() + "> \n"; - - String roleToGrantPredicate = getRoleToGrantPredicate(vreq); - query += "SELECT ?existingGrantLabel WHERE { \n" + - "?role <" + roleToGrantPredicate + "> ?existingGrant . \n" + - "?existingGrant rdfs:label ?existingGrantLabel . }"; - - return query; - } - - private String getExistingGrantQuery(VitroRequest vreq) { - String query = "PREFIX core: <" + getVivoCoreNamespace() + ">" + - "PREFIX rdfs: <" + RDFS.getURI() + "> \n"; - - String roleToGrantPredicate = getRoleToGrantPredicate(vreq); - query += "SELECT ?existingGrant WHERE { \n" + - "?role <" + roleToGrantPredicate + "> ?existingGrant . }"; - return query; - } - - private String getExistingEndDateQuery(VitroRequest vreq) { - String query = " SELECT ?existingEndDate WHERE {\n" + - "?role <" + getRoleToIntervalURI() + "> ?intervalNode .\n" + - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> .\n" + - "?intervalNode <" + getIntervalToEndURI() + "> ?endNode .\n" + - "?endNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .\n" + - "?endNode <" + getDateTimeValueURI() + "> ?existingEndDate . }"; - return query; - } - - private String getExistingStartDateQuery(VitroRequest vreq) { - String query = "SELECT ?existingDateStart WHERE {\n" + - "?role <" + getRoleToIntervalURI() + "> ?intervalNode .\n" + - "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> .\n" + - "?intervalNode <" + getIntervalToStartURI() + "> ?startNode .\n" + - "?startNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .\n" + - "?startNode <" + getDateTimeValueURI() + "> ?existingDateStart . }"; - - return query; - } - - /** - * - * Set Fields and supporting methods - */ - - private void setFields(EditConfigurationVTwo editConfiguration, VitroRequest vreq, String predicateUri) { - Map fields = new HashMap(); - //Multiple fields - getGrantField(editConfiguration, vreq, fields); - getGrantLabelField(editConfiguration, vreq, fields); - getGrantLabelDisplayField(editConfiguration, vreq, fields); - getExistingGrantField(editConfiguration, vreq, fields); - getStartField(editConfiguration, vreq, fields); - getEndField(editConfiguration, vreq, fields); - editConfiguration.setFields(fields); - } - - private void getGrantField(EditConfigurationVTwo editConfiguration, - VitroRequest vreq, Map fields) { - String fieldName = "grant"; - - FieldVTwo field = new FieldVTwo(); - field.setName(fieldName); - //queryForExisting is not being used anywhere in Field - - List validators = new ArrayList(); - field.setValidators(validators); - - fields.put(field.getName(), field); - - } - - private void getGrantLabelField(EditConfigurationVTwo editConfiguration, - VitroRequest vreq, Map fields) { - String fieldName = "grantLabel"; - //get range data type uri and range language - String stringDatatypeUri = XSD.xstring.toString(); - - FieldVTwo field = new FieldVTwo(); - field.setName(fieldName); - //queryForExisting is not being used anywhere in Field - - //Not really interested in validators here - List validators = new ArrayList(); - validators.add("datatype:" + stringDatatypeUri); - field.setValidators(validators); - - fields.put(field.getName(), field); - - } - - private void getGrantLabelDisplayField(EditConfigurationVTwo editConfiguration, - VitroRequest vreq, Map fields) { - - FieldVTwo field = new FieldVTwo(); - - String fieldName = "grantLabelDisplay"; - field.setName(fieldName); - - String stringDatatypeUri = XSD.xstring.toString(); - field.setRangeDatatypeUri(null); - - fields.put(field.getName(), field); - - } - //Need if returning from an invalid submission - private void getExistingGrantField( - EditConfigurationVTwo editConfiguration, VitroRequest vreq, - Map fields) { - String fieldName = "existingGrant"; - - FieldVTwo field = new FieldVTwo(); - field.setName(fieldName); - //queryForExisting is not being used anywhere in Field - - fields.put(field.getName(), field); - } - - private void getStartField(EditConfigurationVTwo editConfiguration, - VitroRequest vreq, Map fields) { - String fieldName = "startField"; - - FieldVTwo field = new FieldVTwo(); - field.setName(fieldName); - - //This logic was originally after edit configuration object created from json in original jsp - field.setEditElement( - new DateTimeWithPrecisionVTwo(field, - VitroVocabulary.Precision.YEAR.uri(), - VitroVocabulary.Precision.NONE.uri())); - - fields.put(field.getName(), field); - - } - - private void getEndField(EditConfigurationVTwo editConfiguration, - VitroRequest vreq, Map fields) { - String fieldName = "endField"; - - FieldVTwo field = new FieldVTwo(); - field.setName(fieldName); - - List validators = new ArrayList(); - field.setValidators(validators); - - //Set edit element - field.setEditElement( - new DateTimeWithPrecisionVTwo(field, - VitroVocabulary.Precision.YEAR.uri(), - VitroVocabulary.Precision.NONE.uri())); - - fields.put(field.getName(), field); - - } - - /** - * Prepare edit configuration for update - * @param vreq - * @param session - * @param editConfiguration - */ - - private void prepareForUpdate(VitroRequest vreq, HttpSession session, EditConfigurationVTwo editConfiguration) { - //Here, retrieve model from - OntModel model = ModelAccess.on(session.getServletContext()).getJenaOntModel(); - //Object property by definition - String objectUri = EditConfigurationUtils.getObjectUri(vreq); - if(objectUri != null) { - //update existing object - editConfiguration.prepareForObjPropUpdate(model); - } else { - //new object to be created - editConfiguration.prepareForNonUpdate( model ); - } - } - - /**Methods for checking edit mode ** - * - */ - public EditMode getEditMode(VitroRequest vreq) { - List roleToGrantPredicates = getPossibleRoleToGrantPredicates(); - return EditModeUtils.getEditMode(vreq, roleToGrantPredicates); - } - - private boolean isAddMode(VitroRequest vreq) { - return EditModeUtils.isAddMode(getEditMode(vreq)); - } - - private boolean isEditMode(VitroRequest vreq) { - return EditModeUtils.isEditMode(getEditMode(vreq)); - } - - private boolean isRepairMode(VitroRequest vreq) { - return EditModeUtils.isRepairMode(getEditMode(vreq)); - } - - /** - * Methods that are REQUIRED to be implemented in subclasses - **/ - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - String predicateUri = EditConfigurationUtils.getPredicateUri(vreq); - if(predicateUri.equals(getHasPrincipalInvestigatorURI())) { - return getVivoOntologyCoreNamespace() + "PrincipalInvestigatorRole"; - } - else if(predicateUri.equals(getHasCoPrincipalInvestigatorURI())) { - return getVivoOntologyCoreNamespace() + "CoPrincipalInvestigatorRole"; - } else { - return getVivoOntologyCoreNamespace() + "InvestigatorRole"; - } - } - - private Object getHasCoPrincipalInvestigatorURI() { - return getVivoOntologyCoreNamespace() + "hasCo-PrincipalInvestigatorRole"; - } - - - //TODO: More dynamic way of getting this or standard mechanism - private String getVivoOntologyCoreNamespace() { - return "http://vivoweb.org/ontology/core#"; - } - - private Object getHasPrincipalInvestigatorURI() { - return getVivoOntologyCoreNamespace() + "hasPrincipalInvestigatorRole"; - - } - - /** - * Methods with default values that may be overwritten when required by a subclass - * Both Default value and method that can be overwritten are included below - **/ - - public boolean isShowRoleLabelField(VitroRequest vreq) { - return true; - } - - - //This has a default value, but note that even that will not be used - //in the update with realized in or contributes to - //Overridden when need be in subclassed generator - //Also note that for now we're going to actually going to return a - //placeholder value by default - public String getRoleToGrantPredicate(VitroRequest vreq) { - ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(getGrantType(), vreq.getWebappDaoFactory()); - return predicate.getURI(); - } - - public String getGrantToRolePredicate(VitroRequest vreq) { - ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(getGrantType(), vreq.getWebappDaoFactory()); - return predicate.getURIInverse(); - } - - public String getGrantType() { - return "http://vivoweb.org/ontology/core#Grant"; - } - //Ensure when overwritten that this includes the <> b/c otherwise the query won't work - - //Some values will have a default value - //grantToRolePredicate - public String getDefaultgrantToRolePredicate() { - return "http://vivoweb.org/ontology/core#relatedRole"; - } - - //roleToGrantPredicate - public String getDefaultroleToGrantPredicate() { - return "http://vivoweb.org/ontology/core#roleIn"; - - } - - public List getPossibleRoleToGrantPredicates() { - return ModelUtils.getPossiblePropertiesForRole(); - } - - public List getPossibleGrantToRolePredicates() { - return ModelUtils.getPossibleInversePropertiesForRole(); - } - - - /** - * Methods to return URIS for various predicates - **/ - public String getVivoCoreNamespace() { - return "http://vivoweb.org/ontology/core#"; - } - - public String getRoleToIntervalURI() { - return getVivoCoreNamespace() + "dateTimeInterval"; - } - - public String getIntervalTypeURI() { - return getVivoCoreNamespace() + "DateTimeInterval"; - } - - public String getIntervalToStartURI() { - return getVivoCoreNamespace() + "start"; - } - - public String getIntervalToEndURI() { - return getVivoCoreNamespace() + "end"; - } - - public String getStartYearPredURI() { - return getVivoCoreNamespace() + "startYear"; - } - - public String getEndYearPredURI() { - return getVivoCoreNamespace() + "endYear"; - } - - public String getDateTimeValueTypeURI() { - return getVivoCoreNamespace() + "DateTimeValue"; - } - - public String getDateTimePrecisionURI() { - return getVivoCoreNamespace() + "dateTimePrecision"; - } - - public String getDateTimeValueURI() { - return getVivoCoreNamespace() + "dateTime"; - } - - //Form specific data - public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - HashMap formSpecificData = new HashMap(); - formSpecificData.put("editMode", getEditMode(vreq).name().toLowerCase()); - //In this case, passing back a sparql query - formSpecificData.put("sparqlForAcFilter", getSparqlForAcFilter(vreq)); - //Put in the fact that we require field - editConfiguration.setFormSpecificData(formSpecificData); - } - - public String getSparqlForAcFilter(VitroRequest vreq) { - String subject = EditConfigurationUtils.getSubjectUri(vreq); - String predicate = EditConfigurationUtils.getPredicateUri(vreq); - - - String query = "PREFIX core:<" + getVivoCoreNamespace() + "> " + - "SELECT ?grantUri WHERE { " + - "<" + subject + "> <" + predicate + "> ?grantRole ." + - "?grantRole <" + getRoleToGrantPredicate(vreq) + "> ?grantUri . }"; - return query; - } - - - - - -} +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.vivoweb.webapp.util.ModelUtils; + +import com.hp.hpl.jena.ontology.OntModel; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.vocabulary.RDF; +import com.hp.hpl.jena.vocabulary.RDFS; +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; +import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; +import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; + +/** + * Custom form for adding a grant to an person for the predicates hasCo-PrincipalInvestigatorRole + and hasPrincipalInvestigatorRole. + +This is intended to create a set of statements like: + +?person core:hasPrincipalInvestigatorRole ?newRole. +?newRole rdf:type core:PrincipalInvestigatorRole ; + core:relatedRole ?someGrant . + + * + */ +public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator { + + private Log log = LogFactory.getLog(AddGrantRoleToPersonGenerator.class); + private String subjectUri = null; + private String predicateUri = null; + private String objectUri = null; + private String template = "addGrantRoleToPerson.ftl"; + + //Types of options to populate drop-down for types for the "right side" of the role + public static enum RoleActivityOptionTypes { + VCLASSGROUP, + CHILD_VCLASSES, + HARDCODED_LITERALS + }; + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { + EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); + + //process subject, predicate, object parameters + this.initProcessParameters(vreq, session, editConfiguration); + + //Assumes this is a simple case of subject predicate var + editConfiguration.setN3Required(this.generateN3Required(vreq)); + + //n3 optional + editConfiguration.setN3Optional(this.generateN3Optional(vreq)); + + //Todo: what do new resources depend on here? + //In original form, these variables start off empty + editConfiguration.setNewResources(generateNewResources(vreq)); + //In scope + this.setUrisAndLiteralsInScope(editConfiguration, vreq); + + //on Form + this.setUrisAndLiteralsOnForm(editConfiguration, vreq); + + editConfiguration.setFilesOnForm(new ArrayList()); + + //Sparql queries + this.setSparqlQueries(editConfiguration, vreq); + + //set fields + setFields(editConfiguration, vreq, EditConfigurationUtils.getPredicateUri(vreq)); + + // No need to put in session here b/c put in session within edit request dispatch controller instead + //placing in session depends on having edit key which is handled in edit request dispatch controller + // editConfiguration.putConfigInSession(editConfiguration, session); + + prepareForUpdate(vreq, session, editConfiguration); + + //Form title and submit label now moved to edit configuration template + //TODO: check if edit configuration template correct place to set those or whether + //additional methods here should be used and reference instead, e.g. edit configuration template could call + //default obj property form.populateTemplate or some such method + //Select from existing also set within template itself + setTemplate(editConfiguration, vreq); + //Set edit key + setEditKey(editConfiguration, vreq); + + //Add validators + editConfiguration.addValidator(new DateTimeIntervalValidationVTwo("startField","endField") ); + editConfiguration.addValidator(new AntiXssValidation()); + editConfiguration.addValidator(new AutocompleteRequiredInputValidator("existingGrant","grantLabel")); + //no preprocessors required here + //Adding additional data, specifically edit mode + addFormSpecificData(editConfiguration, vreq); + return editConfiguration; + } + + + + private void setEditKey(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + String editKey = EditConfigurationUtils.getEditKey(vreq); + editConfiguration.setEditKey(editKey); + } + + protected void setTemplate(EditConfigurationVTwo editConfiguration, + VitroRequest vreq) { + editConfiguration.setTemplate(template); + + } + + //Initialize setup: process parameters + //There will be specialized parameters as well, we may include them here or in a + //separate method + private void initProcessParameters(VitroRequest vreq, HttpSession session, EditConfigurationVTwo editConfiguration) { + String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); + + subjectUri = EditConfigurationUtils.getSubjectUri(vreq); + predicateUri = EditConfigurationUtils.getPredicateUri(vreq); + + editConfiguration.setFormUrl(formUrl); + + editConfiguration.setUrlPatternToReturnTo("/individual"); + + editConfiguration.setVarNameForSubject("person"); + editConfiguration.setSubjectUri(subjectUri); + editConfiguration.setEntityToReturnTo(subjectUri); + editConfiguration.setVarNameForPredicate("rolePredicate"); + editConfiguration.setPredicateUri(predicateUri); + //by definition, this is an object property + objectUri = EditConfigurationUtils.getObjectUri(vreq); + + this.processObjectPropForm(vreq, editConfiguration); + } + + private void processObjectPropForm(VitroRequest vreq, EditConfigurationVTwo editConfiguration) { + editConfiguration.setVarNameForObject("role"); + editConfiguration.setObject(objectUri); + //this needs to be set for the editing to be triggered properly, otherwise the 'prepare' method + //pretends this is a data property editing statement and throws an error + //TODO: Check if null in case no object uri exists but this is still an object property + } + + + /* + * N3 Required and Optional Generators as well as supporting methods + */ + + private String getPrefixesString() { + //TODO: Include dynamic way of including this + return "@prefix core: ."; + } + + //TODO: Check if single string or multiple strings - check rdfslabel form etc. for prefix + //processing + private List generateN3Required(VitroRequest vreq) { + List n3ForEdit = new ArrayList(); + String editString = getN3ForGrantRole(vreq); + n3ForEdit.add(editString); + return n3ForEdit; + } + + + private List generateN3Optional(VitroRequest vreq) { + List n3Optional = new ArrayList(); + //n3 for new grant + n3Optional.add(getN3ForNewGrant(vreq)); + //n3 for existing grant + n3Optional.add(getN3ForExistingGrant(vreq)); + //n3 for inverse + n3Optional.add("?role ?inverseRolePredicate ?person ."); + //N3ForStart + n3Optional.addAll(getN3ForStart()); + //N3 For End + n3Optional.addAll(getN3ForEnd()); + return n3Optional; + } + + public String getN3ForGrantRole(VitroRequest vreq) { + String editString = getPrefixesString(); + editString += "?person ?rolePredicate ?role ."; + editString += "?role a <" + getRoleType(vreq) + "> ."; + return editString; + } + + public String getN3ForNewGrant(VitroRequest vreq) { + String editString = getPrefixesString(); + editString += "?role <" + getRoleToGrantPredicate(vreq) + "> ?grant ."; + editString += "?grant a core:Grant . "; + editString += "?grant <" + getGrantToRolePredicate(vreq) + "> ?role ."; + editString += "?grant <" + RDFS.label.getURI() + "> ?grantLabel ."; + return editString; + } + + public String getN3ForExistingGrant(VitroRequest vreq) { + String editString = getPrefixesString(); + editString += "?role <" + getRoleToGrantPredicate(vreq) + "> ?existingGrant . "; + editString += "?existingGrant <" + getGrantToRolePredicate(vreq) + "> ?role ."; + return editString; + } + + //Method b/c used in two locations, n3 optional and n3 assertions + private List getN3ForStart() { + List n3ForStart = new ArrayList(); + n3ForStart.add("?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + + "?intervalNode <" + RDF.type.getURI() + "> <" + getIntervalTypeURI() + "> ." + + "?intervalNode <" + getIntervalToStartURI() + "> ?startNode ." + + "?startNode <" + RDF.type.getURI() + "> <" + getDateTimeValueTypeURI() + "> ." + + "?startNode <" + getDateTimeValueURI() + "> ?startField-value ." + + "?startNode <" + getDateTimePrecisionURI() + "> ?startField-precision ."); + return n3ForStart; + } + + private List getN3ForEnd() { + List n3ForEnd = new ArrayList(); + n3ForEnd.add("?role <" + getRoleToIntervalURI() + "> ?intervalNode . " + + "?intervalNode <" + RDF.type.getURI() + "> <" + getIntervalTypeURI() + "> ." + + "?intervalNode <" + getIntervalToEndURI() + "> ?endNode ." + + "?endNode <" + RDF.type.getURI() + "> <" + getDateTimeValueTypeURI() + "> ." + + "?endNode <" + getDateTimeValueURI() + "> ?endField-value ." + + "?endNode <" + getDateTimePrecisionURI() + "> ?endField-precision ."); + return n3ForEnd; + + } + + + /* + * Get new resources + */ + private Map generateNewResources(VitroRequest vreq) { + HashMap newResources = new HashMap(); + //TODO: Get default namespace + String defaultNamespace = vreq.getWebappDaoFactory().getDefaultNamespace(); + newResources.put("role", defaultNamespace + "individual"); + newResources.put("grant", defaultNamespace + "individual"); + newResources.put("intervalNode", defaultNamespace + "individual"); + newResources.put("startNode", defaultNamespace + "individual"); + newResources.put("endNode", defaultNamespace + "individual"); + return newResources; + } + + /* + * Set URIS and Literals In Scope and on form and supporting methods + */ + + private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + HashMap> urisInScope = new HashMap>(); + //note that at this point the subject, predicate, and object var parameters have already been processed + //these two were always set when instantiating an edit configuration object from json, + //although the json itself did not specify subject/predicate as part of uris in scope + urisInScope.put(editConfiguration.getVarNameForSubject(), + Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); + urisInScope.put(editConfiguration.getVarNameForPredicate(), + Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); + //Setting role type + urisInScope.put("roleType", + Arrays.asList(new String[]{getRoleType(vreq)})); + //Setting inverse role predicate + urisInScope.put("inverseRolePredicate", getInversePredicate(vreq)); + + editConfiguration.setUrisInScope(urisInScope); + //Uris in scope include subject, predicate, and object var + //literals in scope empty initially, usually populated by code in prepare for update + //with existing values for variables + editConfiguration.setLiteralsInScope(new HashMap>()); + } + + private List getInversePredicate(VitroRequest vreq) { + List inversePredicateArray = new ArrayList(); + ObjectProperty op = EditConfigurationUtils.getObjectProperty(vreq); + if(op != null && op.getURIInverse() != null) { + inversePredicateArray.add(op.getURIInverse()); + } + return inversePredicateArray; + } + + //n3 should look as follows + //?subject ?predicate ?objectVar + + private void setUrisAndLiteralsOnForm(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + List urisOnForm = new ArrayList(); + List literalsOnForm = new ArrayList(); + //add role activity and roleActivityType to uris on form + urisOnForm.add("grant"); + urisOnForm.add("existingGrant"); + editConfiguration.setUrisOnform(urisOnForm); + //activity label and role label are literals on form + literalsOnForm.add("grantLabel"); + literalsOnForm.add("grantLabelDisplay"); + editConfiguration.setLiteralsOnForm(literalsOnForm); + } + + + /** + * Set SPARQL Queries and supporting methods + */ + + + private void setSparqlQueries(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + //Sparql queries defining retrieval of literals etc. + editConfiguration.setSparqlForAdditionalLiteralsInScope(new HashMap()); + + Map urisInScope = new HashMap(); + editConfiguration.setSparqlForAdditionalUrisInScope(urisInScope); + + editConfiguration.setSparqlForExistingLiterals(generateSparqlForExistingLiterals(vreq)); + editConfiguration.setSparqlForExistingUris(generateSparqlForExistingUris(vreq)); + } + + + //Get page uri for object + private HashMap generateSparqlForExistingUris(VitroRequest vreq) { + HashMap map = new HashMap(); + //Queries for role activity, activity type query, interval node, start node, end node, start field precision, endfield precision + map.put("existingGrant", getExistingGrantQuery(vreq)); + map.put("intervalNode", getIntervalNodeQuery(vreq)); + map.put("startNode", getStartNodeQuery(vreq)); + map.put("endNode", getEndNodeQuery(vreq)); + map.put("startField-precision", getStartPrecisionQuery(vreq)); + map.put("endField-precision", getEndPrecisionQuery(vreq)); + return map; + } + + + + private String getEndPrecisionQuery(VitroRequest vreq) { + String query = "SELECT ?existingEndPrecision WHERE {" + + "?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ." + + "?intervalNode <" + getIntervalToEndURI() + "> ?endNode ." + + "?endNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> . " + + "?endNode <" + getDateTimePrecisionURI() + "> ?existingEndPrecision . }"; + return query; + } + + private String getStartPrecisionQuery(VitroRequest vreq) { + String query = "SELECT ?existingStartPrecision WHERE {" + + "?role <" + getRoleToIntervalURI() + "> ?intervalNode ." + + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ." + + "?intervalNode <" + getIntervalToStartURI() + "> ?startNode ." + + "?startNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> . " + + "?startNode <" + getDateTimePrecisionURI() + "> ?existingStartPrecision . }"; + return query; + } + + private String getEndNodeQuery(VitroRequest vreq) { + String query = "SELECT ?existingEndNode WHERE {"+ + "?role <" + getRoleToIntervalURI() + "> ?intervalNode ."+ + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ."+ + " ?intervalNode <" + getIntervalToEndURI() + "> ?existingEndNode . "+ + "?existingEndNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .}"; + return query; + } + + private String getStartNodeQuery(VitroRequest vreq) { + String query = "SELECT ?existingStartNode WHERE {"+ + "?role <" + getRoleToIntervalURI() + "> ?intervalNode ."+ + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> ."+ + "?intervalNode <" + getIntervalToStartURI() + "> ?existingStartNode . "+ + "?existingStartNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .}"; + return query; + } + + private String getIntervalNodeQuery(VitroRequest vreq) { + String query = "SELECT ?existingIntervalNode WHERE { " + + "?role <" + getRoleToIntervalURI() + "> ?existingIntervalNode . " + + " ?existingIntervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> . }"; + return query; + } + + + + private HashMap generateSparqlForExistingLiterals(VitroRequest vreq) { + HashMap map = new HashMap(); + //Queries for activity label, role label, start Field value, end Field value + map.put("grantLabel", getGrantLabelQuery(vreq)); + map.put("startField-value", getExistingStartDateQuery(vreq)); + map.put("endField-value", getExistingEndDateQuery(vreq)); + return map; + } + + private String getGrantLabelQuery(VitroRequest vreq) { + String query = "PREFIX core: <" + getVivoCoreNamespace() + ">" + + "PREFIX rdfs: <" + RDFS.getURI() + "> \n"; + + String roleToGrantPredicate = getRoleToGrantPredicate(vreq); + query += "SELECT ?existingGrantLabel WHERE { \n" + + "?role <" + roleToGrantPredicate + "> ?existingGrant . \n" + + "?existingGrant rdfs:label ?existingGrantLabel . }"; + + return query; + } + + private String getExistingGrantQuery(VitroRequest vreq) { + String query = "PREFIX core: <" + getVivoCoreNamespace() + ">" + + "PREFIX rdfs: <" + RDFS.getURI() + "> \n"; + + String roleToGrantPredicate = getRoleToGrantPredicate(vreq); + query += "SELECT ?existingGrant WHERE { \n" + + "?role <" + roleToGrantPredicate + "> ?existingGrant . }"; + return query; + } + + private String getExistingEndDateQuery(VitroRequest vreq) { + String query = " SELECT ?existingEndDate WHERE {\n" + + "?role <" + getRoleToIntervalURI() + "> ?intervalNode .\n" + + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> .\n" + + "?intervalNode <" + getIntervalToEndURI() + "> ?endNode .\n" + + "?endNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .\n" + + "?endNode <" + getDateTimeValueURI() + "> ?existingEndDate . }"; + return query; + } + + private String getExistingStartDateQuery(VitroRequest vreq) { + String query = "SELECT ?existingDateStart WHERE {\n" + + "?role <" + getRoleToIntervalURI() + "> ?intervalNode .\n" + + "?intervalNode <" + VitroVocabulary.RDF_TYPE + "> <" + getIntervalTypeURI() + "> .\n" + + "?intervalNode <" + getIntervalToStartURI() + "> ?startNode .\n" + + "?startNode <" + VitroVocabulary.RDF_TYPE + "> <" + getDateTimeValueTypeURI() + "> .\n" + + "?startNode <" + getDateTimeValueURI() + "> ?existingDateStart . }"; + + return query; + } + + /** + * + * Set Fields and supporting methods + */ + + private void setFields(EditConfigurationVTwo editConfiguration, VitroRequest vreq, String predicateUri) { + Map fields = new HashMap(); + //Multiple fields + getGrantField(editConfiguration, vreq, fields); + getGrantLabelField(editConfiguration, vreq, fields); + getGrantLabelDisplayField(editConfiguration, vreq, fields); + getExistingGrantField(editConfiguration, vreq, fields); + getStartField(editConfiguration, vreq, fields); + getEndField(editConfiguration, vreq, fields); + editConfiguration.setFields(fields); + } + + private void getGrantField(EditConfigurationVTwo editConfiguration, + VitroRequest vreq, Map fields) { + String fieldName = "grant"; + + FieldVTwo field = new FieldVTwo(); + field.setName(fieldName); + //queryForExisting is not being used anywhere in Field + + List validators = new ArrayList(); + field.setValidators(validators); + + fields.put(field.getName(), field); + + } + + private void getGrantLabelField(EditConfigurationVTwo editConfiguration, + VitroRequest vreq, Map fields) { + String fieldName = "grantLabel"; + //get range data type uri and range language + String stringDatatypeUri = XSD.xstring.toString(); + + FieldVTwo field = new FieldVTwo(); + field.setName(fieldName); + //queryForExisting is not being used anywhere in Field + + //Not really interested in validators here + List validators = new ArrayList(); + validators.add("datatype:" + stringDatatypeUri); + field.setValidators(validators); + + fields.put(field.getName(), field); + + } + + private void getGrantLabelDisplayField(EditConfigurationVTwo editConfiguration, + VitroRequest vreq, Map fields) { + + FieldVTwo field = new FieldVTwo(); + + String fieldName = "grantLabelDisplay"; + field.setName(fieldName); + + String stringDatatypeUri = XSD.xstring.toString(); + field.setRangeDatatypeUri(null); + + fields.put(field.getName(), field); + + } + //Need if returning from an invalid submission + private void getExistingGrantField( + EditConfigurationVTwo editConfiguration, VitroRequest vreq, + Map fields) { + String fieldName = "existingGrant"; + + FieldVTwo field = new FieldVTwo(); + field.setName(fieldName); + //queryForExisting is not being used anywhere in Field + + fields.put(field.getName(), field); + } + + private void getStartField(EditConfigurationVTwo editConfiguration, + VitroRequest vreq, Map fields) { + String fieldName = "startField"; + + FieldVTwo field = new FieldVTwo(); + field.setName(fieldName); + + //This logic was originally after edit configuration object created from json in original jsp + field.setEditElement( + new DateTimeWithPrecisionVTwo(field, + VitroVocabulary.Precision.YEAR.uri(), + VitroVocabulary.Precision.NONE.uri())); + + fields.put(field.getName(), field); + + } + + private void getEndField(EditConfigurationVTwo editConfiguration, + VitroRequest vreq, Map fields) { + String fieldName = "endField"; + + FieldVTwo field = new FieldVTwo(); + field.setName(fieldName); + + List validators = new ArrayList(); + field.setValidators(validators); + + //Set edit element + field.setEditElement( + new DateTimeWithPrecisionVTwo(field, + VitroVocabulary.Precision.YEAR.uri(), + VitroVocabulary.Precision.NONE.uri())); + + fields.put(field.getName(), field); + + } + + /** + * Prepare edit configuration for update + * @param vreq + * @param session + * @param editConfiguration + */ + + private void prepareForUpdate(VitroRequest vreq, HttpSession session, EditConfigurationVTwo editConfiguration) { + //Here, retrieve model from + OntModel model = ModelAccess.on(session.getServletContext()).getJenaOntModel(); + //Object property by definition + String objectUri = EditConfigurationUtils.getObjectUri(vreq); + if(objectUri != null) { + //update existing object + editConfiguration.prepareForObjPropUpdate(model); + } else { + //new object to be created + editConfiguration.prepareForNonUpdate( model ); + } + } + + /**Methods for checking edit mode ** + * + */ + public EditMode getEditMode(VitroRequest vreq) { + List roleToGrantPredicates = getPossibleRoleToGrantPredicates(); + return EditModeUtils.getEditMode(vreq, roleToGrantPredicates); + } + + private boolean isAddMode(VitroRequest vreq) { + return EditModeUtils.isAddMode(getEditMode(vreq)); + } + + private boolean isEditMode(VitroRequest vreq) { + return EditModeUtils.isEditMode(getEditMode(vreq)); + } + + private boolean isRepairMode(VitroRequest vreq) { + return EditModeUtils.isRepairMode(getEditMode(vreq)); + } + + /** + * Methods that are REQUIRED to be implemented in subclasses + **/ + //role type will always be set based on particular form + public String getRoleType(VitroRequest vreq) { + String rangeUri = EditConfigurationUtils.getRangeUri(vreq); + if(rangeUri.equals(getPrincipalInvestigatorURI())) { + return getVivoOntologyCoreNamespace() + "PrincipalInvestigatorRole"; + } + else if(rangeUri.equals(getCoPrincipalInvestigatorURI())) { + return getVivoOntologyCoreNamespace() + "CoPrincipalInvestigatorRole"; + } + else { + return getVivoOntologyCoreNamespace() + "InvestigatorRole"; + } + } + + private Object getCoPrincipalInvestigatorURI() { + return getVivoOntologyCoreNamespace() + "CoPrincipalInvestigatorRole"; + } + + + //TODO: More dynamic way of getting this or standard mechanism + private String getVivoOntologyCoreNamespace() { + return "http://vivoweb.org/ontology/core#"; + } + + private Object getPrincipalInvestigatorURI() { + return getVivoOntologyCoreNamespace() + "PrincipalInvestigatorRole"; + + } + + /** + * Methods with default values that may be overwritten when required by a subclass + * Both Default value and method that can be overwritten are included below + **/ + + public boolean isShowRoleLabelField(VitroRequest vreq) { + return true; + } + + + //This has a default value, but note that even that will not be used + //in the update with realized in or contributes to + //Overridden when need be in subclassed generator + //Also note that for now we're going to actually going to return a + //placeholder value by default + public String getRoleToGrantPredicate(VitroRequest vreq) { + ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(getGrantType(), vreq.getWebappDaoFactory()); + return predicate.getURI(); + } + + public String getGrantToRolePredicate(VitroRequest vreq) { + ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(getGrantType(), vreq.getWebappDaoFactory()); + return predicate.getURIInverse(); + } + + public String getGrantType() { + return "http://vivoweb.org/ontology/core#Grant"; + } + //Ensure when overwritten that this includes the <> b/c otherwise the query won't work + + //Some values will have a default value + //grantToRolePredicate + public String getDefaultgrantToRolePredicate() { + return "http://vivoweb.org/ontology/core#relatedRole"; + } + + //roleToGrantPredicate + public String getDefaultroleToGrantPredicate() { + return "http://vivoweb.org/ontology/core#roleIn"; + + } + + public List getPossibleRoleToGrantPredicates() { + return ModelUtils.getPossiblePropertiesForRole(); + } + + public List getPossibleGrantToRolePredicates() { + return ModelUtils.getPossibleInversePropertiesForRole(); + } + + + /** + * Methods to return URIS for various predicates + **/ + public String getVivoCoreNamespace() { + return "http://vivoweb.org/ontology/core#"; + } + + public String getRoleToIntervalURI() { + return getVivoCoreNamespace() + "dateTimeInterval"; + } + + public String getIntervalTypeURI() { + return getVivoCoreNamespace() + "DateTimeInterval"; + } + + public String getIntervalToStartURI() { + return getVivoCoreNamespace() + "start"; + } + + public String getIntervalToEndURI() { + return getVivoCoreNamespace() + "end"; + } + + public String getStartYearPredURI() { + return getVivoCoreNamespace() + "startYear"; + } + + public String getEndYearPredURI() { + return getVivoCoreNamespace() + "endYear"; + } + + public String getDateTimeValueTypeURI() { + return getVivoCoreNamespace() + "DateTimeValue"; + } + + public String getDateTimePrecisionURI() { + return getVivoCoreNamespace() + "dateTimePrecision"; + } + + public String getDateTimeValueURI() { + return getVivoCoreNamespace() + "dateTime"; + } + + //Form specific data + public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + HashMap formSpecificData = new HashMap(); + formSpecificData.put("editMode", getEditMode(vreq).name().toLowerCase()); + //In this case, passing back a sparql query + formSpecificData.put("sparqlForAcFilter", getSparqlForAcFilter(vreq)); + //Put in the fact that we require field + editConfiguration.setFormSpecificData(formSpecificData); + } + + public String getSparqlForAcFilter(VitroRequest vreq) { + String subject = EditConfigurationUtils.getSubjectUri(vreq); + String predicate = EditConfigurationUtils.getPredicateUri(vreq); + + + String query = "PREFIX core:<" + getVivoCoreNamespace() + "> " + + "SELECT ?grantUri WHERE { " + + "<" + subject + "> <" + predicate + "> ?grantRole ." + + "?grantRole <" + getRoleToGrantPredicate(vreq) + "> ?grantUri . }"; + return query; + } + + + + + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java index 1cab984d..78a1f6ce 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java @@ -1,311 +1,311 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; - -import javax.servlet.http.HttpSession; - -import com.hp.hpl.jena.vocabulary.XSD; - -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; - -public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator implements - EditConfigurationGenerator { - - final static String presentationClass = vivoCore + "Presentation"; - final static String roleClass = vivoCore + "PresenterRole"; - final static String conferenceClass = bibo + "Conference"; - final static String hasRolePred = vivoCore + "hasPresenterRole"; - final static String roleOfPred = vivoCore + "presenterRoleOf"; - final static String roleRealizedInPred = vivoCore + "roleRealizedIn"; - final static String realizedRolePred = vivoCore + "realizedRole"; - final static String includesEventPred = vivoCore + "includesEvent"; - final static String eventWithinPred = vivoCore + "eventWithin"; - final static String roleToInterval = vivoCore + "dateTimeInterval"; - final static String intervalType = vivoCore + "DateTimeInterval"; - final static String intervalToStart = vivoCore + "start"; - final static String intervalToEnd = vivoCore + "end"; - final static String dateTimeValueType = vivoCore + "DateTimeValue"; - final static String dateTimeValue = vivoCore + "dateTime"; - final static String dateTimePrecision = vivoCore + "dateTimePrecision"; - - public AddPresenterRoleToPersonGenerator() {} - - @Override - public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, - HttpSession session) throws Exception { - - EditConfigurationVTwo conf = new EditConfigurationVTwo(); - - initBasics(conf, vreq); - initPropertyParameters(vreq, session, conf); - initObjectPropForm(conf, vreq); - - conf.setTemplate("addPresenterRoleToPerson.ftl"); - - conf.setVarNameForSubject("person"); - conf.setVarNameForPredicate("predicate"); - conf.setVarNameForObject("role"); - - conf.setN3Required( Arrays.asList( n3ForNewRole, - roleLabelAssertion) ); - conf.setN3Optional( Arrays.asList( n3ForNewPresentation, - n3ForExistingPresentation, - n3ForNewConferenceNewPres, - n3ForNewConferenceExistingPres, - n3ForExistingConferenceNewPres, - n3ForExistingConferenceExistingPres, - n3ForStart, - n3ForEnd ) ); - - conf.addNewResource("presentation", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("newConference", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("role", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("endNode", DEFAULT_NS_FOR_NEW_RESOURCE); - - //uris in scope: none - //literals in scope: none - - conf.setUrisOnform(Arrays.asList("existingPresentation", "existingConference", "presentationType")); - conf.setLiteralsOnForm(Arrays.asList("presentationLabel", "presentationLabelDisplay", "conferenceLabel", "conferenceLabelDisplay", "roleLabel")); - - conf.addSparqlForExistingLiteral("presentationLabel", presentationLabelQuery); - conf.addSparqlForExistingLiteral("conferenceLabel", conferenceLabelQuery); - conf.addSparqlForExistingLiteral("roleLabel", roleLabelQuery); - conf.addSparqlForExistingUris("existingPresentation", presentationQuery); - conf.addSparqlForExistingUris("existingConference", existingConferenceQuery); - conf.addSparqlForExistingUris("presentationType", presentationTypeQuery); - conf.addSparqlForExistingLiteral( - "startField-value", existingStartDateQuery); - conf.addSparqlForExistingLiteral( - "endField-value", existingEndDateQuery); - conf.addSparqlForExistingUris( - "intervalNode", existingIntervalNodeQuery); - conf.addSparqlForExistingUris("startNode", existingStartNodeQuery); - conf.addSparqlForExistingUris("endNode", existingEndNodeQuery); - conf.addSparqlForExistingUris("startField-precision", - existingStartPrecisionQuery); - conf.addSparqlForExistingUris("endField-precision", - existingEndPrecisionQuery); - - conf.addField( new FieldVTwo(). // an autocomplete field - setName("existingPresentation") - ); - - conf.addField( new FieldVTwo(). - setName("presentationLabelDisplay") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString()) ) - ); - - conf.addField( new FieldVTwo(). - setName("presentationLabel") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString()) ) - ); - - conf.addField( new FieldVTwo(). - setName("presentationType"). - setValidators( list("nonempty") ). - setOptions( new ChildVClassesWithParent( - presentationClass)) - ); - - conf.addField( new FieldVTwo(). - setName("roleLabel") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("nonempty") ) - ); - - conf.addField( new FieldVTwo(). // an autocomplete field - setName("existingConference") - ); - - conf.addField( new FieldVTwo(). - setName("conferenceLabel"). - setRangeDatatypeUri(XSD.xstring.toString() ) - ); - - conf.addField( new FieldVTwo(). - setName("conferenceLabelDisplay"). - setRangeDatatypeUri(XSD.xstring.toString() ) - ); - - conf.addField( new FieldVTwo().setName("startField"). - setEditElement( - new DateTimeWithPrecisionVTwo(null, - VitroVocabulary.Precision.YEAR.uri(), - VitroVocabulary.Precision.NONE.uri()) - ) - ); - - conf.addField( new FieldVTwo().setName("endField"). - setEditElement( - new DateTimeWithPrecisionVTwo(null, - VitroVocabulary.Precision.YEAR.uri(), - VitroVocabulary.Precision.NONE.uri()) - ) - ); - - conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); - conf.addValidator(new AntiXssValidation()); - conf.addValidator(new AutocompleteRequiredInputValidator("existingPresentation", "presentationLabel")); - prepare(vreq, conf); - return conf; - } - - /* N3 assertions */ - final static String n3ForNewRole = - "@prefix core: <" + vivoCore + "> . \n\n" + - "?person <" + hasRolePred + "> ?role . \n" + - "?role a <" + roleClass + "> . \n" + - "?role <" + roleOfPred + "> ?person . "; - - final static String roleLabelAssertion = - "?role <" + label + "> ?roleLabel ."; - - final static String n3ForNewPresentation = - "?role <" + roleRealizedInPred + "> ?presentation . \n" + - "?presentation <" + realizedRolePred + "> ?role . \n" + - "?presentation <" + label + "> ?presentationLabel . \n" + - "?presentation a ?presentationType ."; - - final static String n3ForExistingPresentation = - "?role <" + roleRealizedInPred + "> ?existingPresentation . \n" + - "?existingPresentation <" + realizedRolePred + "> ?role . \n" + - "?existingPresentation a ?presentationType ."; - - final static String n3ForNewConferenceNewPres = - "?presentation <" + eventWithinPred + "> ?newConference . \n" + - "?newConference <" + includesEventPred + "> ?presentation . \n" + - "?newConference a <" + conferenceClass + "> . \n" + - "?newConference <" + label + "> ?conferenceLabel ."; - - final static String n3ForNewConferenceExistingPres = - "?existingPresentation <" + eventWithinPred + "> ?newConference . \n" + - "?newConference <" + includesEventPred + "> ?existingPresentation . \n" + - "?newConference a <" + conferenceClass + "> . \n" + - "?newConference <" + label + "> ?conferenceLabel ."; - - final static String n3ForExistingConferenceNewPres = - "?existingConference <" + includesEventPred + "> ?presentation . \n" + - "?presentation <" + eventWithinPred + "> ?existingConference . \n" + - "?presentation <" + label + "> ?presentationLabel . "; - - final static String n3ForExistingConferenceExistingPres = - "?existingConference <" + includesEventPred + "> ?existingPresentation . \n" + - "?existingPresentation <" + eventWithinPred + "> ?existingConference . "; - - final static String n3ForStart = - "?role <" + roleToInterval + "> ?intervalNode . \n" + - "?intervalNode a <" + intervalType + "> . \n" + - "?intervalNode <" + intervalToStart + "> ?startNode . \n" + - "?startNode a <" + dateTimeValueType + "> . \n" + - "?startNode <" + dateTimeValue + "> ?startField-value . \n" + - "?startNode <" + dateTimePrecision + "> ?startField-precision . \n"; - - final static String n3ForEnd = - "?role <" + roleToInterval + "> ?intervalNode . \n" + - "?intervalNode a <" + intervalType + "> . \n" + - "?intervalNode <" + intervalToEnd + "> ?endNode . \n" + - "?endNode a <" + dateTimeValueType + "> . \n" + - "?endNode <" + dateTimeValue + "> ?endField-value . \n" + - "?endNode <" + dateTimePrecision + "> ?endField-precision . \n"; - - /* Queries for editing an existing entry */ - final static String roleLabelQuery = - "SELECT ?existingRoleLabel WHERE { \n" + - "?role <" + label + "> ?existingRoleLabel . }"; - - final static String presentationQuery = - "SELECT ?existingPresentation WHERE { \n" + - "?role <" + roleRealizedInPred + "> ?existingPresentation . }"; - - final static String presentationLabelQuery = - "SELECT ?existingPresentationLabel WHERE { \n" + - "?role <" + roleRealizedInPred + "> ?existingPresentation . " + - "?existingPresentation <" + label + "> ?existingPresentationLabel . }"; - - final static String presentationTypeQuery = - "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + - "SELECT ?existingPresentationType WHERE { \n" + - "?role <" + roleRealizedInPred + "> ?existingPresentation . " + - "?existingPresentation vitro:mostSpecificType ?existingPresentationType . }"; - - final static String existingConferenceQuery = - "SELECT ?existingConference WHERE { \n" + - "?role <" + roleRealizedInPred + "> ?existingPresentation . " + - "?existingPresentation <" + eventWithinPred + "> ?existingConference . }"; - - final static String conferenceLabelQuery = - "SELECT ?existingConferenceLabel WHERE { \n" + - "?role <" + roleRealizedInPred + "> ?existingPresentation . " + - "?existingPresentation <" + eventWithinPred + "> ?existingConference . \n" + - "?existingConference <" + label + "> ?existingConferenceLabel . }"; - - final static String existingStartDateQuery = - "SELECT ?existingDateStart WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n" + - " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + - " ?startNode a <" + dateTimeValueType +"> . \n" + - " ?startNode <" + dateTimeValue + "> ?existingDateStart . }"; - - final static String existingEndDateQuery = - "SELECT ?existingEndDate WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n " + - " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + - " ?endNode a <" + dateTimeValueType + "> . \n" + - " ?endNode <" + dateTimeValue + "> ?existingEndDate . }"; - - final static String existingIntervalNodeQuery = - "SELECT ?existingIntervalNode WHERE { \n" + - " ?role <" + roleToInterval + "> ?existingIntervalNode . \n" + - " ?existingIntervalNode a <" + intervalType + "> . }"; - - final static String existingStartNodeQuery = - "SELECT ?existingStartNode WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n" + - " ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" + - " ?existingStartNode a <" + dateTimeValueType + "> . } "; - - final static String existingEndNodeQuery = - "SELECT ?existingEndNode WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n" + - " ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" + - " ?existingEndNode a <" + dateTimeValueType + "> .} "; - - final static String existingStartPrecisionQuery = - "SELECT ?existingStartPrecision WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n" + - " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + - " ?startNode a <" + dateTimeValueType + "> . \n" + - " ?startNode <" + dateTimePrecision + "> ?existingStartPrecision . }"; - - final static String existingEndPrecisionQuery = - "SELECT ?existingEndPrecision WHERE { \n" + - " ?role <" + roleToInterval + "> ?intervalNode . \n" + - " ?intervalNode a <" + intervalType + "> . \n" + - " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + - " ?endNode a <" + dateTimeValueType + "> . \n" + - " ?endNode <" + dateTimePrecision + "> ?existingEndPrecision . }"; - -} - +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.Arrays; + +import javax.servlet.http.HttpSession; + +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator implements + EditConfigurationGenerator { + + final static String presentationClass = vivoCore + "Presentation"; + final static String roleClass = vivoCore + "PresenterRole"; + final static String conferenceClass = bibo + "Conference"; + final static String hasRolePred = "http://purl.obolibrary.org/obo/RO_0000053"; + final static String roleOfPred = "http://purl.obolibrary.org/obo/RO_0000052"; + final static String roleRealizedInPred = "http://purl.obolibrary.org/obo/BFO_0000054"; + final static String realizedRolePred = "http://purl.obolibrary.org/obo/BFO_0000055"; + final static String includesEventPred = "http://purl.obolibrary.org/obo/BFO_0000051"; + final static String eventWithinPred = "http://purl.obolibrary.org/obo/BFO_0000050"; + final static String roleToInterval = vivoCore + "dateTimeInterval"; + final static String intervalType = vivoCore + "DateTimeInterval"; + final static String intervalToStart = vivoCore + "start"; + final static String intervalToEnd = vivoCore + "end"; + final static String dateTimeValueType = vivoCore + "DateTimeValue"; + final static String dateTimeValue = vivoCore + "dateTime"; + final static String dateTimePrecision = vivoCore + "dateTimePrecision"; + + public AddPresenterRoleToPersonGenerator() {} + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, + HttpSession session) throws Exception { + + EditConfigurationVTwo conf = new EditConfigurationVTwo(); + + initBasics(conf, vreq); + initPropertyParameters(vreq, session, conf); + initObjectPropForm(conf, vreq); + + conf.setTemplate("addPresenterRoleToPerson.ftl"); + + conf.setVarNameForSubject("person"); + conf.setVarNameForPredicate("predicate"); + conf.setVarNameForObject("role"); + + conf.setN3Required( Arrays.asList( n3ForNewRole, + roleLabelAssertion) ); + conf.setN3Optional( Arrays.asList( n3ForNewPresentation, + n3ForExistingPresentation, + n3ForNewConferenceNewPres, + n3ForNewConferenceExistingPres, + n3ForExistingConferenceNewPres, + n3ForExistingConferenceExistingPres, + n3ForStart, + n3ForEnd ) ); + + conf.addNewResource("presentation", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("newConference", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("role", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("endNode", DEFAULT_NS_FOR_NEW_RESOURCE); + + //uris in scope: none + //literals in scope: none + + conf.setUrisOnform(Arrays.asList("existingPresentation", "existingConference", "presentationType")); + conf.setLiteralsOnForm(Arrays.asList("presentationLabel", "presentationLabelDisplay", "conferenceLabel", "conferenceLabelDisplay", "roleLabel")); + + conf.addSparqlForExistingLiteral("presentationLabel", presentationLabelQuery); + conf.addSparqlForExistingLiteral("conferenceLabel", conferenceLabelQuery); + conf.addSparqlForExistingLiteral("roleLabel", roleLabelQuery); + conf.addSparqlForExistingUris("existingPresentation", presentationQuery); + conf.addSparqlForExistingUris("existingConference", existingConferenceQuery); + conf.addSparqlForExistingUris("presentationType", presentationTypeQuery); + conf.addSparqlForExistingLiteral( + "startField-value", existingStartDateQuery); + conf.addSparqlForExistingLiteral( + "endField-value", existingEndDateQuery); + conf.addSparqlForExistingUris( + "intervalNode", existingIntervalNodeQuery); + conf.addSparqlForExistingUris("startNode", existingStartNodeQuery); + conf.addSparqlForExistingUris("endNode", existingEndNodeQuery); + conf.addSparqlForExistingUris("startField-precision", + existingStartPrecisionQuery); + conf.addSparqlForExistingUris("endField-precision", + existingEndPrecisionQuery); + + conf.addField( new FieldVTwo(). // an autocomplete field + setName("existingPresentation") + ); + + conf.addField( new FieldVTwo(). + setName("presentationLabelDisplay") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString()) ) + ); + + conf.addField( new FieldVTwo(). + setName("presentationLabel") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString()) ) + ); + + conf.addField( new FieldVTwo(). + setName("presentationType"). + setValidators( list("nonempty") ). + setOptions( new ChildVClassesWithParent( + presentationClass)) + ); + + conf.addField( new FieldVTwo(). + setName("roleLabel") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("nonempty") ) + ); + + conf.addField( new FieldVTwo(). // an autocomplete field + setName("existingConference") + ); + + conf.addField( new FieldVTwo(). + setName("conferenceLabel"). + setRangeDatatypeUri(XSD.xstring.toString() ) + ); + + conf.addField( new FieldVTwo(). + setName("conferenceLabelDisplay"). + setRangeDatatypeUri(XSD.xstring.toString() ) + ); + + conf.addField( new FieldVTwo().setName("startField"). + setEditElement( + new DateTimeWithPrecisionVTwo(null, + VitroVocabulary.Precision.YEAR.uri(), + VitroVocabulary.Precision.NONE.uri()) + ) + ); + + conf.addField( new FieldVTwo().setName("endField"). + setEditElement( + new DateTimeWithPrecisionVTwo(null, + VitroVocabulary.Precision.YEAR.uri(), + VitroVocabulary.Precision.NONE.uri()) + ) + ); + + conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); + conf.addValidator(new AntiXssValidation()); + conf.addValidator(new AutocompleteRequiredInputValidator("existingPresentation", "presentationLabel")); + prepare(vreq, conf); + return conf; + } + + /* N3 assertions */ + final static String n3ForNewRole = + "@prefix core: <" + vivoCore + "> . \n\n" + + "?person <" + hasRolePred + "> ?role . \n" + + "?role a <" + roleClass + "> . \n" + + "?role <" + roleOfPred + "> ?person . "; + + final static String roleLabelAssertion = + "?role <" + label + "> ?roleLabel ."; + + final static String n3ForNewPresentation = + "?role <" + roleRealizedInPred + "> ?presentation . \n" + + "?presentation <" + realizedRolePred + "> ?role . \n" + + "?presentation <" + label + "> ?presentationLabel . \n" + + "?presentation a ?presentationType ."; + + final static String n3ForExistingPresentation = + "?role <" + roleRealizedInPred + "> ?existingPresentation . \n" + + "?existingPresentation <" + realizedRolePred + "> ?role . \n" + + "?existingPresentation a ?presentationType ."; + + final static String n3ForNewConferenceNewPres = + "?presentation <" + eventWithinPred + "> ?newConference . \n" + + "?newConference <" + includesEventPred + "> ?presentation . \n" + + "?newConference a <" + conferenceClass + "> . \n" + + "?newConference <" + label + "> ?conferenceLabel ."; + + final static String n3ForNewConferenceExistingPres = + "?existingPresentation <" + eventWithinPred + "> ?newConference . \n" + + "?newConference <" + includesEventPred + "> ?existingPresentation . \n" + + "?newConference a <" + conferenceClass + "> . \n" + + "?newConference <" + label + "> ?conferenceLabel ."; + + final static String n3ForExistingConferenceNewPres = + "?existingConference <" + includesEventPred + "> ?presentation . \n" + + "?presentation <" + eventWithinPred + "> ?existingConference . \n" + + "?presentation <" + label + "> ?presentationLabel . "; + + final static String n3ForExistingConferenceExistingPres = + "?existingConference <" + includesEventPred + "> ?existingPresentation . \n" + + "?existingPresentation <" + eventWithinPred + "> ?existingConference . "; + + final static String n3ForStart = + "?role <" + roleToInterval + "> ?intervalNode . \n" + + "?intervalNode a <" + intervalType + "> . \n" + + "?intervalNode <" + intervalToStart + "> ?startNode . \n" + + "?startNode a <" + dateTimeValueType + "> . \n" + + "?startNode <" + dateTimeValue + "> ?startField-value . \n" + + "?startNode <" + dateTimePrecision + "> ?startField-precision . \n"; + + final static String n3ForEnd = + "?role <" + roleToInterval + "> ?intervalNode . \n" + + "?intervalNode a <" + intervalType + "> . \n" + + "?intervalNode <" + intervalToEnd + "> ?endNode . \n" + + "?endNode a <" + dateTimeValueType + "> . \n" + + "?endNode <" + dateTimeValue + "> ?endField-value . \n" + + "?endNode <" + dateTimePrecision + "> ?endField-precision . \n"; + + /* Queries for editing an existing entry */ + final static String roleLabelQuery = + "SELECT ?existingRoleLabel WHERE { \n" + + "?role <" + label + "> ?existingRoleLabel . }"; + + final static String presentationQuery = + "SELECT ?existingPresentation WHERE { \n" + + "?role <" + roleRealizedInPred + "> ?existingPresentation . }"; + + final static String presentationLabelQuery = + "SELECT ?existingPresentationLabel WHERE { \n" + + "?role <" + roleRealizedInPred + "> ?existingPresentation . " + + "?existingPresentation <" + label + "> ?existingPresentationLabel . }"; + + final static String presentationTypeQuery = + "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + + "SELECT ?existingPresentationType WHERE { \n" + + "?role <" + roleRealizedInPred + "> ?existingPresentation . " + + "?existingPresentation vitro:mostSpecificType ?existingPresentationType . }"; + + final static String existingConferenceQuery = + "SELECT ?existingConference WHERE { \n" + + "?role <" + roleRealizedInPred + "> ?existingPresentation . " + + "?existingPresentation <" + eventWithinPred + "> ?existingConference . }"; + + final static String conferenceLabelQuery = + "SELECT ?existingConferenceLabel WHERE { \n" + + "?role <" + roleRealizedInPred + "> ?existingPresentation . " + + "?existingPresentation <" + eventWithinPred + "> ?existingConference . \n" + + "?existingConference <" + label + "> ?existingConferenceLabel . }"; + + final static String existingStartDateQuery = + "SELECT ?existingDateStart WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n" + + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + + " ?startNode a <" + dateTimeValueType +"> . \n" + + " ?startNode <" + dateTimeValue + "> ?existingDateStart . }"; + + final static String existingEndDateQuery = + "SELECT ?existingEndDate WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n " + + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + + " ?endNode a <" + dateTimeValueType + "> . \n" + + " ?endNode <" + dateTimeValue + "> ?existingEndDate . }"; + + final static String existingIntervalNodeQuery = + "SELECT ?existingIntervalNode WHERE { \n" + + " ?role <" + roleToInterval + "> ?existingIntervalNode . \n" + + " ?existingIntervalNode a <" + intervalType + "> . }"; + + final static String existingStartNodeQuery = + "SELECT ?existingStartNode WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n" + + " ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" + + " ?existingStartNode a <" + dateTimeValueType + "> . } "; + + final static String existingEndNodeQuery = + "SELECT ?existingEndNode WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n" + + " ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" + + " ?existingEndNode a <" + dateTimeValueType + "> .} "; + + final static String existingStartPrecisionQuery = + "SELECT ?existingStartPrecision WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n" + + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + + " ?startNode a <" + dateTimeValueType + "> . \n" + + " ?startNode <" + dateTimePrecision + "> ?existingStartPrecision . }"; + + final static String existingEndPrecisionQuery = + "SELECT ?existingEndPrecision WHERE { \n" + + " ?role <" + roleToInterval + "> ?intervalNode . \n" + + " ?intervalNode a <" + intervalType + "> . \n" + + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + + " ?endNode a <" + dateTimeValueType + "> . \n" + + " ?endNode <" + dateTimePrecision + "> ?existingEndPrecision . }"; + +} + 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..3f26de70 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 @@ -11,11 +11,20 @@ import javax.servlet.http.HttpSession; import com.hp.hpl.jena.rdf.model.Literal; import com.hp.hpl.jena.vocabulary.XSD; +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.RDFNode; +import com.hp.hpl.jena.rdf.model.Resource; +import com.hp.hpl.jena.sparql.resultset.ResultSetMem; import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; +import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.PersonHasPublicationValidator; @@ -37,6 +46,7 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement final static String collectionClass = bibo + "Periodical"; final static String bookClass = bibo + "Book"; + final static String documentClass = bibo + "Document"; final static String conferenceClass = bibo + "Conference"; final static String editorClass = foaf + "Person"; final static String publisherClass = vivoCore + "Publisher"; @@ -52,7 +62,8 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement final static String dateTimeValueType = vivoCore + "DateTimeValue"; final static String dateTimeValue = vivoCore + "dateTime"; final static String dateTimePrecision = vivoCore + "dateTimePrecision"; - + final static String relatesPred = vivoCore + "relates"; + public AddPublicationToPersonGenerator() {} @Override @@ -69,17 +80,29 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement Individual authorshipNode = EditConfigurationUtils.getObjectIndividual(vreq); //try to get the publication - List stmts = - authorshipNode.getObjectPropertyStatements("http://vivoweb.org/ontology/core#linkedInformationResource"); - if( stmts == null || stmts.isEmpty() ){ - return doBadAuthorshipNoPub( vreq ); - }else if( stmts.size() > 1 ){ - return doBadAuthorshipMultiplePubs(vreq); - }else{ - //skip to publication - EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); - editConfiguration.setSkipToUrl(UrlBuilder.getIndividualProfileUrl(stmts.get(0).getObjectURI(), vreq)); - return editConfiguration; + String pubQueryStr = "SELECT ?obj \n" + + "WHERE { <" + authorshipNode.getURI() + "> <" + relatesPred + "> ?obj . \n" + + " ?obj a <" + documentClass + "> . } \n"; + Query pubQuery = QueryFactory.create(pubQueryStr); + QueryExecution qe = QueryExecutionFactory.create(pubQuery, ModelAccess.on(vreq).getJenaOntModel()); + try { + ResultSetMem rs = new ResultSetMem(qe.execSelect()); + if(!rs.hasNext()){ + return doBadAuthorshipNoPub( vreq ); + }else if( rs.size() > 1 ){ + return doBadAuthorshipMultiplePubs(vreq); + }else{ + //skip to publication + RDFNode objNode = rs.next().get("obj"); + if (!objNode.isResource() || objNode.isAnon()) { + return doBadAuthorshipNoPub( vreq ); + } + EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); + editConfiguration.setSkipToUrl(UrlBuilder.getIndividualProfileUrl(((Resource) objNode).getURI(), vreq)); + return editConfiguration; + } + } finally { + qe.close(); } } @@ -197,22 +220,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() { @@ -285,15 +308,24 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement private String getN3ForNewBookNewEditor() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?newBook vivo:editor ?newEditor . \n " + - "?newEditor vivo:editorOf ?newBook . \n" + + "?newBook vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?newBook . \n" + + "?newBook <" + label + "> ?book . \n " + + "?editorship a vivo:Editorship . \n" + + "?editorship vivo:relates ?newEditor . \n" + + "?newEditor a <" + editorClass + "> . \n" + + "?newEditor vivo:relatedBy ?editorship . \n" + "?newEditor <" + label + "> ?editor ."; } private String getN3ForNewBookEditor() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?newBook vivo:editor ?editorUri . \n" + - "?editorUri vivo:editorOf ?newBook . " ; + "?newBook vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?newBook . \n" + + "?newBook <" + label + "> ?book . \n " + + "?editorship a vivo:Editorship . \n" + + "?editorship vivo:relates ?editorUri . \n" + + "?editorUri vivo:relatedBy ?editorship . "; } private String getN3ForNewBookNewPublisher() { @@ -373,30 +405,44 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement private String getN3ForNewEditor() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?pubUri vivo:editor ?newEditor . \n" + + "?pubUri vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?pubUri . \n" + + "?editorship a vivo:Editorship . \n" + + "?editorship vivo:relates ?newEditor . \n" + "?newEditor a <" + editorClass + "> . \n" + - "?newEditor vivo:editorOf ?pubUri . \n" + + "?newEditor vivo:relatedBy ?editorship . \n" + "?newEditor <" + label + "> ?editor ."; } private String getN3ForEditor() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?pubUri vivo:editor ?editorUri . \n" + - "?editorUri vivo:editorOf ?pubUri . "; + "?pubUri vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?pubUri . \n" + + "?editorship a vivo:Editorship . \n" + + "?editorship vivo:relates ?editorUri . \n" + + "?editorUri vivo:relatedBy ?editorship . "; } private String getN3ForNewEditorNewPub() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?newPublication vivo:editor ?newEditor . \n" + + "?newPublication vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?newPublication . \n" + + "?newPublication <" + label + "> ?title ." + + "?editorship a vivo:Editorship . \n" + + "?editorship vivo:relates ?newEditor . \n" + "?newEditor a <" + editorClass + "> . \n" + - "?newEditor vivo:editorOf ?newPublication . \n" + + "?newEditor vivo:relatedBy ?editorship . \n" + "?newEditor <" + label + "> ?editor ."; } private String getN3ForEditorNewPub() { return "@prefix vivo: <" + vivoCore + "> . \n" + - "?newPublication vivo:editor ?editorUri . \n" + - "?editorUri vivo:editorOf ?newPublication . "; + "?newPublication vivo:relatedBy ?editorship . \n" + + "?editorship vivo:relates ?newPublication . \n" + + "?newPublication <" + label + "> ?title ." + + "?editorship vivo:relates ?editorUri . \n" + + "?editorship a vivo:Editorship . \n" + + "?editorUri vivo:relatedBy ?editorship . "; } private String getN3ForNewPublisher() { @@ -428,13 +474,23 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement } private String getN3FirstNameAssertion() { - return "@prefix foaf: <" + foaf + "> . \n" + - "?newEditor foaf:firstName ?firstName ."; + return "@prefix vcard: . \n" + + "?newEditor ?vcardEditor . \n" + + "?vcardEditor ?newEditor . \n" + + "?vcardEditor a . \n" + + "?vcardEditor vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:givenName ?firstName ."; } private String getN3LastNameAssertion() { - return "@prefix foaf: <" + foaf + "> . \n" + - "?newEditor foaf:lastName ?lastName ."; + return "@prefix vcard: . \n" + + "?newEditor ?vcardEditor . \n" + + "?vcardEditor ?newEditor . \n" + + "?vcardEditor a . \n" + + "?vcardEditor vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:familyName ?lastName ."; } private String getN3ForLocaleAssertion() { @@ -492,6 +548,9 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement newResources.put("newConference", DEFAULT_NS_TOKEN); newResources.put("newEvent", DEFAULT_NS_TOKEN); newResources.put("newEditor", DEFAULT_NS_TOKEN); + newResources.put("editorship", DEFAULT_NS_TOKEN); + newResources.put("vcardEditor", DEFAULT_NS_TOKEN); + newResources.put("vcardName", DEFAULT_NS_TOKEN); newResources.put("newPublisher", DEFAULT_NS_TOKEN); newResources.put("dateTimeNode", DEFAULT_NS_TOKEN); return newResources; @@ -875,8 +934,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; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java index f64254ed..087a4e0d 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java @@ -1,64 +1,64 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; - -public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private static String OBJECT_VCLASS_URI = "http://vivoweb.org/ontology/core#InformationResource"; - - @Override - String getTemplate() { return "addReviewerRoleToPerson.ftl"; } - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - @Override - public String getRoleToActivityPredicate(VitroRequest vreq) { - return ""; - } - - //role type will always be set based on particular form - @Override - public String getRoleType() { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#ReviewerRole"; - } - - /** - * Each subclass generator will return its own type of option here: - * whether literal hardcoded, based on class group, or subclasses of a specific class - */ - @Override - FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { - return new ChildVClassesOptions(OBJECT_VCLASS_URI) - .setDefaultOptionLabel("Select type"); - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - public boolean isShowRoleLabelField() { - return false; - } - - /* - * Use the methods below to change the date/time precision in the - * custom form associated with this generator. When not used, the - * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, - * MINUTE, TIME and NONE. - */ - /* - public String getStartDatePrecision() { - String precision = VitroVocabulary.Precision.MONTH.uri(); - return precision; - } - - public String getEndDatePrecision() { - String precision = VitroVocabulary.Precision.DAY.uri(); - return precision; - } - */ - -} +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; + +public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { + + private static String OBJECT_VCLASS_URI = "http://purl.org/ontology/bibo/Document"; + + @Override + String getTemplate() { return "addReviewerRoleToPerson.ftl"; } + + //The default activityToRolePredicate and roleToActivityPredicates are + //correct for this subclass so they don't need to be overwritten + +/* @Override + public String getRoleToActivityPredicate(VitroRequest vreq) { + return ""; + } +*/ + //role type will always be set based on particular form + @Override + public String getRoleType() { + //TODO: Get dynamic way of including vivoweb ontology + return "http://vivoweb.org/ontology/core#ReviewerRole"; + } + + /** + * Each subclass generator will return its own type of option here: + * whether literal hardcoded, based on class group, or subclasses of a specific class + */ + @Override + FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { + return new ChildVClassesOptions(OBJECT_VCLASS_URI) + .setDefaultOptionLabel("Select type"); + } + + //isShowRoleLabelField remains true for this so doesn't need to be overwritten + public boolean isShowRoleLabelField() { + return false; + } + + /* + * Use the methods below to change the date/time precision in the + * custom form associated with this generator. When not used, the + * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, + * MINUTE, TIME and NONE. + */ + /* + public String getStartDatePrecision() { + String precision = VitroVocabulary.Precision.MONTH.uri(); + return precision; + } + + public String getEndDatePrecision() { + String precision = VitroVocabulary.Precision.DAY.uri(); + return precision; + } + */ + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java index 554fe8cb..b7d61b77 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java @@ -1,50 +1,50 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; - -public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization"; - - @Override - String getTemplate() { return "addServiceProviderRoleToPerson.ftl"; } - - @Override - String getRoleType() { - return "http://vivoweb.org/ontology/core#ServiceProviderRole"; - } - - /** Service Provider role involves hard-coded options for the - * "right side" of the role or activity. */ - @Override - FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { - return new - ChildVClassesOptions(OPTION_CLASS_URI) - .setDefaultOptionLabel("Select type"); - } - - @Override - boolean isShowRoleLabelField(){return true;} - - /* - * Use the methods below to change the date/time precision in the - * custom form associated with this generator. When not used, the - * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, - * MINUTE, TIME and NONE. - */ -/* - public String getStartDatePrecision() { - String precision = VitroVocabulary.Precision.MONTH.uri(); - return precision; - } - - public String getEndDatePrecision() { - String precision = VitroVocabulary.Precision.DAY.uri(); - return precision; - } -*/ -} +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; + +public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { + + private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization"; + + @Override + String getTemplate() { return "addServiceProviderRoleToPerson.ftl"; } + + @Override + String getRoleType() { + return "http://purl.obolibrary.org/obo/ERO_0000012"; + } + + /** Service Provider role involves hard-coded options for the + * "right side" of the role or activity. */ + @Override + FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { + return new + ChildVClassesOptions(OPTION_CLASS_URI) + .setDefaultOptionLabel("Select type"); + } + + @Override + boolean isShowRoleLabelField(){return true;} + + /* + * Use the methods below to change the date/time precision in the + * custom form associated with this generator. When not used, the + * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, + * MINUTE, TIME and NONE. + */ +/* + public String getStartDatePrecision() { + String precision = VitroVocabulary.Precision.MONTH.uri(); + return precision; + } + + public String getEndDatePrecision() { + String precision = VitroVocabulary.Precision.DAY.uri(); + return precision; + } +*/ +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java new file mode 100644 index 00000000..bfc5a43e --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java @@ -0,0 +1,606 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.ontology.OntModel; +import com.hp.hpl.jena.query.Dataset; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.RDFNode; +import com.hp.hpl.jena.shared.Lock; +import com.hp.hpl.jena.sparql.resultset.ResultSetMem; +import com.hp.hpl.jena.vocabulary.RDFS; +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper; +import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions; +import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants; +import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddDataPropertyStatement; +import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddObjectPropertyStatement; +import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; +import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; +import edu.cornell.mannlib.vitro.webapp.beans.Individual; +import edu.cornell.mannlib.vitro.webapp.beans.VClass; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap; +import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.FoafNameToRdfsLabelPreprocessor; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.ManageLabelsForIndividualPreprocessor; +import edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionDataGetter; +import edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectorUtilities; +import edu.cornell.mannlib.vitro.webapp.i18n.selection.SelectedLocale; +import edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.DataPropertyStatementTemplateModel; + +/** + * This generator is specifically for handling labels for a FOAF Person individual and is an object property form. + *This allows the page to show all the labels for a particular individual and sets up code + *enabling the addition of a new label. Links on the page will allow for removal or editing of a given label. + */ +public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { + public static Log log = LogFactory.getLog(ManageLabelsForIndividualGenerator.class); + private static String template = "manageLabelsForPerson.ftl"; + private HashMap> labelsSortedByLanguage = null; + private List existingLabelLiterals = null; + //list of language names sorted alphabetically + private List existingSortedLanguageNameList = null; + //This would be for the full list and can be used for the existing labels list as well + + private HashMap fullLanguageNameToCodeMap = null; + private static String predicateUri = RDFS.label.getURI(); + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { + + EditConfigurationVTwo config = new EditConfigurationVTwo(); + config.setTemplate(this.getTemplate()); + + initBasics(config, vreq); + initPropertyParameters(vreq, session, config); + //This form is technically not an object property form in the true sense + //or a data property form because it is used to list the various labels + //and allow for adding new labels, but since the generator will + //be employed when the 'add' button is used, we will set this is an object property form + //although label will mean we need to add a data property statement as well + //URL to return to is the same page once addition is complete + initObjectPropForm(config, vreq); + + + this.setUrlToReturnTo(config, vreq); + + config.setSubjectUri(EditConfigurationUtils.getSubjectUri(vreq)); + + setVarNames(config); + //config.setDatapropKey( EditConfigurationUtils.getDataHash(vreq) ); + //Add n3, fields, etc. in the case where the user wants to add a label + //N3 required should be empty since the addition of a label is optional in this case + config.setN3Required(this.generateN3Required(vreq)); + config.setN3Optional(this.generateN3Optional(vreq)); + this.addNewResources(config); + this.setUrisAndLiteralsOnForm(config, vreq); + this.setUrisAndLiteralsInScope(config); + this.setFields(config, vreq, EditConfigurationUtils + .getPredicateUri(vreq)); + + //Get existing labels + //this.initExistingLabels(config, vreq); + + //Add form specific data used to populate template + addFormSpecificData(config, vreq); + //This preprocessor handles getting the correct label language and putting the attribute on the label + config.addEditSubmissionPreprocessor( + new ManageLabelsForIndividualPreprocessor(config)); + //This will handle generating the label from the first name, middle, and last names and also make sure to associate + //a language with that label + config.addModelChangePreprocessor(new FoafNameToRdfsLabelPreprocessor()); + + prepare(vreq, config); + return config; + } + + /**With ISF Changes**/ + //For addition of a label, with ISF changes, the name is now linked to a vcard which in turn is linked to a "fullname" that then has first/middle/last names + + private void addNewResources(EditConfigurationVTwo config) { + config.addNewResource("fullName", DEFAULT_NS_FOR_NEW_RESOURCE); + config.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); + } + + private void setUrlToReturnTo(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + editConfiguration.setUrlPatternToReturnTo(EditConfigurationUtils.getFormUrlWithoutContext(vreq)); + } + + private void setVarNames(EditConfigurationVTwo editConfiguration) { + editConfiguration.setVarNameForSubject("subject"); + editConfiguration.setVarNameForPredicate("predicate"); + + } + + + private List generateN3Required(VitroRequest vreq) { + List n3Required = new ArrayList(); + return n3Required; + } + + private List generateN3Optional(VitroRequest vreq) { + List n3Optional = new ArrayList(); + String predicateUri = EditConfigurationUtils.getPredicateUri(vreq); + String n3 = "?subject <" + predicateUri + "> ?label "; + //n3 used if the subject is a person + //String personN3 = this.N3_PREFIX + "?subject foaf:firstName ?firstName ; foaf:lastName ?lastName ."; + //This n3 will be different with the ISF changes + String personN3 = this.N3_PREFIX + + "?subject ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?subject . \n" + + "?individualVcard ?fullName . \n" + + "?fullName a . \n" + + "?fullName ?firstName . \n" + + "?fullName ?lastName ."; + + n3Optional.add(n3); + n3Optional.add(personN3); + return n3Optional; + } + + + + private void setFields(EditConfigurationVTwo editConfiguration, VitroRequest vreq, String predicateUri) { + Map fields = new HashMap(); + editConfiguration.setFields(fields); + editConfiguration.addField(new FieldVTwo(). + setName("label"). + setValidators(getLabelValidators(vreq, editConfiguration))); + editConfiguration.addField(new FieldVTwo( + ).setName("newLabelLanguage")); + //no validators since all of this is optional + //there should be error-checking client side though + editConfiguration.addField(new FieldVTwo(). + setName("firstName"). + setValidators(getFirstNameValidators(vreq, editConfiguration))); + editConfiguration.addField(new FieldVTwo(). + setName("middleName"). + setValidators(getLastNameValidators(vreq, editConfiguration))); + + editConfiguration.addField(new FieldVTwo(). + setName("lastName"). + setValidators(getLastNameValidators(vreq, editConfiguration))); + + //With ISF Changes, also include middle name + + } + + //first and last name have validators if is person is true + private List getFirstNameValidators(VitroRequest vreq, EditConfigurationVTwo config) { + List validators = new ArrayList(); + if(isPersonType(vreq, config)) { + validators.add("nonempty"); + } + return validators; + } + + private List getLastNameValidators(VitroRequest vreq, EditConfigurationVTwo config) { + List validators = new ArrayList(); + if(isPersonType(vreq, config)) { + validators.add("nonempty"); + } + return validators; + } + + //validate label if person is not true + private List getLabelValidators(VitroRequest vreq, EditConfigurationVTwo config) { + List validators = new ArrayList(); + if(!isPersonType(vreq, config)) { + validators.add("nonempty"); + } + return validators; + } + + + + private void setUrisAndLiteralsOnForm(EditConfigurationVTwo config, + VitroRequest vreq) { + List literalsOnForm = new ArrayList(); + literalsOnForm.add("label"); + literalsOnForm.add("newLabelLanguage"); + //optional for person + literalsOnForm.add("firstName"); + literalsOnForm.add("lastName"); + config.setLiteralsOnForm(literalsOnForm); + + } + + + private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration) { + HashMap> urisInScope = new HashMap>(); + //note that at this point the subject, predicate, and object var parameters have already been processed + urisInScope.put(editConfiguration.getVarNameForSubject(), + Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); + urisInScope.put(editConfiguration.getVarNameForPredicate(), + Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); + editConfiguration.setUrisInScope(urisInScope); + //Uris in scope include subject, predicate, and object var + + editConfiguration.setLiteralsInScope(new HashMap>()); + } + + private void initExistingLabels(EditConfigurationVTwo config, + VitroRequest vreq) { + this.existingLabelLiterals = this.getExistingLabels(config.getSubjectUri(), vreq); + // this.labelsSortedByLanguage = this.getLabelsSortedByLanguage(config,vreq); + //language names sorted for the existing languages + // this.existingSortedLanguageNameList = getExistingSortedLanguageNamesList(); + + //Generate a label to language code hash map + //TODO: + + //HashMap labelToLanguageCode = new HashMap(); + + //this.labels = getExistingLabels(config.getSubjectUri(), vreq); + //this.labelsSortedByLanguage = getLabelsSortedByLanguage(config.getSubjectUri(), vreq); + + } + + + private List getExistingSortedLanguageNamesList() { + HashSet existingLanguages = new HashSet(); + for(Literal l: this.existingLabelLiterals) { + String language = l.getLanguage(); + if(!existingLanguages.contains(language)) { + existingLanguages.add(language); + } + } + List sortedNames = new ArrayList(existingLanguages); + //sort alphabetically + Collections.sort(sortedNames); + return sortedNames; + } + + + private void addFormSpecificData(EditConfigurationVTwo config, + VitroRequest vreq) { + //Get all language codes/labels in the system, and this list is sorted by language name + List> locales = this.getLocales(vreq); + //Get code to label hashmap - we use this to get the language name for the language code returned in the rdf literal + HashMap localeCodeToNameMap = this.getFullCodeToLanguageNameMap(locales); + //the labels already added by the user + ArrayList existingLabels = this.getExistingLabels(config.getSubjectUri(), vreq); + int numberExistingLabels = existingLabels.size(); + //existing labels keyed by language name and each of the list of labels is sorted by language name + HashMap> existingLabelsByLanguageName = this.getLabelsSortedByLanguageName(existingLabels, localeCodeToNameMap, config, vreq); + //Get available locales for the drop down for adding a new label, also sorted by language name + HashSet existingLanguageNames = new HashSet(existingLabelsByLanguageName.keySet()); + List> availableLocalesForAdd = getAvailableLocales(locales, existingLanguageNames); + + + //Save all locales + config.addFormSpecificData("selectLocaleFullList", locales); + //Save labels sorted by language name, untyped have "untyped" as the language name value + config.addFormSpecificData("labelsSortedByLanguageName", existingLabelsByLanguageName); + config.addFormSpecificData("selectLocale",availableLocalesForAdd); + config.addFormSpecificData("displayRemoveLink", (numberExistingLabels > 1)); + + + //How do we edit? Will need to see + config.addFormSpecificData("deleteWebpageUrl", "/edit/primitiveDelete"); + + + Individual subject = vreq.getWebappDaoFactory().getIndividualDao().getIndividualByURI(config.getSubjectUri()); + if( subject != null && subject.getName() != null ){ + config.addFormSpecificData("subjectName", subject.getName()); + }else{ + config.addFormSpecificData("subjectName", null); + } + + //Put in whether or not person type + if(isPersonType(vreq, config)) { + //Doing this b/c unsure how freemarker will handle boolean value from JAVA + config.addFormSpecificData("isPersonType", "true"); + } else { + config.addFormSpecificData("isPersonType", "false"); + + } + + //Include whether or not editable to enable edit/remove links and add to show up + config.addFormSpecificData("editable", isEditable(vreq, config)); + } + + + + //Based on what locales have already been selected for labels, return a list of + //locales for which new labels can be added and have these sorted by the name of the language + private List> getAvailableLocales(List> allLocales, + HashSet existingLabelsLanguageNames) { + List> availableLocales = new ArrayList>(); + for(HashMap localeInfo: allLocales) { + String languageName = (String) localeInfo.get("label"); + //If this language label is NOT in the labels sorted by language, then available + //for selection when creating a new label + //The assumption here is we don't want to allow the user to add a new label when a label + //already exists in that language + if(languageName != "untyped" && !existingLabelsLanguageNames.contains(languageName)) { + availableLocales.add(localeInfo); + } + } + //Sort list by language label and return + Collections.sort(availableLocales, new Comparator>() { + public int compare(HashMap h1, HashMap h2) { + String languageName1 = (String) h1.get("label"); + String languageName2 = (String) h2.get("label"); + return languageName1.compareTo(languageName2); + } + }); + + return availableLocales; + } + + + private Object isEditable(VitroRequest vreq, EditConfigurationVTwo config) { + Individual individual = EditConfigurationUtils.getIndividual(vreq, config.getSubjectUri()); + AddDataPropertyStatement adps = new AddDataPropertyStatement( + vreq.getJenaOntModel(), individual.getURI(), + RequestActionConstants.SOME_URI); + AddObjectPropertyStatement aops = new AddObjectPropertyStatement( + vreq.getJenaOntModel(), individual.getURI(), + RequestActionConstants.SOME_URI, + RequestActionConstants.SOME_URI); + return PolicyHelper.isAuthorizedForActions(vreq, new Actions(adps).or(aops)); + } + + + //Copied from NewIndividualFormGenerator + //TODO: Refactor so common code can be used by both generators + public String getFOAFPersonClassURI() { + return "http://xmlns.com/foaf/0.1/Person"; + } + + public boolean isPersonType(VitroRequest vreq, EditConfigurationVTwo config) { + WebappDaoFactory wdf = vreq.getWebappDaoFactory(); + Boolean isPersonType = Boolean.FALSE; + String foafPersonType = getFOAFPersonClassURI(); + List vclasses = this.getVClasses(config, vreq); + if( vclasses != null ){ + for( VClass v: vclasses){ + String typeUri = v.getURI(); + if( foafPersonType.equals(typeUri)) { + isPersonType = Boolean.TRUE; + break; + } + } + } + return isPersonType; + } + + //how to get the type of the individual in question + public List getVClasses(EditConfigurationVTwo config, VitroRequest vreq) { + Individual subject = EditConfigurationUtils.getIndividual(vreq, config.getSubjectUri()); + //Get the vclasses appropriate for this subject + return subject.getVClasses(); + } + + //Languages sorted by language name + private HashMap> getLabelsSortedByLanguageName(List labels, Map localeCodeToNameMap, EditConfigurationVTwo config, + VitroRequest vreq) { + String subjectUri = config.getSubjectUri(); + String propertyUri = config.getPredicateUri(); + + + //Iterate through the labels and create a hashmap + HashMap> labelsHash= new HashMap>(); + + for(Literal l: labels) { + String languageTag = l.getLanguage(); + String languageName = ""; + if(languageTag == "") { + languageName = "untyped"; + } + else if(localeCodeToNameMap.containsKey(languageTag)) { + languageName = localeCodeToNameMap.get(languageTag); + } else { + log.warn("This language tag " + languageTag + " does not have corresponding name in the system and was not processed"); + } + + if(languageName != "") { + if(!labelsHash.containsKey(languageName)) { + labelsHash.put(languageName, new ArrayList()); + } + ArrayList labelsList = (ArrayList)labelsHash.get(languageName); + //This should put the label in the list + //Create label information instance with the required information + //To generate link + DataPropertyStatementTemplateModel dpstm = new DataPropertyStatementTemplateModel(subjectUri, propertyUri, l, + template, vreq); + labelsList.add(new LabelInformation( + l, dpstm.getEditUrl(), dpstm.getDeleteUrl(), languageTag, languageName)); + } + } + + //Sort each label list + LabelInformationComparator lic = new LabelInformationComparator(); + for(String languageName: labelsHash.keySet()) { + List labelInfo = labelsHash.get(languageName); + Collections.sort(labelInfo, lic); + } + return labelsHash; + + } + + + public static class LabelInformationComparator implements Comparator { + + public int compare(LabelInformation l1, LabelInformation l2) { + return l1.getLabelStringValue().compareTo(l2.getLabelStringValue()); + } + } + + + private static String LABEL_QUERY = "" + + "PREFIX rdfs: \n" + + "SELECT DISTINCT ?label WHERE { \n" + + " ?subject rdfs:label ?label \n" + + "} ORDER BY ?label"; + + + private ArrayList getExistingLabels(String subjectUri, VitroRequest vreq) { + String queryStr = QueryUtils.subUriForQueryVar(LABEL_QUERY, "subject", subjectUri); + log.debug("queryStr = " + queryStr); + + ArrayList labels = new ArrayList(); + try { + //We want to get the labels for all the languages, not just the display language + ResultSet results = QueryUtils.getLanguageNeutralQueryResults(queryStr, vreq); + while (results.hasNext()) { + QuerySolution soln = results.nextSolution(); + Literal nodeLiteral = soln.get("label").asLiteral(); + labels.add(nodeLiteral); + + + } + } catch (Exception e) { + log.error(e, e); + } + return labels; +} + + + + //Putting this into a method allows overriding it in subclasses + protected String getEditForm() { + return null; + //return AddEditWebpageFormGenerator.class.getName(); + } + + + protected String getTemplate() { + return template; + } + + + + //get locales + public List> getLocales(VitroRequest vreq) { + List selectables = SelectedLocale.getSelectableLocales(vreq); + if (selectables.isEmpty()) { + return Collections.emptyList(); + } + List> list = new ArrayList>(); + Locale currentLocale = SelectedLocale.getCurrentLocale(vreq); + for (Locale locale : selectables) { + try { + list.add(buildLocaleMap(locale, currentLocale)); + } catch (FileNotFoundException e) { + log.warn("Can't show the Locale selector for '" + locale + + "': " + e); + } + } + + return list; + } + + + + public HashMap getFullCodeToLanguageNameMap(List> localesList) { + HashMap codeToLanguageMap = new HashMap(); + for(Map locale: localesList) { + String code = (String) locale.get("code"); + String label = (String) locale.get("label"); + if(!codeToLanguageMap.containsKey(code)) { + codeToLanguageMap.put(code, label); + } + else { + log.warn("Language code " + code + " for " + label + " was not associated in map becayse label already exists"); + } + } + return codeToLanguageMap; + } + + public List getFullLanguagesNamesSortedList(List> localesList) { + HashSet languageNamesSet = new HashSet(); + for(Map locale: localesList) { + String label = (String) locale.get("label"); + if(!languageNamesSet.contains(label)) { + languageNamesSet.add(label); + } + + } + List languageNames = new ArrayList(languageNamesSet); + Collections.sort(languageNames); + return languageNames; + } + + //copied from locale selection data getter but don't need all this information + private HashMap buildLocaleMap(Locale locale, + Locale currentLocale) throws FileNotFoundException { + HashMap map = new HashMap(); + //Replacing the underscore with a hyphen because that is what is represented in the actual literals + map.put("code", locale.toString().replace("_", "-")); + map.put("label", locale.getDisplayName(currentLocale)); + return map; + } + + //Class used to store the information needed for the template, such as the labels, their languages, their edit links + public class LabelInformation { + private Literal labelLiteral = null; + private String editLinkURL; + private String deleteLinkURL; + private String languageCode; //languageCode + private String languageName; + public LabelInformation(Literal inputLiteral, String inputEditLinkURL, String inputDeleteLinkURL, String inputLanguageCode, String inputLanguageName) { + this.labelLiteral = inputLiteral; + this.editLinkURL = inputEditLinkURL; + this.deleteLinkURL = inputDeleteLinkURL; + this.languageCode = inputLanguageCode; + this.languageName = inputLanguageName; + } + + + public Literal getLabelLiteral() { + return this.labelLiteral; + } + + public String getLabelStringValue() { + return this.labelLiteral.getString(); + } + + public String getEditLinkURL() { + return this.editLinkURL; + } + + public String getDeleteLinkURL() { + return this.deleteLinkURL; + } + public String getLanguageCode() { + return this.languageCode; + } + + public String getLanguageName() { + return this.languageName; + } + } + + private String N3_PREFIX = "@prefix foaf: .\n"; + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsGenerator.java new file mode 100644 index 00000000..3d97c02e --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsGenerator.java @@ -0,0 +1,70 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import edu.cornell.mannlib.vitro.webapp.beans.Individual; +import edu.cornell.mannlib.vitro.webapp.beans.VClass; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; + +/** + *This generator selects the actual generator to be employed based on whether the individual is a Person + *or another individual. Adding a label for a person relies on first/name last name information i.e. object properties. + */ +public class ManageLabelsGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { + public static Log log = LogFactory.getLog(ManageLabelsForIndividualGenerator.class); + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { + EditConfigurationVTwo e = null; + String subjectUri = EditConfigurationUtils.getSubjectUri(vreq); + if(this.isPersonType(subjectUri, vreq)) { + //Generator for persons + e = new ManageLabelsForPersonGenerator().getEditConfiguration(vreq, session); + } else { + //Non-Person individuals + e = new ManageLabelsForIndividualGenerator().getEditConfiguration(vreq, session); + + } + + return e; + + } + + + public boolean isPersonType(String subjectUri, VitroRequest vreq) { + Boolean isPersonType = Boolean.FALSE; + String foafPersonType = getFOAFPersonClassURI(); + List vclasses = this.getVClasses(subjectUri, vreq); + if( vclasses != null ){ + for( VClass v: vclasses){ + String typeUri = v.getURI(); + if( foafPersonType.equals(typeUri)) { + isPersonType = Boolean.TRUE; + break; + } + } + } + return isPersonType; + } + + //Copied from NewIndividualFormGenerator + //TODO: Refactor so common code can be used by both generators + public String getFOAFPersonClassURI() { + return "http://xmlns.com/foaf/0.1/Person"; + } + + //how to get the type of the individual in question + public List getVClasses(String subjectUri, VitroRequest vreq) { + Individual subject = EditConfigurationUtils.getIndividual(vreq, subjectUri); + //Get the vclasses appropriate for this subject + return subject.getVClasses(); + } + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java index 1a82911c..90effba9 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java @@ -83,10 +83,14 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG private static String WEBPAGE_QUERY = "" + "PREFIX core: \n" - + "SELECT DISTINCT ?link ?url ?anchor ?rank WHERE { \n" - + " ?subject core:webpage ?link . \n" - + " OPTIONAL { ?link core:linkURI ?url } \n" - + " OPTIONAL { ?link core:linkAnchorText ?anchor } \n" + + "PREFIX vcard: \n" + + "PREFIX rdfs: \n" + + "SELECT DISTINCT ?vcard ?link ?url ?label ?rank WHERE { \n" + + " ?subject ?vcard . \n" + + " ?vcard vcard:hasURL ?link . \n" + + " ?link a vcard:URL \n" + + " OPTIONAL { ?link vcard:url ?url } \n" + + " OPTIONAL { ?link rdfs:label ?label } \n" + " OPTIONAL { ?link core:rank ?rank } \n" + "} ORDER BY ?rank"; @@ -108,7 +112,7 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG } catch (Exception e) { log.error(e, e); } - + log.debug("webpages = " + webpages); return webpages; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/NewIndividualFormGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/NewIndividualFormGenerator.java index 60d4f156..0fd76116 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/NewIndividualFormGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/NewIndividualFormGenerator.java @@ -1,177 +1,188 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import javax.servlet.http.HttpSession; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.XSD; - -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.FoafNameToRdfsLabelPreprocessor; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; - -/** - * Generates the edit configuration for a default property form. - * ModelChangePreprocessor creates the rdfs:label statement. - */ -public class NewIndividualFormGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { - - @Override - public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { - - EditConfigurationVTwo config = new EditConfigurationVTwo(); - - config.setTemplate( "newIndividualForm.ftl" ); - - config.setN3Required( list( - "?newInd <" + VitroVocabulary.RDF_TYPE + "> <" + getTypeOfNew(vreq) + "> ." - )); - //Optional because user may have selected either person or individual of another kind - //Person uses first name and last name whereas individual of other class would use label - config.setN3Optional(list( - N3_PREFIX + "?newInd foaf:firstName ?firstName ; foaf:lastName ?lastName .", - N3_PREFIX + "?newInd <" + RDFS.label.getURI() + "> ?label ." - )); - - config.addNewResource("newInd", vreq.getWebappDaoFactory().getDefaultNamespace()); - - config.setUrisOnform(list ()); - config.setLiteralsOnForm( list( "label", "firstName", "lastName" )); - setUrisAndLiteralsInScope(config); - //No SPARQL queries for existing since this is only used to create new, never for edit - - config.addField(new FieldVTwo(). - setName("firstName"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getFirstNameValidators(vreq))); - - config.addField(new FieldVTwo(). - setName("lastName"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getLastNameValidators(vreq))); - - config.addField(new FieldVTwo(). - setName("label"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getLabelValidators(vreq))); - - addFormSpecificData(config, vreq); - - config.addValidator(new AntiXssValidation()); - - //This combines the first and last name into the rdfs:label - config.addModelChangePreprocessor(new FoafNameToRdfsLabelPreprocessor()); - - String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); - config.setFormUrl(formUrl); - - //Note, the spaces are important - they were added by ProcessRdfFormController earlier - //as a means of ensuring the substitution worked correctly - as the regex expects spaces - config.setEntityToReturnTo(" ?newInd "); - prepare(vreq, config); - return config; - } - - //first and last name have validators if is person is true - private List getFirstNameValidators(VitroRequest vreq) { - List validators = new ArrayList(); - if(isPersonType(vreq)) { - validators.add("nonempty"); - } - return validators; - } - - private List getLastNameValidators(VitroRequest vreq) { - List validators = new ArrayList(); - if(isPersonType(vreq)) { - validators.add("nonempty"); - } - return validators; - } - - //validate label if person is not true - private List getLabelValidators(VitroRequest vreq) { - List validators = new ArrayList(); - if(!isPersonType(vreq)) { - validators.add("nonempty"); - } - return validators; - } - - //Get parameter from HTTP request for type of new individual - private String getTypeOfNew(VitroRequest vreq) { - String typeUri = vreq.getParameter("typeOfNew"); - if( typeUri == null || typeUri.trim().isEmpty() ) - return getFOAFPersonClassURI(); - else - return typeUri; - } - - //Form specific data - public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - HashMap formSpecificData = new HashMap(); - formSpecificData.put("typeName", getTypeName(vreq)); - //Put in whether or not person type - if(isPersonType(vreq)) { - //Doing this b/c unsure how freemarker will handle boolean value from JAVA - formSpecificData.put("isPersonType", "true"); - } else { - formSpecificData.put("isPersonType", "false"); - - } - editConfiguration.setFormSpecificData(formSpecificData); - } - - private String getTypeName(VitroRequest vreq) { - String typeOfNew = getTypeOfNew(vreq); - VClass type = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(typeOfNew); - return type.getName(); - } - - public String getFOAFPersonClassURI() { - return "http://xmlns.com/foaf/0.1/Person"; - } - - public boolean isPersonType(VitroRequest vreq) { - WebappDaoFactory wdf = vreq.getWebappDaoFactory(); - Boolean isPersonType = Boolean.FALSE; - String foafPersonType = getFOAFPersonClassURI(); - List superTypes = wdf.getVClassDao().getAllSuperClassURIs(getTypeOfNew(vreq)); - if( superTypes != null ){ - for( String typeUri : superTypes){ - if( foafPersonType.equals(typeUri)) { - isPersonType = Boolean.TRUE; - break; - } - } - } - return isPersonType; - } - private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration) { - HashMap> urisInScope = new HashMap>(); - //note that at this point the subject, predicate, and object var parameters have already been processed - urisInScope.put(editConfiguration.getVarNameForSubject(), - Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); - urisInScope.put(editConfiguration.getVarNameForPredicate(), - Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); - editConfiguration.setUrisInScope(urisInScope); - //Uris in scope include subject, predicate, and object var - - editConfiguration.setLiteralsInScope(new HashMap>()); - } - - private String N3_PREFIX = "@prefix foaf: .\n"; -} +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import javax.servlet.http.HttpSession; + +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.vocabulary.RDFS; +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.beans.VClass; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.FoafNameToRdfsLabelPreprocessor; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +/** + * Generates the edit configuration for a default property form. + * ModelChangePreprocessor creates the rdfs:label statement. + */ +public class NewIndividualFormGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { + + EditConfigurationVTwo config = new EditConfigurationVTwo(); + + config.setTemplate( "newIndividualForm.ftl" ); + + config.setN3Required( list( + "?newInd <" + VitroVocabulary.RDF_TYPE + "> <" + getTypeOfNew(vreq) + "> ." + )); + //Optional because user may have selected either person or individual of another kind + //Person uses first name and last name whereas individual of other class would use label + config.setN3Optional(list( + N3_PREFIX + "@prefix vcard: .\n" + + " ?newInd ?newVcardInd . \n" + + " ?newVcardInd ?newInd . \n" + + " ?newVcardInd a . \n" + + " ?newVcardInd vcard:hasName ?newVcardName . \n" + + " ?newVcardName a . \n" + + " ?newVcardName vcard:givenName ?firstName . \n" + + " ?newVcardName vcard:familyName ?lastName .", + N3_PREFIX + " ?newInd <" + RDFS.label.getURI() + "> ?label ." + )); + + config.addNewResource("newInd", vreq.getWebappDaoFactory().getDefaultNamespace()); + config.addNewResource("newVcardInd", vreq.getWebappDaoFactory().getDefaultNamespace()); + config.addNewResource("newVcardName", vreq.getWebappDaoFactory().getDefaultNamespace()); + + config.setUrisOnform(list ()); + config.setLiteralsOnForm( list( "label", "firstName", "lastName" )); + setUrisAndLiteralsInScope(config); + //No SPARQL queries for existing since this is only used to create new, never for edit + + config.addField(new FieldVTwo(). + setName("firstName"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getFirstNameValidators(vreq))); + + config.addField(new FieldVTwo(). + setName("lastName"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getLastNameValidators(vreq))); + + config.addField(new FieldVTwo(). + setName("label"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getLabelValidators(vreq))); + + addFormSpecificData(config, vreq); + + config.addValidator(new AntiXssValidation()); + + //This combines the first and last name into the rdfs:label + // currently being done via javascript in the template. May use this again + // when/if updated to IFS ontology. tlw72 +// config.addModelChangePreprocessor(new FoafNameToRdfsLabelPreprocessor()); + + String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); + config.setFormUrl(formUrl); + + //Note, the spaces are important - they were added by ProcessRdfFormController earlier + //as a means of ensuring the substitution worked correctly - as the regex expects spaces + config.setEntityToReturnTo(" ?newInd "); + prepare(vreq, config); + return config; + } + + //first and last name have validators if is person is true + private List getFirstNameValidators(VitroRequest vreq) { + List validators = new ArrayList(); + if(isPersonType(vreq)) { + validators.add("nonempty"); + } + return validators; + } + + private List getLastNameValidators(VitroRequest vreq) { + List validators = new ArrayList(); + if(isPersonType(vreq)) { + validators.add("nonempty"); + } + return validators; + } + + //validate label if person is not true + private List getLabelValidators(VitroRequest vreq) { + List validators = new ArrayList(); + if(!isPersonType(vreq)) { + validators.add("nonempty"); + } + return validators; + } + + //Get parameter from HTTP request for type of new individual + private String getTypeOfNew(VitroRequest vreq) { + String typeUri = vreq.getParameter("typeOfNew"); + if( typeUri == null || typeUri.trim().isEmpty() ) + return getFOAFPersonClassURI(); + else + return typeUri; + } + + //Form specific data + public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + HashMap formSpecificData = new HashMap(); + formSpecificData.put("typeName", getTypeName(vreq)); + //Put in whether or not person type + if(isPersonType(vreq)) { + //Doing this b/c unsure how freemarker will handle boolean value from JAVA + formSpecificData.put("isPersonType", "true"); + } else { + formSpecificData.put("isPersonType", "false"); + + } + editConfiguration.setFormSpecificData(formSpecificData); + } + + private String getTypeName(VitroRequest vreq) { + String typeOfNew = getTypeOfNew(vreq); + VClass type = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(typeOfNew); + return type.getName(); + } + + public String getFOAFPersonClassURI() { + return "http://xmlns.com/foaf/0.1/Person"; + } + + public boolean isPersonType(VitroRequest vreq) { + WebappDaoFactory wdf = vreq.getWebappDaoFactory(); + Boolean isPersonType = Boolean.FALSE; + String foafPersonType = getFOAFPersonClassURI(); + List superTypes = wdf.getVClassDao().getAllSuperClassURIs(getTypeOfNew(vreq)); + if( superTypes != null ){ + for( String typeUri : superTypes){ + if( foafPersonType.equals(typeUri)) { + isPersonType = Boolean.TRUE; + break; + } + } + } + return isPersonType; + } + private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration) { + HashMap> urisInScope = new HashMap>(); + //note that at this point the subject, predicate, and object var parameters have already been processed + urisInScope.put(editConfiguration.getVarNameForSubject(), + Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); + urisInScope.put(editConfiguration.getVarNameForPredicate(), + Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); + editConfiguration.setUrisInScope(urisInScope); + //Uris in scope include subject, predicate, and object var + + editConfiguration.setLiteralsInScope(new HashMap>()); + } + + private String N3_PREFIX = "@prefix foaf: .\n"; +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/OrganizationHasPositionHistoryGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/OrganizationHasPositionHistoryGenerator.java index 6364b3cc..ac562d48 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/OrganizationHasPositionHistoryGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/OrganizationHasPositionHistoryGenerator.java @@ -43,13 +43,13 @@ public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator + "PREFIX core: \n" + "PREFIX rdfs: \n" + "SELECT ?existingPerson WHERE { \n" - + " ?position core:positionForPerson ?existingPerson .}"; + + " ?position core:relates ?existingPerson .}"; private static final String QUERY_EXISTING_PERSON_LABEL = "" + "PREFIX core: \n" + "PREFIX rdfs: \n" + "SELECT ?existingPersonLabel WHERE { \n" - + " ?position core:positionForPerson ?existingPerson . \n" + + " ?position core:relates ?existingPerson . \n" + " ?existingPerson rdfs:label ?existingPersonLabel . }"; private static final String QUERY_EXISTING_INTERVAL_NODE = "" @@ -113,18 +113,18 @@ public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator private static final String N3_NEW_POSITION = "" + "@prefix core: . \n" + "@prefix rdfs: . \n" - + "?organization core:organizationForPosition ?position . \n" + + "?organization core:relatedBy ?position . \n" + "?position a core:Position . \n" + "?position a ?positionType . \n" + "?position rdfs:label ?positionTitle . \n" - + "?position core:positionInOrganization ?organization . "; + + "?position core:relates ?organization . "; private static final String N3_NEW_PERSON = "" + "@prefix core: . \n" + "@prefix rdfs: . \n" + "@prefix foaf: . \n" - + "?position core:positionForPerson ?person . \n" - + "?person core:personInPosition ?position . \n" + + "?position core:relates ?person . \n" + + "?person core:relatedBy ?position . \n" + "?person a foaf:Person . \n" + "?person rdfs:label ?personLabel . "; @@ -138,8 +138,8 @@ public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator private static final String N3_EXISTING_PERSON = "" + "@prefix core: . \n" - + "?position core:positionForPerson ?existingPerson . \n" - + "?existingPerson core:personInPosition ?position . \n"; + + "?position core:relates ?existingPerson . \n" + + "?existingPerson core:relatedBy ?position . \n"; private static final String N3_NEW_START_NODE = "" + "@prefix core: . \n" diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisingRelationshipGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisingRelationshipGenerator.java index e7159579..fe137c04 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisingRelationshipGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisingRelationshipGenerator.java @@ -28,12 +28,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im final static String subjAreaClass = "http://www.w3.org/2004/02/skos/core#Concept"; final static String degreeClass = vivoCore+"AcademicDegree"; final static String adviseeClass = foaf + "Person"; - final static String advisorInPred = vivoCore + "advisorIn"; - final static String adviseeInPred = vivoCore + "adviseeIn"; - final static String advisorPred = vivoCore + "advisor"; - final static String adviseePred = vivoCore + "advisee" ; - final static String subjAreaPred = vivoCore + "hasSubjectArea" ; - final static String degreePred = vivoCore + "degreeCandidacy" ; + final static String adviseeRoleClass = "http://vivoweb.org/ontology/core#AdviseeRole"; + final static String advisorRoleClass = "http://vivoweb.org/ontology/core#AdvisorRole"; final static String advisingRelToInterval = vivoCore + "dateTimeInterval"; final static String intervalType = vivoCore + "DateTimeInterval"; final static String intervalToStart = vivoCore + "start"; @@ -62,7 +58,7 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im conf.setN3Required( Arrays.asList( n3ForNewAdvisingRelationship, advisingRelLabelAssertion, - advisingRelTypeAssertion ) ); + advisingRelTypeAssertion ) ); conf.setN3Optional( Arrays.asList( n3ForNewAdviseeAssertion, n3ForExistingAdviseeAssertion, degreeAssertion, @@ -75,6 +71,10 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im conf.addNewResource("advisingRelationship", DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("newAdvisee", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("vcardAdvisee", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("vcardName", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("advisorRole", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("adviseeRole", DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("newSubjArea", DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE); @@ -93,6 +93,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery); conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery); + conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery); + conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery); conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery); conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery); conf.addSparqlForExistingUris("degree", degreeQuery); @@ -193,9 +195,14 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im final static String n3ForNewAdvisingRelationship = "@prefix vivo: <" + vivoCore + "> . \n\n" + - "?person <" + advisorInPred + "> ?advisingRelationship . \n" + + "?person ?advisingRelationship . \n" + "?advisingRelationship a <" + advisingRelClass + "> . \n" + - "?advisingRelationship <" + advisorPred + "> ?person . \n" ; + "?advisingRelationship ?person . \n" + + "?advisingRelationship ?advisorRole . \n" + + "?advisorRole a <" + advisorRoleClass + "> . \n" + + "?advisorRole ?advisingRelationship . \n" + + "?person ?advisorRole . \n" + + "?advisorRole ?person . "; final static String advisingRelLabelAssertion = "?advisingRelationship <"+ label + "> ?advisingRelLabel ."; @@ -204,37 +211,60 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im "?advisingRelationship a ?advisingRelType ."; final static String n3ForNewAdviseeAssertion = - "?advisingRelationship <" + adviseePred + "> ?newAdvisee . \n" + - "?newAdvisee <" + adviseeInPred + "> ?advisingRelationship . \n" + + "?advisingRelationship ?newAdvisee . \n" + + "?newAdvisee ?advisingRelationship . \n" + "?newAdvisee <" + label + "> ?adviseeLabel . \n" + - "?newAdvisee a <" + adviseeClass + "> . "; + "?newAdvisee a <" + adviseeClass + "> . \n" + + "?newAdvisee ?adviseeRole . \n" + + "?adviseeRole ?newAdvisee . \n" + + "?adviseeRole a <" + adviseeRoleClass + "> . \n" + + "?advisingRelationship ?adviseeRole . \n" + + "?adviseeRole ?advisingRelationship . "; final static String n3ForExistingAdviseeAssertion = - "?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" + - "?existingAdvisee <" + adviseeInPred + "> ?advisingRelationship . "; + "?advisingRelationship ?existingAdvisee . \n" + + "?existingAdvisee ?advisingRelationship . \n" + + "?existingAdvisee ?adviseeRole . \n" + + "?adviseeRole ?existingAdvisee . \n" + + "?adviseeRole a <" + adviseeRoleClass + "> . \n" + + "?advisingRelationship ?adviseeRole . \n" + + "?adviseeRole ?advisingRelationship . "; final static String firstNameAssertion = - "@prefix foaf: <" + foaf + "> . \n" + - "?newAdvisee foaf:firstName ?firstName ."; + "@prefix vcard: . \n" + + "?newAdvisee ?vcardAdvisee . \n" + + "?vcardAdvisee ?newAdvisee . \n" + + "?vcardAdvisee a . \n" + + "?vcardAdvisee vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:givenName ?firstName ."; final static String lastNameAssertion = - "@prefix foaf: <" + foaf + "> . \n" + - "?newAdvisee foaf:lastName ?lastName ."; + "@prefix vcard: . \n" + + "?newAdvisee ?vcardAdvisee . \n" + + "?vcardAdvisee ?newAdvisee . \n" + + "?vcardAdvisee a . \n" + + "?vcardAdvisee vcard:hasName ?vcardName . \n" + + "?vcardName a . \n" + + "?vcardName vcard:familyName ?lastName ."; final static String degreeAssertion = - "?advisingRelationship <"+ degreePred +"> ?degree ."; + "?advisingRelationship ?degree . \n" + + "?degree ?advisingRelationship . "; //This is for an existing subject area //Where we only need the existing subject area label final static String n3ForExistingSubjAreaAssertion = - "?advisingRelationship <"+ subjAreaPred +"> ?existingSubjArea ."; + "?advisingRelationship ?existingSubjArea . \n" + + "?existingSubjArea ?advisingRelationship . "; //For new subject area, we include all new information //new subject area should always be a new resource //and the following should only get evaluated //when there is something in the label final static String n3ForNewSubjAreaAssertion = - "?advisingRelationship <"+ subjAreaPred +"> ?newSubjArea . \n" + + "?advisingRelationship ?newSubjArea . \n" + + "?newSubjArea ?advisingRelationship . \n" + "?newSubjArea <"+ label + "> ?subjAreaLabel . \n" + "?newSubjArea a <" + subjAreaClass + "> . "; @@ -264,24 +294,46 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im final static String adviseeQuery = "SELECT ?existingAdvisee WHERE { \n" + - " ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" + + " ?advisingRelationship ?existingAdvisee . \n" + + " ?existingAdvisee a <" + adviseeClass + "> . \n" + + " FILTER (?person != ?existingAdvisee) . \n" + + "}"; + + final static String existingAdvisorRoleQuery = + "SELECT ?advisorRole WHERE { \n" + + "?advisingRelationship ?advisorRole . \n" + + "?advisorRole a <" + advisorRoleClass + "> . \n" + + "}"; + + final static String existingAdviseeRoleQuery = + "SELECT ?adviseeRole WHERE { \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?adviseeRole a <" + adviseeRoleClass + "> . \n" + "}"; final static String adviseeLabelQuery = "SELECT ?existingAdviseeLabel WHERE { \n" + - " ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" + + " ?advisingRelationship ?existingAdvisee . \n" + + " ?existingAdvisee a <" + adviseeClass + "> . \n" + " ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" + + " FILTER (?person != ?existingAdvisee) . \n" + "}"; final static String subjAreaQuery = "SELECT ?existingSubjArea WHERE { \n" + - " ?advisingRelationship <" + subjAreaPred + "> ?existingSubjArea . \n" + + " ?advisingRelationship ?existingSubjArea . \n" + + " ?existingSubjArea a . \n" + + " ?existingSubjArea ?type \n" + + " FILTER (?type != ) . \n" + "}"; final static String subjAreaLabelQuery = "SELECT ?existingSubjAreaLabel WHERE { \n" + - " ?advisingRelationship <" + subjAreaPred + "> ?existingSubjArea . \n" + + " ?advisingRelationship ?existingSubjArea . \n" + + " ?existingSubjArea a . \n" + " ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" + + " ?existingSubjArea ?type \n" + + " FILTER (?type != ) . \n" + "}"; final static String advisingRelLabelQuery = @@ -291,7 +343,10 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im final static String degreeQuery = "SELECT ?existingDegree WHERE {\n"+ - " ?advisingRelationship <"+ degreePred +"> ?existingDegree . }"; + " ?advisingRelationship ?existingDegree . \n" + + " ?existingDegree a <" + degreeClass + "> . \n" + + "}"; + final static String existingStartDateQuery = "SELECT ?existingDateStart WHERE { \n" + diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java index 0e911d07..862bceb4 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java @@ -24,12 +24,12 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements final static String awardReceiptClass = vivoCore + "AwardReceipt"; final static String awardClass = vivoCore + "Award"; final static String orgClass = "http://xmlns.com/foaf/0.1/Organization"; - final static String awardReceiptPred = vivoCore + "awardOrHonor"; - final static String awardForPred = vivoCore + "awardOrHonorFor"; - final static String receiptPred =vivoCore+"receipt" ; - final static String receiptOfPred =vivoCore+"receiptOf" ; - final static String awardConferredByPred =vivoCore+"awardConferredBy" ; - final static String awardConferredPred =vivoCore+"awardConferred" ; + final static String awardReceiptPred = vivoCore + "relatedBy"; + final static String awardForPred = vivoCore + "relates"; + final static String receiptPred =vivoCore+"relatedBy" ; + final static String receiptOfPred =vivoCore+"relates" ; + final static String awardConferredByPred =vivoCore+"assignedBy" ; + final static String awardConferredPred =vivoCore+"assigns" ; final static String descriptionPred = vivoCore + "description"; final static String yearAwardedPred = vivoCore + "dateTimeValue"; final static String awardReceiptToInterval = vivoCore + "dateTimeInterval"; @@ -257,11 +257,13 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements final static String existingAwardQuery = "SELECT ?existingAward WHERE { \n" + " ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" + + " ?existingAward a <" + awardClass + "> . \n" + "}"; final static String existingOrgQuery = "SELECT ?existingOrg WHERE { \n" + " ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" + + " ?existingAward a <" + awardClass + "> . \n" + " ?existingAward<" + awardConferredByPred + "> ?existingOrg . \n" + " ?existingOrg <" + awardConferredPred + "> ?existingAward . }"; @@ -273,6 +275,7 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements final static String awardLabelQuery = "SELECT ?existingAwardLabel WHERE { \n" + " ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" + + " ?existingAward a <" + awardClass + "> . \n" + " ?existingAward <" + label + "> ?existingAwardLabel . \n" + "}"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java index 4af8ca41..880dd0f8 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java @@ -30,7 +30,7 @@ import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; core:EducationalTraining - primary new individual being created foaf:Person - existing individual foaf:Organization - new or existing individual - core:AcademicDegree - existing individual + core:AcademicdegreeType - existing individual Data properties of EducationalTraining: core:majorField @@ -42,10 +42,10 @@ import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; core:educationalTraining (Person : EducationalTraining) - inverse of core:educationalTrainingOf core:educationalTrainingOf (EducationalTraining : Person) - inverse of core:educationalTraining - core:degreeEarned (EducationalTraining : AcademicDegree) - inverse of core:degreeOutcomeOf - core:degreeOutcomeOf (AcademicDegree : EducationalTraining) - inverse of core:degreeEarned + core:degreeTypeEarned (EducationalTraining : AcademicdegreeType) - inverse of core:degreeTypeOutcomeOf + core:degreeTypeOutcomeOf (AcademicdegreeType : EducationalTraining) - inverse of core:degreeTypeEarned - core:organizationGrantingDegree (EducationalTraining : Organization) - no inverse + core:organizationGrantingdegreeType (EducationalTraining : Organization) - no inverse Future version -------------- @@ -90,10 +90,13 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements conf.setN3Required( Arrays.asList( n3ForNewEdTraining, trainingTypeAssertion ) ); conf.setN3Optional(Arrays.asList( - n3ForNewOrg, n3ForExistingOrg, majorFieldAssertion, degreeAssertion, - deptAssertion, infoAssertion, n3ForStart, n3ForEnd )); + n3ForNewOrgExistingAwardedDegree, n3ForExistingOrgExistingAwardedDegree, n3ForNewAwardedDegreeNewOrg, + majorFieldAssertion, n3ForNewAwardedDegreeExistingOrg, + //existingDegreeTypeAssertion, + existingAwardedDegreeLabel, deptAssertion, infoAssertion, n3ForStart, n3ForEnd )); conf.addNewResource("edTraining", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("newAwardedDegree",DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("newOrg",DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("intervalNode",DEFAULT_NS_FOR_NEW_RESOURCE); conf.addNewResource("startNode",DEFAULT_NS_FOR_NEW_RESOURCE); @@ -102,10 +105,12 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements //uris in scope: none //literals in scope: none - conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "degree", "trainingType")); - conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "majorField", "dept", "info")); + conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "existingAwardedDegree", "degreeType", "trainingType")); + conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "awardedDegreeLabel", "existingAwardedDegreeLabel", + "majorField", "dept", "info")); conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery); + conf.addSparqlForExistingLiteral("existingAwardedDegreeLabel", existingAwardedDegreeLabelQuery); conf.addSparqlForExistingLiteral("majorField", majorFieldQuery); conf.addSparqlForExistingLiteral("dept", deptQuery); conf.addSparqlForExistingLiteral("info", infoQuery); @@ -113,10 +118,11 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery); + conf.addSparqlForExistingUris("existingAwardedDegree", existingAwardedDegreeQuery); conf.addSparqlForExistingUris("existingOrg", existingOrgQuery); conf.addSparqlForExistingUris("orgType", orgTypeQuery); conf.addSparqlForExistingUris("trainingType", trainingTypeQuery); - conf.addSparqlForExistingUris("degree", degreeQuery); + conf.addSparqlForExistingUris("degreeType", degreeTypeQuery); conf.addSparqlForExistingUris("intervalNode",existingIntervalNodeQuery); conf.addSparqlForExistingUris("startNode", existingStartNodeQuery); conf.addSparqlForExistingUris("endNode", existingEndNodeQuery); @@ -126,9 +132,9 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements conf.addSparqlForAdditionalUrisInScope("inverseTrainingAtOrg", inverseTrainingAtOrgQuery); conf.addField( new FieldVTwo(). - setName("degree"). + setName("degreeType"). setOptions( new IndividualsViaVClassOptions( - degreeClass))); + degreeTypeClass))); conf.addField( new FieldVTwo(). setName("majorField"). @@ -140,11 +146,26 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements //options will be added in browser by auto complete JS ); + conf.addField( new FieldVTwo(). + setName("existingAwardedDegree") + //options will be added in browser by auto complete JS + ); + conf.addField( new FieldVTwo(). setName("orgLabel"). setRangeDatatypeUri(XSD.xstring.toString() ). setValidators( list("datatype:" + XSD.xstring.toString()))); - + + conf.addField( new FieldVTwo(). + setName("awardedDegreeLabel"). + setRangeDatatypeUri(XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString()))); + + conf.addField( new FieldVTwo(). + setName("existingAwardedDegreeLabel"). + setRangeDatatypeUri(XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString()))); + conf.addField( new FieldVTwo(). setName("orgLabelDisplay"). setRangeDatatypeUri(XSD.xstring.toString() )); @@ -159,7 +180,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements setName("trainingType"). setValidators( list("nonempty") ). setOptions( - new ChildVClassesWithParent(trainingClass))); + new ChildVClassesWithParent(edProcessClass))); conf.addField( new FieldVTwo(). setName("dept"). @@ -201,28 +222,59 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements final static String n3ForNewEdTraining = "@prefix core: <"+ vivoCore +"> .\n"+ - "?person core:educationalTraining ?edTraining .\n" + - "?edTraining a core:EducationalTraining .\n" + - "?edTraining core:educationalTrainingOf ?person ."; + "?person ?edTraining .\n" + + "?edTraining a core:EducationalProcess .\n" + + "?edTraining ?person ."; final static String trainingTypeAssertion = "?edTraining a ?trainingType ."; - final static String n3ForNewOrg = - "?edTraining <"+ trainingAtOrg +"> ?newOrg . \n" + - "?newOrg ?inverseTrainingAtOrg ?edTraining . \n" + + final static String n3ForNewAwardedDegreeNewOrg = + "@prefix core: <"+ vivoCore +"> .\n"+ + "?edTraining ?newAwardedDegree . \n" + + "?newAwardedDegree ?edTraining . \n" + + "?newAwardedDegree ?person . \n" + + "?person ?newAwardedDegree . \n" + + "?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" + + "?newAwardedDegree ?newOrg . \n" + + "?newOrg ?newAwardedDegree . \n" + + "?newOrg a ?orgType . \n" + + "?newOrg <"+ label +"> ?orgLabel . \n" + + "?newAwardedDegree ?degreeType .\n"+ + "?degreeType ?newAwardedDegree . \n"+ + "?newAwardedDegree a core:AwardedDegree ."; + + final static String n3ForNewAwardedDegreeExistingOrg = + "@prefix core: <"+ vivoCore +"> .\n"+ + "?edTraining ?newAwardedDegree . \n" + + "?newAwardedDegree ?edTraining . \n" + + "?newAwardedDegree ?person . \n" + + "?person ?newAwardedDegree . \n" + + "?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" + + "?existingOrg ?newAwardedDegree . \n" + + "?newAwardedDegree ?existingOrg . \n" + + "?newAwardedDegree ?degreeType .\n"+ + "?degreeType ?newAwardedDegree . \n"+ + "?newAwardedDegree a core:AwardedDegree ."; + + final static String existingAwardedDegreeLabel = + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree ?edTraining . \n" + + "?existingAwardedDegree ?degreeType .\n"+ + "?degreeType ?existingAwardedDegree . \n"+ + "?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel . " ; + + final static String n3ForNewOrgExistingAwardedDegree = + "?existingAwardedDegree ?newOrg . \n" + + "?newOrg ?existingAwardedDegree . \n" + "?newOrg <"+ label +"> ?orgLabel . \n" + "?newOrg a ?orgType ."; - - final static String n3ForExistingOrg = - "?edTraining <"+ trainingAtOrg +"> ?existingOrg . \n" + - "?existingOrg ?inverseTrainingAtOrg ?edTraining . \n" + + + final static String n3ForExistingOrgExistingAwardedDegree = + "?existingAwardedDegree ?existingOrg . \n" + + "?existingOrg ?existingAwardedDegree . \n" + "?existingOrg a ?orgType . "; - final static String degreeAssertion = - "?edTraining <"+ degreeEarned +"> ?degree .\n"+ - "?degree <"+ degreeOutcomeOf +"> ?edTraining ."; - final static String majorFieldAssertion = "?edTraining <"+ majorFieldPred +"> ?majorField ."; @@ -250,13 +302,24 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements /* Queries for editing an existing educational training entry */ + final static String existingAwardedDegreeQuery = + "SELECT ?existingAwardedDegree WHERE {\n"+ + "?edTraining ?existingAwardedDegree . }\n"; + + final static String existingAwardedDegreeLabelQuery = + "SELECT ?existingAwardedDegreeLabel WHERE {\n"+ + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel }\n"; + final static String existingOrgQuery = "SELECT ?existingOrg WHERE {\n"+ - "?edTraining <"+ trainingAtOrg +"> ?existingOrg . }\n"; + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree ?existingOrg . }\n"; final static String orgLabelQuery = "SELECT ?existingOrgLabel WHERE {\n"+ - "?edTraining <"+ trainingAtOrg +"> ?existingOrg .\n"+ + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree ?existingOrg .\n"+ "?existingOrg <"+ label +"> ?existingOrgLabel .\n"+ "}"; @@ -265,7 +328,8 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements final static String orgTypeQuery = "PREFIX rdfs: <"+ rdfs +"> \n"+ "SELECT ?existingOrgType WHERE {\n"+ - "?edTraining <"+ trainingAtOrg +"> ?existingOrg .\n"+ + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree ?existingOrg .\n"+ "?existingOrg a ?existingOrgType .\n"+ "?existingOrgType rdfs:subClassOf <"+ orgClass +"> .\n"+ "}"; @@ -273,11 +337,15 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements final static String trainingTypeQuery = "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + "SELECT ?existingTrainingType WHERE { \n" + - " ?edTraining vitro:mostSpecificType ?existingTrainingType . }"; + " ?edTraining vitro:mostSpecificType ?existingTrainingType . }"; - final static String degreeQuery = - "SELECT ?existingDegree WHERE {\n"+ - "?edTraining <"+ degreeEarned +"> ?existingDegree . }"; + final static String degreeTypeQuery = + "PREFIX core: <"+ vivoCore +"> \n"+ + "SELECT ?existingDegreeType WHERE {\n"+ + "?edTraining ?existingAwardedDegree . \n"+ + "?existingAwardedDegree a core:AwardedDegree . \n"+ + "?existingAwardedDegree core:relates ?existingDegreeType . \n" + + "?existingDegreeType a core:AcademicDegree }"; final static String majorFieldQuery = "SELECT ?existingMajorField WHERE {\n"+ @@ -346,7 +414,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements final static String inverseTrainingAtOrgQuery = "PREFIX owl: " + " SELECT ?inverseTrainingAtOrg " - + " WHERE { ?inverseTrainingAtOrg owl:inverseOf <"+ trainingAtOrg +"> . } "; + + " WHERE { ?inverseTrainingAtOrg owl:inverseOf . } "; //Adding form specific data such as edit mode @@ -358,10 +426,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements public EditMode getEditMode(VitroRequest vreq) { List predicates = new ArrayList(); - predicates.add(trainingAtOrg); + predicates.add("http://vivoweb.org/ontology/core#relates"); return EditModeUtils.getEditMode(vreq, predicates); } - - - } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEmailGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEmailGenerator.java new file mode 100644 index 00000000..28de70a8 --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEmailGenerator.java @@ -0,0 +1,125 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +public class PersonHasEmailGenerator extends VivoBaseGenerator implements + EditConfigurationGenerator { + private Log log = LogFactory.getLog(PersonHasEmailGenerator.class); + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, + HttpSession session) throws Exception { + + EditConfigurationVTwo conf = new EditConfigurationVTwo(); + + initBasics(conf, vreq); + initPropertyParameters(vreq, session, conf); + initObjectPropForm(conf, vreq); + String emailUri = getEmailUri(vreq); + String rangeUri = getRangeUri(vreq); + + conf.setTemplate("personHasEmailAddress.ftl"); + + conf.setVarNameForSubject("person"); + conf.setVarNameForPredicate("predicate"); + conf.setVarNameForObject("individualVcard"); + + if ( rangeUri.equals("http://www.w3.org/2006/vcard/ns#Work") ) { + conf.setN3Required( Arrays.asList( n3ForNewPrimaryEmail ) ); + } + else { + conf.setN3Required( Arrays.asList( n3ForNewEmail ) ); + } + + conf.setN3Optional( Arrays.asList( emailAddressAssertion ) ); + + conf.addNewResource("email", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); + + conf.setLiteralsOnForm(Arrays.asList("emailAddress" )); + + conf.addSparqlForExistingLiteral("emailAddress", emailAddressQuery); + conf.addSparqlForAdditionalUrisInScope("individualVcard", individualVcardQuery); + + if ( conf.isUpdate() ) { + HashMap> urisInScope = new HashMap>(); + urisInScope.put("email", Arrays.asList(new String[]{emailUri})); + conf.addUrisInScope(urisInScope); + } + + conf.addField( new FieldVTwo(). + setName("emailAddress") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("nonempty") )); + + conf.addValidator(new AntiXssValidation()); + + prepare(vreq, conf); + return conf; + } + + /* N3 assertions */ + + final static String n3ForNewEmail = + "?person ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?person . \n" + + "?individualVcard ?email . \n" + + "?email a . " ; + + final static String n3ForNewPrimaryEmail = + "?person ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?person . \n" + + "?individualVcard ?email . \n" + + "?email a . \n" + + "?email a ." ; + + final static String emailAddressAssertion = + "?email ?emailAddress ."; + + /* Queries for editing an existing entry */ + + final static String individualVcardQuery = + "SELECT ?existingIndividualVcard WHERE { \n" + + "?person ?existingIndividualVcard . \n" + + "}"; + + final static String emailAddressQuery = + "SELECT ?existingEmailAddress WHERE {\n"+ + "?email ?existingEmailAddress . }"; + + private String getRangeUri(VitroRequest vreq) { + String rangeUri = vreq.getParameter("rangeUri"); + + return rangeUri; + } + private String getEmailUri(VitroRequest vreq) { + String emailUri = vreq.getParameter("emailUri"); + + return emailUri; + } +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasMailingAddressGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasMailingAddressGenerator.java index 1e54a758..bde067ee 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasMailingAddressGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasMailingAddressGenerator.java @@ -2,14 +2,23 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import javax.servlet.http.HttpSession; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import com.hp.hpl.jena.vocabulary.XSD; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; @@ -18,20 +27,8 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators. public class PersonHasMailingAddressGenerator extends VivoBaseGenerator implements EditConfigurationGenerator { - - final static String addressClass = vivoCore + "Address"; - final static String countryPred = vivoCore + "addressCountry"; - final static String countryClass = vivoCore + "Country"; - final static String addrLine1Pred =vivoCore+"address1" ; - final static String addrLine2Pred =vivoCore+"address2" ; - final static String addrLine3Pred =vivoCore+"address3" ; - final static String cityPred =vivoCore+"addressCity" ; - final static String statePred =vivoCore+"addressState" ; - final static String postalCodePred =vivoCore+"addressPostalCode" ; - final static String mailingAddressPred =vivoCore+"mailingAddress" ; - - public PersonHasMailingAddressGenerator() {} - + private Log log = LogFactory.getLog(PersonHasMailingAddressGenerator.class); + @Override public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) throws Exception { @@ -40,59 +37,51 @@ public class PersonHasMailingAddressGenerator extends VivoBaseGenerator implemen initBasics(conf, vreq); initPropertyParameters(vreq, session, conf); - initObjectPropForm(conf, vreq); + initObjectPropForm(conf, vreq); + String addressUri = vreq.getParameter("addressUri"); conf.setTemplate("personHasMailingAddress.ftl"); conf.setVarNameForSubject("person"); conf.setVarNameForPredicate("predicate"); - conf.setVarNameForObject("address"); + conf.setVarNameForObject("individualVcard"); - conf.setN3Required( Arrays.asList( n3ForNewAddress, - addrLabelAssertion, - addressTypeAssertion ) ); - conf.setN3Optional( Arrays.asList( addrLineOneAssertion, addrLineTwoAssertion, addrLineThreeAssertion, cityAssertion, stateAssertion, countryAssertion, postalCodeAssertion ) ); + conf.setN3Required( Arrays.asList( n3ForNewAddress ) ); + conf.setN3Optional( Arrays.asList( streetAddressAssertion, + localityAssertion, + regionAssertion, + countryAssertion, + postalCodeAssertion ) ); conf.addNewResource("address", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); + + conf.setLiteralsOnForm(Arrays.asList("streetAddress", "locality", "postalCode", "country", "region" )); - //uris in scope: none - //literals in scope: none - - conf.setUrisOnform(Arrays.asList("addressType")); - conf.setLiteralsOnForm(Arrays.asList("addrLineOne", "addrLineTwo", "addrLineThree", "city", "postalCode", "addrLabel","country", "state" )); - - conf.addSparqlForExistingLiteral("addrLabel", addrLabelQuery); - conf.addSparqlForExistingLiteral("addrLineOne", addrLineOneQuery); - conf.addSparqlForExistingLiteral("addrLineTwo", addrLineTwoQuery); - conf.addSparqlForExistingLiteral("addrLineThree", addrLineThreeQuery); - conf.addSparqlForExistingLiteral("city", cityQuery); + conf.addSparqlForExistingLiteral("streetAddress", streetAddressQuery); + conf.addSparqlForExistingLiteral("locality", localityQuery); conf.addSparqlForExistingLiteral("postalCode", postalCodeQuery); - conf.addSparqlForExistingLiteral("state", stateQuery); - conf.addSparqlForExistingLiteral("country", countryQuery); + conf.addSparqlForExistingLiteral("region", regionQuery); + conf.addSparqlForExistingLiteral("country", countryQuery); - conf.addSparqlForExistingUris("addressType", addressTypeQuery); - - conf.addField( new FieldVTwo(). - setName("country"). - setValidators( list("nonempty") ). - setOptions( - new IndividualsViaVClassOptions( - countryClass))); + if ( conf.isUpdate() ) { + HashMap> urisInScope = new HashMap>(); + urisInScope.put("address", Arrays.asList(new String[]{addressUri})); + conf.addUrisInScope(urisInScope); + } + else { + conf.addSparqlForAdditionalUrisInScope("individualVcard", individualVcardQuery); + } conf.addField( new FieldVTwo(). - setName("addrLineOne") + setName("streetAddress") .setRangeDatatypeUri( XSD.xstring.toString() ). setValidators( list("nonempty") )); conf.addField( new FieldVTwo(). - setName("addrLineTwo") + setName("country") .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString()) )); - - conf.addField( new FieldVTwo(). - setName("addrLineThree") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString()) )); + setValidators( list("nonempty") )); conf.addField( new FieldVTwo(). setName("postalCode") @@ -100,25 +89,15 @@ public class PersonHasMailingAddressGenerator extends VivoBaseGenerator implemen setValidators( list("nonempty") )); conf.addField( new FieldVTwo(). - setName("city") + setName("locality") .setRangeDatatypeUri( XSD.xstring.toString() ). setValidators( list("nonempty") ) ); conf.addField( new FieldVTwo(). - setName("state") + setName("region") .setRangeDatatypeUri( XSD.xstring.toString() ). setValidators( list("datatype:" + XSD.xstring.toString()) ) ); - conf.addField( new FieldVTwo(). - setName("addrLabel") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString()) ) ); - - conf.addField( new FieldVTwo(). - setName("addressType"). - setOptions(new ChildVClassesOptions( - addressClass)) ); - conf.addValidator(new AntiXssValidation()); prepare(vreq, conf); @@ -128,77 +107,53 @@ public class PersonHasMailingAddressGenerator extends VivoBaseGenerator implemen /* N3 assertions */ final static String n3ForNewAddress = - "@prefix vivo: <" + vivoCore + "> . \n\n" + - "?person vivo:mailingAddress ?address . \n" + - "?address a vivo:Address . \n" + - "?address vivo:mailingAddressFor ?person . \n" ; + "?person ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?person . \n" + + "?individualVcard ?address . \n" + + "?address a . " ; - final static String addrLineOneAssertion = - "?address <"+ addrLine1Pred +"> ?addrLineOne ."; + final static String streetAddressAssertion = + "?address ?streetAddress ."; - final static String addrLineTwoAssertion = - "?address <"+ addrLine2Pred +"> ?addrLineTwo ."; - - final static String addrLineThreeAssertion = - "?address <"+ addrLine3Pred +"> ?addrLineThree ."; - - final static String cityAssertion = - "?address <"+ cityPred +"> ?city ."; + final static String localityAssertion = + "?address ?locality ."; final static String postalCodeAssertion = - "?address <"+ postalCodePred +"> ?postalCode ."; + "?address ?postalCode ."; - final static String stateAssertion = - "?address <"+ statePred +"> ?state ."; + final static String regionAssertion = + "?address ?region ."; final static String countryAssertion = - "?address <" + countryPred + "> ?country ."; - - final static String addrLabelAssertion = - "?address <" + label + "> ?addrLabel ."; - - final static String addressTypeAssertion = - "?address a ?addressType ."; + "?address ?country ."; /* Queries for editing an existing entry */ - final static String addrLabelQuery = - "SELECT ?existingAddrLabel WHERE { \n" + - " ?address <" + label + "> ?existingAddrLabel . \n" + + final static String individualVcardQuery = + "SELECT ?individualVcard WHERE { \n" + + "?person ?individualVcard . \n" + "}"; - final static String addrLineOneQuery = - "SELECT ?existingaddrLineOne WHERE {\n"+ - "?address <"+ addrLine1Pred +"> ?existingaddrLineOne . }"; + final static String streetAddressQuery = + "SELECT ?existingStreetAddress WHERE {\n"+ + "?address ?existingStreetAddress . }"; - final static String addrLineTwoQuery = - "SELECT ?existingaddrLineTwo WHERE {\n"+ - "?address <"+ addrLine2Pred +"> ?existingaddrLineTwo . }"; + final static String localityQuery = + "SELECT ?existingLocality WHERE {\n"+ + "?address ?existingLocality . }"; - final static String addrLineThreeQuery = - "SELECT ?existingaddrLineThree WHERE {\n"+ - "?address <"+ addrLine3Pred +"> ?existingaddrLineThree . }"; - - final static String cityQuery = - "SELECT ?existingCity WHERE {\n"+ - "?address <"+ cityPred +"> ?existingCity . }"; - - final static String stateQuery = - "SELECT ?existingState WHERE {\n"+ - "?address <"+ statePred +"> ?existingState . }"; + final static String regionQuery = + "SELECT ?existingRegion WHERE {\n"+ + "?address ?existingRegion . }"; final static String postalCodeQuery = "SELECT ?existingPostalCode WHERE {\n"+ - "?address <"+ postalCodePred +"> ?existingPostalCode . }"; + "?address ?existingPostalCode . }"; final static String countryQuery = "SELECT ?existingCountry WHERE {\n"+ - "?address <"+ countryPred +"> ?existingCountry . }"; - - final static String addressTypeQuery = - "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + - "SELECT ?existingAddressType WHERE { \n" + - "?address vitro:mostSpecificType ?existingAddressType . }"; + "?address ?existingCountry . }"; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java index 900b8657..f22463cd 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java @@ -30,8 +30,8 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme final static String positionClass = vivoCore + "Position"; final static String orgClass = "http://xmlns.com/foaf/0.1/Organization"; - final static String positionInOrgPred = vivoCore + "positionInOrganization"; - final static String orgForPositionPred = vivoCore + "organizationForPosition"; + final static String positionInOrgPred = vivoCore + "relates"; + final static String orgForPositionPred = vivoCore + "relatedBy"; final static String positionToInterval = vivoCore + "dateTimeInterval"; final static String intervalType = vivoCore + "DateTimeInterval"; final static String intervalToStart = vivoCore + "start"; @@ -166,9 +166,9 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme final static String n3ForNewPosition = "@prefix core: <" + vivoCore + "> . \n" + - "?person core:personInPosition ?position . \n" + + "?person core:relatedBy ?position . \n" + "?position a ?positionType . \n" + - "?position core:positionForPerson ?person ; "; + "?position core:relates ?person ; "; final static String positionTitleAssertion = "?position <" + label + "> ?positionTitle ."; @@ -203,9 +203,11 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme "?endNode <" + dateTimeValue + "> ?endField-value . \n" + "?endNode <" + dateTimePrecision + "> ?endField-precision . \n"; +// Queries for existing values final static String orgLabelQuery = "SELECT ?existingOrgLabel WHERE { \n" + " ?position <" + positionInOrgPred + "> ?existingOrg . \n" + + " ?existingOrg a <" + orgClass + "> . \n" + " ?existingOrg <" + label + "> ?existingOrgLabel . \n" + "}"; @@ -231,7 +233,8 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme final static String existingOrgQuery = "SELECT ?existingOrg WHERE { \n" + - " ?position <" + positionInOrgPred + "> ?existingOrg . }"; + " ?position <" + positionInOrgPred + "> ?existingOrg . \n" + + " ?existingOrg a <" + orgClass + "> }"; final static String orgTypeQuery = "PREFIX rdfs: <" + rdfs + "> \n" + diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java new file mode 100644 index 00000000..bdfb65ba --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java @@ -0,0 +1,105 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +public class PersonHasTelephoneNumberGenerator extends VivoBaseGenerator implements + EditConfigurationGenerator { + private Log log = LogFactory.getLog(PersonHasTelephoneNumberGenerator.class); + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, + HttpSession session) throws Exception { + + EditConfigurationVTwo conf = new EditConfigurationVTwo(); + + initBasics(conf, vreq); + initPropertyParameters(vreq, session, conf); + initObjectPropForm(conf, vreq); + String phoneUri = getPhoneUri(vreq); + + conf.setTemplate("personHasTelephoneNumber.ftl"); + + conf.setVarNameForSubject("person"); + conf.setVarNameForPredicate("predicate"); + conf.setVarNameForObject("individualVcard"); + + conf.setN3Required( Arrays.asList( n3ForNewPhone ) ); + conf.setN3Optional( Arrays.asList( telephoneNumberAssertion ) ); + + conf.addNewResource("phone", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); + + conf.setLiteralsOnForm(Arrays.asList("telephoneNumber" )); + + conf.addSparqlForExistingLiteral("telephoneNumber", telephoneNumberQuery); + conf.addSparqlForAdditionalUrisInScope("individualVcard", individualVcardQuery); + + if ( conf.isUpdate() ) { + HashMap> urisInScope = new HashMap>(); + urisInScope.put("phone", Arrays.asList(new String[]{phoneUri})); + conf.addUrisInScope(urisInScope); + } + + conf.addField( new FieldVTwo(). + setName("telephoneNumber") + .setRangeDatatypeUri( XSD.xstring.toString() ). + setValidators( list("nonempty") )); + + conf.addValidator(new AntiXssValidation()); + + prepare(vreq, conf); + return conf; + } + + /* N3 assertions */ + + final static String n3ForNewPhone = + "?person ?individualVcard . \n" + + "?individualVcard a . \n" + + "?individualVcard ?person . \n" + + "?individualVcard ?phone . \n" + + "?phone a . " ; + + final static String telephoneNumberAssertion = + "?phone ?telephoneNumber ."; + + /* Queries for editing an existing entry */ + + final static String individualVcardQuery = + "SELECT ?existingIndividualVcard WHERE { \n" + + "?person ?existingIndividualVcard . \n" + + "}"; + + final static String telephoneNumberQuery = + "SELECT ?existingTelephoneNumber WHERE {\n"+ + "?phone ?existingTelephoneNumber . }"; + + private String getPhoneUri(VitroRequest vreq) { + String phoneUri = vreq.getParameter("phoneUri"); + + return phoneUri; + } +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java index 7bd8818a..cab2f6b3 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java @@ -18,16 +18,13 @@ public abstract class VivoBaseGenerator extends BaseEditConfigurationGenerator i final static String label =rdfs+"label" ; final static String bibo = "http://purl.org/ontology/bibo/"; - final static String trainingClass = vivoCore+"EducationalTraining" ; - final static String degreeClass =vivoCore+"AcademicDegree" ; + final static String edProcessClass = vivoCore+"EducationalProcess" ; + final static String degreeTypeClass =vivoCore+"AcademicDegree" ; final static String majorFieldPred =vivoCore+"majorField" ; final static String deptPred =vivoCore+"departmentOrSchool" ; final static String infoPred =vivoCore+"supplementalInformation" ; - final static String degreeEarned =vivoCore+"degreeEarned" ; - final static String degreeOutcomeOf =vivoCore+"degreeOutcomeOf" ; - final static String trainingAtOrg =vivoCore+"trainingAtOrganization" ; final static String authorRankPredicate = vivoCore + "authorRank"; - final static String linkedAuthorPredicate = vivoCore + "linkedAuthor"; + final static String linkedAuthorPredicate = vivoCore + "relates"; final static String dateTimeValue =vivoCore+"dateTime"; final static String dateTimeValueType =vivoCore+"DateTimeValue"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java index d3fbea33..f673d9e1 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java @@ -9,6 +9,12 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import net.sf.json.JSON; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -21,11 +27,15 @@ import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.rdf.model.Literal; import com.hp.hpl.jena.rdf.model.Resource; +import com.hp.hpl.jena.vocabulary.OWL; import com.hp.hpl.jena.vocabulary.RDF; import com.hp.hpl.jena.vocabulary.RDFS; import com.hp.hpl.jena.vocabulary.XSD; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; +import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.BaseEditSubmissionPreprocessorVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; @@ -37,8 +47,8 @@ public class AddAssociatedConceptsPreprocessor extends protected static final Log log = LogFactory .getLog(AddAssociatedConceptsPreprocessor.class.getName()); - //TODO: Check if better way to do this? protected OntModel ontModel = null; + protected WebappDaoFactory wdf = null; // Field names/variables names for n3 - these will have numbers added as // suffix if more than one term private static String conceptNodeBase = "conceptNode"; @@ -46,6 +56,9 @@ public class AddAssociatedConceptsPreprocessor extends private static String labelBase = "conceptLabel"; private static String conceptSemanticTypeLabelBase = "conceptSemanticTypeLabel"; private static String conceptSemanticTypeURIBase = "conceptSemanticTypeURI"; + private static String conceptBroaderURIBase = "conceptBroaderURI"; + private static String conceptNarrowerURIBase = "conceptNarrowerURI"; + //keyed off label variable, specifies which uri variable should be used, useful if same label repeated twice private HashMap labelVarToUriVarHash = null; private HashMap> conceptSemanticTypeURIVarToValueMap = null; @@ -55,22 +68,29 @@ public class AddAssociatedConceptsPreprocessor extends private static String conceptSourceValues = null; private static String conceptSemanticTypeLabelValues = null; private static String conceptSemanticTypeURIValues = null; + private static List conceptBroaderURIValues = null; + private static List conceptNarrowerURIValues = null; private static MultiValueEditSubmission submission = null; + + private static String SKOSBroaderURI = "http://www.w3.org/2004/02/skos/core#broader"; + private static String SKOSNarrowerURI = "http://www.w3.org/2004/02/skos/core#narrower"; // String datatype // Will be editing the edit configuration as well as edit submission here - public AddAssociatedConceptsPreprocessor(EditConfigurationVTwo editConfig, OntModel ontModel) { + public AddAssociatedConceptsPreprocessor(EditConfigurationVTwo editConfig) { super(editConfig); - this.ontModel = ontModel; this.labelVarToUriVarHash = new HashMap(); //Saves values of concept type uris this.conceptSemanticTypeURIVarToValueMap = new HashMap>(); } - public void preprocess(MultiValueEditSubmission inputSubmission) { + public void preprocess(MultiValueEditSubmission inputSubmission, VitroRequest vreq) { submission = inputSubmission; + this.wdf = vreq.getWebappDaoFactory(); + this.ontModel = ModelAccess.on(vreq).getJenaOntModel(); + //Set the models that we need here // Get the input elements for concept node and concept label as well // as vocab uri (which is based on thge // For query parameters, check whether CUI @@ -83,6 +103,9 @@ public class AddAssociatedConceptsPreprocessor extends //This will put the URI value in scope for the first semantic type label //and generate the rest if need be processConceptSemanticValues(); + //Also need to see if any broader or narrower uris for the concepts that already exist in the system + //and set up the appropriate relationships between this concept and the broader/narrower uri + getExistingConceptRelationships(); if (numberConcepts > 1) { processConceptNodes(numberConcepts); } @@ -93,6 +116,8 @@ public class AddAssociatedConceptsPreprocessor extends } + + //Since we will change the uris and literals from form, we should make copies //of the original values and store them, this will also make iterations //and updates to the submission independent from accessing the values @@ -100,11 +125,133 @@ public class AddAssociatedConceptsPreprocessor extends conceptLabelValues = getConceptLabelValues(); conceptNodeValues = getConceptNodeValues(); conceptSourceValues = getConceptSourceValues(); + conceptBroaderURIValues = getConceptBroaderURIValues(); + conceptNarrowerURIValues = getConceptNarrowerURIValues(); log.debug("concept label values are " + conceptLabelValues); } - // + + //For broader and narrower relationships, we will be + //linking the concept to broader and narrower terms where those terms already + //exist in the system + //This method or approach may change later in which case this method should change + private void getExistingConceptRelationships() { + List existingNarrowerURIs = getExistingNarrowerURIs(conceptNarrowerURIValues); + List existingBroaderURIs = getExistingBroaderURIs(conceptBroaderURIValues); + //Now set the submission values to these, overwriting the original + Map> urisFromForm = submission.getUrisFromForm(); + if(existingNarrowerURIs.size() > 0) { + urisFromForm.put("conceptNarrowerURI", existingNarrowerURIs); + } else { + //The original code for submission wouldn't put in a key if the values were null or size 0 + urisFromForm.remove("conceptNarrowerURI"); + } + //Set the copied values to this value as well so when if there are multiple + //concepts, the inputs get copied correctly for each of them + this.conceptNarrowerURIValues = existingNarrowerURIs; + if(existingBroaderURIs.size() > 0) { + urisFromForm.put("conceptBroaderURI", existingBroaderURIs); + } else { + urisFromForm.remove("conceptBroaderURI"); + } + this.conceptBroaderURIValues = existingBroaderURIs; + } + + //get the broader and narrower uri values that already exist in the system from the ones returned in the search + //and use those to populate relationships between the concept and other concepts already in the system + //We should also make sure to use bidirectional n3 so the graph has both sets of relationships represented + private List getConceptNarrowerURIValues() { + return this.getJSONFormURIValues("conceptNarrowerURI"); + } + + private List getConceptBroaderURIValues() { + return this.getJSONFormURIValues("conceptBroaderURI"); + } + + private List getJSONFormURIValues(String varName) { + Map> urisFromForm = submission.getUrisFromForm(); + List uris = urisFromForm.get(varName); + //This should be a JSON object stringified + if(uris.size() > 0) { + String jsonString = uris.get(0); + if(jsonString != null && !jsonString.isEmpty()) { + JSON json = JSONSerializer.toJSON(jsonString); + //This should be an array + if(json.isArray()) { + JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON(jsonString); + //Convert to list of strings + return convertJsonArrayToList(jsonArray); + } + } + } + return uris; + } + + private List convertJsonArrayToList(JSONArray jsonArray) { + List stringList = new ArrayList(); + int len = jsonArray.size(); + int i = 0; + for(i = 0; i < len; i++) { + stringList.add(jsonArray.getString(i)); + } + return stringList; + } + + private List getExistingBroaderURIs(List broaderURIs) { + if(broaderURIs == null) { + return new ArrayList(); + } + List existingBroaderURIs = this.getExistingURIs(broaderURIs); + return existingBroaderURIs; + } + + private List getExistingNarrowerURIs(List narrowerURIs) { + if(narrowerURIs == null) + return new ArrayList(); + List existingNarrowerURIs = this.getExistingURIs(narrowerURIs); + return existingNarrowerURIs; + } + + //We need to keep the number of elements the same if there are any entries at all in the original + //So we will use an empty string or null + private List getExistingURIs(List uris) { + //Important to keep the same formatting as original, because a comma delimited string as an element in the array + //refers to a list of uris appropriate for a given concept, where each element in the array corresponds to a different + //concept + List existingURIs = new ArrayList(); + for(String uri:uris) { + if(uri.indexOf(",") != -1) { + List existingURISet = new ArrayList(); + String[] uriSet = uri.split(","); + for(String u: uriSet) { + if(u != null && !u.isEmpty() && this.wdf.hasExistingURI(u)) { + existingURISet.add(u); + } + } + //Now add the comma delimited version back to the array + if(existingURISet.size() > 0) { + existingURIs.add(StringUtils.join(existingURISet, ",")); + } else { + //add empty string to indicate no value here + existingURIs.add(""); + } + } else { + if(uri != null && !uri.isEmpty() && this.wdf.hasExistingURI(uri)) { + existingURIs.add(uri); + } + else + { + existingURIs.add(""); + } + + } + } + return existingURIs; + } + + + //Process the semantic type label and URI values for the concepts private void processConceptSemanticValues() { conceptSemanticTypeLabelValues = getConceptSemanticTypeLabelValues(); conceptSemanticTypeURIValues = getConceptSemanticTypeURIValues(); @@ -180,10 +327,10 @@ public class AddAssociatedConceptsPreprocessor extends addConceptSourceInputs(numberConcepts); addConceptLabelInputs(numberConcepts); //for concept semantic type labels and uris where they exist - //TODO: Make into single method as URIs depend on labels addConceptSemanticTypeLabelAndURIInputs(numberConcepts); - //addConceptSemanticTypeURIInputs(numberConcepts); - + //For broader and narrower uris where they exist (this of course is in the case of multiple broader and narrower uris + addConceptBroaderURIInputs(numberConcepts); + addConceptNarrowerURIInputs(numberConcepts); } private void addConceptNodeInputs(int numberConcepts) { @@ -298,30 +445,53 @@ public class AddAssociatedConceptsPreprocessor extends String[] uriValuesArray = uriVals.toArray(new String[uriVals.size()]); submission.addUriToForm(editConfiguration, uriInputName, uriValuesArray); } - - - //the number of existing values may not match up, or at least existing populated ones - /* - if(conceptSemanticTypeURIs != null && conceptSemanticTypeURIs.length == numberConcepts) { - int i; - for(i = 0; i < numberConcepts; i++) { - int suffix = i + 1; - String conceptInputName = conceptSemanticTypeURIBase + suffix; - String[] uriValues = new String[1]; - uriValues[0] = conceptSemanticTypeURIs[i]; - //Add value for uri to form - //TODO: Check if value is empty in which case don't add to submission - submission.addUriToForm(editConfiguration, conceptInputName, uriValues); - } - } else if(conceptSemanticTypeURIs != null && conceptSemanticTypeURIs.length != numberConcepts){ - log.error("Number of concept nodes did not match the number of concepts to be added"); - } else{ - log.error("Concept nodes returned were null"); - } - - */ } + private void addConceptBroaderURIInputs(int numberConcepts) { + int i; + //Add inputs based on if there are any broader uris to add + //Can't really compare number of existing broader uris to concepts + //as each concept may or may not have a broader uri + if(this.conceptBroaderURIValues.size() > 0 && this.conceptBroaderURIValues.size() <= numberConcepts) { + for(i = 0; i < numberConcepts; i++) { + int suffix = i + 1; + String conceptBroaderURIInputName = conceptBroaderURIBase + suffix; + String broaderURIs = this.conceptBroaderURIValues.get(i); + if(broaderURIs != null && !broaderURIs.isEmpty()) { + String[] broaderURISet = new String[1]; + if(broaderURIs.indexOf(",") != -1) { + broaderURISet = broaderURIs.split(","); + } else { + broaderURISet[0] = broaderURIs; + } + //Add value for uri to form + submission.addUriToForm(editConfiguration, conceptBroaderURIInputName, broaderURISet); + } + } + } + + } + private void addConceptNarrowerURIInputs(int numberConcepts) { + int i; + if(this.conceptNarrowerURIValues.size() > 0 && this.conceptNarrowerURIValues.size() <= numberConcepts) { + for(i = 0; i < numberConcepts; i++) { + int suffix = i + 1; + String conceptNarrowerURIInputName = conceptNarrowerURIBase + suffix; + String narrowerURIs = this.conceptNarrowerURIValues.get(i); + if(narrowerURIs != null && !narrowerURIs.isEmpty()) { + String[] narrowerURISet = new String[1]; + if(narrowerURIs.indexOf(",") != -1) { + narrowerURISet = narrowerURIs.split(","); + } else { + narrowerURISet[0] = narrowerURIs; + } + //Add value for uri to form + submission.addUriToForm(editConfiguration, conceptNarrowerURIInputName, narrowerURISet); + } + } + } + } + //Fields private void addFields(int numberConcepts) { @@ -337,7 +507,8 @@ public class AddAssociatedConceptsPreprocessor extends String source = sourceBase + suffix; String conceptSemanticTypeLabel = conceptSemanticTypeLabelBase + suffix; String conceptSemanticTypeURI = this.getConceptSemanticTypeURIFieldName(conceptSemanticTypeLabel, suffix); - + String conceptBroaderURI = conceptBroaderURIBase + suffix; + String conceptNarrowerURI = conceptNarrowerURIBase + suffix; addConceptNodeField(conceptNode); addLabelField(label); addSourceField(source); @@ -348,9 +519,15 @@ public class AddAssociatedConceptsPreprocessor extends conceptSemanticTypeUris.add(conceptSemanticTypeURI); addConceptSemanticTypeURIField(conceptSemanticTypeURI); } + + //add fields for concept broader and narrower uris + addConceptBroaderURIField(conceptBroaderURI); + addConceptNarrowerURIField(conceptNarrowerURI); } } + + private void addConceptNodeField(String conceptNode) { List validators = new ArrayList(); validators.add("nonempty"); @@ -391,7 +568,18 @@ public class AddAssociatedConceptsPreprocessor extends } } + private void addConceptNarrowerURIField(String conceptNarrowerURI) { + editConfiguration.addField(new FieldVTwo(). + setName(conceptNarrowerURI)); + + } + private void addConceptBroaderURIField(String conceptBroaderURI) { + editConfiguration.addField(new FieldVTwo(). + setName(conceptBroaderURI)); + + } + //original literals on form: label, uris on form: conceptNode and conceptSource //This will overwrite the original values in the edit configuration private void addLiteralsAndUrisOnForm(int numberTerms) { @@ -409,12 +597,16 @@ public class AddAssociatedConceptsPreprocessor extends String conceptSemanticTypeLabel = conceptSemanticTypeLabelBase + suffix; //String conceptSemanticTypeURI = conceptSemanticTypeURIBase + suffix; String conceptSemanticTypeURI = this.getConceptSemanticTypeURIFieldName(conceptSemanticTypeLabel, suffix); + String conceptBroaderURI = conceptBroaderURIBase + suffix; + String conceptNarrowerURI = conceptNarrowerURIBase + suffix; urisOnForm.add(conceptNode); urisOnForm.add(source); if(!conceptSemanticTypeURIs.contains(conceptSemanticTypeURI)) { conceptSemanticTypeURIs.add(conceptSemanticTypeURI); urisOnForm.add(conceptSemanticTypeURI); } + urisOnForm.add(conceptBroaderURI); + urisOnForm.add(conceptNarrowerURI); literalsOnForm.add(label); literalsOnForm.add(conceptSemanticTypeLabel); } @@ -453,10 +645,13 @@ public class AddAssociatedConceptsPreprocessor extends String labelVar = "?" + labelBase; String sourceVar = "?" + sourceBase; String conceptSemanticTypeLabelVar = "?" + conceptSemanticTypeLabelBase; + String conceptBroaderURIVar = "?" + conceptBroaderURIBase; + String conceptNarrowerURIVar = "?" + conceptNarrowerURIBase; String prefixStr = "@prefix core: ."; // First one already included so add new ones here //We already have a label var to uri var setup for (index = 1; index <= numberConcepts; index++) { + //Set up the variables based on which concept node int suffix = index; String node = nodeBase + suffix; String label = labelVar + suffix; @@ -464,19 +659,27 @@ public class AddAssociatedConceptsPreprocessor extends String conceptSemanticTypeLabel = conceptSemanticTypeLabelVar + suffix; //get the URI appropriate for the concept semantic type label var String conceptSemanticTypeURI = getConceptSemanticTypeURIVar(conceptSemanticTypeLabelBase + suffix, suffix); - //onceptSemanticTypeURIVar + suffix; + String conceptBroaderURI = conceptBroaderURIVar + suffix; + String conceptNarrowerURI = conceptNarrowerURIVar + suffix; + //Set up the n3 strings String n3String = prefixStr; n3String += node + " <" + RDFS.label.getURI() + "> " + label + " .\n" + node + " <" + RDFS.isDefinedBy.getURI() + "> " + source + " ."; String n3ConceptTypeString = prefixStr; - n3ConceptTypeString += node + " core:hasConceptSemanticType " + conceptSemanticTypeURI + " ." + - conceptSemanticTypeURI + " core:isConceptSemanticTypeOf " + node + ". " + - conceptSemanticTypeURI + " <" + RDFS.label.getURI() + "> " + conceptSemanticTypeLabel + " .\n" + - conceptSemanticTypeURI + " <" + RDF.type.getURI() + "> core:ConceptSemanticType .\n" ; + n3ConceptTypeString += node + " <" + RDF.type.getURI() + "> " + conceptSemanticTypeURI + " ." + + conceptSemanticTypeURI + " <" + RDFS.label.getURI() + "> " + conceptSemanticTypeLabel + " .\n" + + conceptSemanticTypeURI + " <" + RDFS.subClassOf.getURI() + "> .\n" ; + //String representing the broader and narrower uri(s) for each of the concepts - these may or may not exist + String n3ConceptBroaderURI = prefixStr + node + " <" + this.SKOSNarrowerURI + "> " + conceptNarrowerURI + " ." + + conceptNarrowerURI + " <" + this.SKOSBroaderURI + "> " + node + " ."; + String n3ConceptNarrowerURI = prefixStr + node + " <" + this.SKOSBroaderURI + "> " + conceptBroaderURI + " ." + + conceptBroaderURI + " <" + this.SKOSNarrowerURI + "> " + node + " ."; n3Optional.add(n3String); //adding separately so their resolution does not depend on each other n3Optional.add(n3ConceptTypeString); + n3Optional.add(n3ConceptBroaderURI); + n3Optional.add(n3ConceptNarrowerURI); } //Already have n3 required so need to add to that @@ -534,86 +737,93 @@ public class AddAssociatedConceptsPreprocessor extends private String getConceptSemanticTypeLabelValues() { Map> literalsFromForm = submission.getLiteralsFromForm(); Map> transformed = EditConfigurationUtils.transformLiteralMap(literalsFromForm); - return (String) getFirstElement(transformed.get("conceptSemanticTypeLabel")); + String label = (String) getFirstElement(transformed.get("conceptSemanticTypeLabel")); + if(label == null) { + label = ""; + } + + return label; } //This will either generate or retrieve URIs for the concept semantic type labels if they exist //We will then update the submission to include this private String getConceptSemanticTypeURIValues() { - String[] conceptSemanticTypeLabels = convertDelimitedStringToArray(conceptSemanticTypeLabelValues); - //keep track of what label values already exist and to which label variables they map - HashMap> labelValueToVarSuffix = new HashMap>(); - int numberLabels = conceptSemanticTypeLabels.length; String pseudoInputString = ""; - - //The rest of this code is really only relevant for multiple values, so we could break out the old code above - //as we don't need to set up hashes etc. if there is only one concept node being added - if(numberLabels == 1) { - String label = conceptSemanticTypeLabels[0]; - String uri = getURIForSemanticTypeLabel(label); - if(uri != "") { - String[] urisToAdd = new String[1]; - urisToAdd[0] = uri; - pseudoInputString = uri; - log.debug("uris to add" + uri); - submission.addUriToForm(this.editConfiguration, "conceptSemanticTypeURI", urisToAdd); - } + if(conceptSemanticTypeLabelValues != null && !conceptSemanticTypeLabelValues.isEmpty()) { + String[] conceptSemanticTypeLabels = convertDelimitedStringToArray(conceptSemanticTypeLabelValues); + //keep track of what label values already exist and to which label variables they map + HashMap> labelValueToVarSuffix = new HashMap>(); + int numberLabels = conceptSemanticTypeLabels.length; - } - //if there is more than one concept node, we may have duplicate semantic types - //which will need to be referred to by the same semantic type uri - else if (numberLabels > 1){ - - for(int i = 0; i < numberLabels; i++) { - int suffix = i + 1; - String label = conceptSemanticTypeLabels[i]; - String labelVar = this.conceptSemanticTypeLabelBase + suffix; - //if label has not already been encountered, create entry for label value - //and list with the label variables that would refer to it - //for unique values, the uri variable will be the same as label - Integer thisSuffix = new Integer(suffix); - if(!labelValueToVarSuffix.containsKey(label)) { - labelValueToVarSuffix.put(label, new ArrayList()); - //Add suffix to list if not already there - labelValueToVarSuffix.get(label).add(thisSuffix); - } else { - //in this case, the label already exists, get the very first element in the list - //and use that as the uri variable - List suffixList = labelValueToVarSuffix.get(label); - if(suffixList != null && suffixList.size() > 0) { - thisSuffix = suffixList.get(0); - } - - } - - //Now add the uri var to the hash mapping label variable to uri variable - String uriVar = this.conceptSemanticTypeURIBase + thisSuffix.intValue(); - this.labelVarToUriVarHash.put(labelVar, uriVar); - - - //Make or retrieve URI for this label - //TODO: Do we create this string with empty inputs ? + //The rest of this code is really only relevant for multiple values, so we could break out the old code above + //as we don't need to set up hashes etc. if there is only one concept node being added + if(numberLabels == 1) { + String label = conceptSemanticTypeLabels[0]; String uri = getURIForSemanticTypeLabel(label); if(uri != "") { - //uri var shouldn't be repeated? - if(!this.conceptSemanticTypeURIVarToValueMap.containsKey(uriVar)) { - this.conceptSemanticTypeURIVarToValueMap.put(uriVar, new ArrayList()); - this.conceptSemanticTypeURIVarToValueMap.get(uriVar).add(uri); - } + String[] urisToAdd = new String[1]; + urisToAdd[0] = uri; + pseudoInputString = uri; + log.debug("uris to add" + uri); + submission.addUriToForm(this.editConfiguration, "conceptSemanticTypeURI", urisToAdd); } - if(i != 0) { - pseudoInputString += ","; - } - pseudoInputString += uri; - + } + //if there is more than one concept node, we may have duplicate semantic types + //which will need to be referred to by the same semantic type uri + else if (numberLabels > 1){ - //Add this string to the uris for the form - String[] urisToAdd = new String[1]; - urisToAdd[0] = pseudoInputString; - log.debug("uris to add" + pseudoInputString); - submission.addUriToForm(this.editConfiguration, "conceptSemanticTypeURI", urisToAdd); - + for(int i = 0; i < numberLabels; i++) { + int suffix = i + 1; + String label = conceptSemanticTypeLabels[i]; + String labelVar = this.conceptSemanticTypeLabelBase + suffix; + //if label has not already been encountered, create entry for label value + //and list with the label variables that would refer to it + //for unique values, the uri variable will be the same as label + Integer thisSuffix = new Integer(suffix); + if(!labelValueToVarSuffix.containsKey(label)) { + labelValueToVarSuffix.put(label, new ArrayList()); + //Add suffix to list if not already there + labelValueToVarSuffix.get(label).add(thisSuffix); + } else { + //in this case, the label already exists, get the very first element in the list + //and use that as the uri variable + List suffixList = labelValueToVarSuffix.get(label); + if(suffixList != null && suffixList.size() > 0) { + thisSuffix = suffixList.get(0); + } + + } + + //Now add the uri var to the hash mapping label variable to uri variable + String uriVar = this.conceptSemanticTypeURIBase + thisSuffix.intValue(); + this.labelVarToUriVarHash.put(labelVar, uriVar); + + + //Make or retrieve URI for this label + //TODO: Do we create this string with empty inputs ? + String uri = getURIForSemanticTypeLabel(label); + if(uri != "") { + //uri var shouldn't be repeated? + if(!this.conceptSemanticTypeURIVarToValueMap.containsKey(uriVar)) { + this.conceptSemanticTypeURIVarToValueMap.put(uriVar, new ArrayList()); + this.conceptSemanticTypeURIVarToValueMap.get(uriVar).add(uri); + } + } + if(i != 0) { + pseudoInputString += ","; + } + pseudoInputString += uri; + + } + + //Add this string to the uris for the form + String[] urisToAdd = new String[1]; + urisToAdd[0] = pseudoInputString; + log.debug("uris to add" + pseudoInputString); + submission.addUriToForm(this.editConfiguration, "conceptSemanticTypeURI", urisToAdd); + + } } return pseudoInputString; } @@ -630,7 +840,7 @@ public class AddAssociatedConceptsPreprocessor extends } private String getExistingSemanticTypeURI(String label) { - String queryStr = "SELECT ?semanticType WHERE { ?semanticType <" + RDF.type.getURI() + "> . " + + String queryStr = "SELECT ?semanticType WHERE { ?semanticType <" + RDF.type.getURI() + "> <" + OWL.Class.getURI() + "> . " + "?semanticType <" + RDFS.label.getURI() + "> \"" + label + "\"^^ . }"; QueryExecution qe = null; try{ diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ConceptSemanticTypesPreprocessor.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ConceptSemanticTypesPreprocessor.java new file mode 100644 index 00000000..d0b3cb9a --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ConceptSemanticTypesPreprocessor.java @@ -0,0 +1,127 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.ontology.OntModel; +import com.hp.hpl.jena.query.Dataset; +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QuerySolutionMap; +import com.hp.hpl.jena.query.Syntax; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.Property; +import com.hp.hpl.jena.rdf.model.ResIterator; +import com.hp.hpl.jena.rdf.model.Resource; +import com.hp.hpl.jena.rdf.model.ResourceFactory; +import com.hp.hpl.jena.rdf.model.Statement; +import com.hp.hpl.jena.shared.Lock; +import com.hp.hpl.jena.vocabulary.RDF; +import com.hp.hpl.jena.vocabulary.RDFS; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.dao.jena.DatasetWrapper; +import edu.cornell.mannlib.vitro.webapp.dao.jena.DatasetWrapperFactory; + +//We are representing semantic types from the UMLS Semantic Network as OWL Classes +//and this preprocessor will add the appropriate class information to the TBox + +public class ConceptSemanticTypesPreprocessor implements ModelChangePreprocessor { + + private static String VIVOCore = "http://vivoweb.org/ontology/core#"; + private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept"; + private Log log = LogFactory.getLog(ConceptSemanticTypesPreprocessor.class); + + + //Custom constructor + public ConceptSemanticTypesPreprocessor() { + } + + @Override + public void preprocess(Model retractionsModel, Model additionsModel, + HttpServletRequest request) { + VitroRequest vreq = new VitroRequest(request); + //Run a construct query against the additions model + String prefixes = "PREFIX rdfs:<" + RDFS.getURI() + "> " + + "PREFIX owl: " + + "PREFIX rdf:<" + RDF.getURI() + ">" + + "PREFIX skos:"; + String constructQuery = prefixes + " CONSTRUCT { " + + "?semanticType rdf:type owl:Class. " + + "?semanticType rdfs:subClassOf skos:Concept . " + + "?semanticType rdfs:label ?label. " + + "} WHERE { " + + "?concept rdf:type ?semanticType. " + + "?semanticType rdfs:label ?label . " + + "?semanticType rdfs:subClassOf skos:Concept . " + + "}"; + + //Execute construct query + Model constructedModel = ModelFactory.createDefaultModel(); + + + log.debug("CONSTRUCT query string " + constructQuery); + + Query query = null; + try { + query = QueryFactory.create(constructQuery, Syntax.syntaxARQ); + } catch(Throwable th){ + log.error("Could not create CONSTRUCT SPARQL query for query " + + "string. " + th.getMessage()); + log.error(constructQuery); + return; + } + + + + additionsModel.getLock().enterCriticalSection(Lock.READ); + QueryExecution qe = null; + try { + qe = QueryExecutionFactory.create( + query, additionsModel); + qe.execConstruct(constructedModel); + } catch (Exception e) { + log.error("Error getting constructed model for query string " + constructQuery); + } finally { + if (qe != null) { + qe.close(); + } + additionsModel.getLock().leaveCriticalSection(); + } + + //Add constructed model to the designated update model + OntModel toUpdateModel = ModelAccess.on(vreq).getOntModelSelector().getTBoxModel(); + toUpdateModel.enterCriticalSection(Lock.WRITE); + try { + toUpdateModel.add(constructedModel); + } catch (Exception e) { + log.error("Error adding statements to update model for " + constructQuery); + } finally { + toUpdateModel.leaveCriticalSection(); + } + + //Take this constructed model and remove from the additions model + additionsModel.enterCriticalSection(Lock.WRITE); + try { + additionsModel.remove(constructedModel.listStatements().toList()); + } catch (Exception e) { + log.error("Error removing statements from additions model for " + constructQuery); + } finally { + additionsModel.leaveCriticalSection(); + } + + } + + + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToActivityPredicatePreprocessor.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToActivityPredicatePreprocessor.java index df1d6a9a..ae94cf97 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToActivityPredicatePreprocessor.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToActivityPredicatePreprocessor.java @@ -50,7 +50,7 @@ public class RoleToActivityPredicatePreprocessor extends RoleToPredicatePreproce this.itemToRolePredicate = "activityToRolePredicate"; } - protected String getItemType(MultiValueEditSubmission submission) { + protected String getItemType(MultiValueEditSubmission submission, VitroRequest vreq) { String type = null; Map> urisFromForm = submission.getUrisFromForm(); //Get the type of the activity selected diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToPredicatePreprocessor.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToPredicatePreprocessor.java index 60967f8b..4bebf4df 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToPredicatePreprocessor.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/RoleToPredicatePreprocessor.java @@ -56,7 +56,7 @@ public abstract class RoleToPredicatePreprocessor extends BaseEditSubmissionPrep //Instantiate itemType etc. based on which version of preprocessor required abstract protected void setupVariableNames(); - public void preprocess(MultiValueEditSubmission submission) { + public void preprocess(MultiValueEditSubmission submission, VitroRequest vreq) { //Query for all statements using the original roleIn predicate replace //with the appropriate roleRealizedIn or roleContributesTo //In addition, need to ensure the inverse predicate is also set correctly diff --git a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java index d232e875..68705bd3 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java +++ b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java @@ -23,6 +23,7 @@ public class ConceptSearchServiceUtils { private static final String UMLSVocabSource = "http://link.informatics.stonybrook.edu/umls"; private static final String AgrovocVocabSource = "http://aims.fao.org/aos/agrovoc/agrovocScheme"; private static final String GemetVocabSource = "http://www.eionet.europa.eu/gemet/gemetThesaurus"; + private static final String LCSHVocabSource = "http://id.loc.gov/authorities/subjects"; //Get the class that corresponds to the appropriate search public static String getConceptSearchServiceClassName(String searchServiceName) { @@ -41,6 +42,8 @@ public class ConceptSearchServiceUtils { //Commenting out agrovoc for now until implementation is updated map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "http://www.fao.org/agrovoc/", "Agricultural Vocabulary")); map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus")); + map.put(LCSHVocabSource, new VocabSourceDescription("LCSH", LCSHVocabSource, "http://id.loc.gov/authorities/subjects/", "Library of Congress Subject Headings")); + return map; } @@ -53,6 +56,8 @@ public class ConceptSearchServiceUtils { map.put(UMLSVocabSource, "edu.cornell.mannlib.semservices.service.impl.UMLSService"); map.put(AgrovocVocabSource, "edu.cornell.mannlib.semservices.service.impl.AgrovocService"); map.put(GemetVocabSource, "edu.cornell.mannlib.semservices.service.impl.GemetService"); + map.put(LCSHVocabSource, "edu.cornell.mannlib.semservices.service.impl.LCSHService"); + return map; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java index 780f95a2..782c2316 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java +++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java @@ -16,18 +16,18 @@ public class IndividualSearchResult extends BaseIndividualSearchResult { public IndividualSearchResult(Individual individual, VitroRequest vreq) { super(individual, vreq); - log.info("Called Individual Search Result"); + log.debug("Called Individual Search Result"); } /* Access methods for templates */ public String getPreferredTitle() { - log.info("Called get Title"); + log.debug("Called get Title"); return individual.getDataValue(CORE + "preferredTitle"); } public String getEmail() { - log.info("Called get Email"); + log.debug("Called get Email"); return individual.getDataValue(CORE + "email"); } diff --git a/src/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicy.java b/src/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicy.java index 862c5fa9..9ac81ea7 100644 --- a/src/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicy.java +++ b/src/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicy.java @@ -70,8 +70,8 @@ public class SelfEditorRelationshipPolicy extends AbstractRelationshipPolicy return inconclusiveDecision("Not self-editing."); } - if (!canModifyPredicate(action.getPredicateUri())) { - return cantModifyPredicate(action.getPredicateUri()); + if (!canModifyPredicate(action.getPredicate())) { + return cantModifyPredicate(action.getPredicate().getURI()); } for (String resourceUri : action.getResourceUris()) { diff --git a/src/org/vivoweb/webapp/util/ModelUtils.java b/src/org/vivoweb/webapp/util/ModelUtils.java index 4277fded..629d9f52 100644 --- a/src/org/vivoweb/webapp/util/ModelUtils.java +++ b/src/org/vivoweb/webapp/util/ModelUtils.java @@ -20,10 +20,12 @@ public class ModelUtils { private static final Log log = LogFactory.getLog(ModelUtils.class.getName()); - private static final String processPropertyURI = "http://vivoweb.org/ontology/core#roleRealizedIn"; - private static final String processPropertyInverseURI = "http://vivoweb.org/ontology/core#realizedRole"; - private static final String nonProcessPropertyURI = "http://vivoweb.org/ontology/core#roleContributesTo"; + private static final String processPropertyURI = "http://purl.obolibrary.org/obo/BFO_0000054"; + private static final String processPropertyInverseURI = "http://purl.obolibrary.org/obo/BFO_0000055"; + private static final String nonProcessPropertyURI = "http://vivoweb.org/ontology/core#roleContributesTo"; private static final String nonProcessPropertyInverseURI = "http://vivoweb.org/ontology/core#contributingRole"; + private static final String grantPropertyURI = "http://vivoweb.org/ontology/core#relatedBy"; + private static final String grantPropertyInverseURI = "http://vivoweb.org/ontology/core#relates"; private static Set processClass = new HashSet(); static { @@ -32,6 +34,10 @@ public class ModelUtils { processClass.add("http://vivoweb.org/ontology/core#EventSeries"); } + private static Set grantClass = new HashSet(); + static { + grantClass.add("http://vivoweb.org/ontology/core#Grant"); + } /* * Given a class URI that represents the type of entity that a Role * is in (in, in any of its senses) this method returns the URIs of @@ -61,6 +67,7 @@ public class ModelUtils { ObjectProperty op = new ObjectProperty(); boolean isBFOProcess = false; + boolean isGrantClass = false; while (iter.hasNext()) { String superClassURI = iter.next(); @@ -69,12 +76,21 @@ public class ModelUtils { isBFOProcess = true; break; } + if (grantClass.contains(superClassURI)) { + isGrantClass = true; + break; + } } if (isBFOProcess) { op.setURI(processPropertyURI); op.setURIInverse(processPropertyInverseURI); - } else { + } + else if (isGrantClass){ + op.setURI(grantPropertyURI); + op.setURIInverse(grantPropertyInverseURI); + } + else { op.setURI(nonProcessPropertyURI); op.setURIInverse(nonProcessPropertyInverseURI); } diff --git a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java index 2abd52d6..855dd32d 100644 --- a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java +++ b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java @@ -38,6 +38,7 @@ import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAct import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddDataPropertyStatement; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AddObjectPropertyStatement; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource.AddResource; +import edu.cornell.mannlib.vitro.webapp.beans.Property; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; /** @@ -68,8 +69,12 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { private static final String URI_PERMITTED_PREDICATE = NS_PERMITTED + "permittedPredicate"; + private static final Property PERMITTED_PREDICATE = new Property( + URI_PERMITTED_PREDICATE); private static final String URI_RESTRICTED_PREDICATE = NS_RESTRICTED + "restrictedPredicate"; + private static final Property RESTRICTED_PREDICATE = new Property( + URI_RESTRICTED_PREDICATE); /** * Where the model statements are stored for this test. @@ -195,7 +200,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsRestricted() { action = new AddObjectPropertyStatement(ontModel, - URI_RESTRICTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_RESTRICTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -203,7 +208,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropPredicateIsRestricted() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_RESTRICTED_PREDICATE, + URI_PERMITTED_RESOURCE, RESTRICTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -211,7 +216,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsRestricted() { action = new AddObjectPropertyStatement(ontModel, URI_JOE_EDITED_IT, - URI_PERMITTED_PREDICATE, URI_RESTRICTED_RESOURCE); + PERMITTED_PREDICATE, URI_RESTRICTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -282,14 +287,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsInfoResourceButNobodyIsSelfEditing() { action = new AddObjectPropertyStatement(ontModel, URI_JOE_EDITED_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); } @Test public void objectPropSubjectIsInfoResourceButNoAuthorsOrEditorsOrFeatured() { action = new AddObjectPropertyStatement(ontModel, URI_NOBODY_WROTE_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); } @@ -297,21 +302,21 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsInfoResourceButWrongAuthor() { action = new AddObjectPropertyStatement(ontModel, URI_BOZO_WROTE_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void objectPropSubjectIsInfoResourceButWrongEditor() { action = new AddObjectPropertyStatement(ontModel, URI_BOZO_EDITED_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void objectPropSubjectIsInfoResourceButWrongFeatured() { action = new AddObjectPropertyStatement(ontModel, - URI_BOZO_FEATURED_IN_IT, URI_PERMITTED_PREDICATE, + URI_BOZO_FEATURED_IN_IT, PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -319,7 +324,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsInfoResourceWithSelfEditingAuthor() { action = new AddObjectPropertyStatement(ontModel, URI_JOE_WROTE_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -327,7 +332,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsInfoResourceWithSelfEditingEditor() { action = new AddObjectPropertyStatement(ontModel, URI_JOE_EDITED_IT, - URI_PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); + PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -335,7 +340,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropSubjectIsInfoResourceWithSelfEditingFeatured() { action = new AddObjectPropertyStatement(ontModel, - URI_JOE_FEATURED_IN_IT, URI_PERMITTED_PREDICATE, + URI_JOE_FEATURED_IN_IT, PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); @@ -344,7 +349,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourcebutNobodyIsSelfEditing() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); } @@ -352,7 +357,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceButNoAuthorsOrEditors() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_NOBODY_WROTE_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); @@ -361,7 +366,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceButWrongAuthor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_BOZO_WROTE_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -369,7 +374,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceButWrongEditor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_BOZO_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -377,7 +382,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceButWrongFeatured() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_BOZO_FEATURED_IN_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -385,7 +390,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceWithSelfEditingAuthor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_WROTE_IT); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); @@ -394,7 +399,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceWithSelfEditingEditor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); @@ -403,7 +408,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsInfoResourceWithSelfEditingFeatured() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_FEATURED_IN_IT); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); @@ -423,7 +428,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropNeitherSubjectOrObjectIsInfoResource() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, URI_PERMITTED_PREDICATE, + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_PERMITTED_RESOURCE); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } diff --git a/themes/wilma/css/wilma.css b/themes/wilma/css/wilma.css index b7143d30..e8395b0f 100644 --- a/themes/wilma/css/wilma.css +++ b/themes/wilma/css/wilma.css @@ -1694,6 +1694,9 @@ input[type="submit"] { .checkboxSpacer { margin-left:150px; } +p.address-line { + margin-bottom: 0.3em; +} /* EDITING DISPLAY------> */ .edit-individual { border-left: 1px dotted #B2D15A; diff --git a/themes/wilma/i18n/all.properties b/themes/wilma/i18n/all.properties index 38583523..57d9a20f 100644 --- a/themes/wilma/i18n/all.properties +++ b/themes/wilma/i18n/all.properties @@ -280,7 +280,6 @@ change_selection = change selection # custom form templates ( /templates/freemarker/edit/forms ) # manage_concepts = Manage Concepts -remove_capitalized = Remove no_concepts_specified = There are currently no concepts specified. return_to_profile = Return to Profile Page external_vocabulary_services = External Vocabulary Services @@ -452,9 +451,9 @@ internal_class = institutional internal class only_display = Only display within_my_institution = within my institution -enter_a_name = Please enter a value in the name field. -enter_last_name = Please enter a Last Name for this person. -enter_first_name = Please enter a First Name for this person. +enter_a_name = Please enter a value in the Name field. +enter_last_name = Please enter a Last name for this person. +enter_first_name = Please enter a First name for this person. posn_history_entry_for = position history entry for enter_posn_title_value = Please enter a value in the Position Title field. @@ -501,16 +500,14 @@ academic_studies_or_other = Academic Studies or Other Training edit_mailing_address = Edit Mailing Address create_mailing_address = Create Mailing Address mailing_address_for = mailing address for -select_a_country = Please select a country. -enter_address1_value = Please enter a value in the Address Line 1 field. -enter_a_city = Please enter a value in the City field. +enter_a_country = Please enter a value in the Country field. +enter_street_address = Please enter a value in the Street Address field. +enter_a_locality = Please enter a value in the City/Locality field. enter_postal_code = Please enter a value in the Postal Code field. country = Country -street_Address1 = Street Address 1 -street_Address2 = Street Address 2 -street_Address3 = Street Address 3 -city = City -state = State +street_address = Street Address +city_locality = City/Locality +region = State/Province/Region postal_code = Postal Code posn_entry_for = position entry for @@ -693,6 +690,7 @@ or_add_new_one = or add a new one. vocabulary_service_unavailable = The vocabulary service is unavailable. Please try again later. no_serch_results_found = No search results were found. label_type = Label (Type) +label_altLabels = Label (Alternate Labels) definition_capitalized = Definition best_match = Best Match select_term_from_results = Please select at least one term from the search search results. @@ -831,4 +829,14 @@ local_research = Local Research selected_presentation = Selected Presentation event_capitalized = Event collection_capitalized = Collection -item_capitalized = Item \ No newline at end of file +item_capitalized = Item +telephone_number_for = telephone number for +telephone_number = Telephone Number +enter_telephone_number = Please enter a value in the Telephone Number field. +email_address = Email Address +email_address_for = email address for +enter_email_address = Please enter a value in the Email Address field. +full_name = Full name +full_name_for = full name for +first_name = First name +last_name = Last name diff --git a/themes/wilma/i18n/images/select_locale_en_AU.GIF b/themes/wilma/i18n/images/select_locale_en_AU.GIF deleted file mode 100644 index e4c2274c..00000000 Binary files a/themes/wilma/i18n/images/select_locale_en_AU.GIF and /dev/null differ diff --git a/themes/wilma/i18n/images/select_locale_es_MX.GIF b/themes/wilma/i18n/images/select_locale_es_MX.GIF deleted file mode 100644 index 11c25782..00000000 Binary files a/themes/wilma/i18n/images/select_locale_es_MX.GIF and /dev/null differ diff --git a/themes/wilma/templates/individual--foaf-person.ftl b/themes/wilma/templates/individual--foaf-person.ftl index 6e2161fb..f5092db0 100644 --- a/themes/wilma/templates/individual--foaf-person.ftl +++ b/themes/wilma/templates/individual--foaf-person.ftl @@ -11,6 +11,9 @@ <#if !labelCount??> <#assign labelCount = 0 > +<#if !localesCount??> + <#assign localesCount = 1> + <#assign visRequestingTemplate = "foaf-person-wilma">
    @@ -55,7 +58,7 @@ <#else>

    <#-- Label --> - <@p.label individual editable labelCount/> + <@p.label individual editable labelCount localesCount/> <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> @@ -63,7 +66,7 @@ <@p.addLinkWithLabel title editable /> <#list title.statements as statement> ${statement.value} - <@p.editingLinks "${title.name}" statement editable /> + <@p.editingLinks "${title.name}" "" statement editable /> <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> diff --git a/utilities/acceptance-tests/suites/AdminSecurity/AdminLoginLogout.html b/utilities/acceptance-tests/suites/AdminSecurity/AdminLoginLogout.html index a1b01699..3b56df96 100644 --- a/utilities/acceptance-tests/suites/AdminSecurity/AdminLoginLogout.html +++ b/utilities/acceptance-tests/suites/AdminSecurity/AdminLoginLogout.html @@ -132,7 +132,7 @@ verifyElementPresent - link=Restrict Logins + link=Restrict logins diff --git a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminCheckPrivileges.html b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminCheckPrivileges.html index cb095ca4..355c44ad 100644 --- a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminCheckPrivileges.html +++ b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminCheckPrivileges.html @@ -128,7 +128,7 @@ verifyElementPresent - link=Restrict Logins + link=Restrict logins @@ -329,7 +329,7 @@ verifyTextPresent - Page Management + Page management @@ -504,7 +504,7 @@ verifyTextPresent - Email Address + Email address diff --git a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminDelete.html b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminDelete.html index 89ceda9a..ea6beae1 100644 --- a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminDelete.html +++ b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminDelete.html @@ -124,7 +124,7 @@ verifyTextPresent - Deleted 1 accounts. + Deleted 1 account. diff --git a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminFirstLogin.html b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminFirstLogin.html index 0543f143..8b0c615a 100644 --- a/utilities/acceptance-tests/suites/AdminSecurity/NewAdminFirstLogin.html +++ b/utilities/acceptance-tests/suites/AdminSecurity/NewAdminFirstLogin.html @@ -223,7 +223,7 @@ verifyTextPresent - Please enter a password between 6 and 12 characters in length. + Password must be between 6 and 12 characters. diff --git a/utilities/releaseScripts/2_create_branches.rb b/utilities/releaseScripts/2_create_branches.rb index f938b8cb..b5eb1215 100644 --- a/utilities/releaseScripts/2_create_branches.rb +++ b/utilities/releaseScripts/2_create_branches.rb @@ -38,21 +38,14 @@ begin vivo_path = Settings.vivo_path vitro_path = Settings.vitro_path + raise BadState.new("Branches are not created for test candidates.") if is_test_candidate?() raise BadState.new("Branch #{branch} already exists in VIVO.") if branch_exists?(vivo_path, branch) raise BadState.new("Branch #{branch} already exists in Vitro.") if branch_exists?(vitro_path, branch) - puts - yn = prompt("OK to create branches named '#{branch}' (y/n)") - if yn.downcase == 'y' - puts + get_permission_and_go("OK to create branches named '#{branch}'?") do puts "Creating branches" create_branch(vivo_path, branch) create_branch(vitro_path, branch) - puts - else - puts - puts "OK - forget it." - puts end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/3_create_tags.rb b/utilities/releaseScripts/3_create_tags.rb index e19c7c01..f20cf77e 100644 --- a/utilities/releaseScripts/3_create_tags.rb +++ b/utilities/releaseScripts/3_create_tags.rb @@ -52,18 +52,10 @@ begin raise BadState.new("Tag #{tag} already exists in VIVO.") if tag_exists?(vivo_path, tag) raise BadState.new("Tag #{tag} already exists in Vitro.") if tag_exists?(vitro_path, tag) - puts - yn = prompt("OK to create tags named '#{tag}' '#{message}' (y/n)") - if yn.downcase == 'y' - puts + get_permission_and_go("OK to create tags named '#{tag}' '#{message}'?") do puts "Creating tags" create_tag(vivo_path, branch, tag, message) create_tag(vitro_path, branch, tag, message) - puts - else - puts - puts "OK - forget it." - puts end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/4_extract_files.rb b/utilities/releaseScripts/4_extract_files.rb index 6ae3c478..d223158f 100644 --- a/utilities/releaseScripts/4_extract_files.rb +++ b/utilities/releaseScripts/4_extract_files.rb @@ -21,7 +21,23 @@ require '_common' # # Get the VIVO files and the Vitro files, and remove the .git directories. # -def export_files(vivo_path, vitro_path, tag, export_dir) +def export_files(vivo_path, vitro_path, tag, branch, export_dir) + Dir.chdir(vivo_path) do |path| + cmds = ["git checkout #{branch}", + "git pull", + ] + cmds.delete_at(1) unless is_remote_branch?(branch) + approve_and_execute(cmds, "in #{path}") + end + + Dir.chdir(vitro_path) do |path| + cmds = ["git checkout #{branch}", + "git pull", + ] + cmds.delete_at(1) unless is_remote_branch?(branch) + approve_and_execute(cmds, "in #{path}") + end + approve_and_execute([ "rm -Rf #{File.expand_path("..", export_dir)}", "mkdir -pv #{export_dir}", @@ -31,6 +47,10 @@ def export_files(vivo_path, vitro_path, tag, export_dir) ]) end +def is_remote_branch?(branch) + ! `git branch --list -a origin/#{branch}`.strip.empty? +end + # # ------------------------------------------------------------------------------------ # Main method @@ -39,6 +59,7 @@ end begin tag = Settings.tag_name + branch = Settings.branch_name vivo_path = Settings.vivo_path vitro_path = Settings.vitro_path export_dir = Settings.export_dir @@ -47,22 +68,14 @@ begin raise BadState.new("Tag #{tag} doesn't exist in Vitro.") unless tag_exists?(vitro_path, tag) if File.directory?(export_dir) - p = "OK to overwrite export area at #{export_dir} ? (y/n)" + p = "OK to overwrite export area at #{export_dir} ?" else - p = "OK to create export area at #{export_dir} ? (y/n)" + p = "OK to create export area at #{export_dir} ?" end - puts - yn = prompt(p) - if yn.downcase == 'y' - puts + get_permission_and_go(p) do puts "Building export area" - export_files(vivo_path, vitro_path, tag, export_dir) - puts - else - puts - puts "OK - forget it." - puts + export_files(vivo_path, vitro_path, tag, branch, export_dir) end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/5_insert_revision_info.rb b/utilities/releaseScripts/5_insert_revision_info.rb index 92672421..ada08700 100644 --- a/utilities/releaseScripts/5_insert_revision_info.rb +++ b/utilities/releaseScripts/5_insert_revision_info.rb @@ -47,23 +47,15 @@ begin raise BadState.new("Files have not been exported to #{export_dir}") unless File.directory?(export_dir) if File.exist?(vivo_revision_info_path) || File.exist?(vitro_revision_info_path) - p = "OK to overwrite revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ? (y/n)" + p = "OK to overwrite revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ?" else - p = "OK to write revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ? (y/n)" + p = "OK to write revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ?" end - puts - yn = prompt(p) - if yn.downcase == 'y' - puts + get_permission_and_go(p) do puts "Building revision info" create_revision_info(vivo_path, vivo_revision_info_path, tag) create_revision_info(vitro_path, vitro_revision_info_path, tag) - puts - else - puts - puts "OK - forget it." - puts end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/6_create_distribution_files.rb b/utilities/releaseScripts/6_create_distribution_files.rb index 1bd67d77..8c4e9013 100644 --- a/utilities/releaseScripts/6_create_distribution_files.rb +++ b/utilities/releaseScripts/6_create_distribution_files.rb @@ -50,23 +50,10 @@ begin raise BadState.new("Revision information file does not exist at #{vivo_revision_info_path}") unless File.exist?(vivo_revision_info_path) raise BadState.new("Revision information file does not exist at #{vitro_revision_info_path}") unless File.exist?(vitro_revision_info_path) - if File.exist?(vivo_revision_info_path) || File.exist?(vitro_revision_info_path) - p = "OK to overwrite revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ? (y/n)" - else - p = "OK to write revision_info at these paths? \n #{vivo_revision_info_path} \n #{vitro_revision_info_path} ? (y/n)" - end - puts - yn = prompt("OK to create distribution files in #{export_dir} ? (y/n)") - if yn.downcase == 'y' - puts + get_permission_and_go("OK to create distribution files in #{export_dir} ?") do puts "Creating distribution files" create_distribution_files(export_dir, vivo_filename, vitro_filename) - puts - else - puts - puts "OK - forget it." - puts end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/7_merge_to_master.rb b/utilities/releaseScripts/7_merge_to_master.rb index 1e7ea1df..674013f0 100644 --- a/utilities/releaseScripts/7_merge_to_master.rb +++ b/utilities/releaseScripts/7_merge_to_master.rb @@ -47,18 +47,10 @@ begin raise BadState.new("Branch #{branch} doesn't exist in VIVO.") unless branch_exists?(vivo_path, branch) raise BadState.new("Branch #{branch} doesn't exist in Vitro.") unless branch_exists?(vitro_path, branch) - puts - yn = prompt("OK to merge the #{tag} tags to the master branches? (y/n)") - if yn.downcase == 'y' - puts + get_permission_and_go("OK to merge the #{tag} tags to the master branches?") do puts "Merging tags" merge_branch_to_master(branch, tag, message, vivo_path) merge_branch_to_master(branch, tag, message, vitro_path) - puts - else - puts - puts "OK - forget it." - puts end rescue BadState puts "#{$!.message} - Aborting." diff --git a/utilities/releaseScripts/8_push_changes.rb b/utilities/releaseScripts/8_push_changes.rb new file mode 100644 index 00000000..3bb46eba --- /dev/null +++ b/utilities/releaseScripts/8_push_changes.rb @@ -0,0 +1,39 @@ +=begin +-------------------------------------------------------------------------------- + +Push any branches, tags, or merges back to GitHub. + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +=end + +$: << File.dirname(File.expand_path(__FILE__)) +require '_common' + +# +# Merge the maintenance branch to the master branch and create the tag. +# +def push_to_origin(repo_path) + Dir.chdir(repo_path) do |path| + approve_and_execute(["git push --all", "git push --tags"], "in #{path}") + end +end + +# +# ------------------------------------------------------------------------------------ +# Main method +# ------------------------------------------------------------------------------------ +# + +begin + vivo_path = Settings.vivo_path + vitro_path = Settings.vitro_path + + get_permission_and_go("OK to push changes to the origin?") do + puts "Merging tags" + push_to_origin(vivo_path) + push_to_origin(vitro_path) + end +rescue BadState + puts "#{$!.message} - Aborting." +end diff --git a/utilities/releaseScripts/_common.rb b/utilities/releaseScripts/_common.rb index 9b891415..b175b3e1 100644 --- a/utilities/releaseScripts/_common.rb +++ b/utilities/releaseScripts/_common.rb @@ -23,6 +23,10 @@ end # class Settings + # + # The settings themselves: getters, setters, and validators. + # + def self.base_directory `git config --get --global vivo.release.basedirectory`.strip end @@ -102,10 +106,15 @@ class Settings # # The name of the maintenance branch. Looks like "maint-rel-4.2" even for releases like "4.2.1" + # Test candidates for major releases are built on the develop branch. def self.branch_name - label = Settings.confirm_release_label(Settings.release_label) - major_release = label[0..2] - "maint-rel-#{major_release}" + if is_test_candidate?() + "develop" + else + release_label = Settings.confirm_release_label(Settings.release_label) + major_release = release_label[0..2] + "maint-rel-#{major_release}" + end end # The name of the Git tag. Looks like "rel-1.9-tc2" or "rel-1.9" (for final) @@ -165,6 +174,20 @@ class Settings end end +# +# ------------------------------------------------------------------------------------ +# Confirmation methods. +# ------------------------------------------------------------------------------------ +# + +def is_test_candidate?() + Settings.confirm_candidate_label(Settings.candidate_label)[0..0] == 't' +end + +def is_final_release?() + Settings.confirm_candidate_label(Settings.candidate_label) == 'final' +end + # # ------------------------------------------------------------------------------------ # General-purpose methods. @@ -181,6 +204,20 @@ def echo_command(c) `#{c}` end +def get_permission_and_go(p) + puts + yn = prompt("#{p} (y/n)") + if yn.downcase == 'y' + puts + yield + puts + else + puts + puts "OK - forget it." + puts + end +end + def approve_and_execute(cmds, prompt="") if prompt.empty? puts "Execute these commands?" @@ -211,3 +248,4 @@ def tag_exists?(dir, tag) !`git tag --list #{tag}`.strip.empty? end end +