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 (47427) | 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 (27837) | answered Jun 25 '19, 7:27 a.m.

See 5.2 Property Constraints for details about standard OSLC properties.



Comments
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 (764) | answered Jul 17 '19, 9:24 a.m.

 Hiroaki,


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.

Cheers,
Andrew
(Eclipse Lyo project lead)


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

Andrew
Thanks Followed.

I understand the items to check.
I want to get oslc: maxsize, but the shape XML did not contain this property.
ex.
https://jazz.server/ccm/oslc/context/_ziwZ-4xeEeaxEP_v24d1Ow/shapes/workitems/defect
(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="http://open-services.net/ns/core#Property" />
    <oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
    <oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:readOnly>
    <oslc:propertyDefinition rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/key_word" />
    <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one" />
    <oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">key_word</oslc:name>
    <oslc:defaultValue></oslc:defaultValue>
    <dcterms:title rdf:parseType="Literal">Key Word</dcterms:title>
  </rdf:Description>

no property "oslc: maxsize"


Comments
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.