Skip to content

Commit

Permalink
Merge pull request #371 from edmcouncil/obsolete_folder_and_files_rem…
Browse files Browse the repository at this point in the history
…oved

Obsolete folder and files removed
  • Loading branch information
mereolog authored Oct 12, 2023
2 parents 3261f47 + 1a80ad0 commit 0b21778
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 2,756 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ nbactions.xml
**/updateHistory.json
/web-app/fiboMapper/fibo/**
.env

.vscode/

# Protege
catalog-v001.xml
Expand Down
74 changes: 0 additions & 74 deletions CHANGELOG.md

This file was deleted.

219 changes: 8 additions & 211 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<img src="https://spec.edmcouncil.org/fibo/htmlpages/master/latest/img/logo.66a988fe.png" width="150" align="right"/>
<img src="https://github.com/edmcouncil/html-pages/raw/develop/general/assets/img/EDM-council-RGB_200w.png" width="200" align="right"/>

# How to contribute
Since the first release of FIBO Viewer, [this repository](https://github.com/edmcouncil/fibo-viewer) is considered to be the only official space for the community discussion. So, this repository is where the project community develops the new proposals and discusses changes (via GitHub issues).
Since the first release of onto-viewer, [this repository](https://github.com/edmcouncil/onto-viewer) is considered to be the only official space for the community discussion. So, this repository is where the project community develops the new proposals and discusses changes (via GitHub issues).


If you want to contribute to FIBO Viewer, you'll need to create a login for [GitHub](https://github.com). Then you can contribute to FIBO Viewer in two ways.
If you want to contribute to onto-viewer, you'll need to create a login for [GitHub](https://github.com). Then you can contribute to onto-viewer in two ways.

The first way is to suggest changes via GitHub issues, e.g., the suggested changes may concern the GUI of application.

The second way is to contribute directly to the code. For that purpose, you'll need to do the following things:

* Install a git client. In FIBO, we recommend [Sourcetree](https://www.sourcetreeapp.com) from Atlassian
* Make a "fork" of the [fibo-viewer](https://github.com/edmcouncil/fibo-viewer) repository.
* Install a git client, e.g., [Sourcetree](https://www.sourcetreeapp.com) from Atlassian
* Make a "fork" of the [onto-viewer](https://github.com/edmcouncil/onto-viewer) repository.
* Clone your fork to your local repository.
* Submit a Pull Request to the [fibo-viewer](https://github.com/edmcouncil/fibo-viewer) repository.
* Submit a Pull Request to the [onto-viewer](https://github.com/edmcouncil/onto-viewer) repository.


# Developer Certificate of Origin (DCO)
Expand All @@ -25,210 +25,10 @@ Please read the full text of the [DCO](DCO).
Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.


# FIBO Viewer project structure


## Fibo-Viewer-Core module (viewer-core folder)

This module contains methods responsible for extracting ontological components of FIBO, i.e., its modules, taxonomy, classes, properties, individuals, axioms, etc.

* For a given IRI, the module checks the type of object the IRI belongs to. An object type can be class, individual, data property, or object property. Then for the IRI, Fibo-Viewer-Core gets information from FIBO about the resource represented by this IRI (e.g., annotations, taxonomy, subclasses, inherited axioms, metadata, instances, subelements, etc.). In the next step, the resource information is grouped and labeled.
* FIBO has a modular structure and contains meta-information about many domain ontologies of which it is composed. Fibo-Viewer-Core checks for a given FIBO IRI, whether it is FIBO ontology or FIBO entity. If IRI ends with '/', it means it is an ontology. In other case is an entity.
* Labels that have been used once in a program session are saved in memory.
* Fibo-Viewer-Core generates graphs from FIBO restrictions. For a given FIBO class, its graph is displayed at the bottom of the page.
* FIBO individuals are handled by OWLReasonerFactory.


## Fibo-Config-Loader module (config-loader folder)
This module is responsible for loading configuration for FIBO Viewer.


## Fibo-Web-App module (web-app folder)
This module is responsible for displaying the input data from the Fibo-Viewer-Core module.

* Fibo-Web-App displays data using JSP templates.
* The css files are located in the "resources" directory.
* The vis.css file is responsible for displaying graphs.
* The graphs are displayed by vis-network.


web-app folder condains XML file "fibo\_viewer\_config.xml" that defines the FIBO Viewer configuration. Let us walk through the file.




### Load FIBO

FIBO can be loaded from the "AboutFIBOProd" file located in a folder. To load FIBO from the file on your disc, provide the path to the file as follows:

```
<ontologyPath>PATH/AboutFIBOProd.rdf</ontologyPath>
```

FIBO can also be loaded from URL. E.g.

```
<ontologyURL>https://spec.edmcouncil.org/fibo/ontology/master/latest/AboutFIBOProd.rdf</ontologyURL>
```

If neither URL nor path is provided, FIBO Viewer will look for the "AboutFIBOProd" file in the default folder.

### FIBO Development and FIBO Product
> <img src="https://spec.edmcouncil.org/fibo/htmlpages/master/latest/img/FIBO_logo.11aeaf9b.jpg" width="300" align="right"/>
>
> Note that FIBO Development is published in real time as changes are
> incorporated by the FIBO Community Group and consists of draft as well
> vetted content. The latest version is always avaliable at
>
> * [https://spec.edmcouncil.org/fibo/ontology/master/latest/AboutFIBODev.ttl](https://spec.edmcouncil.org/fibo/ontology/master/latest/AboutFIBODev.ttl)
>
> FIBO Production is published at the end of each calendar quarter and has been vetted by SMEs and passed standard industry hygiene tests for OWL. To access the latest FIBO Production use the following URL:
>
> * [https://spec.edmcouncil.org/fibo/ontology/master/latest/AboutFIBOProd.ttl](https://spec.edmcouncil.org/fibo/ontology/master/latest/AboutFIBOProd.ttl)
>
> and to read FIBO from a give quarter use the following URL:
>
> * [https://spec.edmcouncil.org/fibo/ontology/master/QUATER_REFERENCE/AboutFIBOProd.ttl](https://spec.edmcouncil.org/fibo/ontology/master/2019Q3/AboutFIBOProd.ttl)
>
> An example of QUATER_REFERENCE may be "2019Q3".


### Labels display

Exemplary labels display configuration is shown below.

```
<labelConfig>
<displayLabel>TRUE</displayLabel>
<labelPriority>LABEL</labelPriority>
<forceLabelLang>FALSE</forceLabelLang>
<labelLang>en</labelLang>
<missingLanguageAction>FIRST</missingLanguageAction>
<userDefinedNamesList>
<userDefinedName>
<resourceIriToName>http://www.w3.org/2000/01/rdf-schema#Literal</resourceIriToName>
<resourceIriName>literal</resourceIriName>
</userDefinedName>
<userDefinedName>
<resourceIriToName>http://www.w3.org/2001/XMLSchema#string</resourceIriToName>
<resourceIriName>string</resourceIriName>
</userDefinedName>
</userDefinedNamesList>
</labelConfig>
```


If you want names for FIBO resources to be displayed instead of IRI fragments, enter "TRUE" between displayLabel tags:

```
<displayLabel>TRUE</displayLabel> ```
If "FALSE" is entered, IRI fragments will be displayed.
If you want rdfs:labels for the FIBO resources to be display, enter "TRUE" between the displayLabel tags and "RDS_LABEL" between the labelPriority tags.
```
<displayLabel>TRUE</displayLabel>
<labelPriority>RDFS_LABEL</labelPriority>
```
If you want the user-defined names to be displayed for the resources, enter "TRUE" between the displayLabel tags and "USER_DEFINED" between labelPriority tags:
```
<displayLabel>TRUE</displayLabel>
<labelPriority>USER_DEFINED</labelPriority>
```
If "RDFS_LABEL" is entered, but a FIBO resource does not have rdfs:label, FIBO Viewer will automatically look for names defined between the userDefinedNamesList tags, e.g.:
```
<userDefinedNamesList>
<userDefinedName>
<resourceIriToName>http://www.w3.org/2000/01/rdf-schema#Literal</resourceIriToName>
<resourceIriName>literal</resourceIriName>
</userDefinedName>
<userDefinedName>
<resourceIriToName>http://www.w3.org/2001/XMLSchema#string</resourceIriToName>
<resourceIriName>string</resourceIriName>
</userDefinedName>
</userDefinedNamesList>
```
To display labels with a given language, enter "TRUE" between the forceLabelLang tags.
```
<forceLabelLang>TRUE</forceLabelLang>
<labelLang>en</labelLang>
```
If the language is not present, an IRI fragment will be displayed.
When a resource has more than one label, then one of them randomly picked will be displayed.
If a language tag is not forced, we may still have a situation where we have more than one label for the resource, and none of them has a language tag.
Line with code above defines an action when a label is not forced, and the entity has more than one label, but none has a language. "FIRST" value means that one of them randomly picked will be displayed. "FRAGMENT" value determines that the IRI fragment of the resource will be displayed.
```
<forceLabelLang>FALSE</forceLabelLang>
<missingLanguageAction>FIRST</missingLanguageAction>
```
Ontological information that a user wants to hide should be placed between ignore tags, e.g.:
```
<ignoreToDisplaying>
<ignore>SubObjectPropertyOf</ignore>
</ignoreToDisplaying>
```
### URLs that are and are not IRIs of FIBO resources
Between the uriNamespace tags that are wrapped in the scopeIri tags, there are defined the URLs that are to be treated as the resource IRIs.
```
<scopeIri>
<uriNamespace>https://spec.edmcouncil.org/fibo/ontology</uriNamespace>
<uriNamespace>https://www.omg.org/spec/</uriNamespace>
</scopeIri>
```
### Grouping
In the fibo\_vierwer\_config.xml file, there are tags that are responsible for displaying group names and the list of grouped items. Group elements must have a packaging tag.
```
<groups>
<group>
<groupName>Natural Language characteristic</groupName>
<groupItem>http://www.w3.org/2000/01/rdf-schema#label</groupItem>
<groupItem>https://spec.edmcouncil.org/fibo/ontology/FND/Utilities/AnnotationVocabulary/synonym</groupItem>
...
</group>

<group>
<groupName>Ontological characteristic</groupName>
<groupItem>@viewer.axiom.EquivalentClasses</groupItem>
<groupItem>@viewer.axiom.SubClassOf</groupItem>
...
</group>
</groups>
```
To display items, enter their local IDs or IRIs between groupItem tags. Each list of groups should be wrapped into groups tags. The display order of groups and their items is determined by order of these elements in the config file or the priority list:
```
<priorityList>
<priority>http://www.w3.org/2000/01/rdf-schema#subClassOf</priority>
<priority>http://www.w3.org/2000/01/rdf-schema#seeAlso</priority>
</priorityList>
```
# Release Management
Release management (corresponding to software versioning in source code management) will follow the widely accepted [Git's branching model](https://nvie.com/posts/a-successful-git-branching-model/).


## Versioning Policy
Versioning policy rules are the same for all components created in the project. All components should have the same version number (two first sequences) to reflect their proper cooperation. It means that there can be situations in which one component will have version changed, even if there were no code change.

Expand All @@ -240,12 +40,9 @@ A version number contains three sequences on numbers separated with a "." (dot)
* The last sequence indicates a version with a bug fix in release branch or production.

## Branching Policy
There are two main branches for source code in repository:
* master – main branch, reflects production version of the application,
* develop – derived from the master branch, used for synchronization of developers' work - releases are created from this branch
There is one main branch for source code in repository:

See the figure: [Git's branching model](https://nvie.com/posts/a-successful-git-branching-model/)
* develop – main branch, reflects production version of the application,

Additional branches used in versioning:

Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN apk --no-cache add --upgrade bash curl jq && \
WORKDIR /opt/viewer
COPY ./onto-viewer-web-app/entrypoint.sh /opt/viewer/entrypoint.sh
COPY ./onto-viewer-web-app/integration_tests/ontologies /opt/viewer/ontologies
COPY ./onto-viewer-web-app/staticOntologies /opt/viewer/staticOntologies
COPY --from=build-onto-viewer /onto-viewer-web-app.war /opt/viewer/onto-viewer.war
CMD ["sh", "entrypoint.sh"]
HEALTHCHECK --start-period=60s --interval=15s --timeout=1s --retries=60 CMD test "$(curl -q http://localhost/${ONTPUB_FAMILY}/ontology/actuator/health | jq -e ".components.custom.details.INITIALIZATION_DONE")" = "true"
Loading

0 comments on commit 0b21778

Please sign in to comment.