How to find if an artifact has links or not in DNG?
One answer
Do you mean outgoing links (those stored in DN), incoming links (stored in other applications linking to a requirement), or both?
For incoming links, since DN does not manage or persist that data, it won't be part of the RDF of a requirement and you would have to query LQE (or LDX) for that data.
For outgoing links, a GET on the requirement should produce RDF that includes the outgoing links for that requirement. You will need to use the Oslc-Core-Version=2.0 header on the GET request.
Comments
Thanks for the info... But when a GET on requirement is fetched do we get to know it has outgoing link in below format??
You inspect the RDF of that fetched requirement to see what statements, if any, are made using the requirement's concept URI. This is as described by the OSLC Requirement Management specification. If you want to know which properties represent relationships, you discover the OSLC resource shape for that artifact (typically referenced by an oslc:instanceShape statement), and then GET that resource shape to examine its declared OSLC properties. See OSLC Core Version 3.0. Part 6: Resource Shape. If you know the predicates of the relationships you are interested in, you can simply look for RDF statements made using those predicates against the requirement concept URI subject.