-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix missing class on qualified restrictions (#566) * Update issue templates Removed "outdated ontology" tag from Bug report. * Update issue templates Template for documentation related issues. * - Update build widget script * - Add README.md * - Update package version * - Update README.md * Add routing support for ebi-lookup service (#631) * - Add routing for ebi lookup service * - Fix URL routing with env variable * - Add console log - Try diff caddy config * - REVERT - Add console log - REVERT - Try diff caddy config * Add biolink (#632) * Add biolink * fix typo * Owl2 completeness (#635) * Union of constructors were not rendered on frontend. * Self references should not be bold or a link. Fixed inconsistent ontology. * UnionOf only applies to classes. Aligned examples with OWL2 Primer. * implement datatypes --------- Co-authored-by: James McLaughlin <james@mclgh.net> * Add DCAT * Testcases for stackoverflow and nesting issue introduced by efe665c. Main failing ontology on dev is genepio with minimal-genepio as example. This causes stackoverflow which causes nesting-error for subsequent ontologies processed. * Recognise datatype leaf nodes to fix stackoverflow. * Changed check for leaf node to just check for any builtin XML data type. * Alignment of dev branch with stable branch. --------- Co-authored-by: James McLaughlin <james@mclgh.net> Co-authored-by: haider <haideriqbal1@hotmail.com> Co-authored-by: Haider Iqbal <haideri@ebi.ac.uk>
- Loading branch information
1 parent
7e1b1d3
commit 3ce8a64
Showing
29 changed files
with
116,888 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
frontend/src/pages/ontologies/entities/entityPageSections/UnionOfSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { Fragment } from "react"; | ||
import { randomString } from "../../../../app/util"; | ||
import ClassExpression from "../../../../components/ClassExpression"; | ||
import EntityLink from "../../../../components/EntityLink"; | ||
import Entity from "../../../../model/Entity"; | ||
import Class from "../../../../model/Class"; | ||
import LinkedEntities from "../../../../model/LinkedEntities"; | ||
import Property from "../../../../model/Property"; | ||
|
||
export default function UnionOfSection({ | ||
entity, | ||
linkedEntities, | ||
}: { | ||
entity: Entity; | ||
linkedEntities: LinkedEntities; | ||
}) { | ||
if (!(entity instanceof Class)) { | ||
return <Fragment />; | ||
} | ||
|
||
let unionOfs = entity.getUnionOf(); | ||
|
||
if (!unionOfs || unionOfs.length === 0) { | ||
return <Fragment />; | ||
} | ||
|
||
return ( | ||
<div> | ||
<div className="font-bold">Union of</div> | ||
{unionOfs.length === 1 ? ( | ||
<p> | ||
{typeof unionOfs[0] === "object" && | ||
!Array.isArray(unionOfs[0]) ? ( | ||
<ClassExpression | ||
ontologyId={entity.getOntologyId()} | ||
currentEntity={entity} | ||
expr={unionOfs[0]} | ||
linkedEntities={linkedEntities} | ||
/> | ||
) : ( | ||
<EntityLink | ||
ontologyId={entity.getOntologyId()} | ||
currentEntity={entity} | ||
entityType={ | ||
entity.getType() === "property" ? "properties" : "classes" | ||
} | ||
iri={unionOfs[0]} | ||
linkedEntities={linkedEntities} | ||
/> | ||
)} | ||
</p> | ||
) : ( | ||
<ul className="list-disc list-inside"> | ||
{unionOfs.map((disjointWith) => { | ||
return ( | ||
<li key={randomString()}> | ||
{typeof disjointWith === "object" && | ||
!Array.isArray(disjointWith) ? ( | ||
<ClassExpression | ||
ontologyId={entity.getOntologyId()} | ||
currentEntity={entity} | ||
expr={disjointWith} | ||
linkedEntities={linkedEntities} | ||
/> | ||
) : ( | ||
<EntityLink | ||
ontologyId={entity.getOntologyId()} | ||
currentEntity={entity} | ||
entityType={ | ||
entity.getType() === "property" ? "properties" : "classes" | ||
} | ||
iri={disjointWith} | ||
linkedEntities={linkedEntities} | ||
/> | ||
)} | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
)} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"ontologies": [ | ||
{ | ||
"id": "owl2primer-datatype-enumeration", | ||
"preferredPrefix": "owl2primer-datatype-enumeration", | ||
"ontology_purl": "./testcases/owl2-primer/datatype-enumeration.owl" | ||
} | ||
] | ||
} |
Oops, something went wrong.