| @@ -3,22 +3,16 @@ | ||
| 3 | 3 | namespace SESP\Annotator; | 
| 4 | 4 | |
| 5 | 5 | use SESP\PropertyRegistry; | 
| 6 | - | |
| 7 | 6 | use SMW\SemanticData; | 
| 8 | 7 | use SMW\DIProperty; | 
| 9 | 8 | use SMW\Subobject; | 
| 10 | - | |
| 11 | 9 | use SMWDataItem as DataItem; | 
| 12 | 10 | use SMWDITime as DITime; | 
| 13 | 11 | use SMWDIBlob as DIBlob; | 
| 14 | 12 | use SMWDINumber as DINumber; | 
| 15 | - | |
| 16 | 13 | use FormatMetadata; | 
| 17 | -use Title; | |
| 18 | 14 | use File; | 
| 19 | 15 | |
| 20 | -use RuntimeException; | |
| 21 | - | |
| 22 | 16 | /** | 
| 23 | 17 | * @ingroup SESP | 
| 24 | 18 | * | 
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | * @since 1.0 | 
| 51 | 51 | * | 
| 52 | 52 | * @param SemanticData $semanticData | 
| 53 | - * @param Factory $factory | |
| 53 | + * @param Factory $appFactory | |
| 54 | 54 | * @param array $configuration | 
| 55 | 55 | */ | 
| 56 | 56 |  	public function __construct( SemanticData $semanticData, AppFactory $appFactory, array $configuration ) { | 
| @@ -129,11 +129,17 @@ discard block | ||
| 129 | 129 | return true; | 
| 130 | 130 | } | 
| 131 | 131 | |
| 132 | + /** | |
| 133 | + * @param string|null $propertyId | |
| 134 | + */ | |
| 132 | 135 |  	protected function hasRegisteredPropertyId( $propertyId, $cachedProperties ) { | 
| 133 | 136 | return ( DIProperty::getPredefinedPropertyTypeId( $propertyId ) === '' ) || | 
| 134 | 137 | array_key_exists( $propertyId, $cachedProperties ); | 
| 135 | 138 | } | 
| 136 | 139 | |
| 140 | + /** | |
| 141 | + * @param DIProperty $property | |
| 142 | + */ | |
| 137 | 143 |  	protected function createDataItemById( $externalId, $property ) { | 
| 138 | 144 | |
| 139 | 145 | $dataItem = null; | 
| @@ -4,18 +4,13 @@ | ||
| 4 | 4 | |
| 5 | 5 | use SESP\PropertyRegistry; | 
| 6 | 6 | use SESP\AppFactory; | 
| 7 | - | |
| 8 | 7 | use SMW\SemanticData; | 
| 9 | 8 | use SMW\DIProperty; | 
| 10 | 9 | use SMW\DIWikiPage; | 
| 11 | -use SMW\Store; | |
| 12 | - | |
| 13 | 10 | use SMWDataItem as DataItem; | 
| 14 | 11 | use SMWDIBlob as DIBlob; | 
| 15 | -use SMWDIBoolean as DIBoolean; | |
| 16 | 12 | use SMWDITime as DITime; | 
| 17 | 13 | use SMWDINumber as DINumber; | 
| 18 | - | |
| 19 | 14 | use WikiPage; | 
| 20 | 15 | use User; | 
| 21 | 16 | use RuntimeException; | 
| @@ -3,12 +3,9 @@ | ||
| 3 | 3 | namespace SESP\Annotator; | 
| 4 | 4 | |
| 5 | 5 | use SESP\PropertyRegistry; | 
| 6 | - | |
| 7 | 6 | use SMW\SemanticData; | 
| 8 | 7 | use SMW\DIProperty; | 
| 9 | - | |
| 10 | 8 | use SMWDIUri as DIUri; | 
| 11 | - | |
| 12 | 9 | use Title; | 
| 13 | 10 | use SpecialPage; | 
| 14 | 11 | use RuntimeException; | 
| @@ -139,6 +139,9 @@ | ||
| 139 | 139 | return $this->getTextMessage( $key, $arguments ); | 
| 140 | 140 | } | 
| 141 | 141 | |
| 142 | + /** | |
| 143 | + * @param string $key | |
| 144 | + */ | |
| 142 | 145 |  	protected function getTextMessage( $key, $arguments ) { | 
| 143 | 146 | |
| 144 | 147 | $this->messages[ $key ] = wfMessage( $arguments )->inLanguage( $this->language )->text(); | 
| @@ -4,10 +4,8 @@ | ||
| 4 | 4 | |
| 5 | 5 | use SESP\Definition\DefinitionReader; | 
| 6 | 6 | use SESP\Cache\MessageCache; | 
| 7 | - | |
| 8 | 7 | use SMW\DataTypeRegistry; | 
| 9 | 8 | use SMW\DIProperty; | 
| 10 | -use SMWDataItem as DataItem; | |
| 11 | 9 | |
| 12 | 10 | /** | 
| 13 | 11 | * @ingroup SESP | 
| @@ -167,10 +167,16 @@ discard block | ||
| 167 | 167 | } | 
| 168 | 168 | } | 
| 169 | 169 | |
| 170 | + /** | |
| 171 | + * @return boolean | |
| 172 | + */ | |
| 170 | 173 |  	protected function getPropertyLabel( $id ) { | 
| 171 | 174 | return $this->lookupWithIndexForId( 'label', $id ); | 
| 172 | 175 | } | 
| 173 | 176 | |
| 177 | + /** | |
| 178 | + * @return boolean | |
| 179 | + */ | |
| 174 | 180 |  	protected function getPropertyVisibility( $id ) { | 
| 175 | 181 | |
| 176 | 182 | $show = $this->lookupWithIndexForId( 'show', $id ); | 
| @@ -204,6 +210,11 @@ discard block | ||
| 204 | 210 | return null; | 
| 205 | 211 | } | 
| 206 | 212 | |
| 213 | + /** | |
| 214 | + * @param string $index | |
| 215 | + * | |
| 216 | + * @return string | |
| 217 | + */ | |
| 207 | 218 |  	protected function lookupWithIndexForId( $index, $id ) { | 
| 208 | 219 | |
| 209 | 220 | $id = strtoupper( $id ); |