congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Messages
Code IndexAdd Tabnine to your IDE (free)

How to use
Messages
in
org.deegree.feature.i18n

Best Java code snippets using org.deegree.feature.i18n.Messages (Showing top 20 results out of 315)

origin: deegree/deegree3

/**
 * Short version for lazy people.
 * 
 * @param key
 * @param arguments
 * @return the same as #getMessage
 */
public static String get( String key, Object... arguments ) {
  return getMessage( key, arguments );
}
origin: deegree/deegree3

  return getMessage( key, arguments );
      overrideMessages( fileName, p );
      fileName = "/messages_en.properties";
      overrideMessages( fileName, p );
      fileName = "messages_" + l + ".properties";
      overrideMessages( fileName, p );
      fileName = "/messages_" + l + ".properties";
      overrideMessages( fileName, p );
    } catch ( IOException e ) {
      LOG.error( "Error loading language file for language '" + l + "': ", e );
return get( props.get( loc ), key, arguments );
origin: deegree/deegree3

/**
 * Returns the message assigned to the passed key. If no message is assigned, an error message will be returned that
 * indicates the missing key.
 * 
 * @see MessageFormat for conventions on string formatting and escape characters.
 * 
 * @param key
 * @param arguments
 * @return the message assigned to the passed key
 */
public static String getMessage( String key, Object... arguments ) {
  return get( defaultProps, key, arguments );
}
origin: deegree/deegree3

  /**
   * Parses the feature id attribute from the feature <code>START_ELEMENT</code> event that the given
   * <code>XMLStreamReader</code> points to.
   * <p>
   * Looks after 'gml:id' (GML 3) first, if no such attribute is present, the 'fid' (GML 2) attribute is used.
   *
   * @param xmlReader
   *            must point to the <code>START_ELEMENT</code> event of the feature
   * @return the feature id, or "" (empty string) if neither a 'gml:id' nor a 'fid' attribute is present
   */
  protected String parseFeatureId( XMLStreamReaderWrapper xmlReader ) {

    String fid = xmlReader.getAttributeValue( gmlNs, GMLID );
    if ( fid == null ) {
      fid = xmlReader.getAttributeValue( null, FID );
    }

    // Check that the feature id has the correct form. "fid" and "gml:id" are both based on the XML type "ID":
    // http://www.w3.org/TR/xmlschema11-2/#NCName Thus, they must match the NCName production rule. This means that
    // they may not contain a separating colon (only at the first position a colon is allowed) and must not start
    // with a digit.
    if ( fid != null && fid.length() > 0 && !fid.matches( "[^\\d][^:]+" ) ) {
      String msg = Messages.getMessage( "ERROR_INVALID_FEATUREID", fid );
      throw new IllegalArgumentException( msg );
    }
    return fid;
  }
}
origin: deegree/deegree3

String msg = Messages.getMessage( "LOCK_DB_CREATE_ERROR", e.getMessage() );
LOG.error( msg, e );
throw new FeatureStoreException( msg, e );
origin: deegree/deegree3

/**
 * Returns the transaction to the datastore. This makes the transaction available to other clients again (via
 * {@link #acquireTransaction()}.
 * <p>
 * The transaction should be terminated, i.e. commit() or rollback() must have been called before.
 * </p>
 * 
 * @param ta
 *            the transaction to be released, must not be <code>null</code>
 * @param newFeatures
 * @throws FeatureStoreException
 */
void releaseTransaction( MemoryFeatureStoreTransaction ta, StoredFeatures newFeatures )
            throws FeatureStoreException {
  if ( ta.getStore() != this ) {
    String msg = Messages.getMessage( "TA_NOT_OWNER" );
    throw new FeatureStoreException( msg );
  }
  if ( ta != this.activeTransaction ) {
    String msg = Messages.getMessage( "TA_NOT_ACTIVE" );
    throw new FeatureStoreException( msg );
  }
  if ( newFeatures != null ) {
    storedFeatures = newFeatures;
  }
  this.activeTransaction = null;
  this.transactionHolder = null;
  // notifyAll();
}
origin: deegree/deegree3

rs = stmt.executeQuery( "SELECT ACQUIRED,EXPIRES FROM LOCKS WHERE ID=" + lockIdInt + "" );
if ( !rs.next() ) {
  String msg = Messages.getMessage( "LOCK_NO_SUCH_ID", lockId );
  throw new LockHasExpiredException( msg, "lockId" );
origin: deegree/deegree3

String schemaLocation = xmlStream.getAttributeValue( XSINS, "schemaLocation" );
if ( schemaLocation == null ) {
  LOG.warn( Messages.getMessage( "NO_SCHEMA_LOCATION", xmlStream.getSystemId() ) );
  return new DynamicAppSchema();
  LOG.warn( Messages.getMessage( "ERROR_SCHEMA_LOCATION_TOKENS_COUNT", xmlStream.getSystemId() ) );
  return new DynamicAppSchema();
    LOG.warn( Messages.getMessage( "INVALID_SCHEMA_LOCATION", xmlStream.getSystemId() ) );
    return new DynamicAppSchema();
  schema = decoder.extractAppSchema();
} catch ( Throwable t ) {
  LOG.warn( Messages.getMessage( "BROKEN_SCHEMA", xmlStream.getSystemId(), t.getMessage() ), t );
  return new DynamicAppSchema();
origin: deegree/deegree3

Timestamp expires2 = rs.getTimestamp( 2 );
rs.close();
String msg = getMessage( "LOCK_CANNOT_LOCK_ALL", fid,
             formatDateTime( new DateTime( expires2, null ) ),
             formatDateTime( new DateTime( acquired2, null ) ) );
origin: deegree/deegree3

String msg = Messages.getMessage( "ERROR_FEATURE_ID_NOT_UNIQUE", fid );
throw new XMLParsingException( xmlStream, msg );
origin: deegree/deegree3

/**
 * Returns the feature type with the given name.
 * <p>
 * If no feature type with the given name is defined, an XMLParsingException is thrown.
 *
 * @param xmlStreamReader
 *
 * @param ftName
 *            feature type name to look up
 * @return the feature type with the given name
 * @throws XMLParsingException
 *             if no feature type with the given name is defined
 */
private FeatureType lookupFeatureType( XMLStreamReaderWrapper xmlStreamReader, QName ftName, boolean exception )
            throws XMLParsingException {
  FeatureType ft = null;
  ft = schema.getFeatureType( ftName );
  if ( ft == null ) {
    ft = WellKnownGMLTypes.getType( ftName );
  }
  if ( ft == null && exception ) {
    String msg = Messages.getMessage( "ERROR_SCHEMA_FEATURE_TYPE_UNKNOWN", ftName );
    throw new XMLParsingException( xmlStreamReader, msg );
  }
  return ft;
}
origin: deegree/deegree3

/**
 * Returns the feature type with the given name.
 * <p>
 * If no feature type with the given name is defined, an XMLParsingException is thrown.
 *
 * @param xmlStreamReader
 *
 * @param ftName
 *            feature type name to look up
 * @return the feature type with the given name
 * @throws XMLParsingException
 *             if no feature type with the given name is defined
 */
private FeatureType lookupFeatureType( XMLStreamReaderWrapper xmlStreamReader, QName ftName, boolean exception )
            throws XMLParsingException {
  FeatureType ft = null;
  ft = schema.getFeatureType( ftName );
  if ( ft == null ) {
    ft = WellKnownGMLTypes.getType( ftName );
  }
  if ( ft == null && exception ) {
    String msg = Messages.getMessage( "ERROR_SCHEMA_FEATURE_TYPE_UNKNOWN", ftName );
    throw new XMLParsingException( xmlStreamReader, msg );
  }
  return ft;
}
origin: deegree/deegree3

private void checkIfFeaturesAreNotLocked( IdFilter filter, Lock lock )
            throws FeatureStoreException {
  String lockId = lock != null ? lock.getId() : null;

  // check if all features can be deleted
  for ( ResourceId id : filter.getSelectedIds() ) {
    if ( !fs.getLockManager().isFeatureModifiable( id.getRid(), lockId ) ) {
      if ( lockId == null ) {
        throw new MissingParameterException( getMessage( "TA_DELETE_LOCKED_NO_LOCK_ID", id.getRid() ),
                           "lockId" );
      }
      throw new InvalidParameterValueException( getMessage( "TA_DELETE_LOCKED_WRONG_LOCK_ID", id.getRid() ),
                           "lockId" );
    }
  }
}
origin: deegree/deegree3

FeatureType referencedFt = ftNameToFt.get( referencedFtName );
if ( referencedFt == null ) {
  String msg = Messages.getMessage( "ERROR_SCHEMA_UNKNOWN_FEATURE_TYPE_IN_PROPERTY",
                   referencedFtName, pt.getName() );
  LOG.warn( msg );
origin: deegree/deegree3

String msg = Messages.getMessage( "ERROR_PROPERTY_TOO_MANY_OCCURENCES", propName,
                 activeDecl.getMaxOccurs(), type.getName() );
throw new XMLParsingException( xmlStream, msg );
  String msg = null;
  if ( activeDecl.getMinOccurs() == 1 ) {
    msg = Messages.getMessage( "ERROR_PROPERTY_MANDATORY", activeDecl.getName(), type.getName() );
  } else {
    msg = Messages.getMessage( "ERROR_PROPERTY_TOO_FEW_OCCURENCES", activeDecl.getName(),
                  activeDecl.getMinOccurs(), type.getName() );
String msg = Messages.getMessage( "ERROR_PROPERTY_UNEXPECTED", propName, type.getName() );
throw new XMLParsingException( xmlStream, msg );
origin: deegree/deegree3

String msg = Messages.getMessage( "STORE_MANAGER_STORE_SETUP_ERROR", e.getMessage() );
LOG.error( msg, e );
throw new ResourceInitException( msg, e );
    ta.commit();
  } catch ( Exception e ) {
    String msg = Messages.getMessage( "STORE_MANAGER_STORE_SETUP_ERROR", e.getMessage() );
    LOG.error( msg );
    LOG.trace( "Stack trace:", e );
origin: deegree/deegree3

String msg = Messages.getMessage( "ERROR_PROPERTY_TOO_MANY_OCCURENCES", propName,
                 activeDecl.getMaxOccurs(), ft.getName() );
throw new XMLParsingException( xmlStream, msg );
  String msg = null;
  if ( activeDecl.getMinOccurs() == 1 ) {
    msg = Messages.getMessage( "ERROR_PROPERTY_MANDATORY", activeDecl.getName(), ft.getName() );
  } else {
    msg = Messages.getMessage( "ERROR_PROPERTY_TOO_FEW_OCCURENCES", activeDecl.getName(),
                  activeDecl.getMinOccurs(), ft.getName() );
String msg = Messages.getMessage( "ERROR_PROPERTY_UNEXPECTED", propName, ft.getName() );
throw new XMLParsingException( xmlStream, msg );
origin: deegree/deegree3

if ( id != null && !"".equals( id ) ) {
  if ( idContext.getObject( id ) != null ) {
    String msg = Messages.getMessage( "ERROR_FEATURE_ID_NOT_UNIQUE", id );
    throw new XMLParsingException( xmlStream, msg );
origin: deegree/deegree3

if ( fid != null && !"".equals( fid ) ) {
  if ( idContext.getObject( fid ) != null ) {
    String msg = Messages.getMessage( "ERROR_FEATURE_ID_NOT_UNIQUE", fid );
    throw new XMLParsingException( xmlStream, msg );
origin: deegree/deegree3

throw new FeatureStoreException( getMessage( "TA_OPERATION_FT_NOT_SERVED", ftName ) );
    if ( !lockManager.isFeatureModifiable( feature.getId(), lockId ) ) {
      if ( lockId == null ) {
        throw new MissingParameterException( getMessage( "TA_UPDATE_LOCKED_NO_LOCK_ID",
                                 feature.getId() ), "lockId" );
      throw new InvalidParameterValueException( getMessage( "TA_UPDATE_LOCKED_WRONG_LOCK_ID",
                                 feature.getId() ), "lockId" );
org.deegree.feature.i18nMessages

Javadoc

Responsible for the access to messages that are visible to the user.

Messages are read from the properties file messages_LANG.properties (LANG is always a lowercased ISO 639 code), so internationalization is supported. If a certain property (or the property file) for the specific default language of the system is not found, the message is taken from messages_en.properties.

Most used methods

  • getMessage
  • get
  • overrideMessages

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Socket (java.net)
    Provides a client-side TCP socket.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now