Skip to content

Commit 7cab070

Browse files
committed
Merge pull request #16 from wmde/fingerprint
General update
2 parents b756100 + 608a661 commit 7cab070

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5959
-2430
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,55 @@
44
[Data Model](https://meta.wikimedia.org/wiki/Wikidata/Data_model)
55
at the heart of the [Wikibase software](http://wikiba.se/).
66

7+
![Wikibase JavaScript Data Model UML diagram](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Wikibase_JavaScript_Data_Model_1.0.svg/600px-Wikibase_JavaScript_Data_Model_1.0.svg.png)
8+
https://commons.wikimedia.org/wiki/File:Wikibase_JavaScript_Data_Model_1.0.svg
9+
710
## Release notes
811

9-
### 0.4 (dev)
12+
### 1.0 (dev)
1013

14+
#### Breaking changes
1115
* Removed wikibase.datamodel.Reference.setSnaks(). Generate new Reference objects when interacting with the API to reflect hash changes performed in the back-end.
1216
* Removed wikibase.datamodel.Entity.equals().
1317
* Removed wikibase.datamodel.Reference.setSnaks().
1418
* wikibase.datamodel.Reference constructor does not accept Snak object(s) any more.
19+
* An entity cannot be constructed by passing internal object representation to Entity constructor anymore; Use entity specific constructors instead.
20+
* Removed useless Entity.isNew(), Entity.newEmpty().
21+
* Removed Entity.getLabel(), Entity.getLabels(), Entity.getDescription(), Entity.getDescription(), Entity.getAliases(), Entity.getAllAliases(); Acquire data via Entity.getFingerprint() instead.
22+
* Removed Entity.getClaims(); Acquire claims/statements via Entity specific implementation.
23+
* Item.getSiteLinks() returns a SiteLinkSet object instead of an array of SiteLink objects.
24+
* Renamed Property.getDataType() to Property.getDataTypeId().
25+
* Removed all toJSON(), newFromJSON(), toMap() and newFromMap() functions; Use serializers and unserializers of wikibase.serialization instead.
26+
* Statement does not accept a plain array of references anymore; Supply a ReferenceList instead.
27+
* Remove Claim.TYPE and Statement.TYPE attributes.
28+
* Instead of inheriting from Claim, Statement now features a Claim instance that needs to be passed to the Statement constructor.
29+
* Reference constructor does not accept a plain list of Snak objects anymore; Supply a proper SnakList object instead.
30+
* SnakList constructor only accepts arrays of Snak objects.
31+
32+
#### Enhancements
33+
* Added ClaimGroup.
34+
* Added ClaimGroupSet.
35+
* Added ClaimList.
36+
* Added Fingerprint.
37+
* Added Group.
38+
* Added GroupableCollection.
39+
* Added List.
40+
* Added Map.
41+
* Added MultiTerm.
42+
* Added MultiTermMap.
43+
* Added ReferenceList.
44+
* Added SiteLinkSet.
45+
* Added StatementGroup.
46+
* Added StatementGroupSet.
47+
* Added StatementList.
48+
* Added Term.
49+
* Added TermMap.
50+
* Added Set.
51+
* Added individual constructors for Item and Property.
52+
* Added Entity.getFingerprint(), Entity.setFingerprint().
53+
* Added SiteLink and Statement specific functionality to Item.
54+
* Added Statement specific functionality to Property.
55+
* Added isEmpty() and equals() functions to Item and Property.
1556

1657
### 0.3.2 (2014-08-19)
1758

composer.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,10 @@
66
},
77
"license": "GPL-2.0+",
88
"authors": [
9-
{
10-
"name": "Daniel Werner",
11-
"homepage": "https://www.mediawiki.org/wiki/User:Danwe"
12-
},
139
{
1410
"name": "H. Snater",
1511
"homepage": "http://www.snater.com"
1612
},
17-
{
18-
"name": "Jeroen De Dauw",
19-
"email": "jeroendedauw@gmail.com",
20-
"homepage": "http://jeroendedauw.com"
21-
},
2213
{
2314
"name": "Adrian Lang",
2415
"email": "adrian.lang@wikimedia.de"

init.mw.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<?php
22

3+
if ( !defined( 'MEDIAWIKI' ) ) {
4+
die( 'Not an entry point.' );
5+
}
6+
37
$GLOBALS['wgExtensionCredits']['wikibase'][] = array(
48
'path' => __FILE__,
59
'name' => 'Wikibase DataModel JavaScript',
610
'version' => WIKIBASE_DATAMODEL_JAVASCRIPT_VERSION,
711
'author' => array(
8-
'[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
912
'[http://www.snater.com H. Snater]',
1013
),
1114
'url' => 'https://github.com/wmde/WikibaseDataModelJavascript',
1215
'description' => 'Javascript implementation of the Wikibase data model',
1316
'license-name' => 'GPL-2.0+'
1417
);
1518

16-
include 'resources.mw.php';
17-
include 'resources.test.mw.php';
19+
include 'resources.php';
20+
include 'resources.test.php';

resources.mw.php

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)