Hi Ludovic
 
You can use the getObjectXML method to get the full FOXML, however that's not very efficient as you'll get the full FOXML including all history.
 
Unfortunately the getObjectProfile method does not return the state property.  However you can use findObjects to get the state.
 
An alternative would be to use the Resource Index if you have that enabled, and for instance search for the pattern using one of:
 
TQL:
select $state from <#ri>
where <info:fedora/demo:object> <info:fedora/fedora-system:def/model#state> $state
 
SPO:
<info:fedora/demo:ingest> <info:fedora/fedora-system:def/model#state> *
(replacing <info:fedora/demo:ingest with the URI of your object)
 
You can find other object properties using this method also.
 
Regards
Steve

 
 
 
-----Original Message-----
From: Ludovic Deravet [mailto:ludovicderavet@gmail.com]
Sent: 25 November 2010 10:33
To: fedora-commons-users@lists.sourceforge.net
Subject: [fcrepo-user] How to access property's value definedobjectProperties?

Hello,

I'm searching a way to extract from digital objects properties stored into the <foxml:objectProperties> segment.

<foxml:objectProperties>
   <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="A"/>
   <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="MyLabel"/>   
</foxml:objectProperties>

I tried to find a way to easy extract from digital objects the value from property label, for instance, but couldn't find a way to do it through the API.

Am I missing something here? How can I extract the value of such property?

Thank you.
--
Ludovic