How do I get the research publications with their authors on the home page?

37 views
Skip to first unread message

Camilo Reyes Granada

unread,
Sep 12, 2022, 12:13:07 AM9/12/22
to VIVO Tech
Hello, I am working on the customization of VIVO for my university, in this case it was proposed to show recent publications  and their authors/s on the home page, as seen in the image. 

titulo.PNG

I was reading the documentation but I didn't find a way to do what I want,  so I was looking at the code and I saw on the home page a similar query is made, but in this case it is for faculty members and it is in the file homePageUtilis.js

homepage.PNG

In this case, it makes a request to the endpoint "/dataservice?getRandomSearchIndividualsBy Class=1&vclassId=" which returns a json file with some information about some individuals. 

I wanted to know if there is any way to create an endpoint similar to that but with the data that I want or if there is any other way to do it?




Brian Lowe

unread,
Sep 13, 2022, 11:36:03 AM9/13/22
to vivo...@googlegroups.com

Hi Camilo,

 

We discussed your question during today’s Development Interest Group call.  Here are a few options that might meet your needs:

  1. Define a SPARQLQueryDataGetter – a SPARQL query that returns the publication details you need paired with the name of the template on which its results should be made available (in this case „page-home.ftl”).  There is some documentation here: https://wiki.lyrasis.org/display/VIVODOC113x/Enhancing+Freemarker+templates+with+DataGetters
  2. Use getRandomSearchIndividualsByVClass with a different class URI.  You could define a local OWL class that would be used only within the application to serve as a flag for recent publications (e.g. local:RecentPublication) and include this additional type on instances you want to make available for display on the home page.  (These triples would of course have to be updated as you add new data.). You could then define a „short view” on the local:RecentPublication class for context SEARCH that includes the particular details (authors, etc.) you want display.  For more on short views, see: https://wiki.lyrasis.org/display/VIVODOC113x/Creating+short+views+of+individuals#Creatingshortviewsofindividuals-SEARCHexample

 

A new „Dynamic API” feature is currently being developed for core VIVO that should make it easier to add your own new data endpoints in the future.  You might also take a look at an earlier VIVO add-on called the Data Distribution API:  https://vivo-community.github.io/vivo-data-distribution-api/ . If it works with VIVO 1.11 as claimed, the odds are pretty good that it also works with newer versions.

 

Brian

 

From: vivo...@googlegroups.com <vivo...@googlegroups.com> on behalf of Camilo Reyes Granada <mariabett...@gmail.com>
Date: Monday, 12 September 2022 at 07:13
To: VIVO Tech <vivo...@googlegroups.com>
Subject: [vivo-tech] How do I get the research publications with their authors on the home page?

Hello, I am working on the customization of VIVO for my university, in this case it was proposed to show recent publications  and their authors/s on the home page, as seen in the image. 

 

 

I was reading the documentation but I didn't find a way to do what I want,  so I was looking at the code and I saw on the home page a similar query is made, but in this case it is for faculty members and it is in the file homePageUtilis.js

 

 

In this case, it makes a request to the endpoint "/dataservice?getRandomSearchIndividualsBy Class=1&vclassId=" which returns a json file with some information about some individuals. 

 

I wanted to know if there is any way to create an endpoint similar to that but with the data that I want or if there is any other way to do it?

 

 

 

 

--
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/8dd0f956-770d-4e29-b030-84dd13055923n%40googlegroups.com.

Brian Lowe

unread,
Sep 13, 2022, 11:53:52 AM9/13/22
to vivo...@googlegroups.com

P.S.  A small correction to what I mentioned about short views.  The „shortViewHtml” in the JSON for getRandomSearchIndividualsByVClass actually uses the „BROWSE” context, not „SEARCH”, so this part of the page would include the most relevant examples:

 

https://wiki.lyrasis.org/display/VIVODOC113x/Creating+short+views+of+individuals#Creatingshortviewsofindividuals-BROWSEexample

 

Brian

Benjamin Gross

unread,
Sep 14, 2022, 2:23:22 PM9/14/22
to vivo...@googlegroups.com
If it works with VIVO 1.11 as claimed, the odds are pretty good that it also works with newer versions.
 

Just a note, I have indeed used the Data Distribution API on a couple projects with the latest release of VIVO successfully. 

Benjamin

_____________________________
Benjamin Gross
API Product Manager, Science Group

Clarivate
clarivate.com
Accelerating innovation

On Sep 13, 2022, at 5:53 PM, Brian Lowe <br...@ontocale.com> wrote:

P.S.  A small correction to what I mentioned about short views.  The „shortViewHtml” in the JSON for getRandomSearchIndividualsByVClass actually uses the „BROWSE” context, not „SEARCH”, so this part of the page would include the most relevant examples:
 
 
Brian
 

From: vivo...@googlegroups.com <vivo...@googlegroups.com> on behalf of Brian Lowe <br...@ontocale.com>
Date: Tuesday, 13 September 2022 at 18:36
To: vivo...@googlegroups.com <vivo...@googlegroups.com>
Subject: Re: [vivo-tech] How do I get the research publications with their authors on the home page?

Hi Camilo,
 
We discussed your question during today’s Development Interest Group call.  Here are a few options that might meet your needs:
  1. Define a SPARQLQueryDataGetter – a SPARQL query that returns the publication details you need paired with the name of the template on which its results should be made available (in this case „page-home.ftl”).  There is some documentation here:https://wiki.lyrasis.org/display/VIVODOC113x/Enhancing+Freemarker+templates+with+DataGetters
  2. Use getRandomSearchIndividualsByVClass with a different class URI.  You could define a local OWL class that would be used only within the application to serve as a flag for recent publications (e.g. local:RecentPublication) and include this additional type on instances you want to make available for display on the home page.  (These triples would of course have to be updated as you add new data.). You could then define a „short view” on the local:RecentPublication class for context SEARCH that includes the particular details (authors, etc.) you want display.  For more on short views, see:https://wiki.lyrasis.org/display/VIVODOC113x/Creating+short+views+of+individuals#Creatingshortviewsofindividuals-SEARCHexample
 
A new „Dynamic API” feature is currently being developed for core VIVO that should make it easier to add your own new data endpoints in the future.  You might also take a look at an earlier VIVO add-on called the Data Distribution API:  https://vivo-community.github.io/vivo-data-distribution-api/ . If it works with VIVO 1.11 as claimed, the odds are pretty good that it also works with newer versions.
 
Brian
 

From: vivo...@googlegroups.com <vivo...@googlegroups.com> on behalf of Camilo Reyes Granada <mariabett...@gmail.com>
Date: Monday, 12 September 2022 at 07:13
To: VIVO Tech <vivo...@googlegroups.com>
Subject: [vivo-tech] How do I get the research publications with their authors on the home page?

Hello, I am working on the customization of VIVO for my university, in this case it was proposed to show recent publications  and their authors/s on the home page, as seen in the image. 
 
<titulo.PNG>
 
I was reading the documentation but I didn't find a way to do what I want,  so I was looking at the code and I saw on the home page a similar query is made, but in this case it is for faculty members and it is in the file homePageUtilis.js
 
<homepage.PNG>
 
In this case, it makes a request to the endpoint "/dataservice?getRandomSearchIndividualsBy Class=1&vclassId=" which returns a json file with some information about some individuals. 
 
I wanted to know if there is any way to create an endpoint similar to that but with the data that I want or if there is any other way to do it?
 
 
 
 
-- 
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/8dd0f956-770d-4e29-b030-84dd13055923n%40googlegroups.com.
-- 
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/VE1P194MB087941F24683D886231716E7D2479%40VE1P194MB0879.EURP194.PROD.OUTLOOK.COM.

-- 
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.

Confidentiality note: This e-mail may contain confidential information from Clarivate. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this e-mail is strictly prohibited. If you have received this e-mail in error, please delete this e-mail and notify the sender immediately.

Reply all
Reply to author
Forward
0 new messages