Extension:GWToolset/Technical Implementation

GWToolset is a Special Page extension. The main goal of the extension is to allow GLAMs the ability to mass upload content ( pictures, videos, and sounds ) to Wikimedia Commons based on respective metadata ( XML ); the intent is to allow for a wide variety of XML schemas. The extension goes about this task by presenting the user with several steps, represented by HTML forms, in order to set-up a batch upload process that will upload content and metadata to the wiki. Below are sections that describe the implementation in further detail.

Code conventions
GWToolset attempts, as much as possible, to adhere to MediaWiki Code conventions. Below are a few code conventions mentioned for clarity.

PHP namespace
GWToolset uses a PHP namespace in order to prevent conflicts with other code within the MediaWiki global namespace; the root namespace is.

MediaWiki namespace
GWToolset defines two.

Configuration
GWToolset uses a Config class,, to add configuration settings within the GWToolset namespace. Settings can be changed with:

User group requirement
GWToolset adds a new user group,, that users must be a part of in order to use the extension. This method of permission control was chosen in order to isolate users similar to UploadWizard’s ‘upwizcampeditors’ and Translate’s ‘translate-proofr’ user groups.

Upload process
The current steps within the upload process are:
 * 1) Metadata detection
 * 2) Metadata mapping
 * 3) Batch preview
 * 4) Batch job creation

Application entry
Further detail on application entry into the extension.

Handlers
Further detail on each of the main handlers used within the application:
 * MetadataDetectHandler
 * MetadataMappingHandler
 * MetadataMappingSaveHandler

Jobs
Further detail on each of the jobs used within the application:
 * UploadMediafileJob
 * UploadMetadataJob