[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cosmos-dev] graphQuery questions
|
Title: graphQuery questions
Hi David
While testing an ER, I noticed a few issues related to the CMDBf services.
The first is that the Example MDR and the SML MDR both return “graphQueryResponseType” as the root element name in the graphQuery response (see below). My interpretation of the CMDBf spec is that the root element name should be “queryResult” instead of “graphQueryResponseType”. I think it’s important that COSMOS adheres to the exact letter of the spec to ensure maximum compatibility. Is this a known issue?
The second is that the CMDBf query transformations had SAX parsing problems processing the graphQuery response. When I looked at the code, I found a method in the AbstractFederatingCMDB.java called cleanseResponse(), with a comment describing it as a workaround for 217141:
/**
* This method should not be needed. It is currently here as
* a workaround to the following defect: https://bugs.eclipse.org/bugs/show_bug.cgi?id=217141
*
* @param queryResponse The query response
* @return Cleansed version of the response
*/
private Element cleanseResponse(Element queryResponse)
I needed to implement this workaround to avoid the parsing problems in the CMDBf query transformation services. Since the bug was closed in i9, why is the workaround still required?
The third question is for Sheldon. After building and running several queries, the navigator tree displays the query nodes in the UI. I can select any of the query nodes to display the results in the details window very nicely. But after a while, I got confused about which query I used for each query node and had to rerun them to be sure. Do you think the UI should be able to show the original query request?
Regards
Bill
<?xml version="1.0" encoding="UTF-8"?><dyn:graphQueryResponseType xmlns:dyn="http://www.eclipse.org/cosmos/mdrquery" xmlns:cmdbf="http://cmdbf.org/schema/1-0-0/datamodel">
<cmdbf:nodes templateId="items">
<cmdbf:item>
<cmdbf:record xmlns="http://school">
<student>
<identity firstName="Mike" id="03" lastName="Lee"/>
</student>
<cmdbf:recordMetadata>
<cmdbf:recordId>03</cmdbf:recordId>
</cmdbf:recordMetadata>
</cmdbf:record>
<cmdbf:instanceId>
<cmdbf:mdrId>org.eclipse.cosmos.samples.cmdbf.XMLRepository</cmdbf:mdrId>
<cmdbf:localId>03</cmdbf:localId>
</cmdbf:instanceId>
</cmdbf:item>
<cmdbf:item>
<cmdbf:record xmlns="http://school">
<student>
<identity firstName="Jane" id="02" lastName="Ryerson"/>
</student>
<cmdbf:recordMetadata>
<cmdbf:recordId>02</cmdbf:recordId>
</cmdbf:recordMetadata>
</cmdbf:record>
<cmdbf:instanceId>
<cmdbf:mdrId>org.eclipse.cosmos.samples.cmdbf.XMLRepository</cmdbf:mdrId>
<cmdbf:localId>02</cmdbf:localId>
</cmdbf:instanceId>
</cmdbf:item>
<cmdbf:item>
<cmdbf:record xmlns="http://school">
<student>
<identity firstName="Bob" id="01" lastName="Davidson"/>
</student>
<cmdbf:recordMetadata>
<cmdbf:recordId>01</cmdbf:recordId>
</cmdbf:recordMetadata>
</cmdbf:record>
<cmdbf:instanceId>
<cmdbf:mdrId>org.eclipse.cosmos.samples.cmdbf.XMLRepository</cmdbf:mdrId>
<cmdbf:localId>01</cmdbf:localId>
</cmdbf:instanceId>
</cmdbf:item>
</cmdbf:nodes>
</dyn:graphQueryResponseType>