Class InternetTags

    • Constructor Detail

      • InternetTags

        public InternetTags()
        Constructs a new InternetTags test.
    • Method Detail

      • doTest

        private boolean doTest​(OsmPrimitive p,
                               String k,
                               String[] keys,
                               AbstractValidator validator,
                               int code)
        Potentially validates a given primitive key against a given validator.
        Parameters:
        p - The OSM primitive to test
        k - The key to validate
        keys - The list of keys to check. If k is not inside this collection, do nothing
        validator - The validator to run if k is inside keys
        code - The error code to set if the validation fails
        Returns:
        true if the validation fails. In this case, a new error has been created.
      • validateTag

        public List<TestErrorvalidateTag​(OsmPrimitive p,
                                           String k,
                                           AbstractValidator validator,
                                           int code)
        Validates a given primitive tag against a given validator.
        Parameters:
        p - The OSM primitive to test
        k - The key to validate
        validator - The validator to run
        code - The error code to set if the validation fails
        Returns:
        The error if the validation fails, null otherwise
        Since:
        7824, 14803 (return type)
      • doValidateTag

        private List<TestErrordoValidateTag​(OsmPrimitive p,
                                              String k,
                                              String v,
                                              AbstractValidator validator,
                                              int code)
        Validates a given primitive tag against a given validator.
        Parameters:
        p - The OSM primitive to test
        k - The key to validate
        v - The value to validate. May be null to use p.get(k)
        validator - The validator to run
        code - The error code to set if the validation fails
        Returns:
        The error if the validation fails, null otherwise