From 4d627c506eab09ec12300bcdca7edaa4c35ca125 Mon Sep 17 00:00:00 2001 From: Arkopaul Sarkar Date: Sat, 19 Oct 2024 21:33:37 -0400 Subject: [PATCH] changed default color in ontology, cheetsheet updated --- docs/cheatsheet.html | 3482 ++++++++++++++++++++++++++++++++++++++++++ docs/cheatsheet.md | 225 +++ ontologyv2.iuml | 2 +- 3 files changed, 3708 insertions(+), 1 deletion(-) create mode 100644 docs/cheatsheet.html create mode 100644 docs/cheatsheet.md diff --git a/docs/cheatsheet.html b/docs/cheatsheet.html new file mode 100644 index 0000000..bc42940 --- /dev/null +++ b/docs/cheatsheet.html @@ -0,0 +1,3482 @@ + + + + + Class + + + + + + + + + + + + +
+
+

Class

+
class(c1, "bfo:Quality")   
+
+uml diagram +
oClass(bfo:Quality)   
+
+uml diagram +

Individual

+
individual(o1, "ns1:temperature1")
+
+uml diagram +
oIndividual(ns1:temperature1)
+
+uml diagram +

Type of an individual

+
class(c1, "bfo:Quality")   
+individual(o1, "ns1:temperature1")
+typeOf(o1, c1)
+
+uml diagram +
oClass(bfo:Quality)
+oIndividual(ns1:temperature1)
+typeOf(ns1:temperature1, bfo:Quality)
+
+uml diagram +

Associating individuals using object property

+
individual(p1, "ns1:plank1")
+individual(l1, "ns1:length1")
+property(p1, bfo:bears, l1, right)
+
+uml diagram +
oIndividual(ns1:plank1)
+oIndividual(ns1:length1)
+property(ns1:plank1, bfo:bears, ns1:length1, right)
+
+uml diagram +

Associating data to an individual

+
individual(l1, "ns1:length-value")
+data(l1, iof:hasSimpleExpressionValue, 30^^xsd:decimal)
+
+uml diagram +
oIndividual(ns1:length-value)
+data(ns1:length-value, iof:hasSimpleExpressionValue, 30^^xsd:decimal)
+
+uml diagram +

Same individuals

+
oIndividual(ns1:smith)
+oIndividual(ns1:simpson)
+sameAs(ns1:smith, ns1:simpson)
+
+uml diagram +

Different individuals

+
oIndividual(ns1:apple-as-fruit)
+oIndividual(ns1:apple-as-company)
+differentFrom(ns1:apple-as-fruit, ns1:apple-as-company)
+
+uml diagram +
+

All different individuals

+
oIndividual(ns1:apple-as-fruit)
+oIndividual(ns1:apple-as-company)
+oIndividual(ns1:apple-as-logo)
+allDifferent('["ns1:apple-as-fruit", "ns1:apple-as-company", "ns1:apple-as-logo"]')
+
+uml diagram +
+

Subclass

+
oClass(bfo:Quality)
+oClass(iof:Temperature)
+subClass(iof:Temperature, bfo:Quality)
+
+uml diagram +
+
+ + + + + \ No newline at end of file diff --git a/docs/cheatsheet.md b/docs/cheatsheet.md new file mode 100644 index 0000000..4050339 --- /dev/null +++ b/docs/cheatsheet.md @@ -0,0 +1,225 @@ +## Class + +``` +class(c1, "bfo:Quality") +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +class(c1, "bfo:Quality") +@enduml +``` + +``` +oClass(bfo:Quality) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oClass(bfo:Quality) +@enduml +``` + + +## Individual + +``` +individual(o1, "ns1:temperature1") +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +individual(o1, "ns1:temperature1") +@enduml +``` + +``` +oIndividual(ns1:temperature1) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:temperature1) +@enduml +``` + +## Type of an individual +``` +class(c1, "bfo:Quality") +individual(o1, "ns1:temperature1") +typeOf(o1, c1) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +class(c1, "bfo:Quality") +individual(o1, "ns1:temperature1") +typeOf(o1, c1) +@enduml +``` + +``` +oClass(bfo:Quality) +oIndividual(ns1:temperature1) +typeOf(ns1:temperature1, bfo:Quality) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oClass(bfo:Quality) +oIndividual(ns1:temperature1) +typeOf(ns1:temperature1, bfo:Quality) +@enduml +``` + +## Associating individuals using object property + +``` +individual(p1, "ns1:plank1") +individual(l1, "ns1:length1") +property(p1, bfo:bears, l1, right) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +individual(p1, "ns1:plank1") +individual(l1, "ns1:length1") +property(p1, bfo:bears, l1, right) +@enduml +``` + +``` +oIndividual(ns1:plank1) +oIndividual(ns1:length1) +property(ns1:plank1, bfo:bears, ns1:length1, right) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:plank1) +oIndividual(ns1:length1) +property(ns1:plank1, bfo:bears, ns1:length1, right) +@enduml +``` + +## Associating data to an individual + +``` +individual(l1, "ns1:length-value") +data(l1, iof:hasSimpleExpressionValue, 30^^xsd:decimal) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +individual(l1, "ns1:length-value") +data(l1, iof:hasSimpleExpressionValue, 30^^xsd:decimal) +@enduml +``` + +``` +oIndividual(ns1:length-value) +data(ns1:length-value, iof:hasSimpleExpressionValue, 30^^xsd:decimal) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:length-value) +data(ns1:length-value, iof:hasSimpleExpressionValue, 30^^xsd:decimal) +@enduml +``` + +## Same individuals + +``` +oIndividual(ns1:smith) +oIndividual(ns1:simpson) +sameAs(ns1:smith, ns1:simpson) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:smith) +oIndividual(ns1:simpson) +sameAs(ns1:smith, ns1:simpson) +@enduml +``` + +## Different individuals + +``` +oIndividual(ns1:apple-as-fruit) +oIndividual(ns1:apple-as-company) +differentFrom(ns1:apple-as-fruit, ns1:apple-as-company) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:apple-as-fruit) +oIndividual(ns1:apple-as-company) +differentFrom(ns1:apple-as-fruit, ns1:apple-as-company) +@enduml +``` + +## All different individuals + +``` +oIndividual(ns1:apple-as-fruit) +oIndividual(ns1:apple-as-company) +oIndividual(ns1:apple-as-logo) +allDifferent('["ns1:apple-as-fruit", "ns1:apple-as-company", "ns1:apple-as-logo"]') +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oIndividual(ns1:apple-as-fruit) +oIndividual(ns1:apple-as-company) +oIndividual(ns1:apple-as-logo) +allDifferent('["ns1:apple-as-fruit", "ns1:apple-as-company", "ns1:apple-as-logo"]') +@enduml +``` + +## Subclass + +``` +oClass(bfo:Quality) +oClass(iof:Temperature) +subClass(iof:Temperature, bfo:Quality) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oClass(bfo:Quality) +oClass(iof:Temperature) +subClass(iof:Temperature, bfo:Quality) +@enduml +``` + +## Equivalent classes + +``` +oClass(qk:Temperature) +oClass(iof:Temperature) +equivalent(qk:Temperature, qk:Temperature) +``` + +```plantuml +@startuml +!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml +oClass(bfo:Temperature) +oClass(iof:Temperature) +@enduml +``` \ No newline at end of file diff --git a/ontologyv2.iuml b/ontologyv2.iuml index 57c98a1..0b39715 100644 --- a/ontologyv2.iuml +++ b/ontologyv2.iuml @@ -16,7 +16,7 @@ skinparam roundCorner 10 ' global variable for setting custom color for namespaces ' (expects json with key = prefix (should be present in $prefixes), value = color) !$namespace_colors = { "rdf" : "White" } -!$namespace_default_color = "White" +!$namespace_default_color = "black" ' !unquoted procedure setColor($prefix, $color) ' !if %json_key_exists($prefixes, $prefix)