It's all about the answers!

Ask a question

Creating Collection artifact using OSLC


Mustafa Askin (108412) | asked Apr 06 '18, 3:29 p.m.

 Hi,


I couldn't create a collection artifact as I want.

I create a Collection artifact manually with following properties.
Type:Collection
Format:Collection

Then I get collection xml with http get.

After I took xml content of Collection artifact. I delete following line then I post xml as it is.

<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">5016</dcterms:identifier> (This is artifact ID, I don't need this while creating a new one)

A new artifact is created but following properties.
Type:Collection
Format:Text

Why ? Why OSLC created artifact format is TEXT ? 
I post with 
"</oslc_rm:RequirementCollection>" & "<rdf:type rdf:resource="http://jazz.net/ns/rm#Collection"/>" tags
but created artifact has "</oslc_rm:Requirement>" & "<rdf:type rdf:resource="http://jazz.net/ns/rm#Text"/>" tags which I did not set.

PS: DOORS version is  6.0.4 iFix006

Any help would be appreciated.

Mustafa Askin


Comments
Donald Nong commented Apr 09 '18, 3:42 a.m.

I can see the same thing and something is not quite right. I have the below two lines in the POST data along with <oslc:instanceShape>
    <rdf:type rdf:resource="http://jazz.net/ns/rm#Collection"/>
    <rdf:type rdf:resource="https://ibm.com/domain/collection"/>
but the resulting artifact has the below content
    <rdf:type rdf:resource="http://jazz.net/ns/rm#Text" />
    <rdf:type rdf:resource="https://ibm.com/domain/collection" />
I'm using DNG 6.0.5 iFix003a.

I suggest you contact IBM Support.

One answer



permanent link
Jim Amsden (19336) | answered Apr 06 '18, 4:04 p.m.

 the dcterms:identifier is not the URI for the collection, its just the identifier in the context of the project area. You need to POST a new resource with a blank node for the identifier (the resource URI). Something like:


<rdf:RDF

    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

    xmlns:dc="http://purl.org/dc/terms/"

    xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/"

  <rdf:Description rdf:nodeID="A0">

    <dc:title>Some new resource</dc:title>

    <dc:description>To check the Contributes To on a REST created Work Item</dc:description>

    <rdf:type rdf:resource="http://open-services.net/rm#RequirementCollection"/>

  </rdf:Description>

</rdf:RDF>



Your answer


Register or to post your answer.