diff --git a/.gitignore b/.gitignore index 440c75b..a7f6a18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ C01V04-VER.EX01.trig dexpi.properties pandid.xml pandid.trig -imf-ontology.owl.ttl rml/segments.trig client/.idea client/Boundaries/Dexpi2Svg/test.svg diff --git a/owl/imf-ontology.owl.ttl b/owl/imf-ontology.owl.ttl new file mode 100644 index 0000000..2f6e741 --- /dev/null +++ b/owl/imf-ontology.owl.ttl @@ -0,0 +1,1573 @@ +@prefix rdf: . +@prefix imf: . +@prefix o-owl-rstr: . +@prefix o-rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix skos: . +@prefix rdfs: . +@prefix o-imf-t-o: . +@prefix o-imf-t-s: . +@prefix sh: . +@prefix o-imf: . +@prefix ottr: . +@prefix o-owl-ma: . +@prefix vann: . +@prefix foaf: . +@prefix o-imf-d: . +@prefix o-rdf: . +@prefix pca-plm: . +@prefix pav: . +@prefix ex: . +@prefix o-owl-dec: . +@prefix o-owl-ax: . +@prefix vs: . +@prefix dc: . + +imf:Aspect + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor, [ + a owl:Restriction ; + owl:onClass imf:InformationDomain ; + owl:onProperty imf:hasCharacteristic ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger + ], [ + a owl:Restriction ; + owl:onClass imf:Modality ; + owl:onProperty imf:hasCharacteristic ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger + ], [ + a owl:Restriction ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass imf:Interest ; + owl:onProperty imf:hasCharacteristic + ] ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: updated definition to reflect introduced classes [Information Domain], [Interest] and [Modality]." ; + skos:definition "An [Aspect] sets a context for interpreting and the modelling of [Element]s. An [Aspect] is characterized by an [Information Domain] (What is the modelling focus?), an [Interest] (What is the modelling interest?), and a [Modality] (What is the mode of existence of what is modelled?)." ; + skos:note "Aspect is a core concept of ISO/IEC 81346 and the IMF ontology includes aspects that are found in ISO/IEC 81346: function (imf:intendedActivity), location (imf:intendedSpace) and product (imf:intendedImplementation)." ; + skos:prefLabel "Aspect" . + +imf:AspectElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:allValuesFrom imf:AspectElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:Element + [ + a owl:Restriction ; + owl:onClass imf:Aspect ; + owl:onProperty imf:hasAspect ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger + ] + ) + ] ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "An [Aspect Element] is an [Element] that has exactly one [Aspect]." ; + skos:prefLabel "Aspect Element" . + +imf:Attribute + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor, [ + a owl:Restriction ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass imf:RegularityQualifier ; + owl:onProperty imf:classifier + ], [ + a owl:Restriction ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass imf:ScopeQualifier ; + owl:onProperty imf:classifier + ], [ + a owl:Restriction ; + owl:onProperty [ + a owl:ObjectProperty ; + owl:inverseOf imf:hasAttribute + ] ; + owl:someValuesFrom imf:Element + ], [ + a owl:Restriction ; + owl:onProperty imf:value ; + owl:someValuesFrom rdfs:Literal + ], [ + a owl:Restriction ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass imf:ProvenanceQualifier ; + owl:onProperty imf:classifier + ], [ + a owl:Restriction ; + owl:onProperty imf:predicate ; + owl:someValuesFrom owl:Thing + ], [ + a owl:Restriction ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass imf:RangeQualifier ; + owl:onProperty imf:classifier + ] ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.2.1 :: Changed: add axioms that specify that an [Attribute] has a [value] and a [predicate] and is the [Attribute], via [has attribute], for some [Element]." ; + skos:definition "An [Attribute] describes a quality, property or characteristic of a resource by setting a [predicate], a [value], and optionally a [unit of measure]. An [Attribute] may be qualified by classifiers." ; + skos:example "Maximum ambient operating temperature: 120 K.", "Measured weight: 1250 kg.", "Specified colour: red." ; + skos:prefLabel "Attribute" . + +imf:AttributeGroup + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:definition "An [Attribute Group] is a collection of [Attribute]s which are typically grouped for convenience as they describe closely related features or characteristics of a resource." ; + skos:editorialNote "Does an [Attribute Group] add any semantics? -- what is the difference from an [Attribute Group] and an [Element] with [Attribute]s?" ; + skos:example "The physical dimensions of a product, e.g., its length, width and height, could be grouped by an [Attribute Group]." ; + skos:prefLabel "Attribute Group" . + +imf:AttributeQualifier + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:prefLabel "Attribute Qualifier" . + +imf:BiTerminal + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Terminal ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "A [Bi Terminal] is a [Terminal] that accepts both input and output." ; + skos:prefLabel "Bi Terminal" . + +imf:Block + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Element, [ + a owl:Restriction ; + owl:allValuesFrom imf:Terminal ; + owl:onProperty imf:adjacentTo + ], [ + a owl:Restriction ; + owl:allValuesFrom imf:Block ; + owl:onProperty imf:transfersTo + ] ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: Update definition and scopeNote" ; + skos:definition "A [Block] represents an abstraction of any entity at any abstraction level. A [Block] also represents a boundary that separates what is internal and external to the [Block]. [Element]s that are part of the [Block] are internal to the [Block] and are not directly accessible to [Element]s outside (the boundary of) the [Block]. It can be natural to consider a [Block] as a processing black box that transforms input to output, where the transformation process is detailed by the internals of the [Block]." ; + skos:prefLabel "Block" ; + skos:scopeNote """A [Block] is a basic building block of the IMF language. A [Block] can represent anything which is of interest and which is deemed convenient to treat as a system or system element. A [Block] sets the boundaries of what it abstracts over---at any granularity level. This could be a whole industry plant, a pump system, a measuring function, or a location of interest. + +A [Block] interfaces with other [Block]s via its [Terminal]s (expressed with the property [has terminal]), and through [Connector]s. A [Block] can have any number of [Terminal]s. + +A [Block] is visualized as a rectangular box.""" . + +imf:Connector + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Element, [ + a owl:Restriction ; + owl:allValuesFrom imf:Terminal ; + owl:onProperty imf:adjacentTo + ], [ + a owl:Restriction ; + owl:onClass imf:Terminal ; + owl:onProperty imf:adjacentTo ; + owl:qualifiedCardinality "2"^^xsd:nonNegativeInteger + ] ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "A [Connector] represents a topological connection between two [Block]s, and it will specify conditions on this connection, such as the media that is transferred between the [Block]s. A [Connector] can be considered as a [Block] with infinitely small boundary, i.e., a [Block] where there is no transformation of the input to the output at the current abstraction level of the [Connector]. A [Connector] may be further described by its parts." ; + skos:prefLabel "Connector" . + +imf:Descriptor + a owl:Class ; + rdfs:subClassOf imf:InformationArtefact . + +imf:Element + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:InformationArtefact ; + owl:equivalentClass [ + a owl:Class ; + owl:unionOf (imf:Block + imf:Connector + imf:Terminal + ) + ] ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: updated definition and scopeNote." ; + skos:definition "An [Element] represents the specification of an asset. All assets specifications are represented by an [Element]. An [Element] is described by its relations to other [Element]s, e.g., [part of] and [connected to], and by its [Attribute]s (through the property [has attribute])." ; + skos:note """An [Element] should be expressed with the following metadata: + - a preferred label (using `skos:prefLabel`); + - optionally additional alternative labels (using `skos:altLabel`); + - a (textual) description (using `dc:description`); + - optionally a source of origin from which information about the element is taken (using `dc:source`); + - a version number (using `pav:version`); + - a created timestamp (using `pav:createdOn`); + - its creator, i.e., a person (using `createdBy`); + - optionally contributors to its creation (using `pav:contributedBy`); + - optionally the time of latest update (using `pav:lastUpdateOn`).""" ; + skos:prefLabel "Element" ; + skos:scopeNote "[Element] is a very generic concept and direct instantiation of [Element] is probably a mistake. A better option is to use a subclass of [Element] that specifies whether the [Element] is either a [Block], [Connector] or [Terminal]." . + +imf:FunctionBlock + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Block, imf:FunctionElement ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:FunctionElement + imf:Block + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Function Block (deprecated)" . + +imf:FunctionElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:AspectElement, [ + a owl:Restriction ; + owl:allValuesFrom imf:FunctionElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:functionAspect ; + owl:onProperty imf:hasAspect + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Function Element (deprecated)" . + +imf:FunctionTerminal + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:FunctionElement, imf:Terminal ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:FunctionElement + imf:Terminal + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Function Terminal (deprecated)" . + +imf:IMFOntology + pav:contributedBy [ + foaf:name "Arild Waaler" + ], _:b139 ; + pav:createdBy _:b139 ; + pav:createdOn "2024-05-31T00:00:00"^^xsd:dateTime ; + vann:preferredNamespacePrefix "imf" ; + vann:preferredNamespaceUri ; + a owl:Ontology ; + owl:priorVersion ; + owl:versionIRI ; + owl:versionInfo "0.3.0" ; + skos:changeNote """0.2.0 :: Change summary: + - Change: minor naming adjustments to some IRIs. + - Added metadata descriptions, including definitions and statuses. +""", """0.3.x :: Change summary: + - New structure to modelling of Aspects, defined with three characteristics. + - Removed Breakdown point +""" ; + skos:editorialNote """ + - All IRIs in the ontology are placed in the namespace `http://ns.imfid.org/imf`. The localnames of IRIs follow these naming conventions: + - Classes use `UpperCamelCase`, + - Properties use `lowerCamelCase`, + - Individuals use `lowerCamelCase`. + - When referring to a term in the ontology, the following format is used: [prefLabel], where prefLabel is set by the property `skos:prefLabel`, e.g., we will write [Block] to refer to the class `imf:Block`. + +The ontology makes use of these vocabularies for its definition: + - [SKOS](https://www.w3.org/TR/skos-primer/) + - [PAV](https://pav-ontology.github.io/pav/) + - [VANN](https://vocab.org/vann/) + - [Term-centric Semantic Web Vocabulary Annotations](https://www.w3.org/2003/06/sw-vocab-status/note.html) + +Versions of this ontology and other semantic web resources for IMF are published at an URL following this schema: `http://ns.imfid.org/[yyyymmdd]/[resource-name]`. +""" ; + skos:prefLabel "IMF Ontology -- OWL implementation" ; + skos:scopeNote """The ontology is designed to meet the following functional requirements: + + - The IMF language should be understandable to subject matter experts (SME). This means that the IMF language and ontology must be easy to learn and simple to use, hence it must contain a limited set of vocabulary terms and grammar rules. + - The language must provide incremental value, and hence must support modelling in an incremental manner. + - The language must be scalable across disciplines, work processes, and the value chain. This means that the IMF language must: + - Enable SMEs from a range of disciplines to fully express their design using the same modelling principles. + - Enable SMEs to express different levels of precision as part of iterations of their design. + - Enable use in different phases of a project (concept, detail engineering, manufacturing, etc.). + - The language must have the precision of machine interpretation to allow automated verification. This means that the IMF language must be precise and unambiguous, and allow translation into other ontology languages and be able to exploit semantic descriptions in external ontologies and reference data libraries. + """ ; + sh:shapesGraph . + +imf:InformationArtefact + a owl:Class ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "Information Artefact" . + +imf:InformationDomain + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "Information Domain" . + +imf:InformationModel + vann:termGroup "model" ; + a owl:Class ; + rdfs:subClassOf imf:InformationArtefact ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: replace hasElement with hasMember." ; + skos:definition "A [Information Model] is a collection of [Element]s and related entities." ; + skos:editorialNote "TODOs: Can an [Element] belong to multiple [Information Model]s, if so, should it have one 'owner'?" ; + skos:prefLabel "Information Model" ; + skos:scopeNote """A [Information Model] is a construct for organizing [Element]s into an identified collection which is useful for, e.g., provenance, exchange and integration. + +[Information Model] has the status 'unstable'; more detailed use cases and experience is required to work out its details.""" . + +imf:InputTerminal + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Terminal, [ + a owl:Restriction ; + owl:maxCardinality "0"^^xsd:nonNegativeInteger ; + owl:onProperty imf:transfersTo + ] ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:inputDirection ; + owl:onProperty imf:direction + ] ; + vs:term_status "testing" ; + skos:altLabel "Input" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "An [Input Terminal] is a [Terminal] that accepts only input (and not output)." ; + skos:prefLabel "Input Terminal" ; + skos:scopeNote "An [Input Terminal] is equivalent to a [Terminal] that has the [direction] [input]." . + +imf:InstalledBlock + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Block, imf:InstalledElement ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:InstalledElement + imf:Block + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Installed Block (deprecated)" . + +imf:InstalledElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:AspectElement, [ + a owl:Restriction ; + owl:allValuesFrom imf:InstalledElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:installedAspect ; + owl:onProperty imf:hasAspect + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Installed Element (deprecated)" . + +imf:InstalledTerminal + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:InstalledElement, imf:Terminal ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:InstalledElement + imf:Terminal + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Installed Terminal (deprecated)" . + +imf:Interest + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[Interest] refers to the modelling purpose and the intended usage of the information, and hence the users of the information, their preferences and working habits." ; + skos:prefLabel "Interest" . + +imf:LocationBlock + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Block, imf:LocationElement ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:LocationElement + imf:Block + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Location Block (deprecated)" . + +imf:LocationElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:AspectElement, [ + a owl:Restriction ; + owl:allValuesFrom imf:LocationElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:locationAspect ; + owl:onProperty imf:hasAspect + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Location Element (deprecated)" . + +imf:LocationTerminal + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:LocationElement, imf:Terminal ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:LocationElement + imf:Terminal + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Location Terminal (deprecated)" . + +imf:Modality + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[Modality] refers to the mode of existence of what is modelled." ; + skos:prefLabel "Modality" . + +imf:NoAspectElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:allValuesFrom imf:NoAspectElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:Element + [ + a owl:Class ; + owl:complementOf [ + a owl:Restriction ; + owl:onProperty imf:hasAspect ; + owl:someValuesFrom owl:Thing + ] + ] + ) + ] ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "A [No-Aspect Element] is an [Element] that does not have an [Aspect]." ; + skos:prefLabel "No-Aspect Element" . + +imf:OutputTerminal + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Terminal, [ + a owl:Restriction ; + owl:allValuesFrom imf:InputTerminal ; + owl:onProperty imf:transfersTo + ] ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:outputDirection ; + owl:onProperty imf:direction + ] ; + vs:term_status "testing" ; + skos:altLabel "Output" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "An [Output Terminal] is a [Terminal] that accepts only output (and not input)." ; + skos:prefLabel "Output Terminal" ; + skos:scopeNote "An [Output Terminal] is equivalent to a [Terminal] that has the [direction] [output]." . + +imf:ProductBlock + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:Block, imf:ProductElement ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:ProductElement + imf:Block + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Product Block (deprecated)" . + +imf:ProductElement + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:AspectElement, [ + a owl:Restriction ; + owl:allValuesFrom imf:ProductElement ; + owl:onProperty imf:intraAspectRelation + ] ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class, owl:Restriction ; + owl:hasValue imf:productAspect ; + owl:onProperty imf:hasAspect + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Product Element (deprecated)" . + +imf:ProductTerminal + vann:termGroup "aspects" ; + a owl:Class ; + rdfs:subClassOf imf:ProductElement, imf:Terminal ; + owl:deprecated true ; + owl:equivalentClass [ + a owl:Class ; + owl:intersectionOf (imf:ProductElement + imf:Terminal + ) + ] ; + skos:changeNote "0.1.0 :: Added", "0.2.2 :: Deprecated: use instead imf:hasAspect." ; + skos:prefLabel "Product Terminal (deprecated)" . + +imf:ProvenanceQualifier + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:AttributeQualifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004033 ; + skos:prefLabel "Provenance Qualifier" . + +imf:RangeQualifier + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:AttributeQualifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004035 ; + skos:prefLabel "Range Qualifier" . + +imf:RegularityQualifier + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:AttributeQualifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004036 ; + skos:prefLabel "Regularity Qualifier" . + +imf:ScopeQualifier + vann:termGroup "attributes" ; + a owl:Class ; + rdfs:subClassOf imf:AttributeQualifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004034 ; + skos:prefLabel "Scope Qualifier" . + +imf:Terminal + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Element, [ + a owl:Restriction ; + owl:allValuesFrom imf:Terminal ; + owl:onProperty imf:partOf + ], [ + a owl:Restriction ; + owl:onProperty imf:adjacentTo ; + owl:someValuesFrom imf:Block + ], [ + a owl:Restriction ; + owl:allValuesFrom imf:Terminal ; + owl:onProperty imf:transfersTo + ], [ + a owl:Restriction ; + owl:allValuesFrom [ + a owl:Class ; + owl:unionOf (imf:Block + imf:Connector + ) + ] ; + owl:onProperty imf:adjacentTo + ], [ + a owl:Restriction ; + owl:onProperty [ + a owl:ObjectProperty ; + owl:inverseOf imf:hasTerminal + ] ; + owl:someValuesFrom imf:Block + ] ; + vs:term_status "testing" ; + skos:altLabel "Channel", "Input/Output", "Port" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: updated definition." ; + skos:definition """A [Terminal] is an [Element] that represents a point of interaction or communication for exactly one [Block] (through the relation [has terminal]), and hence specifies an input and/or output that the [Block] produces and/or receives. A [Terminal] may be qualified by [classifier]s. + +A [Terminal] is visualized as a square with rounded corners, attached to its [Block]. An [Input Terminal] is placed to the left of its [Block], while an [Output Terminal] is placed to the right of its [Block].""" ; + skos:prefLabel "Terminal" . + +imf:TerminalQualifier + vann:termGroup "elements" ; + a owl:Class ; + rdfs:subClassOf imf:Descriptor ; + owl:deprecated true ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Deprecated: use imf:direction instead." ; + skos:definition "[Terminal Qualifier] is a feature or characteristic of a [Terminal]." ; + skos:prefLabel "Terminal Qualifier (deprecated)" . + +imf:absoluteQualifier + vann:termGroup "attributes" ; + a imf:RegularityQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004052 ; + skos:prefLabel "absolute qualifier" . + +imf:activity + vann:termGroup "aspects" ; + a imf:InformationDomain, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[activity] is an [Entity type] for entities representing information about, e.g., process, motion, change. The purpose of a system is captured by entities of [Entity type] [activity]." ; + skos:prefLabel "activity" . + +imf:actualImplementation + imf:colour "#0000FF" ; + imf:hasCharacteristic imf:actualModality, imf:implementation ; + imf:prefix "::" ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "installed aspect" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "actual implementation" . + +imf:actualModality + vann:termGroup "aspects" ; + a imf:Modality, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[actual] is a [Modality] for representing information about physical assets." ; + skos:prefLabel "actual" . + +imf:adjacentTo + vann:termGroup "topology" ; + a owl:IrreflexiveProperty, owl:ObjectProperty, owl:SymmetricProperty ; + rdfs:subPropertyOf imf:connectedTo ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[adjacent to] is a subrelation of [connected to] that relates an [Element] *E1* to an [Element] *E2* to specify that *E1* is adjacent to (and hence immediately connected to) *E2*." ; + skos:prefLabel "adjacent to" . + +imf:asFunction + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:range imf:FunctionElement ; + rdfs:subPropertyOf imf:interAspectRelation ; + owl:deprecated true ; + skos:changeNote "0.2.0 :: Added", "0.2.2 :: Deprecated: use instead imf:proxy, if the subject resource is an imf:AspectElement, or imf:projectionOf, if the subject element is a imf:NonAspectElement." ; + skos:prefLabel "as function (deprecated)" . + +imf:asInstalled + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:range imf:InstalledElement ; + rdfs:subPropertyOf imf:interAspectRelation ; + owl:deprecated true ; + skos:changeNote "0.2.0 :: Added", "0.2.2 :: Deprecated: use instead imf:proxy, if the subject resource is an imf:AspectElement, or imf:projectionOf, if the subject element is a imf:NonAspectElement." ; + skos:prefLabel "as installed (deprecated)" . + +imf:asLocation + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:range imf:LocationElement ; + rdfs:subPropertyOf imf:interAspectRelation ; + owl:deprecated true ; + skos:changeNote "0.2.0 :: Added", "0.2.2 :: Deprecated: use instead imf:proxy, if the subject resource is an imf:AspectElement, or imf:projectionOf, if the subject element is a imf:NonAspectElement." ; + skos:prefLabel "as location (deprecated)" . + +imf:asProduct + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:range imf:ProductElement ; + rdfs:subPropertyOf imf:interAspectRelation ; + owl:deprecated true ; + skos:changeNote "0.2.0 :: Added", "0.2.2 :: Deprecated: use instead imf:proxy, if the subject resource is an imf:AspectElement, or imf:projectionOf, if the subject element is a imf:NonAspectElement." ; + skos:prefLabel "as product (deprecated)" . + +imf:associativeRelation + vann:termGroup "generic relations" ; + a owl:ObjectProperty ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[associative relation] is a generic relation that relates resources in an associative (or non-hierarchical) structure." ; + skos:prefLabel "associative relation" ; + skos:scopeNote "This is a generic property that is not intended to be used directly, rather use one of its subproperties. Generic properties like this are introduced to add structure to the ontology's properties, and for expressing generic class constraints." . + +imf:auxClassifier + vann:termGroup "classifiers" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:classifier ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "auxiliary classifier" . + +imf:averageQualifier + vann:termGroup "attributes" ; + a imf:RangeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004047 ; + skos:prefLabel "average qualifier" . + +imf:calculatedQualifier + vann:termGroup "attributes" ; + a imf:ProvenanceQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004038 ; + skos:prefLabel "calculated qualifier" . + +imf:classifier + vann:termGroup "classifiers" ; + a owl:ObjectProperty ; + rdfs:domain owl:Thing ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: moved to generic relations." ; + skos:definition "[classifier] is a [external relation] that relates an [Element] *E* to a resource *X* in an external ontology or reference data library such that *E* is classified by, or /is typed by/, or /has the classifier/type/ *X*. [classifier]s are used to assign [element] additional descriptions by relying on external definitions." ; + skos:prefLabel "classifier" . + +imf:colour + vann:termGroup "aspects" ; + a owl:AnnotationProperty ; + rdfs:range xsd:string ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: Renamed to colour." ; + skos:definition "[colour] is a relation from a resource *X* to a string identifying a hexadecimal colour *c* to specify that the *c* is a colour that is associated with *X*." ; + skos:example "For examples, see the instances of [Aspect] defined in this ontology, e.g., [function aspect]." ; + skos:prefLabel "colour" . + +imf:connectedThrough + vann:termGroup "topology" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:connectedTo ; + owl:propertyChainAxiom (imf:hasTerminal + imf:hasConnector + ) ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[connected through] is a subproperty of [connected to] that relates a [Block] *B* to a [Connector] *C* to specify that *B* is connected to (and through) *C*." ; + skos:prefLabel "connected through" . + +imf:connectedTo + vann:termGroup "topology" ; + a owl:ObjectProperty, owl:SymmetricProperty ; + rdfs:domain imf:Element ; + rdfs:range imf:Element ; + rdfs:subPropertyOf imf:associativeRelation, imf:intraAspectRelation ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed IRI from imf:isConnectedTo to imf:connectedTo.", """0.3.0 :: Changed: +- domain and range from Terminal to Element. +- removed functional axiom. +- added symmetric axiom. +""" ; + skos:definition "[connected to] is an [associative relation] and an [intra-aspect relation] that relates an [Element] *E1* to an [Element] *E2* to specify that *E1* is connected to *E2*. [connected to] specifies a topology of [Element]s." ; + skos:prefLabel "connected to" . + +imf:containedIn + vann:termGroup "topology" ; + a owl:ObjectProperty, owl:TransitiveProperty ; + rdfs:domain imf:Element ; + rdfs:range imf:Element ; + rdfs:subPropertyOf imf:hierarchicalRelation, imf:intraAspectRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[contained in] is a [hierarchical relation] and an [intra-aspect relation] that relates an [Element] *E1* and an [Element] *E2* to specify that *E1* is contained in *E2*. [contained in] is used to specify a breakdown hierarchy of [Element]s." ; + skos:prefLabel "contained in" . + +imf:contains + vann:termGroup "topology" ; + a owl:ObjectProperty, owl:TransitiveProperty ; + rdfs:subPropertyOf imf:hierarchicalRelation, imf:intraAspectRelation ; + owl:inverseOf imf:containedIn ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[contains] is the inverse relation of [contained in]." ; + skos:prefLabel "contains" . + +imf:continuousQualifier + vann:termGroup "attributes" ; + a imf:RegularityQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004051 ; + skos:prefLabel "continuous qualifier" . + +imf:designQualifier + vann:termGroup "attributes" ; + a imf:ScopeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004042 ; + skos:prefLabel "design qualifier" . + +imf:direction + vann:termGroup "elements" ; + a owl:FunctionalProperty, owl:ObjectProperty ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[direction] relates a [Terminal] *T* to a direction *d* to specify that *T* has the direction *d*." ; + skos:prefLabel "direction" . + +imf:elementRelation + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:domain imf:Element ; + rdfs:range imf:Element ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "An [element relation] is a relation between [Element]s." ; + skos:prefLabel "element relation" . + +imf:fulfilledBy + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:elementRelation, imf:hierarchicalRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[fulfilled by] is a [hierarchical relation] from Element *A* to Element *B* to express that *B* is intended as a solution to the requirements posited by *A*." ; + skos:prefLabel "fulfilled by" . + +imf:fulfills + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:elementRelation, imf:hierarchicalRelation ; + owl:inverseOf imf:fulfilledBy ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[fulfills] is the inverse relation of [fulfilled by]." ; + skos:prefLabel "fulfills" . + +imf:functionAspect + a imf:Aspect, owl:NamedIndividual ; + owl:sameAs imf:intendedActivity ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed: use lowerCamelCase for localname of IRI.", "0.3.0 :: Changed: same as imf:intendedActivity." ; + skos:definition "[function aspect] is an [Aspect] about the intended activity of [Element]s, i.e., the activity an [Element] performs or is designed to bring about." ; + skos:prefLabel "function aspect" . + +imf:hasAspect + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:domain imf:Element ; + rdfs:range imf:Aspect ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[has aspect] is a relation from an [Element] *E* to an [Aspect] *A* that specifies that *E* has the [Aspect] *A*." ; + skos:prefLabel "has aspect" . + +imf:hasAttribute + vann:termGroup "attributes" ; + a owl:ObjectProperty ; + rdfs:domain imf:Element ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: added AttributeGroup to range." ; + skos:definition "[has attribute] is a relation between an [Element] *E* and an [Attribute] *A* that specifies that *E* has the attribute *A*." ; + skos:prefLabel "has attribute" . + +imf:hasAttributeGroup + vann:termGroup "attributes" ; + a owl:ObjectProperty ; + rdfs:range imf:AttributeGroup ; + rdfs:subPropertyOf imf:reference ; + owl:deprecated true ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Deprecated: use instead imf:hasAttribute" ; + skos:definition "[has attribute group] is a relation between a resource *X* and an [Attribute Group] *A* that specifies that *X* has the attribute group *A*." ; + skos:editorialNote "See comment on [Attribute Group], does [has attribute group] represent a \"long-hand property\" meaning that attaching the Attributes of the Attribute Group directly is equivalent? Perhaps the functionality of [Attribute Group]s is best realized as aspect-less-types?" ; + skos:prefLabel "has attribute group (deprecated)" . + +imf:hasAttributeQualifier + vann:termGroup "attributes" ; + a owl:ObjectProperty ; + rdfs:domain imf:Attribute ; + rdfs:range imf:AttributeQualifier ; + rdfs:subPropertyOf imf:reference ; + owl:deprecated true ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Deprecated: use instead imf:classifier" ; + skos:definition "[has attribute qualifier] is a relation between an [Attribute] *A* and an [Attribute Qualifier] *Q* to specify that *A* is qualified by *Q*." ; + skos:prefLabel "has attribute qualifier (deprecated)" . + +imf:hasCharacteristic + vann:termGroup "descriptor" ; + a owl:ObjectProperty ; + rdfs:domain imf:Descriptor ; + rdfs:range imf:Descriptor ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "has characteristic" . + +imf:hasConnector + vann:termGroup "topology" ; + a owl:ObjectProperty ; + rdfs:domain imf:Terminal ; + rdfs:range imf:Connector ; + rdfs:subPropertyOf imf:adjacentTo ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", """0.3.0 :: Changed: + - remove inverse functional type. + - change super property to imf:adjacentTo. +""" ; + skos:definition "[has connector] is a subproperty of [adjacent to] that relates a [Terminal] *T* to a [Connector] *C* to specify that *T* is directly connected to *C*." ; + skos:prefLabel "has connector" . + +imf:hasInputTerminal + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:range imf:InputTerminal ; + rdfs:subPropertyOf imf:hasTerminal ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[has input terminal] is a subproperty of [has terminal] property that relates [Block]s to [InputTerminal]s." ; + skos:prefLabel "has input terminal" . + +imf:hasMember + vann:termGroup "logic relations" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:hierarchicalRelation ; + owl:inverseOf imf:memberOf ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[has member] is the inverse relation of [member of]" ; + skos:prefLabel "has member" . + +imf:hasOutputTerminal + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:range imf:OutputTerminal ; + rdfs:subPropertyOf imf:hasTerminal ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[has output terminal] is a subproperty of [has terminal] property that relates [Block]s to [Output Terminal]s." ; + skos:prefLabel "has output terminal" . + +imf:hasPart + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:contains ; + owl:inverseOf imf:partOf ; + vs:term_status "testing" ; + skos:altLabel "has child" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[has part] is the inverse relation of [part of]." ; + skos:prefLabel "has part" . + +imf:hasTerminal + vann:termGroup "topology" ; + a owl:ObjectProperty ; + rdfs:domain imf:Block ; + rdfs:range imf:Terminal ; + rdfs:subPropertyOf imf:adjacentTo ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", """0.3.0 :: Changed: + - remove inverse functional type. + - change super property to imf:adjacentTo. +""" ; + skos:definition "[has terminal] is a subproperty of [adjacent to] that relates a [Block] *B* to a [Terminal] *T* to specify that *T* is a terminal of, or belongs to, *B*." ; + skos:prefLabel "has terminal" . + +imf:hasTerminalQualifier + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:domain imf:Terminal ; + rdfs:range imf:TerminalQualifier ; + rdfs:subPropertyOf imf:reference ; + owl:deprecated true ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Deprecated: use imf:direction instead." ; + skos:definition "[has terminal qualifier] relates a [Terminal] *T* to a [Terminal Qualifier] *Q* to specify that *T* has the qualifier *Q*." ; + skos:prefLabel "has terminal qualifier (deprecated)" . + +imf:hierarchicalRelation + vann:termGroup "generic relations" ; + a owl:ObjectProperty ; + rdfs:seeAlso ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[hierarchical relation] is a generic relation that relates resources in a hierarchical or tree-shaped structure." ; + skos:prefLabel "hierarchical relation" ; + skos:scopeNote "This is a generic property that is not intended to be used directly, rather use one of its subproperties. Generic properties like this are introduced to add structure to the ontology's properties, and for expressing generic class constraints." . + +imf:implementation + vann:termGroup "aspects" ; + a imf:InformationDomain, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[implementation] is an [Entity type] for entities representing information about physical objects or software. A system view of elements as physical objects or software is captured by entities of [Entity type] [implementation]." ; + skos:prefLabel "implementation" . + +imf:inputDirection + vann:termGroup "elements" ; + a owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: IRI changed to imf:inputDirection and metadata updated accordingly." ; + skos:definition "[input] is a valid [direction] for a [Terminal]. It specifies that the [Terminal] is an [InputTerminal]." ; + skos:prefLabel "input" . + +imf:installedAspect + a imf:Aspect, owl:NamedIndividual ; + owl:sameAs imf:actualImplementation ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed: use lowerCamelCase for localname of IRI.", "0.3.0 :: Changed: same as imf:actualImplementation." ; + skos:definition "[installed aspect] is an [Aspect] about the information of [Element] instances." ; + skos:prefLabel "installed aspect" . + +imf:intendedActivity + imf:colour "#FFFF00" ; + imf:hasCharacteristic imf:activity, imf:intendedModality ; + imf:prefix "=" ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "function aspect" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "intended activity" . + +imf:intendedImplementation + imf:colour "#00FFFF" ; + imf:hasCharacteristic imf:implementation, imf:intendedModality ; + imf:prefix "-" ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "product aspect" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "The configured product individual." ; + skos:prefLabel "intended implementation" . + +imf:intendedModality + vann:termGroup "aspects" ; + a imf:Modality, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[intended] is a [Modality] for representing information that expresses needs, specifications, or similar engineering related information." ; + skos:prefLabel "intended" . + +imf:intendedProductActivity + imf:hasCharacteristic imf:activity, imf:intendedModality, imf:productLifecycleInterest ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "inherent product function" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "The capability of a product individual for bringing about an intended activity; the purpose of the product." ; + skos:prefLabel "intended product activity" . + +imf:intendedProductImplementation + imf:hasCharacteristic imf:implementation, imf:intendedModality, imf:productLifecycleInterest ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "project location" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "intended product implementation" . + +imf:intendedProductSpace + imf:hasCharacteristic imf:intendedModality, imf:productLifecycleInterest, imf:space ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "project location" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "The space that a product individual occupies." ; + skos:prefLabel "intended product space" . + +imf:intendedProjectActivity + imf:hasCharacteristic imf:activity, imf:intendedModality, imf:projectLifecycleInterest ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "Project activity need" ; + skos:changeNote "0.3.0 :: Added" ; + skos:example "Functional requirements resulting from simulation. Breakdown of activities to a level of detail where a system function can be identified with capability to deliver the needed activity. Activity needs are typically activity breakdown hierarchies identified by the disciplines with interfaces to one another that bring details on various sorts of medium" ; + skos:prefLabel "intended project activity" . + +imf:intendedProjectImplementation + imf:hasCharacteristic imf:implementation, imf:intendedModality, imf:projectLifecycleInterest ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "plant aspect" ; + skos:changeNote "0.3.0 :: Added" ; + skos:example "System components and how they are physically assembled and connected." ; + skos:prefLabel "intended project implementation" . + +imf:intendedProjectSpace + imf:hasCharacteristic imf:intendedModality, imf:projectLifecycleInterest, imf:space ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "project area need" ; + skos:changeNote "0.3.0 :: Added" ; + skos:example "Definition of activity spaces and detailed positions and coordinates. The information will typically be organized in breakdown hierarchies with information about how they are interrelated, e.g., where they overlap or where they are adjacent" ; + skos:prefLabel "intended project space" . + +imf:intendedSpace + imf:colour "#FF00FF" ; + imf:hasCharacteristic imf:intendedModality, imf:space ; + imf:prefix "+" ; + vann:termGroup "aspects" ; + a imf:Aspect, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:altLabel "location aspect" ; + skos:changeNote "0.3.0 :: Added" ; + skos:prefLabel "intended space" . + +imf:interAspectRelation + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:elementRelation ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: make domain and range scoped" ; + skos:definition "[inter-aspect relation] a generic relation between [Element]s *E1* and *E2* such that *E1* and *E2* do not share any [Aspect]s." ; + skos:prefLabel "inter-aspect relation" ; + skos:scopeNote "[inter-aspect relations] is not used directly, rather use one of its subproperties. An [inter-aspect relation] is used to relate [Element]s that represent the same system/system element, but in different [Aspect]s." . + +imf:intraAspectRelation + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:elementRelation ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added", "0.3.0 :: Changed: make domain and range scoped" ; + skos:definition "[intra-aspect relation] a generic relation between [Element]s *E1* and *E2* such that *E1* and *E2* share at least one [Aspect]." ; + skos:prefLabel "intra-aspect relation" ; + skos:scopeNote "[intra-aspect relations] is not used directly, rather use one of its subproperties. An [intra-aspect relation] is used to relate [Element]s that represent different (but related) systems/system elements within the same [Aspect]." . + +imf:locationAspect + a imf:Aspect, owl:NamedIndividual ; + owl:sameAs imf:intendedSpace ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed: use lowerCamelCase for localname of IRI.", "0.3.0 :: Changed: same as imf:intendedSpace." ; + skos:definition "[location aspect] is an [Aspect] about the spatial envelope (e.g., geometry, size and shape) of [Element]s." ; + skos:prefLabel "location aspect" . + +imf:maximumQualifier + vann:termGroup "attributes" ; + a imf:RangeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004048 ; + skos:prefLabel "maximum qualifier" . + +imf:measuredQualifier + vann:termGroup "attributes" ; + a imf:ProvenanceQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004039 ; + skos:prefLabel "measured qualifier" . + +imf:medium + vann:termGroup "media transfer" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:classifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: Removed Terminal as domain." ; + skos:definition "[medium] is a [classifier] that relates a [Terminal] or [Connector] *E* to a resource *X* to specify that *E* handles the medium *X*" ; + skos:example """[medium] typically specifies one (or a specialization) of the following: + - Material (Fluid, Solids), + - Energy (Mechanical, Electrical, Thermal), + - Force (Mechanical), + - Information (Electrical, Optical, Wireless) +""" ; + skos:prefLabel "medium" . + +imf:memberOf + vann:termGroup "logic relations" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:hierarchicalRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[member of] is a relation that relates a resource *X1* to a an resource *X2* resource to specify that *X1* is a member of the group or collection *X2*." ; + skos:prefLabel "member of" . + +imf:minimumQualifier + vann:termGroup "attributes" ; + a imf:RangeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004049 ; + skos:prefLabel "minimum qualifier" . + +imf:nominalQualifier + vann:termGroup "attributes" ; + a imf:RangeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004045 ; + skos:prefLabel "nominal qualifier" . + +imf:normalQualifier + vann:termGroup "attributes" ; + a imf:RangeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004046 ; + skos:prefLabel "normal qualifier" . + +imf:operatingQualifier + vann:termGroup "attributes" ; + a imf:ScopeQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004043 ; + skos:prefLabel "operating qualifier" . + +imf:outputDirection + vann:termGroup "elements" ; + a owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed: IRI changed to imf:outputDirection and metadata updated accordingly." ; + skos:definition "[output] is a valid [direction] for a [Terminal]. It specifies that the [Terminal] is an [OutputTerminal]." ; + skos:prefLabel "output" . + +imf:partOf + vann:termGroup "elements" ; + a owl:FunctionalProperty, owl:IrreflexiveProperty, owl:ObjectProperty ; + rdfs:subPropertyOf imf:containedIn ; + vs:term_status "testing" ; + skos:altLabel "has parent" ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed: IRI from imf:isPartOf to imf:partOf.", "0.3.0 :: Changed: subproperty of new containedIn" ; + skos:definition "[part of] is a subproperty of [contained in] that relates an [Element] *E1* and an [Element] *E2* to specify that *E1* is a direct part of *E2*, or equivalently that *E2* has *E1* as a part." ; + skos:prefLabel "part of" ; + skos:scopeNote """[part of]/[has part] is used for describing an [Element] *E* by splitting *E* into parts *Es*, which again can be broken down into parts, to form a tree-shaped breakdown structure. + +[part of] is visualized with an arrow pointing from the child (the part) to the parent (the whole).""" . + +imf:predicate + vann:termGroup "attributes" ; + a owl:ObjectProperty ; + rdfs:domain imf:Attribute ; + rdfs:subPropertyOf imf:primaryClassifier ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Changed set super property to classifier." ; + skos:definition "[predicate] is a [primary classifier] that relates an [Attribute] *A* to a resource *X* to specify that *A* has the predicate *X*." ; + skos:example "The [predicate] of an [Attribute] \"Weight: 1250 kg\" could be expressed as WEIGHT ." ; + skos:prefLabel "predicate" . + +imf:prefix + vann:termGroup "aspects" ; + a owl:AnnotationProperty ; + rdfs:domain imf:Aspect ; + rdfs:range xsd:string ; + vs:term_status "testing" ; + skos:changeNote "0.1.0 :: Added" ; + skos:definition "[prefix] is a relation from an [Aspect] *A* to a string *s* to specify that *s* is the prefix associated with *A*. Such prefix strings are typically used for identifying the aspect when constructing reference designation system (RDS) identifiers." ; + skos:example "For examples, see the instances of [Aspect] defined in this ontology, e.g., [function aspect]." ; + skos:prefLabel "prefix" . + +imf:primaryClassifier + vann:termGroup "classifiers" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:classifier ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "" ; + skos:prefLabel "primary classifier" . + +imf:productAspect + a imf:Aspect, owl:NamedIndividual ; + owl:sameAs imf:intendedImplementation ; + skos:changeNote "0.1.0 :: Added", "0.2.0 :: Changed: use lowerCamelCase for localname of IRI.", "0.3.0 :: Changed: same as imf:intendedImplementation." ; + skos:definition "[product aspect] is an [Aspect] about the specification of a (physical) solution/implementation of [Element]s." ; + skos:prefLabel "product aspect" . + +imf:productLifecycleInterest + vann:termGroup "aspects" ; + a imf:Interest, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[project lifecycle interest] is an [Interest] used when the modelling interest is from a supplier's or manufacturer's viewpoint." ; + skos:prefLabel "product lifecycle" . + +imf:projectLifecycleInterest + vann:termGroup "aspects" ; + a imf:Interest, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[project lifecycle interest] is an [Interest] used when the modelling interest is in identifying needs in project execution and in operation and maintenance." ; + skos:prefLabel "project lifecycle" . + +imf:projectionOf + vann:termGroup "aspects" ; + a owl:ObjectProperty ; + rdfs:domain imf:NoAspectElement ; + rdfs:range imf:AspectElement ; + rdfs:subPropertyOf imf:elementRelation, imf:hierarchicalRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[projection of] is a [hierarchical relation] from [Element] *A* to [Element] *B* to express that *B* is intended as a solution to the requirements posited by *A*." ; + skos:prefLabel "projection of" . + +imf:proxy + vann:termGroup "aspects" ; + a owl:ObjectProperty, owl:SymmetricProperty, owl:TransitiveProperty ; + rdfs:domain imf:AspectElement ; + rdfs:range imf:AspectElement ; + rdfs:subPropertyOf imf:associativeRelation, imf:interAspectRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[proxy] is an [inter-aspect relation] between two different [Aspect Element]s that are projections of the same [No-Aspect Element]." ; + skos:prefLabel "proxy" . + +imf:purpose + vann:termGroup "classifiers" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:classifier ; + owl:deprecated true ; + skos:changeNote "0.2.0 :: Added", "0.3.0 :: Deprecated: use imf:classifier or one of its subproperties instead." ; + skos:definition "[purpose] is a [classifier] that relates an [Element] *E* to a resource *X* in an external ontology or reference data library such that *E* has the purpose *X*." ; + skos:example """Use [purpose] to state that the main activity of a [Function Block] is to perform pumping, by relating the [Function Block] to, e.g., the external resource PUMPING : + + ex:myFunctionBlock imf:purpose . + +We then say that the [Function Block] has the purpose PUMPING. +In the case that the [Block] also performs, e.g,. a mixing activity, this can be stated by relating the [Block] to an external resource that represents this activity using the property [classifier].""" ; + skos:prefLabel "purpose (deprecated)" ; + skos:scopeNote "[purpose] should be used to state the main purpose of an [Element]. Any additional purposes can be stated using [classifier]." . + +imf:reference + vann:termGroup "generic relations" ; + a owl:ObjectProperty ; + rdfs:range imf:Descriptor ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:definition "[reference] is a generic relation that relates a resource *X* to a resource in an external ontology or reference data library to describe *X*." ; + skos:prefLabel "reference" ; + skos:scopeNote "This is a generic property that is not intended to be used directly, rather use one of its subproperties. Generic properties like this are introduced to add structure to the ontology's properties, and for expressing generic class constraints." . + +imf:space + vann:termGroup "aspects" ; + a imf:InformationDomain, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[space] is an [Entity type] for entities representing information about, e.g., geometry, geographical position, what is located within what. Information about the space that an asset occupies is meant to be captured by entities of [Entity type] [space]." ; + skos:prefLabel "space" . + +imf:specializationOf + vann:termGroup "logic relations" ; + a owl:ObjectProperty, owl:TransitiveProperty ; + rdfs:subPropertyOf imf:hierarchicalRelation, imf:intraAspectRelation ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[specialization of] is a relation that relates a resource *X1* to a an resource *X2* resource to specify that *X1* is a specialization of *X2*. If *X1* is a [specialization of] *X2*, then *X1* inherits all facts expressed for *X2*." ; + skos:prefLabel "specialization of" . + +imf:specializes + vann:termGroup "logic relations" ; + a owl:ObjectProperty, owl:TransitiveProperty ; + rdfs:subPropertyOf imf:hierarchicalRelation, imf:intraAspectRelation ; + owl:inverseOf imf:specializationOf ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[specializes] is the inverse relation of [specialization of]." ; + skos:prefLabel "specializes" . + +imf:specifiedQualifier + vann:termGroup "attributes" ; + a imf:ProvenanceQualifier, owl:NamedIndividual ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:exactMatch pca-plm:PCA_100004037 ; + skos:prefLabel "specified qualifier" . + +imf:symbol + vann:termGroup "elements" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:definition "[symbol] is an [reference] that associates a resource *X* with a typical graphical representation of *X*." ; + skos:prefLabel "symbol" . + +imf:transfersTo + vann:termGroup "media transfer" ; + a owl:ObjectProperty ; + rdfs:subPropertyOf imf:connectedTo ; + vs:term_status "testing" ; + skos:changeNote "0.3.0 :: Added" ; + skos:definition "[transfers to] is a subproperty of [connected to] that relates a [Block] *E1* to a [Block] *E2*, or a [Terminal] *E1* to a [Terminal] *E2*, to specify that *E1* transfers medium to *E2*" ; + skos:prefLabel "transfers to" . + +imf:uom + vann:termGroup "attributes" ; + a owl:ObjectProperty ; + rdfs:domain imf:Attribute ; + rdfs:subPropertyOf imf:reference ; + vs:term_status "testing" ; + skos:altLabel "uom" ; + skos:changeNote "0.2.0 :: Added" ; + skos:definition "[unit of measure] is an [reference] that relates an [Attribute] *A* to a resource *X* to specify that *A* has the unit of measure *X*." ; + skos:example "The [unit of measure] of an [Attribute] \"Weight: 1250 kg\" could be expressed as KILOGRAM ." ; + skos:prefLabel "unit of measure" . + +imf:value + vann:termGroup "attributes" ; + a owl:DatatypeProperty ; + rdfs:domain imf:Attribute ; + vs:term_status "testing" ; + skos:changeNote "0.2.0 :: Added" ; + skos:definition "[value] relates an [Attribute] *A* to literal value *v* to specify that *A* has the value *v*." ; + skos:example "The [value] of an [Attribute] \"Weight: 1250 kg\" could be expressed as the literal `\"1250\"^^xsd:integer` (or using a different appropriate literal datatype)." ; + skos:prefLabel "value" . + +rdfs:Literal + a rdfs:Datatype . + +owl:Thing + a owl:Class . + +skos:notation + a owl:DatatypeProperty ; + skos:scopeNote "From the SKOS reference: 'A notation is a string of characters such as \"T58.5\" or \"303.4833\" used to uniquely identify a concept within the scope of a given concept scheme.' Use skos:notation to set a RDS string." . + +[] + a owl:AllDisjointClasses ; + owl:members (imf:InputTerminal + imf:OutputTerminal + imf:BiTerminal + ) . + +[] + a owl:Restriction ; + rdfs:subClassOf imf:NoAspectElement ; + owl:onProperty imf:intraAspectRelation ; + owl:someValuesFrom imf:NoAspectElement . + +[] + a owl:AllDifferent ; + owl:members (imf:projectLifecycleInterest + imf:productLifecycleInterest + ) . + +[] + a owl:AllDifferent ; + owl:members (imf:activity + imf:space + imf:implementation + ) . + +[] + a owl:AllDifferent ; + owl:members (imf:intendedModality + imf:actualModality + ) . + +_:b139 + foaf:name "Martin G. Skjæveland" . + +[] + a owl:AllDifferent ; + owl:members (imf:intendedProjectActivity + imf:intendedProductActivity + imf:intendedActivity + imf:intendedProjectSpace + imf:intendedProductSpace + imf:intendedSpace + imf:intendedProjectImplementation + imf:intendedProductImplementation + imf:intendedImplementation + imf:actualImplementation + ) . + +[] + a owl:AllDisjointClasses ; + owl:members (imf:Block + imf:Connector + imf:Terminal + ) . + +[] + a owl:AllDifferent ; + owl:members (imf:specifiedQualifier + imf:calculatedQualifier + imf:measuredQualifier + imf:averageQualifier + imf:maximumQualifier + imf:minimumQualifier + imf:nominalQualifier + imf:normalQualifier + imf:absoluteQualifier + imf:continuousQualifier + imf:designQualifier + imf:operatingQualifier + ) . + +[] + a owl:AllDisjointClasses ; + owl:members (imf:Aspect + imf:Attribute + imf:AttributeGroup + imf:AttributeQualifier + imf:TerminalQualifier + imf:Interest + imf:Modality + imf:InformationDomain + ) . + +[] + a owl:Restriction ; + rdfs:subClassOf imf:AspectElement ; + owl:onProperty imf:intraAspectRelation ; + owl:someValuesFrom imf:AspectElement . + +[] + a owl:AllDifferent ; + owl:members (imf:inputDirection + imf:outputDirection + ) . + +[] + a owl:AllDisjointClasses ; + owl:members (imf:ProvenanceQualifier + imf:RangeQualifier + imf:RegularityQualifier + imf:ScopeQualifier + ) . + +[] + a owl:AllDisjointClasses ; + owl:members (imf:Element + imf:Descriptor + imf:InformationModel + ) . + diff --git a/www/README.md b/www/README.md index c25f80c..532a5a9 100644 --- a/www/README.md +++ b/www/README.md @@ -2,6 +2,26 @@ 1) Run the dexpi.rdfox script, the documentation for this script is found [here](../rdfox/README.md) 2) Open the dexpi.html file in a browser 3) Select the boundary points and an internal component -- Right click to select or deselect the internal component -- Left click to select or deselect boundary nodes + - Ctrl+left click to select or deselect the internal component + 1) If the node is not a member of the internal class: + - Add the node to the internal class to indicate that it is selected + - Update rdfox with the following triple :nodeId a :insideBoundary . + 2) If the node is a member of the internal class: + - Remove the node from the internal class to indicate that it is deselected + - Update rdfox, delete the following triple :nodeId a :insideBoundary . + 3) If the node is not a member of the internal class, but is a member of the boundary class: + - Add the node to the internal class, and remove it from the boundary class. + - Update rdfox, insert the following triple :nodeId a :insideBoundary . + - Update rdfox, delete the following triple :nodeId a :boundary . + - Left click to select or deselect boundary nodes + 1) If the node is not a member of the boundary class: + - Add the node to the boundary class to indicate that it is selected + - Update rdfox with the following triple :nodeId a :boundary . + 2) If the node is a member of the boundary class: + - Remove the node from the boundary class to indicate that it is deselected + - Update rdfox, delete the following triple :nodeId a :boundary . + 3) If the node is not a member of the boundary class, but is a member of the internal class: + - Add the node to the boundary class, and remove it from the internal class. + - Update rdfox, insert the following triple :nodeId a :boundary . + - Update rdfox, delete the following triple :nodeId a :insideBoundary . 4) Hit enter to query RDFox for the boundary - the output of the query can be found in the logs. \ No newline at end of file diff --git a/www/script.js b/www/script.js index 5a1969d..f2249fe 100644 --- a/www/script.js +++ b/www/script.js @@ -1,102 +1,102 @@ -var nodes = document.querySelectorAll(".node"); +let nodes = document.querySelectorAll('.node'); -document.addEventListener("keyup", (event) => { - if (event.key === "Enter") { - console.log("enter pressed") - let query = 'SELECT ?node WHERE{?node a data:insideBoundary .}' - result = queryTripleStore(query) +nodes.forEach((node) => { + node.addEventListener('click', async (event) => { + await handleNodeClick(node, event); + await updateInCommissioningPackage(); + }); +}); + +window.addEventListener('load', async () => { + for (const node of nodes) { + await makeSparqlAndUpdateStore(node.id, 'delete', 'boundary'); + await makeSparqlAndUpdateStore(node.id, 'delete', 'insideBoundary'); + node.classList.remove('insideBoundary', 'boundary', 'inCommissioningPackage'); } }); -/** - * Left clicking is used to select or deselect nodes as boundries: - * 1) If the node is not a member of the boundary class: - * - Add the node to the boundary class to indicate that it is selected - * - Update rdfox with the following triple :nodeId a :boundary . - * 2) If the node is a member of the boundary class: - * - Remove the node from the boundary class to indicate that it is deselected - * - Update rdfox, delete the following triple :nodeId a :boundary . - * 3) If the node is not a member of the boundary class, but is a member of the internal class: - * - Add the node to the boundary class, and remove it from the internal class. - * * - Update rdfox, insert the following triple :nodeId a :boundary . - * - Update rdfox, delete the following triple :nodeId a :insideBoundary . - */ -nodes.forEach(function(node) { - node.addEventListener('click', () => { +async function handleNodeClick(node, event) { + // ctrl + left click - select or deselect nodes as insideBoundary + if (event.ctrlKey) { + if (node.classList.contains('insideBoundary')) { + node.classList.remove('insideBoundary', 'inCommissioningPackage'); + await makeSparqlAndUpdateStore(node.id, 'delete', 'insideBoundary'); + } else { + node.classList.add('insideBoundary'); + await makeSparqlAndUpdateStore(node.id, 'insert', 'insideBoundary'); + if (node.classList.contains('boundary')) { + node.classList.remove('boundary', 'inCommissioningPackage'); + await makeSparqlAndUpdateStore(node.id, 'delete', 'boundary'); + } + } + // left click - select or deselect nodes as boundary + } else { if (node.classList.contains('boundary')) { - node.classList.remove('boundary'); - let deleteSparql = `DELETE DATA {<${node.id}> a data:boundary . }`; - updateTripleStore(deleteSparql); + node.classList.remove('boundary', 'inCommissioningPackage'); + await makeSparqlAndUpdateStore(node.id, 'delete', 'boundary'); } else { node.classList.add('boundary'); - let insertSparql = `INSERT DATA { <${node.id}> a data:boundary . }`; - updateTripleStore(insertSparql); - if(node.classList.contains('internal')){ - node.classList.remove('internal'); - let deleteSparql = `DELETE DATA { <${node.id}> a data:insideBoundary . }`; - updateTripleStore(deleteSparql); + await makeSparqlAndUpdateStore(node.id, 'insert', 'boundary'); + if (node.classList.contains('insideBoundary')) { + node.classList.remove('insideBoundary', 'inCommissioningPackage'); + await makeSparqlAndUpdateStore(node.id, 'delete', 'insideBoundary'); } } - }); + } +} -/** - * Right clicking is used to select or deselect a node as internal: - * 1) If the node is not a member of the internal class: - * - Add the node to the internal class to indicate that it is selected - * - Update rdfox with the following triple :nodeId a :insideBoundary . - * 2) If the node is a member of the internal class: - * - Remove the node from the internal class to indicate that it is deselected - * - Update rdfox, delete the following triple :nodeId a :insideBoundary . - * 3) If the node is not a member of the internal class, but is a member of the boundary class: - * - Add the node to the internal class, and remove it from the boundary class. - * * - Update rdfox, insert the following triple :nodeId a :insideBoundary . - * - Update rdfox, delete the following triple :nodeId a :boundary . - */ - node.addEventListener('contextmenu', () => { - if (node.classList.contains('internal')) { - node.classList.remove('internal'); - let deleteSparql = `DELETE DATA {<${node.id}> a data:insideBoundary . }`; - updateTripleStore(deleteSparql) +async function updateInCommissioningPackage() { + if (checkOnlyInsideBoundary()) { return ;} + let query = 'SELECT ?node WHERE{?node a data:insideBoundary .}'; + let result = await queryTripleStore(query); + let nodeIds = parseNodeIds(result); + nodes.forEach(node => { + if (nodeIds.includes(node.id) && !node.classList.contains('boundary') && !node.classList.contains('insideBoundary')) { + node.classList.add('inCommissioningPackage'); } else { - node.classList.add('internal'); - let insertSparql = `INSERT DATA { <${node.id}> a data:insideBoundary . }`; - updateTripleStore(insertSparql); - if(node.classList.contains('boundary')){ - node.classList.remove('boundary'); - let deleteSparql = `DELETE DATA {<${node.id}> a data:boundary . }`; - updateTripleStore(deleteSparql); - } + node.classList.remove('inCommissioningPackage'); } - }) -}); + }); +} -function updateTripleStore(sparql) { - fetch('http://localhost:12110/datastores/boundaries/sparql', { - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - body: `update=${sparql}` - }) - .then(response => response.text()) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error('Error:', error); - }); +function parseNodeIds(result) { + let lines = result.split('\n').filter(line => line.trim() !== ''); + return lines.slice(1).map(line => line.replace(/[<>]/g, '')); } -function queryTripleStore(sparql) { - var encoded = encodeURI(sparql) - fetch(`http://localhost:12110/datastores/boundaries/sparql?query=${encoded}`, { - method: 'GET', - }) - .then(response => response.text()) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error('Error:', error); - }); -} \ No newline at end of file +function checkOnlyInsideBoundary() { + let hasBoundary = Array.from(nodes).some(node => node.classList.contains('boundary')); + let hasInsideBoundary = Array.from(nodes).some(node => node.classList.contains('insideBoundary')); + return hasInsideBoundary && !hasBoundary; +} + +async function makeSparqlAndUpdateStore(nodeId, action, type) { + let sparql = action === 'insert' + ? `INSERT DATA { <${nodeId}> a data:${type} . }` + : `DELETE DATA { <${nodeId}> a data:${type} . }`; + await updateTripleStore(sparql); +} + +async function updateTripleStore(sparql) { + try { + await fetch('http://localhost:12110/datastores/boundaries/sparql', { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded'}, + body: `update=${sparql}` + }); + } catch (error) { + console.error('Error:', error); + } +} + +async function queryTripleStore(sparql) { + try { + let encoded = encodeURI(sparql); + let response = await fetch(`http://localhost:12110/datastores/boundaries/sparql?query=${encoded}`, { + method: 'GET', + }); + return await response.text(); + } catch (error) { + console.error('Error:', error); + } +} diff --git a/www/style.css b/www/style.css index 0e0b393..2d65039 100644 --- a/www/style.css +++ b/www/style.css @@ -7,14 +7,12 @@ .boundary text { fill: #FF0000; - transition: 0.6s; } -.internal text { - fill: rgb(234, 255, 0); - transition: 0.6s; +.insideBoundary text { + fill: rgb(34 244 18); } -.package text { - fill: rgb(5, 109, 5) +.inCommissioningPackage text { + fill: rgb(112 237 240); }