Object With States Pattern¶
Source: ODP portal · Published by: delicias.dia.fi.upm.es · Category: structural · Domain: computing
An object can have different states for which different restrictions apply. The goal of the pattern is to allow modelling the different states of an object and the restrictions on such object for its different states
What it answers¶
- Objects in StateA must have at least one value for property property1
- Objects in StateB must have at most one value for property property2
- Objects in StateC must have exactly one value for property property3
- Objects must have a unique state
- Object states must belong to a single collection of non-duplicate elements (i.e., to a set)
- An object can have three different states
- The possible states are: StateA, StateB and StateC
The pattern¶
The graph is the axioms the pattern asserts; nothing here is inferred. Drag to rearrange, scroll to zoom, and use the graph's own search box to find a term inside it.
Opens at level of detail 3: classes, individuals, properties and restrictions, without the literals. Raise it with the LOD control in the graph's own toolbar to see annotation values and anything a reasoner adds.
Should you use this one?¶
| Size | 5 classes, 6 properties, 33 axioms |
| Brings in | 1 imported ontology, so adopting it adopts that too |
| Reasoning | HermiT finds this pattern consistent, with no unsatisfiable class, and its worked example consistent with the pattern. |
A situation it was written for. A sample scenario is the following. A software defect created in an issue tracker must have a creator and be associated to a certain software product. Once it is checked that the defect is reproducible, it must be assigned to some developer and have a certain priority. However, before checking the defect reproducilibty the defect must not have either asignee or priority.
Check it yourself: the published pattern · an archived copy · the ontology itself.
If a link does not open
ontologydesignpatterns.org, which publishes most of this library, does
not currently answer over HTTPS, and its wiki redirects submission pages
to its front page. The archived copy is there for exactly that reason.
The ontology files themselves are still served over plain HTTP.
Terms it declares¶
The 11 classes and properties this pattern models, as the recommender scores them. Annotation properties and built-ins are excluded, because an annotation property is not modelling.
http://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#Objecthttp://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#Statehttp://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#StateSethttp://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#hasStatehttp://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#isStateOfhttp://ontologydesignpatterns.org/cp/owl/collectionentity.owl#isMemberOfhttp://www.ontologydesignpatterns.org/cp/owl/set.owl#Sethttp://www.ontologydesignpatterns.org/cp/owl/set.owl#sizehttp://www.ontologydesignpatterns.org/cp/owl/situation.owl#Situationhttp://www.ontologydesignpatterns.org/cp/owl/situation.owl#hasSettinghttp://www.ontologydesignpatterns.org/cp/owl/situation.owl#isSettingFor
An example of it in use¶
The pattern says what may be asserted; this says it. The graph below is a small set of individuals that instantiate the classes above and are connected by its properties, so the shape the pattern describes is visible as data rather than as a schema.
Import this pattern into your own ontology from inside Protégé: OntoBoard → Reuse → Pattern library…, which hands it to Import terms… and writes the term list, the module, the import and the catalog entry the way ODK expects. See Working with ODK.
Something wrong with this pattern, its example or this page? Report a problem with this pattern - the form opens with the pattern filled in, and a title and a sentence are all it needs.