Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an overview page for used OEO terms #1

Open
yum-yab opened this issue Sep 14, 2023 · 0 comments
Open

Create an overview page for used OEO terms #1

yum-yab opened this issue Sep 14, 2023 · 0 comments

Comments

@yum-yab
Copy link
Collaborator

yum-yab commented Sep 14, 2023

There should be a page listing all the used/annotated (OEO) terms. It could be based on one simpleSPARQL query, which fetches the terms, the number of usages and maybe some more other inforrmation.

The Query

The query can be based of the ones you can see in here, but the most imporrtant part is:

{
  GRAPH ?g {
    ?metadata csvw:table ?table .
    ?table csvw:tableSchema/csvw:column ?column .
    ?column gr:valueReference|saref:isAbout <http://openenergy-platform.org/ontology/oeo/OEO_00010165> .
    ?activity a <http://mods.tools.dbpedia.org/ns/demo#ApiDemoMod> ;
              prov:used ?id .
  }
}

The ?activity selects the mod type, and the term in question is hardcoded in the query as <http://openenergy-platform.org/ontology/oeo/OEO_00010165>. So just fetch all of the terms, maybe count distinct isAbout and valueReference.

The Website

An example for a list in vaadin (and the general webpage) can be seen here. The mosty important part is the creation of the list, just look at this:

private final Grid<SearchResult> result_grid = new Grid<>();
   
private final List<SearchResult> result_list = new result_grid.addColumn(SearchResult::getTitle).setSortable(true).setHeader("Title");
result_grid.addColumn(TemplateRenderer.<SearchResult>of("<a href=\"[[item.idUri]]\" target='_top'>[[item.idUri]]</a>").withProperty("idUri", SearchResult::getDatabusFileUri)).setHeader("Download");
result_grid.addColumn(SearchResult::getComment).setHeader("Comment");
result_grid.addColumn(searchResult -> searchResult.getType().toString()).setSortable(true).setHeader("Databus ID Type");
result_grid.addColumn(SearchResult::getStartDate).setSortable(true).setHeader("Start Date");
result_grid.addColumn(SearchResult::getEndDate).setSortable(true).setHeader("End Date");

search_field.setValueChangeMode(ValueChangeMode.LAZY);
search_field.setPlaceholder("Search the Databus for Files containing or annotated with Classes, Properties etc.");
search_field.setMinWidth("60%");
search_field.setClearButtonVisible(true);

and how to fill it can be found in the search function, which in this case can happen during startup and does need no update logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant