src/main/java/de/blau/android/validation/BaseValidator.java
/**
     * Check if a preset required tag is missing
     * 
     * @param status previous validation status
     * @param e the OsmElement
     * @param pi the PresetItem
     * @return new validation status
     */
Check if a preset required tag is missing

@param status previous validation status
@param e the OsmElement
@param pi the PresetItem
@return new validation status
Check if a preset required tag is missing @param status previous validation status @param e the OsmElement @param pi the PresetItem @return new validation status
public int validateMissingTags(int status, @NonNull OsmElement e, @NonNull PresetItem pi) {
        for (Entry<String, Boolean> entry : checkTags.entrySet()) {
            String[] keys = splitKeys(entry);
            int tempStatus = 0;
            for (String key : keys) {
                key = key.trim();
                if (pi.hasKey(key, entry.getValue())) {
                    if (!e.hasTagKey(key) && reportMissingKey(e, key)) {
                        tempStatus = Validator.MISSING_TAG;
                    } else {
                        tempStatus = 0; 
                        break;
                    }
                }
            }
            status |= tempStatus;
        }
        return status;
    }
public int validateMissingTags ( int status , @ NonNull OsmElement e , @ NonNull PresetItem pi ) { for ( Entry < String , Boolean > entry : checkTags . entrySet ( ) ) { String [ ] keys = splitKeys ( entry ) ; int tempStatus = 0 ; for ( String key : keys ) { key = key . trim ( ) ; if ( pi . hasKey ( key , entry . getValue ( ) ) ) { if ( ! e . hasTagKey ( key ) && reportMissingKey ( e , key ) ) { tempStatus = Validator . MISSING_TAG ; } else { tempStatus = 0 ; break ; } } } status |= tempStatus ; } return status ; }
Check if a preset required tag is missing
Check if a preset required tag is missing
// found a key