It's all about the answers!

Ask a question

Compact resource not correctly outputted by DOORS NG server.


Benjamin Röhl (1671425) | asked Feb 23 '15, 7:53 a.m.
Hello,

I tried to read the Compact resource, which can be requested by any OSLC resource (e.g. requirement)
with the accept media type "application/x-oslc-compact+xml".
I'm using the OSLC4JMarshaller from the org.eclipse.lyo.core.utils package to read the responded resource.

The Compact entity is read but the contained small and large Preview objects properties are all set to null.

This is the current Compact resource responded by DOORSNG 5.0.1.0
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dcterms="http://purl.org/dc/terms/"
	xmlns:oslc="http://open-services.net/ns/core#">
<oslc:Compact rdf:about="https://jazz:9443/rm/resources/_KVy1UD8sEeSZxPPkdZ-lVg">
	<dcterms:title>14&amp;#58;&amp;#32;Fog&amp;#32;Lights</dcterms:title>
	<oslc:shortTitle>14</oslc:shortTitle>
	<oslc:icon rdf:resource="https://jazz:9443/rm/images/richtext.gif"/>
	<oslc:smallPreview rdf:parseType="Resource">
		<oslc:Preview rdf:parseType="Resource">
			<oslc:document rdf:resource="https://jazz:9443/rm/resources/_KVy1UD8sEeSZxPPkdZ-lVg/compact/html?hover=small"/>
			<oslc:hintWidth>600</oslc:hintWidth>
			<oslc:hintHeight>600</oslc:hintHeight>
			<oslc:initialHeight>125</oslc:initialHeight>
		</oslc:Preview>
	</oslc:smallPreview>
</oslc:Compact>
</rdf:RDF>

Could you please submit a bug?

Thanks in advance!


Comments
Mike Jaworski commented Feb 23 '15, 8:36 a.m.
JAZZ DEVELOPER

Hi Benjamin,

I'm not sure I understand the problem - the data you've posted here looks well-formed to me. What entity are you seeing that is set to "null"? Do you receive any sort of failure response from the server? Are there any entries in the RM log file which might shed more light on the problem?

I would also suggest attempting to rich hover the artifact in question from the DNG web client in your browser. If the rich hover does not work from there, then it seems like this may be a valid defect.

Thanks,
Mike


Benjamin Röhl commented Feb 23 '15, 9:01 a.m.

The problem is the rdf:parseType attribute for oslc:smallPreview and oslc:Preview.
These let the RDF parser not correctly read the resource, especially the Preview object. The OSLC Core specification does not apply to this.

I tried to parse the Compact resource with the lyo reference implementation.
I already modified the rdf/xml from the compact resource by removing the rdf:parseType="Resource" attribute. Then the Preview object is defined correct.



Mike Jaworski commented Feb 23 '15, 9:44 a.m.
JAZZ DEVELOPER

Benjamin,

This would seem to suggest that your RDF parser is not actually attempting to parse RDF. Aside from a few capitalization issues in the document you provided (not sure why that is happening, because the DNG server should be returning proper capitalization) running this data through an RDF validator returns valid input (see http://www.w3.org/RDF/Validator/). The rdf:parseType="Resource" attribute is valid RDF, and as far as I can see it is using it in the proper context, so it looks like DNG is returning the correct information.

Perhaps you could try providing a bit more information about how you are attempting to parse the RDF document?

Accepted answer


permanent link
Mike Jaworski (1.4k6) | answered Feb 23 '15, 10:44 a.m.
JAZZ DEVELOPER
Hi Benjamin,

I apologize for the run-around in the comments earlier - you are correct that this appears to be a valid defect against DNG. I spoke with Sam Padgett from the Eclipse Lyo and OSLC team, and he mentioned that while the RDF returned by DNG is not invalid, it does not conform to the OSLC spec and subsequently breaks Lyo when attempting to parse the document (just like you mentioned earlier). I've created a defect to address this situation: 95019: DNG compact rendering documents should not use rdf:parseType="Resource" for small and large preview resources.

Again, I'm sorry for my confusion earlier, and I hope this defect is able to correct the behavior you are observing (it should be delivered to the 6.0 release of DNG).

Thanks,
Mike Jaworski
Benjamin Röhl selected this answer as the correct answer

Comments
Benjamin Röhl commented Feb 23 '15, 11:15 a.m.

No problem, thanks for the bug report!

I tried to submit a bug via https://jazz.net/mystuff/#tab=workitems by myself but was stopped by missing license.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.