Modified:
/trunk/simplegraph.class.php
=======================================
--- /trunk/simplegraph.class.php Tue Aug 2 08:53:06 2011
+++ /trunk/simplegraph.class.php Thu Sep 29 03:36:55 2011
@@ -1357,37 +1357,30 @@
function get_sequence_values($sequenceUri) {
$triples = $this->get_index();
- $properties = array();
+ $found_values = array();
if (isset($triples[$sequenceUri]))
{
foreach ($triples[$sequenceUri] as $property => $objects)
{
- if (strpos($property, RDF_) !== false)
- {
- $key = substr($property, strpos($property, '_') + 1
);
- $value = $this->get_first_resource($sequenceUri,
$property);
-
-
- if (empty($value))
- {
- $value = $this->get_first_literal($sequenceUri,
$property);
- }
-
- $properties[$key] = $value;
- }
- }
-
- ksort($properties, SORT_NUMERIC);
- }
-
- $values = array();
-
- foreach($properties as $key=>$value)
- {
+ if (strpos($property, RDF_) !== false)
+ {
+ $key = substr($property, strpos($property, '_') + 1 );
+ foreach ($objects as $object)
+ {
+ $found_values[$key][] = $object['value'];
+ }
+ }
+ }
+ ksort($found_values, SORT_NUMERIC);
+ }
+ foreach($found_values as $key_values)
+ {
+ foreach($key_values as $value)
+ {
$values[] = $value;
- }
-
+ }
+ }
return $values;
}