Class 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
    • Constructor Detail

      • WbLocationConstant

        public WbLocationConstant​(String origValue)
    • Method Detail

      • validate

        public void validate​(ValidationState validation)
        Description copied from interface: WbExpression
        Check that this expression is fully formed and ready to be evaluated.
        Specified by:
        validate in interface WbExpression<org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue>
        Parameters:
        validation - the state in which to log any validation errors
      • 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
      • getValue

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

        public int hashCode()
        Overrides:
        hashCode in class Object