DNG v7.0.2: Unclear ID when adding a term link with OSLC API
Hello everybody,
I'm trying to programmatically with OSLC add a link to some existing term in DNG module. I have sent GET request, modified the body of a resource, and finally trying to send PUT request as prescribed.
Partially, the content to PUT is like next:
...
<rdf:Description rdf:nodeID="A2"><jazz_rm:primaryText rdf:parseType="Literal"> <div xmlns="http://www.w3.org/1999/xhtml"> <p dir="ltr" id="_1634550900066"> If we want to make a term then <a href="https://win-olemig:9443/rm/resources/TX_UfRoECqNEeyX9sJ60m8STg" id="_1634553234800">Business Recovery Matters</a> can be most appropriate candidate. Term <span title="Business Recovery Matters"> <a href="https://win-olemig:9443/rm/resources/TX_UfRoECqNEeyX9sJ60m8STg" id="_1634553246847">Business Recovery Matters</a> </span> can be met secondly, and much more times in the text as needed. </p> <p dir="ltr" id="_1634558606926"> And one more <a href="https://win-olemig:9443/rm/resources/TX_UfRoECqNEeyX9sJ60m8STg" id="">Business Recovery Matters</a> for testing! </p> </div>
<rdf:subject rdf:resource="https://win-olemig:9443/rm/resources/TX_Nh95cC_4EeyE757DKrVYXA" />
<rdf:predicate rdf:resource="http://www.ibm.com/xmlns/rdm/types/Link" />
<rdf:object rdf:resource="https://win-olemig:9443/rm/resources/TX_UfEzwCqNEeyX9sJ60m8STg" />
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" />
<dcterms:title>85</dcterms:title>
</rdf:Description>
...
</jazz_rm:primaryText>
...
<rdf:Description rdf:nodeID="A3">
<rdf:subject rdf:resource="https://win-olemig:9443/rm/resources/TX_Nh95cC_4EeyE757DKrVYXA" />
<rdf:predicate rdf:resource="http://www.ibm.com/xmlns/rdm/types/ArtifactTermReferenceLink" />
<rdf:object rdf:resource="https://win-olemig:9443/rm/resources/TX_UfRoECqNEeyX9sJ60m8STg" />
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" />
<dcterms:title>https://win-olemig:9443/rm/resources/TX_UfRoECqNEeyX9sJ60m8STg</dcterms:title>
</rdf:Description>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/">
<rdf:Description>
<err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>cvc-attribute.3: The value '' of attribute 'id' on element 'a' is not valid with respect to its type, 'ID'.,cvc-datatype-valid.1.2.1: '' is not a valid value for 'NCName'.</err:detailedMessage>
<err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Bad Request</err:errorMessage>
<err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
>400</err:errorStatus>
</rdf:Description>
</rdf:RDF>
Could anybody provide any link or simple explanation where it can be found.
Thank you very much in advance!
One answer
When adding a relationship between artifacts, you only add the assertion for the relationship, you don't add the reified statements describing that assertion. So for example, say you did a GET for work item with URL https://host:port/project/id and you want to add a resolved by link to another work item. You would add the following triple:
Comments
Hi Jim,
Thank you for your answer. But my confusion is a bit another one. Sorry that I was not clear enough to explain my problem.|
I'm following in the way like you mentioned - making GET and sending the following PUT to update a resource.
But when I add it with OSLC, those links aren't bind. I must to remove it first in primary text and second in Links section.
So if not ID then what is responsible for that behavior? Or ID is?