It's all about the answers!

Ask a question

(RTC Process Data) We want to get "attribute type" , when we use REST API

HIROAKI JOSAKO (47327) | asked Jun 24 '19, 9:15 p.m.

InstanceShape can not get information of "attribute type".
Is there any way to get data size etc. and check it?

In the API, it is summarized as follows.
ex. small string, medium string-> string
enumerations, enumerations list-> reteral
  html, medium html-> XML

3 answers

permanent link
Jim Amsden (26837) | answered Jun 25 '19, 7:27 a.m.

See 5.2 Property Constraints for details about standard OSLC properties.

HIROAKI JOSAKO commented Jun 26 '19, 4:52 a.m.

Hi Jim
Thank you comment
As.. not exist links "5.2 Property Constraints" URL
Please Again URL

HIROAKI JOSAKO commented Jun 26 '19, 8:42 p.m.

Hi Ralph.

Thank you!! take a URL.

As long as you read the document,
Does it mean that you can not confirm RTC-specific Type?
ex. bytesize Small String <-> Medium String,
       list type Contributor <-> Enumerations

I want to know, how to check if the String type is Small, Medium or Large.

permanent link
Andrew Berezovskyi (763) | answered Jul 17 '19, 9:24 a.m.


I think what Jim meant is that you have to fetch the RDF for the shape of the answer (not the answer itself) and check its "oslc:maxSize" property for the string (and have a custom code to infer small/medium/large string format).

Same should work for HTML. I have no idea how to deal with the enumerations.

(Eclipse Lyo project lead)

permanent link
HIROAKI JOSAKO (47327) | answered Jul 18 '19, 9:32 p.m.

Thanks Followed.

I understand the items to check.
I want to get oslc: maxsize, but the shape XML did not contain this property.
(defect shape info)
attribute "key_word" datatype:small string
  <rdf:Description rdf:about="https://jazz.server/ccm2/oslc/context/_ziwZ-4xeEeaxEP_v24d1Ow/shapes/workitems/defect/property/key_word">
    <rdf:type rdf:resource="" />
    <oslc:valueType rdf:resource="" />
    <oslc:readOnly rdf:datatype="">false</oslc:readOnly>
    <oslc:propertyDefinition rdf:resource="" />
    <oslc:occurs rdf:resource="" />
    <oslc:name rdf:datatype="">key_word</oslc:name>
    <dcterms:title rdf:parseType="Literal">Key Word</dcterms:title>

no property "oslc: maxsize"

Andrew Berezovskyi commented Jul 25 '19, 6:05 a.m.

I am afraid with the approach I have suggested you can either ask the product people to add those properties to the OSLC responses of the products in question or to hardcode the mapping of the property names to attribute types (but I guess you did that in the meantime already).

HIROAKI JOSAKO commented Jul 25 '19, 8:28 p.m.

Hi Andrew!!

Thank you very much.
It means that you can not achieve the purpose if it is as it is.
Ask to product support.

Your answer

Register or to post your answer.