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 Details

  • Constructor Details

  • 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: WbExpression
      Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.
      Specified by:
      evaluate in interface WbExpression<org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue>
      Throws:
      SkipSchemaExpressionException
    • getValue

      public String getValue()
      Returns:
      the original value as a string.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object