Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php |
— | — | @@ -1119,4 +1119,19 @@ |
1120 | 1120 | return $recordSet; |
1121 | 1121 | } |
1122 | 1122 | |
| 1123 | +function getDefiningExpressionRecord($definedMeaningId) { |
1123 | 1124 | |
| 1125 | + global |
| 1126 | + $definedMeaningCompleteDefiningExpressionAttribute, |
| 1127 | + $definedMeaningDefiningExpressionAttribute, |
| 1128 | + $expressionIdAttribute, |
| 1129 | + $languageAttribute; |
| 1130 | + |
| 1131 | + $definingExpression=definingExpressionRow($definedMeaningId); |
| 1132 | + $definingExpressionRecord = new ArrayRecord($definedMeaningCompleteDefiningExpressionAttribute->type); |
| 1133 | + $definingExpressionRecord->setAttributeValue($expressionIdAttribute, $definingExpression[0]); |
| 1134 | + $definingExpressionRecord->setAttributeValue($definedMeaningDefiningExpressionAttribute, $definingExpression[1]); |
| 1135 | + $definingExpressionRecord->setAttributeValue($languageAttribute, $definingExpression[2]); |
| 1136 | + return $definingExpressionRecord; |
| 1137 | + |
| 1138 | +} |
\ No newline at end of file |
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php |
— | — | @@ -30,8 +30,8 @@ |
31 | 31 | $alternativeDefinitionsAttribute, $synonymsAndTranslationsAttribute, |
32 | 32 | $relationsAttribute, $reciprocalRelationsAttribute, |
33 | 33 | $classMembershipAttribute, $collectionMembershipAttribute, $definedMeaningAttributesAttribute, |
34 | | - $possiblySynonymousAttribute; |
35 | | - |
| 34 | + $possiblySynonymousAttribute, $definedMeaningCompleteDefiningExpressionAttribute; |
| 35 | + |
36 | 36 | if (is_null($viewInformation)) { |
37 | 37 | $viewInformation = new ViewInformation(); |
38 | 38 | $viewInformation->queryTransactionInformation= new QueryLatestTransactionInformation(); |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | #wfDebug("definedMeaningId:$definedMeaningId, filterLanguageId:$viewInformation->filterLanguageId, possiblySynonymousRelationTypeId:$viewInformation->possiblySynonymousRelationTypeId, queryTransactionInformation:$viewInformation->queryTransactionInformation\n"); |
42 | 42 | $this->setDefinedMeaningID($definedMeaningId); |
43 | 43 | $record = new ArrayRecord($definedMeaningAttribute->type); |
| 44 | + $record->setAttributeValue($definedMeaningCompleteDefiningExpressionAttribute, getDefiningExpressionRecord($definedMeaningId)); |
44 | 45 | $record->setAttributeValue($definitionAttribute, getDefinedMeaningDefinitionRecord($definedMeaningId, $viewInformation)); |
45 | 46 | $record->setAttributeValue($classAttributesAttribute, getClassAttributesRecordSet($definedMeaningId, $viewInformation)); |
46 | 47 | $record->setAttributeValue($alternativeDefinitionsAttribute, getAlternativeDefinitionsRecordSet($definedMeaningId, $viewInformation)); |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -59,10 +59,22 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | global |
63 | | - $definedMeaningIdAttribute, $definedMeaningDefiningExpressionAttribute; |
| 63 | + $definedMeaningIdAttribute, $definedMeaningDefiningExpressionAttribute, |
| 64 | + $definedMeaningCompleteDefiningExpressionStructure, |
| 65 | + $definedMeaningCompleteDefiningExpressionAttribute; |
64 | 66 | |
65 | 67 | $definedMeaningIdAttribute = new Attribute("defined-meaning-id", "Defined meaning identifier", "defined-meaning-id"); |
66 | 68 | $definedMeaningDefiningExpressionAttribute = new Attribute("defined-meaning-defining-expression", "Defined meaning defining expression", "short-text"); |
| 69 | + |
| 70 | + $definedMeaningCompleteDefiningExpressionStructure = |
| 71 | + new Structure("defined-meaning-full-defining-expression", |
| 72 | + $definedMeaningDefiningExpressionAttribute, |
| 73 | + $expressionIdAttribute, |
| 74 | + $languageAttribute |
| 75 | + ); |
| 76 | + $definedMeaningCompleteDefiningExpressionAttribute=new Attribute(null, "Defining expression", $definedMeaningCompleteDefiningExpressionStructure); |
| 77 | + |
| 78 | + |
67 | 79 | |
68 | 80 | global |
69 | 81 | $definedMeaningReferenceStructure, $definedMeaningLabelAttribute, $definedMeaningReferenceType, |