Skip to content

Commit 1733975

Browse files
Merge pull request #2 from casework/note_documentation_sources
Note documentation sources
2 parents 67ba54e + e3751d6 commit 1733975

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This is only one possible application development style, and templates are avail
1313

1414
* [casework/CASE-Mapping-Template-Python](https://github.com/casework/CASE-Mapping-Template-Python), which demonstrates an approach based on constructing Python `dict`s and checking generated results afterwards for CASE conformance with the [CASE Validation Action](https://github.com/kchason/case-validation-action).
1515

16+
Other options and considerations for application development are noted on the [CASE Get Started page](https://caseontology.org/ontology/get-started.html).
17+
1618
Testing procedures run in _this_ repository are:
1719

1820
* _GitHub Actions_: [Workflows](.github/workflows/) are defined to run testing as they would be run in a local command-line environment, reviewing on pushes and pull requests to certain branches.

case_cli_example/cli.py

+22-1
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,30 @@ def main() -> None:
7777
# multiple tools contribute to the same graph.
7878
graph.namespace_manager.bind("xsd", NS_XSD)
7979

80-
# Generate an example object.
80+
# Generate a graph node for an example object.
8181
n_example_organization = ns_kb["Organization-" + local_uuid()]
82+
83+
# The graph node is not added to the graph until it is part of some
84+
# statement. A common first statement is a type, denoting
85+
# class-membership. This example object is an organization. The
86+
# class IRI of organization is:
87+
#
88+
# https://ontology.unifiedcyberontology.org/uco/identity/Organization
89+
#
90+
# In Python, NS_UCO_IDENTITY.Organization spells this IRI as a
91+
# property in an RDFLib Namespace object.
92+
#
93+
# Visiting that IRI in a browser will show documentation for that class.
94+
# The classes in CASE are listed here (and include the classes in UCO):
95+
# https://ontology.caseontology.org/documentation/entities-tree-classes.html
8296
graph.add((n_example_organization, NS_RDF.type, NS_UCO_IDENTITY.Organization))
97+
98+
# Assign some property for the example object - in this case, the
99+
# organization's name. Other properties available to an object are
100+
# viewable in the documentation system noted above, or in "stub"
101+
# JSON-LD objects, such as Organization's stub here:
102+
#
103+
# https://github.com/casework/CASE-Mapping-Template-Stubs/blob/main/templates/uco-identity/Organization.json
83104
graph.add(
84105
(n_example_organization, NS_UCO_CORE.name, Literal("Cyber Domain Ontology"))
85106
)

0 commit comments

Comments
 (0)