Hi Phil,

I think this is probably the problem:

https://github.com/swordapp/JavaServer2.0/blob/master/src/main/java/org/swordapp/server/AtomStatement.java#L58

(and similarly in the ORE format)

There's no way to actually serialise the properties on the resource part.
 You'd probably want to either patch the AtomStatement, or extend it with
our own implementation which is returned by the StatementManagerImpl.

Cheers,

Richard



On 19 June 2014 14:58, Philip Durbin <philip_dur...@harvard.edu> wrote:

> Question about https://github.com/swordapp/JavaServer2.0
>
> I was originally hoping to expose more metadata about files (besides
> MediaType) and took a couple runs at using properties on a
> ResourcePart but it doesn't seem show in the Atom statement.
>
> This is what I have commented out (with a todo) at
>
> https://github.com/IQSS/dataverse/blob/77b981d85014a622f8ce0de8e7a23c22e2b73ae1/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/StatementManagerImpl.java#L133
>
> /**
>  * @todo: Why are properties set on a ResourcePart not
>  * exposed when you GET a Statement?
>  */
> Map<String, String> properties = new HashMap<String, String>();
> properties.put("filename", studyFile.getFileName());
> properties.put("category", studyFile.getLatestCategory());
> properties.put("originalFileType", studyFile.getOriginalFileType());
> properties.put("id", studyFile.getId().toString());
> properties.put("UNF", studyFile.getUnf());
> resourcePart.setProperties(properties);
> statement.addResource(resourcePart);
>
> I was hoping this would show up in each <entry> for a file.
>
> Any advice here? Is this just a dumb Java coding error on my part?
> What are properties for? Thanks!
>
> Phil
>
> --
> Philip Durbin
> Software Developer for http://thedata.org
> http://www.iq.harvard.edu/people/philip-durbin
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> sword-app-tech mailing list
> sword-app-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sword-app-tech
>



-- 

Richard Jones,

Founder, Cottage Labs
t: @richard_d_jones, @cottagelabs
w: http://cottagelabs.com
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

Reply via email to