Permalink
Browse files

Extends alsfrs.xml with typeparameters

  • Loading branch information...
1 parent 682c69a commit 741ff05f66027c4fdfeb2acf923398b5ac03d626 @k00ni k00ni committed Nov 13, 2011
Showing with 123 additions and 5 deletions.
  1. +14 −3 classes/Formula.php
  2. +56 −2 classes/XmlConfig.php
  3. +53 −0 xmlconfigurationfiles/alsfrs.xml
View
@@ -26,7 +26,9 @@ public function __construct($index, $selectedModel)
{
$this->_data = array ();
- $this->setIndex ($index);
+ $this->setIndex ($index);
+ $this->_data ['targetclass'] = '';
+ $this->_data ['labelparts'] = array ();
$this->_data ['title'] = '';
$this->_data ['description'] = '';
$this->_data ['mode'] = 'new';
@@ -594,15 +596,15 @@ public function getPredicateValue ($index)
return '';
}
+
/**
* replace the architecture namespace string with the correct uri
* @param $s
* @return string
*/
public function replaceNamespaces($s)
{
-
- $namespaceUri = "";
+ $namespaceUri = '';
// fetch properties of a resource
$result = $this->_selectedModel->sparqlQuery(
@@ -617,4 +619,13 @@ public function replaceNamespaces($s)
return str_replace('architecture:', $namespaceUri, $s);
}
+
+
+ /**
+ *
+ */
+ public function generateAlsfrsPredicates ()
+ {
+
+ }
}
View
@@ -109,7 +109,61 @@ public function loadFile ($file, &$form)
// set typeparameters
switch ( $type )
- {
+ {
+ // ALSFRS: complex structure of relations and instances
+ case 'alsfrs':
+
+ $typeparameter ['predicateToHealthState'] = (string)
+ $predicate->typeparameter->predicateToHealthState;
+
+ $typeparameter ['healthState'] = $predicate->typeparameter->healthState;
+
+ $typeparameter ['predicateToPropertySet'] = (string)
+ $predicate->typeparameter->predicateToPropertySet;
+
+ $typeparameter ['propertySet'] = $predicate->typeparameter->propertySet;
+
+ $typeparameter ['predicateToSymptomSet'] = (string)
+ $predicate->typeparameter->predicateToSymptomSet;
+
+ $typeparameter ['symptomSet'] = $predicate->typeparameter->symptomSet;
+
+ $typeparameter ['predicateToPropertyOption'] = (string)
+ $predicate->typeparameter->predicateToPropertyOption;
+
+ $typeparameter ['predicateToSymptomOption'] = (string)
+ $predicate->typeparameter->predicateToSymptomOption;
+
+ // topic
+ $typeparameter ['topic'] = (string)
+ $predicate->typeparameter->topic;
+
+ $typeparameter ['topicLabel'] = (string)
+ $predicate->typeparameter->topicLabel;
+
+ $typeparameter ['topicSuggestedQuestion'] = (string)
+ $predicate->typeparameter->topicSuggestedQuestion;
+
+ $typeparameter ['topicHasOption'] = (string)
+ $predicate->typeparameter->topicHasOption;
+
+ // option
+ $typeparameter ['option'] = (string)
+ $predicate->typeparameter->option;
+
+ $typeparameter ['optionLabel'] = (string)
+ $predicate->typeparameter->optionLabel;
+
+ // clear assignment which topics are SymptomOptions
+ foreach ($predicate->typeparameter->pertainsToSymptomSet->item as $parameter)
+ $typeparameter ['pertainsToSymptomSet'][] = (string) $parameter;
+
+ // clear assignment which topics are PropertyOptions
+ foreach ($predicate->typeparameter->pertainsToPropertySet->item as $parameter)
+ $typeparameter ['pertainsToPropertySet'][] = (string) $parameter;
+
+ break;
+
case 'date':
break;
@@ -132,7 +186,7 @@ public function loadFile ($file, &$form)
}
break;
- default: // xsd:string
+ default:
break;
}
@@ -24,6 +24,59 @@
<!-- Textfield -->
<predicate>
<type>alsfrs</type>
+ <typeparameter>
+
+ <!-- Patientresource has healthStateInstance -->
+ <predicateToHealthState>has</predicateToHealthState>
+ <healthState>http://als.dispedia.info/wrapperAlsfrs/c/20111105/ALSFRSHealthState</healthState>
+
+ <!-- healthStateInstance includesAffectedProperties ALSFRSPropertySet -->
+ <predicateToPropertySet>http://als.dispedia.info/architecture/c/20110827/includesAffectedProperties</predicateToPropertySet>
+ <propertySet>http://als.dispedia.info/wrapperAlsfrs/c/20111105/ALSFRSPropertySet</propertySet>
+
+ <!-- healthStateInstance includesSymptoms ALSFRSSymptomSet-Instance -->
+ <predicateToSymptomSet>http://als.dispedia.info/architecture/c/20110827/includesSymptoms</predicateToSymptomSet>
+ <symptomSet>http://als.dispedia.info/wrapperAlsfrs/c/20111105/ALSFRSSymptomSet</symptomSet>
+
+ <!-- ALSFRSPropertySet-Instance containsPropertyOption Option-Instance -->
+ <predicateToPropertyOption>http://als.dispedia.info/wrapperAlsfrs/c/20111105/containsPropertyOption</predicateToPropertyOption>
+
+ <!-- ALSFRSSymptomSet-Instance containsSymptomOption Option-Instance -->
+ <predicateToSymptomOption>http://als.dispedia.info/wrapperAlsfrs/c/20111105/containsSymptomOption</predicateToSymptomOption>
+
+ <!-- Topic related stuff -->
+ <topic>http://als.dispedia.info/frs/o/Topic</topic>
+ <topicLabel>http://www.w3.org/2000/01/rdf-schema#label</topicLabel>
+ <topicSuggestedQuestion>http://als.dispedia.info/frs/o/suggestedQuestion</topicSuggestedQuestion>
+ <topicHasOption>http://als.dispedia.info/frs/o/hasOption</topicHasOption>
+
+ <!-- Option related stuff -->
+ <option>http://als.dispedia.info/frs/o/Option</option>
+ <optionLabel>http://www.w3.org/2000/01/rdf-schema#label</optionLabel>
+ <optionHasScore>http://als.dispedia.info/frs/o/hasScore</optionHasScore>
+
+ <!-- clear assignment which topics are SymptomOptions -->
+ <pertainsToSymptomSet>
+ <item>http://als.dispedia.info/frs/i/topic/t2</item>
+ <item>http://als.dispedia.info/frs/i/topic/t4</item>
+ <item>http://als.dispedia.info/frs/i/topic/t8</item>
+ <item>http://als.dispedia.info/frs/i/topic/t10</item>
+ <item>http://als.dispedia.info/frs/i/topic/t11</item>
+ </pertainsToSymptomSet>
+
+ <!-- clear assignment which topics are PropertyOptions -->
+ <pertainsToPropertySet>
+ <item>http://als.dispedia.info/frs/i/topic/t1</item>
+ <item>http://als.dispedia.info/frs/i/topic/t3</item>
+ <item>http://als.dispedia.info/frs/i/topic/t5a</item>
+ <item>http://als.dispedia.info/frs/i/topic/t5b</item>
+ <item>http://als.dispedia.info/frs/i/topic/t6</item>
+ <item>http://als.dispedia.info/frs/i/topic/t7</item>
+ <item>http://als.dispedia.info/frs/i/topic/t9</item>
+ <item>http://als.dispedia.info/frs/i/topic/t12</item>
+ </pertainsToPropertySet>
+
+ </typeparameter>
</predicate>
</item>

0 comments on commit 741ff05

Please sign in to comment.