Topic
  • 5 replies
  • Latest Post - ‏2017-06-19T20:54:31Z by MartinBurch
SanjaySThakur
SanjaySThakur
9 Posts

Pinned topic TRIRIGA OSLC Interface: - Resource Attribute Sequence

‏2017-06-13T10:51:49Z | integration oslc

Is there any way we can specify sequence of resource attributes to appear in JSON formatted get query output .?

We are looking for pre-define set of resource attributes order to appear in OSLC get query output

Updated on 2017-06-13T11:02:50Z at 2017-06-13T11:02:50Z by SanjaySThakur
  • MartinBurch
    MartinBurch
    75 Posts

    Re: TRIRIGA OSLC Interface: - Resource Attribute Sequence

    ‏2017-06-13T23:44:41Z  

    You should be able to use the oslc.orderBy parameter to define the ordering of results https://www.ibm.com/support/knowledgecenter/en/SSHEB3_3.5.2/com.ibm.tap.doc/con_oslc/r_oslc_query_params.html

    If you are talking about default ordering without that parameter, then I think the query definition of the query capability should define the ordering.

  • SanjaySThakur
    SanjaySThakur
    9 Posts

    Re: TRIRIGA OSLC Interface: - Resource Attribute Sequence

    ‏2017-06-14T07:31:45Z  

    You should be able to use the oslc.orderBy parameter to define the ordering of results https://www.ibm.com/support/knowledgecenter/en/SSHEB3_3.5.2/com.ibm.tap.doc/con_oslc/r_oslc_query_params.html

    If you are talking about default ordering without that parameter, then I think the query definition of the query capability should define the ordering.

    Thanks Martin for the response ,

    oslc.orderBy parameter do the shorting/ order by on property resource attribute VALUE .We looking for property resource attribute name serialization . 

    Yes ,We defined sequence on attributes in OSLC get query capability native report but in JSON formatted output they are appearing in altogether in different sequence .

  • MartinBurch
    MartinBurch
    75 Posts

    Re: TRIRIGA OSLC Interface: - Resource Attribute Sequence

    ‏2017-06-14T20:01:35Z  

    Thanks Martin for the response ,

    oslc.orderBy parameter do the shorting/ order by on property resource attribute VALUE .We looking for property resource attribute name serialization . 

    Yes ,We defined sequence on attributes in OSLC get query capability native report but in JSON formatted output they are appearing in altogether in different sequence .

    It's determined by the associated properties to the Oslc Shape, but it is not specified by the query section order, so whatever ordering is returned by the database query of the property records will be the order of the properties.  I do not see any way to determine the order right now.

  • SanjaySThakur
    SanjaySThakur
    9 Posts

    Re: TRIRIGA OSLC Interface: - Resource Attribute Sequence

    ‏2017-06-15T07:55:48Z  

    It's determined by the associated properties to the Oslc Shape, but it is not specified by the query section order, so whatever ordering is returned by the database query of the property records will be the order of the properties.  I do not see any way to determine the order right now.

    I see a method called Serialization called in "com.tririga.platform.integration.oslc.handler.JSONQuerySerializer"  to build get query payload ,

    Unfortunately don;t have access to class and can't see the logic defined in this method as on what basis it serialize shape associated properties order .

  • MartinBurch
    MartinBurch
    75 Posts

    Re: TRIRIGA OSLC Interface: - Resource Attribute Sequence

    ‏2017-06-19T20:54:31Z  

    I see a method called Serialization called in "com.tririga.platform.integration.oslc.handler.JSONQuerySerializer"  to build get query payload ,

    Unfortunately don;t have access to class and can't see the logic defined in this method as on what basis it serialize shape associated properties order .

    There is no logic to that class that controls order.  The JSON elements are sequentially added internally in TRIRIGA, and the order is determined by retrieving the associated property records to an OSLC shape record.  The design does not presume any particular ordering.  I suggest opening an RFE to have the OSLC API provide some way of controlling the order of properties.