Class ManifestV1
- java.lang.Object
-
- org.openrefine.wikibase.manifests.ManifestV1
-
-
Field Summary
-
Fields inherited from interface org.openrefine.wikibase.manifests.Manifest
DEFAULT_MAX_EDITS_PER_MINUTE, DEFAULT_TAG_TEMPLATE, ITEM_TYPE, MEDIAINFO_TYPE, PROPERTY_TYPE
-
-
Constructor Summary
Constructors Constructor Description ManifestV1(com.fasterxml.jackson.databind.JsonNode manifest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAvailableEntityTypes()
The list of all entity types in use on this instance.String
getConstraintsRelatedId(String name)
Returns an entity or property id used in the WikibaseQualityConstraints extension.String
getEditGroupsUrlSchema()
Returns the template that should be inserted in edit summaries for edits to be tracked by EditGroups.String
getEntityTypeSiteIri(String entityType)
Gets the site IRI used for a particular entity type. - if the entity type is editable on this Wikibase instance, then it should be identical to the site IRI for this instance. - if the entity type is federated from another instance, then it should be the site IRI for that instance.String
getInstanceOfPid()
The property id used to link an entity to the entity representing its type (class).int
getMaxEditsPerMinute()
The maximum number of edits to do per minute on this Wikibase instance.int
getMaxlag()
The recommended `maxlag` value for edits on this instance.String
getMediaWikiApiEndpoint()
The MediaWiki API endpoint of this Wikibase instance.String
getMediaWikiApiEndpoint(String entityType)
Get the MediaWiki endpoint of the source Wikibase for the entity type.String
getName()
The name of the Wikibase instance, displayed in the UI.String
getReconServiceEndpoint()
The reconciliation service for entities in this Wikibase instance.String
getReconServiceEndpoint(String entityType)
Get the reconciliation service endpoint for a given entity type supported by this Wikibase instance.String
getSiteIri()
The RDF serialization prefix for entities stored in this instance.String
getSubclassOfPid()
The property id used to link a class to its superclasses.String
getTagTemplate()
The tag to apply to edits made from OpenRefine.String
getVersion()
The version of the manifest object, which determines its JSON format.boolean
hideStructuredFieldsInMediaInfo()
Only useful for Wikibase instances to which one can upload files: this is set to true when the Wikibase instance does not support structured data in the form of MediaInfo entities.
-
-
-
Method Detail
-
getVersion
public String getVersion()
Description copied from interface:Manifest
The version of the manifest object, which determines its JSON format.- Specified by:
getVersion
in interfaceManifest
-
getName
public String getName()
Description copied from interface:Manifest
The name of the Wikibase instance, displayed in the UI.
-
getSiteIri
public String getSiteIri()
Description copied from interface:Manifest
The RDF serialization prefix for entities stored in this instance.- Specified by:
getSiteIri
in interfaceManifest
-
getMaxlag
public int getMaxlag()
Description copied from interface:Manifest
The recommended `maxlag` value for edits on this instance.
-
getInstanceOfPid
public String getInstanceOfPid()
Description copied from interface:Manifest
The property id used to link an entity to the entity representing its type (class). In Wikidata, this is P31 (instance of)- Specified by:
getInstanceOfPid
in interfaceManifest
-
getSubclassOfPid
public String getSubclassOfPid()
Description copied from interface:Manifest
The property id used to link a class to its superclasses. In Wikidata, this is P279 (subclass of)- Specified by:
getSubclassOfPid
in interfaceManifest
-
getMediaWikiApiEndpoint
public String getMediaWikiApiEndpoint()
Description copied from interface:Manifest
The MediaWiki API endpoint of this Wikibase instance.- Specified by:
getMediaWikiApiEndpoint
in interfaceManifest
-
getReconServiceEndpoint
public String getReconServiceEndpoint()
Description copied from interface:Manifest
The reconciliation service for entities in this Wikibase instance.- Specified by:
getReconServiceEndpoint
in interfaceManifest
-
getConstraintsRelatedId
public String getConstraintsRelatedId(String name)
Description copied from interface:Manifest
Returns an entity or property id used in the WikibaseQualityConstraints extension.- Specified by:
getConstraintsRelatedId
in interfaceManifest
- Parameters:
name
- our internal identifier for the entity id- Returns:
- the entity id
-
getEditGroupsUrlSchema
public String getEditGroupsUrlSchema()
Description copied from interface:Manifest
Returns the template that should be inserted in edit summaries for edits to be tracked by EditGroups.- Specified by:
getEditGroupsUrlSchema
in interfaceManifest
-
getReconServiceEndpoint
public String getReconServiceEndpoint(String entityType)
Description copied from interface:Manifest
Get the reconciliation service endpoint for a given entity type supported by this Wikibase instance.- Specified by:
getReconServiceEndpoint
in interfaceManifest
- Returns:
- null if there is no recon service for this entity type.
-
getEntityTypeSiteIri
public String getEntityTypeSiteIri(String entityType)
Description copied from interface:Manifest
Gets the site IRI used for a particular entity type. - if the entity type is editable on this Wikibase instance, then it should be identical to the site IRI for this instance. - if the entity type is federated from another instance, then it should be the site IRI for that instance.- Specified by:
getEntityTypeSiteIri
in interfaceManifest
- Returns:
- null if the entity type is not supported by the Wikibase instance
-
getMediaWikiApiEndpoint
public String getMediaWikiApiEndpoint(String entityType)
Description copied from interface:Manifest
Get the MediaWiki endpoint of the source Wikibase for the entity type. This can be different than the MediaWiki endpoint for this Wikibase instance, when federation is used.- Specified by:
getMediaWikiApiEndpoint
in interfaceManifest
- Returns:
- null if there is no recon service for this entity type.
-
getAvailableEntityTypes
public List<String> getAvailableEntityTypes()
Description copied from interface:Manifest
The list of all entity types in use on this instance.- Specified by:
getAvailableEntityTypes
in interfaceManifest
-
hideStructuredFieldsInMediaInfo
public boolean hideStructuredFieldsInMediaInfo()
Description copied from interface:Manifest
Only useful for Wikibase instances to which one can upload files: this is set to true when the Wikibase instance does not support structured data in the form of MediaInfo entities. In this case, OpenRefine will still offer editing those files, but hide the Captions and Statements fields.- Specified by:
hideStructuredFieldsInMediaInfo
in interfaceManifest
-
getTagTemplate
public String getTagTemplate()
Description copied from interface:Manifest
The tag to apply to edits made from OpenRefine. If the string contains the ${version} string, it should be replaced by the major.minor OpenRefine version.- Specified by:
getTagTemplate
in interfaceManifest
-
getMaxEditsPerMinute
public int getMaxEditsPerMinute()
Description copied from interface:Manifest
The maximum number of edits to do per minute on this Wikibase instance. Set to zero to disable any throttling.- Specified by:
getMaxEditsPerMinute
in interfaceManifest
-
-