RM: OSLC fetch all properties ref IDs for a given artifact type
Problem: There's no indication of the name of the artifact type; thus, I cannot narrow the set of attributes that are relevant to a particular NAMED artifact (as opposed to using the ID).
So... can anyone articulate how to get fetch the oslc:property tuples (i.e. all the attribute defs) for a SINGLE NAMED artifact type in RM?
One answer
Are you looking for a way to identify which named artifact type does the resource shape belong to, on a resource shape URI?
I don't see a way to do that directly without doing a get on the resource shape URI. But the result of GET on resource shape URI does have a tuple that would allow you to identify which named artifact type's properties they are, along with the bunch of oslc:properties it gets:
Comments
Funny how when you step away and then look again, you see it. Yes, the dc:title is in fact in there as a peer item to the oslc:property items (which irritatingly enough are not wrapped as a collection similar to other calls). For some reason I simply did not see it before.
So I whipped it up and now it works. I get the resourceShapes from the creationFactory, then iterate over them, ignoring all but the dc:title of the desired artifact type. Functionally OK but there can be a performance hit, especially since my custom artifacts tend to end up at the BOTTOM of the list.
Thanks.