Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -416,20 +416,20 @@ |
417 | 417 | global |
418 | 418 | $definedMeaningReferenceType; |
419 | 419 | |
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); |
422 | 422 | $definedMeaningReferenceType = $t->definedMeaningReferenceStructure; |
423 | 423 | $t->definedMeaningReference = new Attribute("definedMeaningReference", wfMsg("DefinedMeaningReference"), $definedMeaningReferenceType); |
424 | 424 | $t->collectionId = new Attribute("collectionId", "Collection", "collection-id"); |
425 | 425 | $t->collectionMeaning = new Attribute("collectionMeaning", wfMsg("Collection"), $t->definedMeaningReferenceStructure); |
426 | 426 | $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); |
428 | 428 | $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); |
430 | 430 | $t->collectionMembership = new Attribute("collectionMembership", wfMsg("CollectionMembership"), $t->collectionMembershipStructure); |
431 | 431 | $t->classMembershipId = new Attribute("classMembershipId", "Class membership id", "integer"); |
432 | 432 | $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); |
434 | 434 | $t->classMembership = new Attribute("classMembership", wfMsg("ClassMembership"), $t->classMembershipStructure); |
435 | 435 | |
436 | 436 | global |
— | — | @@ -437,9 +437,7 @@ |
438 | 438 | |
439 | 439 | $t->possiblySynonymousId = new Attribute("possiblySynonymousId", "Possibly synonymous id", "integer"); |
440 | 440 | $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); |
444 | 442 | $t->possiblySynonymous = new Attribute("possiblySynonymous", wfMsg("PossiblySynonymous"), $t->possiblySynonymousStructure); |
445 | 443 | |
446 | 444 | global |
— | — | @@ -456,7 +454,7 @@ |
457 | 455 | $t->relations = new Attribute("relations", wfMsg("Relations"), $t->relationStructure); |
458 | 456 | $t->reciprocalRelations = new Attribute("reciprocalRelations", wfMsg("IncomingRelations"), $t->relationStructure); |
459 | 457 | $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); |
461 | 459 | |
462 | 460 | $t->definitionId = new Attribute("definitionId", "Definition identifier", "integer"); |
463 | 461 | |
— | — | @@ -470,7 +468,7 @@ |
471 | 469 | global |
472 | 470 | $wgAlternativeDefinitionsAttributeId; |
473 | 471 | |
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); |
475 | 473 | $t->alternativeDefinitions = new Attribute("alternativeDefinitions", wfMsg("AlternativeDefinitions"), $t->alternativeDefinitionsStructure); |
476 | 474 | |
477 | 475 | global |
— | — | @@ -484,7 +482,7 @@ |
485 | 483 | $t->attributeObject = new Attribute("attributeObject", "Attribute object", "object-id"); |
486 | 484 | |
487 | 485 | $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); |
489 | 487 | $t->synonymsAndTranslations = new Attribute("synonymsAndTranslations", "$synonymsAndTranslationsCaption", $t->synonymsTranslationsStructure); |
490 | 488 | $t->translatedTextAttributeId = new Attribute("translatedTextAttributeId", "Attribute identifier", "object-id"); |
491 | 489 | $t->translatedTextAttribute = new Attribute("translatedTextAttribute", wfMsg("TranslatedTextAttribute"), $definedMeaningReferenceType); |
— | — | @@ -500,7 +498,7 @@ |
501 | 499 | $t->textAttributeId = new Attribute("textAttributeId", "Attribute identifier", "object-id"); |
502 | 500 | $t->textAttributeObject = new Attribute("textAttributeObject", "Attribute object", "object-id"); |
503 | 501 | $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); |
505 | 503 | $t->textAttributeValues = new Attribute("textAttributeValues", wfMsg("TextAttributeValues"), $t->textAttributeValuesStructure); |
506 | 504 | $t->linkLabel = new Attribute("linkLabel", "Label", "short-text"); |
507 | 505 | $t->linkURL = new Attribute("linkURL", "URL", "url"); |
— | — | @@ -518,7 +516,7 @@ |
519 | 517 | $t->optionAttributeValuesStructure = new Structure("optionAttributeValues", $t->optionAttributeId, $t->optionAttribute, $t->optionAttributeObject, $t->optionAttributeOption, $t->objectAttributes); |
520 | 518 | $t->optionAttributeValues = new Attribute("optionAttributeValues", wfMsg("OptionAttributeValues"), $t->optionAttributeValuesStructure); |
521 | 519 | $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); |
523 | 521 | $t->optionAttributeOptions = new Attribute("optionAttributeOptions", wfMsg("OptionAttributeOptions"), $t->optionAttributeOptionsStructure); |
524 | 522 | |
525 | 523 | if ($viewInformation->filterOnLanguage() && !$viewInformation->hasMetaDataAttributes()) |
— | — | @@ -535,7 +533,7 @@ |
536 | 534 | $t->classAttributeAttribute = new Attribute("classAttributeAttribute", wfMsg("ClassAttributeAttribute"), $t->definedMeaningReferenceStructure); |
537 | 535 | $t->classAttributeLevel = new Attribute("classAttributeLevel", wfMsg("ClassAttributeLevel"), $t->definedMeaningReferenceStructure); |
538 | 536 | $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); |
540 | 538 | $t->classAttributes = new Attribute("classAttributes", wfMsg("ClassAttributes"), $t->classAttributesStructure); |
541 | 539 | |
542 | 540 | $t->definedMeaning = new Attribute("definedMeaning", wfMsg("DefinedMeaning"), |
— | — | @@ -554,20 +552,19 @@ |
555 | 553 | ) |
556 | 554 | ); |
557 | 555 | |
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); |
559 | 557 | $t->expressionExactMeanings = new Attribute("expressionExactMeanings", wfMsg("ExactMeanings"), $t->expressionMeaningStructure); |
560 | 558 | $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); |
563 | 560 | $t->expressionMeanings = new Attribute("expressionMeanings", wfMsg("ExpressionMeanings"), $t->expressionMeaningsStructure); |
564 | 561 | $t->expressionsStructure = new Structure("expressions", $t->expressionId, $t->expression, $t->expressionMeanings); |
565 | 562 | $t->expressions = new Attribute("expressions", wfMsg("Expressions"), $t->expressionsStructure); |
566 | 563 | $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); |
568 | 565 | $t->objectAttributes->setAttributeType($t->objectAttributesStructure); |
569 | 566 | $t->definedMeaningAttributes->setAttributeType($t->objectAttributesStructure); |
570 | 567 | |
571 | | - $t->annotatedAttributes = array( |
| 568 | + $annotatedAttributes = array( |
572 | 569 | $t->definedMeaning, |
573 | 570 | $t->definition, |
574 | 571 | $t->synonymsAndTranslations, |
— | — | @@ -583,7 +580,7 @@ |
584 | 581 | $attribute = $propertyToColumnFilter->getAttribute(); |
585 | 582 | $attribute->setAttributeType($t->objectAttributesStructure); |
586 | 583 | |
587 | | - foreach ($t->annotatedAttributes as $annotatedAttribute) |
| 584 | + foreach ($annotatedAttributes as $annotatedAttribute) |
588 | 585 | $annotatedAttribute->type->addAttribute($attribute); |
589 | 586 | } |
590 | 587 | } |