I would like to dive a bit deeper. I want to separate the results into the 
value and the unit e.g. value = 1.04 and the unit is kilogram. I made a 
constraint where the units for class* a* and* b* should be the same units 
(so similar as previously described - and solved - problem). The difference 
for this case however is that instances for* b* can have different values 
for those units (where in the previous case both value and unit should be 
the same), so it would look something like this:

test:a
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:label "a" ;
  rdfs:subClassOf owl:Thing ;
  sh:property test:a_has_units ;
.

test:b
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:label "b" ;
  rdfs:subClassOf owl:Thing ;
  sh:property test:b_has_units ;
  sh:property test:b_has_values_for_units ;
.

Where *a_has_units = b_has_units* and *b_has_values_for_units* should 
contain *decimals *linked to those units. So it would look something like 
this for the instances:

*instance test_units:*
test:bee2c6e0-2c15-11b2-80f2-005056bba47c
  rdf:type test:unit ;
  test:has_unit1 kilogram ;
  test:has_unit2 deciliter ;
  test:has_unit3 meter ;
  rdfs:label "test_units" ;
.

*instance_a:*
test:a91bea78-2c0b-11b2-809c-005056bba47c
  rdf:type test:a ;
  test:a_has_units test:bee2c6e0-2c15-11b2-80f2-005056bba47c ;
  rdfs:label "instance_a" ;
.

*instance_b:*
test:bee2c6d6-2c15-11b2-80f2-005056bba47c
  rdf:type test:b ;
  test:b_has_unit test:bee2c6e0-2c15-11b2-80f2-005056bba47c ;
  test:b_has_values_for_units test:bee2c6e0-2c15-11b2-80f2-005056bba50c ;
  rdfs:label "instance_b" ;
.

*instance test_values_for_units:*
test:bee2c6e0-2c15-11b2-80f2-005056bba50c
  rdf:type test:value ;
  test:has_value1 20.5 ; (note this should somehow indicate/link to 
kilogram)
  test:has_value2 40.0 ; (note this should somehow indicate/link to 
deciliter)
  test:has_value3 3.0 ; (note this should somehow indicate/link to meter)
  rdfs:label "test_values_for_units" ;
.

The reason I would like to have such a structure is that *b *can have 
multiple instances with different values, but these instances should always 
contain the same type of units that are found in the instance for *a *and 
can not have more values than there are units. Let's write the case in 
noncode-format:

a has:
- kilogram
- deciliter
- meter

b1 has:
- 1.04 kilogram
- 3.00 deciliter
- 0.58 meter

b2 has:
- 20 kilogram
- 40 deciliter
- 3 meter

b3 has: (when validating this should raise two errors: the units differ 
from *a* and there is one extra value)
- 11.2 kilogram
- 3.1 deciliter
- 0.95 nanometer
- 2.23 meter

Could any of you think of solutions for this? 

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/64428d4e-72b1-498c-8eee-5d96642e0c92%40googlegroups.com.

Reply via email to