Why is Property::AllowedValues empty?

Hi,

Here I have a resource shape property from DOORS:

    <oslc:property>
      <oslc:Property>
        <oslc:propertyDefinition rdf:resource="https://192.168.99.3:9443/rm/types/AD_cJ08jZbBEeyYHZXkfFQaAg"/>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
        <oslc:defaultValue rdf:resource="https://192.168.99.3:9443/rm/types/AT_cJ08q5bBEeyYHZXkfFQaAg#_cJ08rpbBEeyYHZXkfFQaAg"/>
        <oslc:allowedValues>
          <oslc:AllowedValues>
            <oslc:allowedValue rdf:resource="https://192.168.99.3:9443/rm/types/AT_cJ08q5bBEeyYHZXkfFQaAg#_cJ08rpbBEeyYHZXkfFQaAg"/>
            <oslc:allowedValue rdf:resource="https://192.168.99.3:9443/rm/types/AT_cJ08q5bBEeyYHZXkfFQaAg#_cJ08rZbBEeyYHZXkfFQaAg"/>
            <oslc:allowedValue rdf:resource="https://192.168.99.3:9443/rm/types/AT_cJ08q5bBEeyYHZXkfFQaAg#_cJ08rJbBEeyYHZXkfFQaAg"/>
          </oslc:AllowedValues>
        </oslc:allowedValues>
        <oslc:name>AD_cJ08jZbBEeyYHZXkfFQaAg</oslc:name>
        <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
        <dcterms:title rdf:parseType="Literal">Risk Status</dcterms:title>
        <dcterms:description rdf:parseType="Literal"></dcterms:description>
        <oslc:range rdf:resource="https://192.168.99.3:9443/rm/types/AT_cJ08q5bBEeyYHZXkfFQaAg"/>
      </oslc:Property>
    </oslc:property>

This really represents a kind of enumeration property which, I think, can only be determined by recognizing the hash character in the AllowedValue URIs.

But this far I don’t come with Lyo. All the Properties of the ResourceShape are missing both the entire allowed values information. Property.getAllowedValuesRef() always returns null, Property.getAllowedValuesCollection() always returns an empty collection, and Property.getAllowedValues() is deprecated (looking at the implementation it must return an empty String array).

Am I doing something wrong?
How can I get access to the AllowedValues information?

Hi

I did some simple test, and I can reproduce the issue when trying to marshall this shape into a Property.

This is my first guess, but it looks like the Property class in lyo i expecting the AllowedValues resource to be a proper resource and not a blank node as is given in your sample data.

You can see that in the annotations on getAllowedValuesRef().

Compare for example with

The OSLC spec says that oslc:allowedValues has a representation of Reference, meaning it must be a URI, and cannot be inlined as a blank node. So that example oslc:Property looks invalid. If it came from DOORS Next, you should submit a defect against DOORS Next.