lists and sequences to moriarty

1 view
Skip to first unread message

Keith Alexander

unread,
Mar 9, 2010, 10:56:41 AM3/9/10
to moriar...@googlegroups.com, andre...@talis.com, Ian Davis
How about adding some code to SimpleGraph to make dealing with lists
and sequences easier ?
The Aspire team have written code for manipulating rdf:Sequences
http://pastebin.com/cNaTi7UZ (methods like add_resource_to_sequence,
remove_resource_from_sequence, get_sequence_values)
and I've written some methods for converting rdf:Lists to arrays

I propose we all the methods in 'ExtendedGraph' over to SimpleGraph,
and I add my rdf:List code too.

Currently it is called list_to_array($listUri)

but it would be better if the naming was aligned with the naming of
the sequences code - so get_list_values($listUri) ?

an alternative would be (more complicated, but closer to the rest of
simplegraph) to differentiate between resource and literal values in
the function name

like:

get_list_resource_values
get_list_literal_values
get_sequence_resource_values
get_sequence_literal_values

but that, as well as probably not being a useful distinction, also
gives priority to value type over list/sequence order, so maybe the
simpler get_*_values is better.

Thoughts?

Keith

Keith Alexander

unread,
Mar 9, 2010, 11:10:51 AM3/9/10
to moriar...@googlegroups.com, andre...@talis.com, Ian Davis

Keith Alexander

unread,
Mar 9, 2010, 11:15:51 AM3/9/10
to moriar...@googlegroups.com, andre...@talis.com, Ian Davis

Rob Styles

unread,
Mar 9, 2010, 5:59:33 PM3/9/10
to moriar...@googlegroups.com
sounds like a great idea to me.

rob

--
You received this message because you are subscribed to the Google Groups "moriarty-dev" group.
To post to this group, send email to moriar...@googlegroups.com.
To unsubscribe from this group, send email to moriarty-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/moriarty-dev?hl=en.




--
Rob Styles
http://dynamicorange.com

astilla

unread,
Mar 10, 2010, 8:18:05 AM3/10/10
to moriarty-dev
We have unit tests for those functions in ExtendedGraph too - may be a
few holes but not bad. So those would get pushed into Moriarty too if
it happened.

Happy to consider renaming functions if it fits in with Moriarty
better and we could upgrade at leisure (we currently extern to a fixed
revision of Moriarty to shield ourselves from bleeding-edge changes).

Ian Davis

unread,
Mar 10, 2010, 8:21:15 AM3/10/10
to moriar...@googlegroups.com
Yes I'd love to see these kind of functions go into moriarty. Provided
they are thoroughly unit tested!

Reply all
Reply to author
Forward
0 new messages