r24783 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24782‎ | r24783 | r24784 >
Date:10:25, 14 August 2007
Author:proes
Status:old
Tags:
Comment:
Changed structure names to camel case.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -416,20 +416,20 @@
417417 global
418418 $definedMeaningReferenceType;
419419
420 - $t->definedMeaningLabel = new Attribute("defined-meaning-label", "Defined meaning label", "short-text");
421 - $t->definedMeaningReferenceStructure = new Structure("defined-meaning", $t->definedMeaningId, $t->definedMeaningLabel, $t->definedMeaningDefiningExpression);
 420+ $t->definedMeaningLabel = new Attribute("definedMeaningLabel", "Defined meaning label", "short-text");
 421+ $t->definedMeaningReferenceStructure = new Structure("definedMeaning", $t->definedMeaningId, $t->definedMeaningLabel, $t->definedMeaningDefiningExpression);
422422 $definedMeaningReferenceType = $t->definedMeaningReferenceStructure;
423423 $t->definedMeaningReference = new Attribute("definedMeaningReference", wfMsg("DefinedMeaningReference"), $definedMeaningReferenceType);
424424 $t->collectionId = new Attribute("collectionId", "Collection", "collection-id");
425425 $t->collectionMeaning = new Attribute("collectionMeaning", wfMsg("Collection"), $t->definedMeaningReferenceStructure);
426426 $t->sourceIdentifier = new Attribute("sourceIdentifier", wfMsg("SourceIdentifier"), "short-text");
427 - $t->gotoSourceStructure = new Structure("goto-source",$t->collectionId, $t->sourceIdentifier);
 427+ $t->gotoSourceStructure = new Structure("gotoSource", $t->collectionId, $t->sourceIdentifier);
428428 $t->gotoSource = new Attribute("gotoSource", wfMsg("GotoSource"), $t->gotoSourceStructure);
429 - $t->collectionMembershipStructure = new Structure("collection-membership",$t->collectionId, $t->collectionMeaning, $t->sourceIdentifier);
 429+ $t->collectionMembershipStructure = new Structure("collectionMembership",$t->collectionId, $t->collectionMeaning, $t->sourceIdentifier);
430430 $t->collectionMembership = new Attribute("collectionMembership", wfMsg("CollectionMembership"), $t->collectionMembershipStructure);
431431 $t->classMembershipId = new Attribute("classMembershipId", "Class membership id", "integer");
432432 $t->class = new Attribute("class", "Class", $t->definedMeaningReferenceStructure);
433 - $t->classMembershipStructure = new Structure("class-membership", $t->classMembershipId, $t->class);
 433+ $t->classMembershipStructure = new Structure("classMembership", $t->classMembershipId, $t->class);
434434 $t->classMembership = new Attribute("classMembership", wfMsg("ClassMembership"), $t->classMembershipStructure);
435435
436436 global
@@ -437,9 +437,7 @@
438438
439439 $t->possiblySynonymousId = new Attribute("possiblySynonymousId", "Possibly synonymous id", "integer");
440440 $t->possibleSynonym = new Attribute("possibleSynonym", wfMsg("PossibleSynonym"), $t->definedMeaningReferenceStructure);
441 - # Bug found ... This never worked before: (!)
442 - #$t->possiblySynonymousStructure = new Structure("possibly-synonymous", $t->possiblySynonymousId, $t->possiblySynonymous);
443 - $t->possiblySynonymousStructure = new Structure("possibly-synonymous", $t->possiblySynonymousId, $t->possibleSynonym);
 441+ $t->possiblySynonymousStructure = new Structure("possiblySynonymous", $t->possiblySynonymousId, $t->possibleSynonym);
444442 $t->possiblySynonymous = new Attribute("possiblySynonymous", wfMsg("PossiblySynonymous"), $t->possiblySynonymousStructure);
445443
446444 global
@@ -456,7 +454,7 @@
457455 $t->relations = new Attribute("relations", wfMsg("Relations"), $t->relationStructure);
458456 $t->reciprocalRelations = new Attribute("reciprocalRelations", wfMsg("IncomingRelations"), $t->relationStructure);
459457 $t->translatedTextId = new Attribute("translatedTextId", "Translated text ID", "integer");
460 - $t->translatedTextStructure = new Structure("translated-text", $t->language, $t->text);
 458+ $t->translatedTextStructure = new Structure("translatedText", $t->language, $t->text);
461459
462460 $t->definitionId = new Attribute("definitionId", "Definition identifier", "integer");
463461
@@ -470,7 +468,7 @@
471469 global
472470 $wgAlternativeDefinitionsAttributeId;
473471
474 - $t->alternativeDefinitionsStructure = new Structure("alternative-definitions", $t->definitionId, $t->alternativeDefinition, $t->source);
 472+ $t->alternativeDefinitionsStructure = new Structure("alternativeDefinitions", $t->definitionId, $t->alternativeDefinition, $t->source);
475473 $t->alternativeDefinitions = new Attribute("alternativeDefinitions", wfMsg("AlternativeDefinitions"), $t->alternativeDefinitionsStructure);
476474
477475 global
@@ -484,7 +482,7 @@
485483 $t->attributeObject = new Attribute("attributeObject", "Attribute object", "object-id");
486484
487485 $t->syntransId = new Attribute("syntransId", "$synonymsAndTranslationsCaption identifier", "integer");
488 - $t->synonymsTranslationsStructure = new Structure("synonyms-translations", $t->syntransId, $t->expression, $t->identicalMeaning, $t->objectAttributes);
 486+ $t->synonymsTranslationsStructure = new Structure("synonymsTranslations", $t->syntransId, $t->expression, $t->identicalMeaning, $t->objectAttributes);
489487 $t->synonymsAndTranslations = new Attribute("synonymsAndTranslations", "$synonymsAndTranslationsCaption", $t->synonymsTranslationsStructure);
490488 $t->translatedTextAttributeId = new Attribute("translatedTextAttributeId", "Attribute identifier", "object-id");
491489 $t->translatedTextAttribute = new Attribute("translatedTextAttribute", wfMsg("TranslatedTextAttribute"), $definedMeaningReferenceType);
@@ -500,7 +498,7 @@
501499 $t->textAttributeId = new Attribute("textAttributeId", "Attribute identifier", "object-id");
502500 $t->textAttributeObject = new Attribute("textAttributeObject", "Attribute object", "object-id");
503501 $t->textAttribute = new Attribute("textAttribute", wfMsg("TextAttribute"), $t->definedMeaningReferenceStructure);
504 - $t->textAttributeValuesStructure = new Structure("text-attribute-values", $t->textAttributeId, $t->textAttributeObject, $t->textAttribute, $t->text, $t->objectAttributes);
 502+ $t->textAttributeValuesStructure = new Structure("textAttributeValues", $t->textAttributeId, $t->textAttributeObject, $t->textAttribute, $t->text, $t->objectAttributes);
505503 $t->textAttributeValues = new Attribute("textAttributeValues", wfMsg("TextAttributeValues"), $t->textAttributeValuesStructure);
506504 $t->linkLabel = new Attribute("linkLabel", "Label", "short-text");
507505 $t->linkURL = new Attribute("linkURL", "URL", "url");
@@ -518,7 +516,7 @@
519517 $t->optionAttributeValuesStructure = new Structure("optionAttributeValues", $t->optionAttributeId, $t->optionAttribute, $t->optionAttributeObject, $t->optionAttributeOption, $t->objectAttributes);
520518 $t->optionAttributeValues = new Attribute("optionAttributeValues", wfMsg("OptionAttributeValues"), $t->optionAttributeValuesStructure);
521519 $t->optionAttributeOptionId = new Attribute("optionAttributeOptionId", "Option identifier", "object-id");
522 - $t->optionAttributeOptionsStructure = new Structure("option-attribute-options", $t->optionAttributeOptionId, $t->optionAttribute, $t->optionAttributeOption, $t->language);
 520+ $t->optionAttributeOptionsStructure = new Structure("optionAttributeOptions", $t->optionAttributeOptionId, $t->optionAttribute, $t->optionAttributeOption, $t->language);
523521 $t->optionAttributeOptions = new Attribute("optionAttributeOptions", wfMsg("OptionAttributeOptions"), $t->optionAttributeOptionsStructure);
524522
525523 if ($viewInformation->filterOnLanguage() && !$viewInformation->hasMetaDataAttributes())
@@ -535,7 +533,7 @@
536534 $t->classAttributeAttribute = new Attribute("classAttributeAttribute", wfMsg("ClassAttributeAttribute"), $t->definedMeaningReferenceStructure);
537535 $t->classAttributeLevel = new Attribute("classAttributeLevel", wfMsg("ClassAttributeLevel"), $t->definedMeaningReferenceStructure);
538536 $t->classAttributeType = new Attribute("classAttributeType", wfMsg("ClassAttributeType"), "short-text");
539 - $t->classAttributesStructure = new Structure("class-attributes", $t->classAttributeId, $t->classAttributeAttribute, $t->classAttributeLevel, $t->classAttributeType, $t->optionAttributeOptions);
 537+ $t->classAttributesStructure = new Structure("classAttributes", $t->classAttributeId, $t->classAttributeAttribute, $t->classAttributeLevel, $t->classAttributeType, $t->optionAttributeOptions);
540538 $t->classAttributes = new Attribute("classAttributes", wfMsg("ClassAttributes"), $t->classAttributesStructure);
541539
542540 $t->definedMeaning = new Attribute("definedMeaning", wfMsg("DefinedMeaning"),
@@ -554,20 +552,19 @@
555553 )
556554 );
557555
558 - $t->expressionMeaningStructure = new Structure("expression-exact-meanings", $t->definedMeaningId, $t->text, $t->definedMeaning);
 556+ $t->expressionMeaningStructure = new Structure("expressionExactMeanings", $t->definedMeaningId, $t->text, $t->definedMeaning);
559557 $t->expressionExactMeanings = new Attribute("expressionExactMeanings", wfMsg("ExactMeanings"), $t->expressionMeaningStructure);
560558 $t->expressionApproximateMeanings = new Attribute("expressionApproximateMeanings", wfMsg("ApproximateMeanings"), $t->expressionMeaningStructure);
561 - # bug found here also: $t->expressionAoproximateMeaning_S_
562 - $t->expressionMeaningsStructure = new Structure("expression-meanings", $t->expressionExactMeanings, $t->expressionApproximateMeanings);
 559+ $t->expressionMeaningsStructure = new Structure("expressionMeanings", $t->expressionExactMeanings, $t->expressionApproximateMeanings);
563560 $t->expressionMeanings = new Attribute("expressionMeanings", wfMsg("ExpressionMeanings"), $t->expressionMeaningsStructure);
564561 $t->expressionsStructure = new Structure("expressions", $t->expressionId, $t->expression, $t->expressionMeanings);
565562 $t->expressions = new Attribute("expressions", wfMsg("Expressions"), $t->expressionsStructure);
566563 $t->objectId = new Attribute("objectId", "Object identifier", "object-id");
567 - $t->objectAttributesStructure = new Structure("object-attributes", $t->objectId, $t->textAttributeValues, $t->translatedTextAttributeValues, $t->optionAttributeValues, $t->linkAttributeValues);
 564+ $t->objectAttributesStructure = new Structure("objectAttributes", $t->objectId, $t->textAttributeValues, $t->translatedTextAttributeValues, $t->optionAttributeValues, $t->linkAttributeValues);
568565 $t->objectAttributes->setAttributeType($t->objectAttributesStructure);
569566 $t->definedMeaningAttributes->setAttributeType($t->objectAttributesStructure);
570567
571 - $t->annotatedAttributes = array(
 568+ $annotatedAttributes = array(
572569 $t->definedMeaning,
573570 $t->definition,
574571 $t->synonymsAndTranslations,
@@ -583,7 +580,7 @@
584581 $attribute = $propertyToColumnFilter->getAttribute();
585582 $attribute->setAttributeType($t->objectAttributesStructure);
586583
587 - foreach ($t->annotatedAttributes as $annotatedAttribute)
 584+ foreach ($annotatedAttributes as $annotatedAttribute)
588585 $annotatedAttribute->type->addAttribute($attribute);
589586 }
590587 }

Status & tagging log