Skip to content

Commit

Permalink
Update Reference type and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yauhenikapl committed Jun 24, 2024
1 parent 1e9fcdd commit 5fc6a36
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 176 deletions.
5 changes: 2 additions & 3 deletions documentation/modules/ROOT/examples/reference-declaration.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# tag::content[]
:TestReference a samm-c:Reference ;
samm:dataType xsd:string ;
samm-c:referenceValue "urn:samm:com.example:1.0.0#otherProperty" .
:TestProperty a samm:Property ;
samm:characteristic samm-c:Reference .
# end::content[]
11 changes: 0 additions & 11 deletions documentation/modules/ROOT/pages/characteristics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,6 @@ of another aspect within a different twin.

See xref:modeling-guidelines.adoc#declaring-reference[declaring Reference] for usage in an Aspect Model.

[width="100%", options="header", cols="30,60,10"]
|===
| Attributes | Description | Required
| `samm-c:dataType` | The `samm-c:dataType` provided from `Characteristic` has to explain
type of the xref:modeling-guidelines.adoc#declaring-reference[Reference].
It can be `https://www.w3.org/TR/xmlschema11-2/#string[xsd:string]` for the text references or
`https://www.w3.org/TR/xmlschema11-2/#anyURI[xsd:anyURI]` for the references to the properties. | {ok}
| `samm-c:referenceValue` | The `samm-c:referenceValue` is set to a URN, but it could be any value,
including a URI, a literal, or another entity. | {ok}
|===

[[characteristics-instances]]
== Characteristics Instances

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ samm-c:StructuredValue rdfs:subClassOf samm:Characteristic ;
rdfs:label "StructuredValue" ;
rdfs:comment "Describes how the value of a Property is structured from parts."@en .

samm-c:Reference rdfs:subClassOf samm:Characteristic ;
rdfs:label "Reference" ;
rdfs:comment "Defines a unique type of Property. This reference can either be a global reference, such as a URN, or it can refer to a property of another aspect within a different twin."@en .

# Constraints
samm-c:RangeConstraint rdfs:subClassOf samm:Constraint ;
rdfs:label "RangeConstraint" ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ samm-c:MimeType a samm:Characteristic ;
samm:description """A MIME type as defined in RFC 2046, for example "application/pdf"."""@en ;
samm:dataType xsd:string .

samm-c:Reference a samm:Characteristic ;
samm:preferredName "Reference"@en ;
samm:description "Defines a unique type of Property. This reference can either be a global reference, such as a URN, or it can refer to a property of another aspect within a different twin."@en ;
samm:dataType xsd:anyURI .

Original file line number Diff line number Diff line change
Expand Up @@ -768,14 +768,6 @@ samm-c:StructuredValueShape
] ;
] .

samm-c:ReferenceShape
a sh:NodeShape ;
sh:targetClass samm-c:Reference ;
sh:property [
sh:path samm-c:referenceValue ;
sh:name "referenceValue" ;
] .

samm-c:FixedPointConstraintShape
a sh:NodeShape ;
sh:targetClass samm-c:FixedPointConstraint ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,4 @@ class ReferenceShapeTest extends AbstractShapeTest {
void testValidReferenceExpectSuccess( final KnownVersion metaModelVersion ) {
checkValidity( "reference-shape", "TestReference", metaModelVersion );
}

@ParameterizedTest
@MethodSource( value = "versionsStartingWith2_2_0" )
void testValidReferenceWithEntityExpectSuccess( final KnownVersion metaModelVersion ) {
checkValidity( "reference-shape", "TestReferenceWithEntityReferenceType", metaModelVersion );
}

@ParameterizedTest
@MethodSource( value = "versionsStartingWith2_2_0" )
void testValidReferenceWithPropertyExpectSuccess( final KnownVersion metaModelVersion ) {
checkValidity( "reference-shape", "TestReferenceWithPropertyReferenceType", metaModelVersion );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.2.0#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:TestReference a samm-c:Reference ;
samm:dataType xsd:string ;
samm-c:referenceValue "urn:samm:com.example:1.0.0#otherProperty" .
:TestProperty a samm:Property ;
samm:characteristic samm-c:Reference .

This file was deleted.

This file was deleted.

0 comments on commit 5fc6a36

Please sign in to comment.