Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Ordered Collections. Fixes #112. #495

Merged
merged 14 commits into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Release 10.0.0

- Renamed `MimeType` to `MediaType` to be consistent with [IANA guidelines](https://www.iana.org/assignments/media-types/media-types.xhtml)
and [RFC6838](https://tools.ietf.org/html/rfc6838). Issue [#434](<https://github.com/semanticarts/gist/issues/434>).
- Refactored `gist:OrderedCollection` and `gist:OrderedMember`. Added `gist:isProxyFor`. Deprecated `gist:OrdinalCollection` and `gist:OrdinalMember`. Issue [#112](<https://github.com/semanticarts/gist/issues/112>).

daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
### Minor Updates

Expand Down
77 changes: 37 additions & 40 deletions gistCore.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -1728,51 +1728,39 @@ gist:Offer
gist:OrderedCollection
a owl:Class ;
rdfs:subClassOf gist:Collection ;
owl:equivalentClass [
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:someValuesFrom gist:OrderedMember ;
] ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distinctionary pattern is written like this:

gist:OrderedCollection
	a owl:Class ;
	owl:equivalentClass [
		owl:intersectionOf (
			gist:Collection 
			[ 
				a owl:Restriction ;
				owl:onProperty gist:hasOrderedMember ;
				owl:someValuesFrom gist:OrderedMember ;
			]
		);
	] ;
	skos:definition "A collection where the members are in a fixed sequence."^^xsd:string ;
	skos:prefLabel "Ordered Collection"^^xsd:string ;

This expresses more clearly the idea that "An X is a type of Y that Z."

You also need an allValuesFrom restriction, so the full definition is:

gist:OrderedCollection
	a owl:Class ;
	owl:equivalentClass [
		owl:intersectionOf (
			gist:Collection 
			[ 
				a owl:Restriction ;
				owl:onProperty gist:hasOrderedMember ;
				owl:someValuesFrom gist:OrderedMember ;
			]
			[ 
				a owl:Restriction ;
				owl:onProperty gist:hasOrderedMember ;
				owl:allValuesFrom gist:OrderedMember ;
			]
		);
	] ;
	skos:definition "A collection where the members are in a fixed sequence."^^xsd:string ;
	skos:prefLabel "Ordered Collection"^^xsd:string ;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjyounes @daliadahleh Should we not remove the someValuesFrom? The allValueFrom enforces the object type on the property, and removing someValuesFrom allows for an empty collection.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uschold and I discussed the possibility of empty sets and opened a new issue to raise the question: #498. In theory I'm in favor of allowing empty collections, but we noted that if we allow empty collections, then the restriction must also be removed from Collection (gist:hasMember some owl:Thing), which leaves it as a class without a formal definition.

skos:definition "A collection where the members are in a fixed sequence."^^xsd:string ;
skos:prefLabel "Ordered Collection"^^xsd:string ;
.

gist:OrdinalCollection
a owl:Class ;
rdfs:subClassOf
gist:OrderedCollection ,
[
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:allValuesFrom gist:OrdinalMember ;
]
;
skos:definition "An Ordered Collection where no item can be of the same rank as any other item. In mathematical terms, this is a ?strict total order?."^^xsd:string ;
skos:prefLabel "Ordinal Collection"^^xsd:string ;
.

gist:OrdinalMember
gist:OrderedMember
a owl:Class ;
rdfs:subClassOf
gist:Category ,
[
a owl:Class ;
owl:unionOf (
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecededBy ;
owl:someValuesFrom gist:OrdinalMember ;
]
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecedes ;
owl:someValuesFrom gist:OrdinalMember ;
]
) ;
]
;
owl:equivalentClass [
a owl:Restriction ;
owl:onProperty gist:orderedMemberOf ;
owl:someValuesFrom gist:OrdinalCollection ;
rdfs:subClassOf [
a owl:Class ;
owl:unionOf (
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecededBy ;
owl:someValuesFrom gist:OrderedMember ;
]
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecedes ;
owl:someValuesFrom gist:OrderedMember ;
]
[
a owl:Restriction ;
owl:onProperty gist:sequence ;
owl:someValuesFrom xsd:integer ;
]
) ;
] ;
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ;
skos:prefLabel "Ordinal Member"^^xsd:string ;
skos:definition "A member of an Ordered Collection. It either precedes or is preceded by another Ordered Member in the same collection, or it has a stated integer position in the collection."^^xsd:string ;
Copy link
Collaborator

@rjyounes rjyounes Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit "stated." This implies a violation of the Open World Assumption.

In actual fact I would remove the entire sentence. The definition doesn't need to restate the restrictions, especially in this case, where the restrictions are not even the most salient part of the semantics. I would use something like this:

skos:definition "A member of an ordered collection. This resource serves as a proxy linking a real-world item in the collection to that collection, allowing the expression of positional and other information that applies to the item only in the context of the collection."

If you really want to keep your definition, then I would add the second sentence as a scope note.

I'm not entirely thrilled with the "real-world" term. Feel free to find something better.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use 'linking a member of a collection to that collection' to bypass the 'real-world item' awkwardness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sa-bpelakh that seems confusing because the class name (and the first sentence of the definition) suggests that the proxy is the 'member', while your definition suggests that the real-world item is the 'member'. I think 'real-world item' is clearer.

skos:prefLabel "Ordered Member"^^xsd:string ;
.

gist:Organization
Expand Down Expand Up @@ -3307,7 +3295,7 @@ gist:hasOrderedMember
;
rdfs:subPropertyOf gist:hasMember ;
owl:inverseOf gist:orderedMemberOf ;
daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
skos:definition "An inverse functional version of hasMember to ensure that no OrderedMember can be in more than one OrderedCollection., which can quickly lead to problems."^^xsd:string ;
skos:definition "An inverse functional version of hasMember to ensure that no OrderedMember can be in more than one OrderedCollection."^^xsd:string ;
daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
skos:prefLabel "has ordered member"^^xsd:string ;
.

Expand Down Expand Up @@ -3473,6 +3461,15 @@ gist:identifies
skos:prefLabel "identifies"^^xsd:string ;
.

gist:isProxyFor
a
owl:FunctionalProperty ,
owl:ObjectProperty
;
skos:definition "The subject is used as a proxy, or substitute, for the object."^^xsd:string ;
daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
skos:prefLabel "is proxy for"^^xsd:string ;
.

daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
gist:lastModifiedOn
a owl:ObjectProperty ;
rdfs:subPropertyOf gist:actual ;
Expand Down
43 changes: 43 additions & 0 deletions gistDeprecated.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,49 @@
owl:versionIRI <https://ontologies.semanticarts.com/o/gistDeprecatedX.x.x> ;
.

gist:OrdinalCollection
daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
a owl:Class ;
rdfs:subClassOf
gist:OrderedCollection ,
[
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:allValuesFrom gist:OrdinalMember ;
]
;
skos:definition "An Ordered Collection where no item can be of the same rank as any other item. In mathematical terms, this is a ?strict total order?."^^xsd:string ;
skos:prefLabel "Ordinal Collection"^^xsd:string ;
.

gist:OrdinalMember
a owl:Class ;
rdfs:subClassOf
gist:Category ,
[
a owl:Class ;
owl:unionOf (
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecededBy ;
owl:someValuesFrom gist:OrdinalMember ;
]
[
a owl:Restriction ;
owl:onProperty gist:directlyPrecedes ;
owl:someValuesFrom gist:OrdinalMember ;
]
) ;
]
;
owl:equivalentClass [
a owl:Restriction ;
owl:onProperty gist:orderedMemberOf ;
owl:someValuesFrom gist:OrdinalCollection ;
] ;
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ;
skos:prefLabel "Ordinal Member"^^xsd:string ;
.

daliadahleh marked this conversation as resolved.
Show resolved Hide resolved
gist:PhysicalThing
a owl:Class ;
rdfs:label "Physical Thing"^^xsd:string ;
Expand Down