At present, any instance of a Facet is freely associable with any instance of a UcoObject. This is in support of duck typing, where being a Foo implies having behaviors like a Foo, but having behaviors like a Foo does not necessarily imply being a Foo. However, at present, UCO has no encoding of this. "Foo" has no association with "FooFacet" stronger than any other "BarFacet" - e.g., uco-observable:File and uco-observable:FileFacet are as strongly related by structural design as uco-observable:File and uco-observable:URLFacet. The string pattern-matching is clear, but would not cover cases where Facets should be associated with non-matching name patterns, like uco-identity:Person and uco-identity:SimpleNameFacet.
There is a mechanism to express this in OWL. For File and FileFacet, this block of Turtle states that "If a thing is a File, there exists one FileFacet linked with hasFacet."
Adding this encoding does not cause data where there's a File with no FileFacet to be declared invalid. OWL's open-world assumption leaves it fine to not record a FileFacet.
SHACL is not an appropriate mechanism to make such an expression. This statement of existence can be represented with sh:qualifiedValueShape, but there's nothing being constrained, except the uniqueness of the specific facet type (i.e, no File can have two different FileFacets). Specific facet type uniqueness is left out of scope of this proposal, and requires resolution of Issue 595. The present proposal intends only to hint an inheritable association.
Requirements
Requirement 1
UCO SHOULD hint the Facet classes associated with any UcoObject subclass.
Requirement 2
The hinting mechanism MUST support arbitrary Facet associability---that is, if a pattern association is not present (like a "Foo" and "FooFacet" being related by suffixing), hard-coding an association should be possible.
Requirement 3
The hinting mechanism MUST NOT impede other abilities to associate Facet instances with UcoObject instances.
Risk / Benefit analysis
Benefits
This proposal helps to remove some of the obfuscation caused by housing properties in Facets rather than directly on UcoObjects. Before this proposal, the tie between a File and the fileName property are as strong as the tie between a File and a latitude value.
Adoption of this proposal enables focused discovery of properties entailed by Facets from parent classes. For instance, the CASE JSON-LD Stubs repository shows a stub for uco-observable:ArchiveFilehere. The Facet hinting in this proposal enables linking in the directly associated ArchiveFileFacet, as well as the parent class's FileFacet. Both associations were drawn from the "Foo"/"FooFacet" pattern-match, which will be part of the implementation this proposal begins.
Reviewing the Facet hints also provides an opportunity to review Facets that have no current associated UcoObject subclass, clearing up currently unclear and/or forgotten use cases.
Risks
This proposal brings more OWL structural syntax into UCO. This risk and syntactic complexity increase is suggested as acceptable because the need is believed inappropriate to meet with SHACL.
Concerns with accidental inference capabilities have been noted by some UCO Ontology Committee members. The restriction illustrated in the proposal background has the following inferential effects:
On a File, if there are two FileFacets linked with hasFacet, the two FileFacets are inferred to be the same individual. This is actually in line with previously expressed, but not yet encoded, understandings that "Specific" Facet classes are meant to be unique in typing on their "Host" objects. (Again, a universal SHACL review mechanism for this uniqueness is deferred until after Issue 595 is adopted.)
On any non-FileUcoObject instance, if there are two FileFacets linked with hasFacet, the two FileFacets are NOT inferred to be the same individual. While not desirable, this is consistent with the current state of UCO. (This would also be resolved after Issue 595.)
If a File has no FileFacet linked with hasFacet, there is NO automatic creation of a FileFacet node.
If a File has some non-FileFacet linked with hasFacet, it is NOT inferred to be a FileFacet. (This would happen if owl:allValuesFrom were used.)
If some non-File thing has a FileFacet linked with hasFacet, the thing is NOT inferred to be a File. (This would happen if a certain owl:equivalentClass construction were used. The owl:Restriction used in this proposal is only "if", not "only if" or "if and only if".)
Last, while the "Foo"/"FooFacet" pattern will generate many of the owl:Restrictions, several Facet classes don't match this pattern, and will require manual attention and association. A comment following this proposal will list the known non-mechanically-associable Facets subclasses.
Competencies demonstrated
The key competency generated in this proposal is support for mechanical discovery of properties of UcoObjects ("domain objects") that have been obscured by separation into Facets. The JSON-LD stubs repository, especially with its ArchiveFile demonstration, is left as the demonstration of this new competency.
Solution suggestion
Generate the owl:Restrictions noted in the background for all "Foo"/"FooFacet" pairs. Do so by importing the script facet_cardinalities_ttl.py.
This proposal is not suggested to wait for the entire resolution of hinting currently-unassociated Facets.
Adapt facet_cardinalities_ttl.py for an idempotent usage process - namely, not generating owl:Restrictions if it already exists in UCO.
This is slightly complicated by owl:Restrictions being syntactically required to be blank nodes.
Integrate the adapted facet_cardinalities_ttl.py into CI, to catch when a new "Foo"/"FooFacet" pair is added but an owl:Restriction is forgotten.
The test update is likely to be: Generate a graph of new owl:Restrictions, and fail the test if any are generated, with a gentle suggestion to copy them in.
Background
At present, any instance of a
Facet
is freely associable with any instance of aUcoObject
. This is in support of duck typing, where being a Foo implies having behaviors like a Foo, but having behaviors like a Foo does not necessarily imply being a Foo. However, at present, UCO has no encoding of this. "Foo" has no association with "FooFacet" stronger than any other "BarFacet" - e.g.,uco-observable:File
anduco-observable:FileFacet
are as strongly related by structural design asuco-observable:File
anduco-observable:URLFacet
. The string pattern-matching is clear, but would not cover cases whereFacet
s should be associated with non-matching name patterns, likeuco-identity:Person
anduco-identity:SimpleNameFacet
.There is a mechanism to express this in OWL. For
File
andFileFacet
, this block of Turtle states that "If a thing is a File, there exists one FileFacet linked with hasFacet."(Syntax can be reviewed by checking for
ObjectExactCardinality
in OWL 2 Web Ontology Language Mapping to RDF Graphs.)Adding this encoding does not cause data where there's a
File
with noFileFacet
to be declared invalid. OWL's open-world assumption leaves it fine to not record aFileFacet
.SHACL is not an appropriate mechanism to make such an expression. This statement of existence can be represented with
sh:qualifiedValueShape
, but there's nothing being constrained, except the uniqueness of the specific facet type (i.e, noFile
can have two differentFileFacet
s). Specific facet type uniqueness is left out of scope of this proposal, and requires resolution of Issue 595. The present proposal intends only to hint an inheritable association.Requirements
Requirement 1
UCO SHOULD hint the
Facet
classes associated with anyUcoObject
subclass.Requirement 2
The hinting mechanism MUST support arbitrary
Facet
associability---that is, if a pattern association is not present (like a "Foo" and "FooFacet" being related by suffixing), hard-coding an association should be possible.Requirement 3
The hinting mechanism MUST NOT impede other abilities to associate
Facet
instances withUcoObject
instances.Risk / Benefit analysis
Benefits
This proposal helps to remove some of the obfuscation caused by housing properties in
Facet
s rather than directly onUcoObject
s. Before this proposal, the tie between aFile
and thefileName
property are as strong as the tie between aFile
and a latitude value.Adoption of this proposal enables focused discovery of properties entailed by
Facet
s from parent classes. For instance, the CASE JSON-LD Stubs repository shows a stub foruco-observable:ArchiveFile
here. TheFacet
hinting in this proposal enables linking in the directly associatedArchiveFileFacet
, as well as the parent class'sFileFacet
. Both associations were drawn from the "Foo"/"FooFacet" pattern-match, which will be part of the implementation this proposal begins.Reviewing the
Facet
hints also provides an opportunity to reviewFacet
s that have no current associatedUcoObject
subclass, clearing up currently unclear and/or forgotten use cases.Risks
This proposal brings more OWL structural syntax into UCO. This risk and syntactic complexity increase is suggested as acceptable because the need is believed inappropriate to meet with SHACL.
Concerns with accidental inference capabilities have been noted by some UCO Ontology Committee members. The restriction illustrated in the proposal background has the following inferential effects:
File
, if there are twoFileFacet
s linked withhasFacet
, the twoFileFacet
s are inferred to be the same individual. This is actually in line with previously expressed, but not yet encoded, understandings that "Specific"Facet
classes are meant to be unique in typing on their "Host" objects. (Again, a universal SHACL review mechanism for this uniqueness is deferred until after Issue 595 is adopted.)File
UcoObject
instance, if there are twoFileFacet
s linked withhasFacet
, the twoFileFacet
s are NOT inferred to be the same individual. While not desirable, this is consistent with the current state of UCO. (This would also be resolved after Issue 595.)File
has noFileFacet
linked withhasFacet
, there is NO automatic creation of aFileFacet
node.File
has some non-FileFacet
linked withhasFacet
, it is NOT inferred to be aFileFacet
. (This would happen ifowl:allValuesFrom
were used.)File
thing has aFileFacet
linked withhasFacet
, the thing is NOT inferred to be aFile
. (This would happen if a certainowl:equivalentClass
construction were used. Theowl:Restriction
used in this proposal is only "if", not "only if" or "if and only if".)Last, while the "Foo"/"FooFacet" pattern will generate many of the
owl:Restriction
s, severalFacet
classes don't match this pattern, and will require manual attention and association. A comment following this proposal will list the known non-mechanically-associableFacet
s subclasses.Competencies demonstrated
The key competency generated in this proposal is support for mechanical discovery of properties of
UcoObject
s ("domain objects") that have been obscured by separation intoFacet
s. The JSON-LD stubs repository, especially with itsArchiveFile
demonstration, is left as the demonstration of this new competency.Solution suggestion
owl:Restriction
s noted in the background for all "Foo"/"FooFacet" pairs. Do so by importing the scriptfacet_cardinalities_ttl.py
.Facet
s.facet_cardinalities_ttl.py
for an idempotent usage process - namely, not generatingowl:Restriction
s if it already exists in UCO.owl:Restriction
s being syntactically required to be blank nodes.facet_cardinalities_ttl.py
into CI, to catch when a new "Foo"/"FooFacet" pair is added but anowl:Restriction
is forgotten.owl:Restriction
s, and fail the test if any are generated, with a gentle suggestion to copy them in.Coordination