Skip to content

Commit

Permalink
Revert RDF list reference-consolidation and test for alignment
Browse files Browse the repository at this point in the history
This patch undoes an engineering convenience put in place as part of UCO
CP-100.  RDF Lists that were part of semi-open vocabularies were given
IRIs, so they could be referenced for OWL datatype definitions and for
SHACL membership testing.  This was acknowledged as an incompatibility
with OWL 2 DL, which requires that RDF Lists be identified as blank
nodes.  The concepts were intended to remain until an OWL test mechanism
would identify this error.

A test mechanism is now under development as part of UCO Issue 406, and
correctly flags IRI-identified RDF lists.  Hence, this patch undoes the
change.

To ensure the RDF lists are kept in sync. across their duplicate
locations, a Python unit test has been added to confirm list-equality.

References:
* [UCO OC-12] (CP-100) UCO's idea of "Open vocabulary" does not agree
  with its implementation with owl:oneOf
* #406

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jul 23, 2022
1 parent eba573d commit e77020d
Show file tree
Hide file tree
Showing 5 changed files with 360 additions and 141 deletions.
15 changes: 13 additions & 2 deletions ontology/uco/action/action.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ action:Action
sh:or (
[
sh:datatype vocabulary:ActionStatusTypeVocab ;
sh:in vocabulary:ActionStatusTypeVocab-members ;
sh:in (
"Complete/Finish"^^vocabulary:ActionStatusTypeVocab
"Error"^^vocabulary:ActionStatusTypeVocab
"Fail"^^vocabulary:ActionStatusTypeVocab
"Ongoing"^^vocabulary:ActionStatusTypeVocab
"Pending"^^vocabulary:ActionStatusTypeVocab
"Success"^^vocabulary:ActionStatusTypeVocab
"Unknown"^^vocabulary:ActionStatusTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -257,7 +265,10 @@ action:ActionFrequencyFacet
sh:or (
[
sh:datatype vocabulary:TrendVocab ;
sh:in vocabulary:TrendVocab-members ;
sh:in (
"Decreasing"^^vocabulary:TrendVocab
"Increasing"^^vocabulary:TrendVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down
212 changes: 192 additions & 20 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,16 @@ observable:AccountFacet
sh:or (
[
sh:datatype vocabulary:AccountTypeVocab ;
sh:in vocabulary:AccountTypeVocab-members ;
sh:in (
"ldap"^^vocabulary:AccountTypeVocab
"nis"^^vocabulary:AccountTypeVocab
"openid"^^vocabulary:AccountTypeVocab
"radius"^^vocabulary:AccountTypeVocab
"tacacs"^^vocabulary:AccountTypeVocab
"unix"^^vocabulary:AccountTypeVocab
"windows_domain"^^vocabulary:AccountTypeVocab
"windows_local"^^vocabulary:AccountTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1179,7 +1188,11 @@ observable:ContactAddress
sh:or (
[
sh:datatype vocabulary:ContactAddressScopeVocab ;
sh:in vocabulary:ContactAddressScopeVocab-members ;
sh:in (
"home"^^vocabulary:ContactAddressScopeVocab
"work"^^vocabulary:ContactAddressScopeVocab
"school"^^vocabulary:ContactAddressScopeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1296,7 +1309,12 @@ observable:ContactEmail
sh:or (
[
sh:datatype vocabulary:ContactEmailScopeVocab ;
sh:in vocabulary:ContactEmailScopeVocab-members ;
sh:in (
"home"^^vocabulary:ContactEmailScopeVocab
"work"^^vocabulary:ContactEmailScopeVocab
"school"^^vocabulary:ContactEmailScopeVocab
"cloud"^^vocabulary:ContactEmailScopeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1557,7 +1575,16 @@ observable:ContactPhone
sh:or (
[
sh:datatype vocabulary:ContactPhoneScopeVocab ;
sh:in vocabulary:ContactPhoneScopeVocab-members ;
sh:in (
"home"^^vocabulary:ContactPhoneScopeVocab
"work"^^vocabulary:ContactPhoneScopeVocab
"school"^^vocabulary:ContactPhoneScopeVocab
"mobile"^^vocabulary:ContactPhoneScopeVocab
"main"^^vocabulary:ContactPhoneScopeVocab
"home fax"^^vocabulary:ContactPhoneScopeVocab
"work fax"^^vocabulary:ContactPhoneScopeVocab
"pager"^^vocabulary:ContactPhoneScopeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1631,7 +1658,11 @@ observable:ContactSIP
sh:or (
[
sh:datatype vocabulary:ContactSIPScopeVocab ;
sh:in vocabulary:ContactSIPScopeVocab-members ;
sh:in (
"home"^^vocabulary:ContactSIPScopeVocab
"work"^^vocabulary:ContactSIPScopeVocab
"school"^^vocabulary:ContactSIPScopeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1681,7 +1712,12 @@ observable:ContactURL
sh:or (
[
sh:datatype vocabulary:ContactURLScopeVocab ;
sh:in vocabulary:ContactURLScopeVocab-members ;
sh:in (
"home"^^vocabulary:ContactURLScopeVocab
"work"^^vocabulary:ContactURLScopeVocab
"school"^^vocabulary:ContactURLScopeVocab
"homepage"^^vocabulary:ContactURLScopeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -1789,7 +1825,11 @@ observable:ContentDataFacet
sh:or (
[
sh:datatype vocabulary:EndiannessTypeVocab ;
sh:in vocabulary:EndiannessTypeVocab-members ;
sh:in (
"Big-endian"^^vocabulary:EndiannessTypeVocab
"Little-endian"^^vocabulary:EndiannessTypeVocab
"Middle-endian"^^vocabulary:EndiannessTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -3770,7 +3810,13 @@ observable:MemoryFacet
sh:or (
[
sh:datatype vocabulary:MemoryBlockTypeVocab ;
sh:in vocabulary:MemoryBlockTypeVocab-members ;
sh:in (
"Bit-mapped"^^vocabulary:MemoryBlockTypeVocab
"Byte-mapped"^^vocabulary:MemoryBlockTypeVocab
"Initialized"^^vocabulary:MemoryBlockTypeVocab
"Overlay"^^vocabulary:MemoryBlockTypeVocab
"Uninitialized"^^vocabulary:MemoryBlockTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -5815,7 +5861,12 @@ observable:TaskActionType
sh:or (
[
sh:datatype vocabulary:TaskActionTypeVocab ;
sh:in vocabulary:TaskActionTypeVocab-members ;
sh:in (
"TASK_ACTION_COM_HANDLER"^^vocabulary:TaskActionTypeVocab
"TASK_ACTION_EXEC"^^vocabulary:TaskActionTypeVocab
"TASK_ACTION_SEND_EMAIL"^^vocabulary:TaskActionTypeVocab
"TASK_ACTION_SHOW_MESSAGE"^^vocabulary:TaskActionTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -5914,7 +5965,16 @@ observable:TriggerType
sh:or (
[
sh:datatype vocabulary:TriggerFrequencyVocab ;
sh:in vocabulary:TriggerFrequencyVocab-members ;
sh:in (
"TASK_EVENT_TRIGGER_AT_LOGON"^^vocabulary:TriggerFrequencyVocab
"TASK_EVENT_TRIGGER_AT_SYSTEMSTART"^^vocabulary:TriggerFrequencyVocab
"TASK_EVENT_TRIGGER_ON_IDLE"^^vocabulary:TriggerFrequencyVocab
"TASK_TIME_TRIGGER_DAILY"^^vocabulary:TriggerFrequencyVocab
"TASK_TIME_TRIGGER_MONTHLYDATE"^^vocabulary:TriggerFrequencyVocab
"TASK_TIME_TRIGGER_MONTHLYDOW"^^vocabulary:TriggerFrequencyVocab
"TASK_TIME_TRIGGER_ONCE"^^vocabulary:TriggerFrequencyVocab
"TASK_TIME_TRIGGER_WEEKLY"^^vocabulary:TriggerFrequencyVocab
) ;
]
[
sh:datatype xsd:string ;
Expand All @@ -5927,7 +5987,15 @@ observable:TriggerType
sh:or (
[
sh:datatype vocabulary:TriggerTypeVocab ;
sh:in vocabulary:TriggerTypeVocab-members ;
sh:in (
"TASK_TRIGGER_BOOT"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_EVENT"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_IDLE"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_LOGON"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_REGISTRATION"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_SESSION_STATE_CHANGE"^^vocabulary:TriggerTypeVocab
"TASK_TRIGGER_TIME"^^vocabulary:TriggerTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -6444,7 +6512,19 @@ observable:URLVisitFacet
sh:or (
[
sh:datatype vocabulary:URLTransitionTypeVocab ;
sh:in vocabulary:URLTransitionTypeVocab-members ;
sh:in (
"link"^^vocabulary:URLTransitionTypeVocab
"typed"^^vocabulary:URLTransitionTypeVocab
"auto_bookmark"^^vocabulary:URLTransitionTypeVocab
"auto_subframe"^^vocabulary:URLTransitionTypeVocab
"manual_subframe"^^vocabulary:URLTransitionTypeVocab
"generated"^^vocabulary:URLTransitionTypeVocab
"auto_toplevel"^^vocabulary:URLTransitionTypeVocab
"form_submit"^^vocabulary:URLTransitionTypeVocab
"reload"^^vocabulary:URLTransitionTypeVocab
"keyword"^^vocabulary:URLTransitionTypeVocab
"keyword_generated"^^vocabulary:URLTransitionTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -6773,7 +6853,27 @@ observable:WhoIsFacet
sh:or (
[
sh:datatype vocabulary:WhoisStatusTypeVocab ;
sh:in vocabulary:WhoisStatusTypeVocab-members ;
sh:in (
"ADD_PERIOD"^^vocabulary:WhoisStatusTypeVocab
"AUTO_RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab
"CLIENT_DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"CLIENT_HOLD"^^vocabulary:WhoisStatusTypeVocab
"CLIENT_RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"CLIENT_TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"CLIENT_UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"DELETE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"HOLD"^^vocabulary:WhoisStatusTypeVocab
"INACTIVE"^^vocabulary:WhoisStatusTypeVocab
"OK"^^vocabulary:WhoisStatusTypeVocab
"PENDING_DELETE_RESTORABLE"^^vocabulary:WhoisStatusTypeVocab
"PENDING_DELETE_SCHEDULED_FOR_RELEASE"^^vocabulary:WhoisStatusTypeVocab
"PENDING_RESTORE"^^vocabulary:WhoisStatusTypeVocab
"RENEW_PERIOD"^^vocabulary:WhoisStatusTypeVocab
"RENEW_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"TRANSFER_PERIOD"^^vocabulary:WhoisStatusTypeVocab
"TRANSFER_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
"UPDATE_PROHIBITED"^^vocabulary:WhoisStatusTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -6818,7 +6918,11 @@ observable:WhoisContactFacet
sh:or (
[
sh:datatype vocabulary:WhoisContactTypeVocab ;
sh:in vocabulary:WhoisContactTypeVocab-members ;
sh:in (
"ADMIN"^^vocabulary:WhoisContactTypeVocab
"BILLING"^^vocabulary:WhoisContactTypeVocab
"TECHNICAL"^^vocabulary:WhoisContactTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -8016,7 +8120,21 @@ observable:WindowsTaskFacet
sh:or (
[
sh:datatype vocabulary:TaskFlagVocab ;
sh:in vocabulary:TaskFlagVocab-members ;
sh:in (
"TASK_FLAG_DELETE_WHEN_DONE"^^vocabulary:TaskFlagVocab
"TASK_FLAG_DISABLED"^^vocabulary:TaskFlagVocab
"TASK_FLAG_DONT_START_IF_ON_BATTERIES"^^vocabulary:TaskFlagVocab
"TASK_FLAG_HIDDEN"^^vocabulary:TaskFlagVocab
"TASK_FLAG_INTERACTIVE"^^vocabulary:TaskFlagVocab
"TASK_FLAG_KILL_IF_GOING_ON_BATTERIES"^^vocabulary:TaskFlagVocab
"TASK_FLAG_KILL_ON_IDLE_END"^^vocabulary:TaskFlagVocab
"TASK_FLAG_RESTART_ON_IDLE_RESUME"^^vocabulary:TaskFlagVocab
"TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET"^^vocabulary:TaskFlagVocab
"TASK_FLAG_RUN_ONLY_IF_LOGGED_ON"^^vocabulary:TaskFlagVocab
"TASK_FLAG_START_ONLY_IF_IDLE"^^vocabulary:TaskFlagVocab
"TASK_FLAG_SYSTEM_REQUIRED"^^vocabulary:TaskFlagVocab
"TASK_FLAG_ZERO"^^vocabulary:TaskFlagVocab
) ;
]
[
sh:datatype xsd:string ;
Expand All @@ -8029,7 +8147,14 @@ observable:WindowsTaskFacet
sh:or (
[
sh:datatype vocabulary:TaskPriorityVocab ;
sh:in vocabulary:TaskPriorityVocab-members ;
sh:in (
"ABOVE_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
"BELOW_NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
"HIGH_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
"IDLE_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
"NORMAL_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
"REALTIME_PRIORITY_CLASS"^^vocabulary:TaskPriorityVocab
) ;
]
[
sh:datatype xsd:integer ;
Expand All @@ -8045,7 +8170,32 @@ observable:WindowsTaskFacet
sh:or (
[
sh:datatype vocabulary:TaskStatusVocab ;
sh:in vocabulary:TaskStatusVocab-members ;
sh:in (
"SCHED_E_ACCOUNT_DBASE_CORRUPT"^^vocabulary:TaskStatusVocab
"SCHED_E_ACCOUNT_INFORMATION_NOT_SET"^^vocabulary:TaskStatusVocab
"SCHED_E_ACCOUNT_NAME_NOT_FOUND"^^vocabulary:TaskStatusVocab
"SCHED_E_CANNOT_OPEN_TASK"^^vocabulary:TaskStatusVocab
"SCHED_E_INVALID_TASK"^^vocabulary:TaskStatusVocab
"SCHED_E_NO_SECURITY_SERVICES"^^vocabulary:TaskStatusVocab
"SCHED_E_SERVICE_NOT_INSTALLED"^^vocabulary:TaskStatusVocab
"SCHED_E_SERVICE_NOT_RUNNING"^^vocabulary:TaskStatusVocab
"SCHED_E_TASK_NOT_READY"^^vocabulary:TaskStatusVocab
"SCHED_E_TASK_NOT_RUNNING"^^vocabulary:TaskStatusVocab
"SCHED_E_TRIGGER_NOT_FOUND"^^vocabulary:TaskStatusVocab
"SCHED_E_UNKNOWN_OBJECT_VERSION"^^vocabulary:TaskStatusVocab
"SCHED_E_UNSUPPORTED_ACCOUNT_OPTION"^^vocabulary:TaskStatusVocab
"SCHED_S_EVENT_TRIGGER"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_DISABLED"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_HAS_NOT_RUN"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_NOT_SCHEDULED"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_NO_MORE_RUNS"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_NO_VALID_TRIGGERS"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_READY"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_RUNNING"^^vocabulary:TaskStatusVocab
"SCHED_S_TASK_TERMINATED"^^vocabulary:TaskStatusVocab
"TASK_STATE_QUEUED"^^vocabulary:TaskStatusVocab
"TASK_STATE_UNKNOWN"^^vocabulary:TaskStatusVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -8193,7 +8343,15 @@ observable:WindowsVolumeFacet
sh:or (
[
sh:datatype vocabulary:WindowsDriveTypeVocab ;
sh:in vocabulary:WindowsDriveTypeVocab-members ;
sh:in (
"DRIVE_CDROM"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_FIXED"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_NO_ROOT_DIR"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_RAMDISK"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_REMOTE"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_REMOVABLE"^^vocabulary:WindowsDriveTypeVocab
"DRIVE_UNKNOWN"^^vocabulary:WindowsDriveTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -8272,7 +8430,15 @@ observable:WirelessNetworkConnectionFacet
sh:or (
[
sh:datatype vocabulary:WirelessNetworkSecurityModeVocab ;
sh:in vocabulary:WirelessNetworkSecurityModeVocab-members ;
sh:in (
"None"^^vocabulary:WirelessNetworkSecurityModeVocab
"WEP"^^vocabulary:WirelessNetworkSecurityModeVocab
"WPA"^^vocabulary:WirelessNetworkSecurityModeVocab
"WPA2-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab
"WPA2-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab
"WPA3-PSK"^^vocabulary:WirelessNetworkSecurityModeVocab
"WPA3-Enterprise"^^vocabulary:WirelessNetworkSecurityModeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down Expand Up @@ -11536,7 +11702,13 @@ observable:regionalInternetRegistry-shape-value-not-vocabulary-member
sh:or (
[
sh:datatype vocabulary:RegionalRegistryTypeVocab ;
sh:in vocabulary:RegionalRegistryTypeVocab-members ;
sh:in (
"APNIC"^^vocabulary:RegionalRegistryTypeVocab
"ARIN"^^vocabulary:RegionalRegistryTypeVocab
"AfriNIC"^^vocabulary:RegionalRegistryTypeVocab
"LACNIC"^^vocabulary:RegionalRegistryTypeVocab
"RIPE NCC"^^vocabulary:RegionalRegistryTypeVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down
11 changes: 10 additions & 1 deletion ontology/uco/types/types.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,16 @@ types:Hash
sh:or (
[
sh:datatype vocabulary:HashNameVocab ;
sh:in vocabulary:HashNameVocab-members ;
sh:in (
"MD5"^^vocabulary:HashNameVocab
"MD6"^^vocabulary:HashNameVocab
"SHA1"^^vocabulary:HashNameVocab
"SHA224"^^vocabulary:HashNameVocab
"SHA256"^^vocabulary:HashNameVocab
"SHA384"^^vocabulary:HashNameVocab
"SHA512"^^vocabulary:HashNameVocab
"SSDEEP"^^vocabulary:HashNameVocab
) ;
]
[
sh:datatype xsd:string ;
Expand Down
Loading

0 comments on commit e77020d

Please sign in to comment.