Package org.openrefine.wikidata.schema
Class WbLocationConstant
java.lang.Object
org.openrefine.wikidata.schema.WbLocationConstant
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue>
public class WbLocationConstant
extends Object
implements WbExpression<org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue>
A constant for a geographical location. The accepted format is lat,lng or
lat/lng.
- Author:
- Antonin Delpeuch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValueevaluate(ExpressionContext ctxt) Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.getValue()inthashCode()static org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValueParses a string to a location.
-
Field Details
-
defaultPrecision
public static final double defaultPrecision- See Also:
-
-
Constructor Details
-
WbLocationConstant
- Throws:
ParseException
-
-
Method Details
-
parse
public static org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue parse(String expr) throws ParseException Parses a string to a location.- Parameters:
expr- the string to parse- Returns:
- the parsed location
- Throws:
ParseException
-
evaluate
public org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue evaluate(ExpressionContext ctxt) throws SkipSchemaExpressionException Description copied from interface:WbExpressionEvaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.- Specified by:
evaluatein interfaceWbExpression<org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue>- Throws:
SkipSchemaExpressionException
-
getValue
- Returns:
- the original value as a string.
-
equals
-
hashCode
public int hashCode()
-