private void importFromProperties(final URL _url,
                                      final String _language)
    {
        try {
            final InputStream propInFile = _url.openStream();
            final Properties props = new Properties();
            props.load(propInFile);
            final Iterator<Entry<Object, Object>> iter = props.entrySet().iterator();

            while (iter.hasNext()) {
                final Entry<Object, Object> element = iter.next();
                Instance propInstance = getExistingKey(element.getKey().toString());
                if (propInstance == null || !propInstance.isValid()) {
                    propInstance = insertNewProp(element.getKey().toString(), element.getValue().toString());
                }

                final Instance localInstance = getExistingLocale(propInstance.getId(), _language);
                if (localInstance == null || !localInstance.isValid()) {
                    insertNewLocal(propInstance.getId(), element.getValue().toString(), _language);
                } else {
                    updateLocale(localInstance, element.getValue().toString());
                }
            }

        } catch (final IOException e) {
            DBPropertiesUpdate.LOG.error("ImportFromProperties() - I/O failed.", e);
        }
    }
private void importFromProperties ( final URL _url , final String _language ) { try { final InputStream propInFile = _url . openStream ( ) ; final Properties props = new Properties ( ) ; props . load ( propInFile ) ; final Iterator < Entry < Object , Object > > iter = props . entrySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { final Entry < Object , Object > element = iter . next ( ) ; Instance propInstance = getExistingKey ( element . getKey ( ) . toString ( ) ) ; if ( propInstance == null || ! propInstance . isValid ( ) ) { propInstance = insertNewProp ( element . getKey ( ) . toString ( ) , element . getValue ( ) . toString ( ) ) ; } final Instance localInstance = getExistingLocale ( propInstance . getId ( ) , _language ) ; if ( localInstance == null || ! localInstance . isValid ( ) ) { insertNewLocal ( propInstance . getId ( ) , element . getValue ( ) . toString ( ) , _language ) ; } else { updateLocale ( localInstance , element . getValue ( ) . toString ( ) ) ; } } } catch ( final IOException e ) { DBPropertiesUpdate . LOG . error ( "ImportFromProperties() - I/O failed." , e ) ; } }
Import Properties from a Properties-File as language-specific value, if
the key is not existing, a new default(=value) will also be created. If
the language is not existing it will be created also.

@param _url Complete Path/Name of the File to import
@param _language Language to use for the Import