Class ManifestV2
- java.lang.Object
-
- org.openrefine.wikibase.manifests.ManifestV2
-
-
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 ManifestV2(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.StringgetConstraintsRelatedId(String name)Returns an entity or property id used in the WikibaseQualityConstraints extension.StringgetEditGroupsUrlSchema()Returns the template that should be inserted in edit summaries for edits to be tracked by EditGroups.StringgetEntityTypeSiteIri(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.StringgetInstanceOfPid()The property id used to link an entity to the entity representing its type (class).intgetMaxEditsPerMinute()The maximum number of edits to do per minute on this Wikibase instance.intgetMaxlag()The recommended `maxlag` value for edits on this instance.StringgetMediaWikiApiEndpoint()The MediaWiki API endpoint of this Wikibase instance.StringgetMediaWikiApiEndpoint(String entityType)Get the MediaWiki endpoint of the source Wikibase for the entity type.StringgetName()The name of the Wikibase instance, displayed in the UI.StringgetReconServiceEndpoint()The reconciliation service for entities in this Wikibase instance.StringgetReconServiceEndpoint(String entityType)Get the reconciliation service endpoint for a given entity type supported by this Wikibase instance.StringgetSiteIri()The RDF serialization prefix for entities stored in this instance.StringgetSubclassOfPid()The property id used to link a class to its superclasses.StringgetTagTemplate()The tag to apply to edits made from OpenRefine.StringgetVersion()The version of the manifest object, which determines its JSON format.booleanhideStructuredFieldsInMediaInfo()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.
-
-
-
Constructor Detail
-
ManifestV2
public ManifestV2(com.fasterxml.jackson.databind.JsonNode manifest) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
-
Method Detail
-
getVersion
public String getVersion()
Description copied from interface:ManifestThe version of the manifest object, which determines its JSON format.- Specified by:
getVersionin interfaceManifest
-
getName
public String getName()
Description copied from interface:ManifestThe name of the Wikibase instance, displayed in the UI.
-
getSiteIri
public String getSiteIri()
Description copied from interface:ManifestThe RDF serialization prefix for entities stored in this instance.- Specified by:
getSiteIriin interfaceManifest
-
getMaxlag
public int getMaxlag()
Description copied from interface:ManifestThe recommended `maxlag` value for edits on this instance.
-
getInstanceOfPid
public String getInstanceOfPid()
Description copied from interface:ManifestThe property id used to link an entity to the entity representing its type (class). In Wikidata, this is P31 (instance of)- Specified by:
getInstanceOfPidin interfaceManifest
-
getSubclassOfPid
public String getSubclassOfPid()
Description copied from interface:ManifestThe property id used to link a class to its superclasses. In Wikidata, this is P279 (subclass of)- Specified by:
getSubclassOfPidin interfaceManifest
-
getMediaWikiApiEndpoint
public String getMediaWikiApiEndpoint()
Description copied from interface:ManifestThe MediaWiki API endpoint of this Wikibase instance.- Specified by:
getMediaWikiApiEndpointin interfaceManifest
-
getReconServiceEndpoint
public String getReconServiceEndpoint()
Description copied from interface:ManifestThe reconciliation service for entities in this Wikibase instance.- Specified by:
getReconServiceEndpointin interfaceManifest
-
getConstraintsRelatedId
public String getConstraintsRelatedId(String name)
Description copied from interface:ManifestReturns an entity or property id used in the WikibaseQualityConstraints extension.- Specified by:
getConstraintsRelatedIdin interfaceManifest- Parameters:
name- our internal identifier for the entity id- Returns:
- the entity id
-
getEditGroupsUrlSchema
public String getEditGroupsUrlSchema()
Description copied from interface:ManifestReturns the template that should be inserted in edit summaries for edits to be tracked by EditGroups.- Specified by:
getEditGroupsUrlSchemain interfaceManifest
-
getReconServiceEndpoint
public String getReconServiceEndpoint(String entityType)
Description copied from interface:ManifestGet the reconciliation service endpoint for a given entity type supported by this Wikibase instance.- Specified by:
getReconServiceEndpointin interfaceManifest- Returns:
- null if there is no recon service for this entity type.
-
getEntityTypeSiteIri
public String getEntityTypeSiteIri(String entityType)
Description copied from interface:ManifestGets 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:
getEntityTypeSiteIriin interfaceManifest- Returns:
- null if the entity type is not supported by the Wikibase instance
-
getMediaWikiApiEndpoint
public String getMediaWikiApiEndpoint(String entityType)
Description copied from interface:ManifestGet 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:
getMediaWikiApiEndpointin interfaceManifest- Returns:
- null if there is no recon service for this entity type.
-
getAvailableEntityTypes
public List<String> getAvailableEntityTypes()
Description copied from interface:ManifestThe list of all entity types in use on this instance.- Specified by:
getAvailableEntityTypesin interfaceManifest
-
hideStructuredFieldsInMediaInfo
public boolean hideStructuredFieldsInMediaInfo()
Description copied from interface:ManifestOnly 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:
hideStructuredFieldsInMediaInfoin interfaceManifest
-
getTagTemplate
public String getTagTemplate()
Description copied from interface:ManifestThe 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:
getTagTemplatein interfaceManifest
-
getMaxEditsPerMinute
public int getMaxEditsPerMinute()
Description copied from interface:ManifestThe maximum number of edits to do per minute on this Wikibase instance. Set to zero to disable any throttling.- Specified by:
getMaxEditsPerMinutein interfaceManifest
-
-