Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qudt:Quantity vs qudt:QuantityValue #785

Open
dr-shorthair opened this issue Oct 17, 2023 · 3 comments
Open

qudt:Quantity vs qudt:QuantityValue #785

dr-shorthair opened this issue Oct 17, 2023 · 3 comments

Comments

@dr-shorthair
Copy link
Contributor

I have a feeling this has been answered before, but I can't find it.

At https://github.com/qudt/qudt-public-repo/wiki/User-Guide-for-QUDT#1-simple-use-case the basic pattern for a QUDT encoded Quantity instance is shown thus:

wiki-examples:MyThermostatSetting a qudt:Quantity ;
    qudt:unit unit:DEG_F ;
    qudt:value "72.0"^^xsd:float ;
.

However, looking at the OWL I see that a qudt:Quantity may have a qudt:quantityValue property whose range is expected to be a qudt:QuantityValue. (Note that qudt:unit and qudt:value are not mentioned in the OWL.)

Then the definition of qudt:QuantityValue is

A Quantity Value expresses the magnitude and kind of a quantity and is given by the product of a numerical value n and a unit of measure U. The number multiplying the unit is referred to as the numerical value of the quantity expressed in that unit. Refer to <a href="http://physics.nist.gov/Pubs/SP811/sec07.html\">NIST SP 811 section 7 for more on quantity values.

This seems to be the same as qudt:Quantity except without the QuantityKind reference. Is that correct?

This also seems to imply alternative serialisations:

wiki-examples:MyThermostatSetting a qudt:QuantityValue ;
    qudt:unit unit:DEG_F ;
    qudt:value "72.0"^^xsd:float ;
.

or

wiki-examples:MyThermostatSetting a qudt:Quantity ;
    qudt:quantityValue [ 
        a qudt:QuantityValue ;
        qudt:unit unit:DEG_F ;
        qudt:value "72.0"^^xsd:float ;
    ]
.

Which is recommended? Am I missing something here?

@steveraysteveray
Copy link
Collaborator

Just a bit lower in the wiki is this section. Does it answer your question?

@dr-shorthair
Copy link
Contributor Author

Yes - it helps a bit. Quantity is the concept (and may/should have a quantityKind), QuantityValue is a specifically scaled value.
But if the value for the Quantity is only available with one uom, then the Quantity/quantityValue/QuantityValue form can be shortened to just Quantity ??

Also: the example you refer to uses qudt:hasUnit. Is that preferred to qudt:unit ?

@steveraysteveray
Copy link
Collaborator

Yes, that is the intent. Just one uom, you can use qudt:value and qudt:hasUnit directly. With multiple uoms, use qudt:quantityValue.

Also, yes, we are migrating toward qudt:hasUnit instead of qudt:unit for consistency with qudt:hasQuantityKind, as of Release 2.1.28

(Now that you mention it, maybe we should also migrate qudt:value to qudt:hasValue...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants