Tabnine Logo
Messages.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
org.deegree.protocol.i18n.Messages

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

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

private Boolean parseLockAction( String lockActionStr ) {
  Boolean lockAll = null;
  if ( lockActionStr != null ) {
    if ( "ALL".equals( lockActionStr ) ) {
      lockAll = true;
    } else if ( "SOME".equals( lockActionStr ) ) {
      lockAll = false;
    } else {
      String msg = Messages.get( "WFS_UNKNOWN_LOCK_ACTION", lockActionStr );
      throw new XMLParsingException( this, rootElement, msg );
    }
  }
  return lockAll;
}
origin: deegree/deegree3

  private Boolean parseLockAction( String lockActionStr ) {
    Boolean lockAll = null;
    if ( lockActionStr != null ) {
      if ( "ALL".equals( lockActionStr ) ) {
        lockAll = true;
      } else if ( "SOME".equals( lockActionStr ) ) {
        lockAll = false;
      } else {
        String msg = Messages.get( "WFS_UNKNOWN_LOCK_ACTION", lockActionStr );
        throw new XMLParsingException( this, rootElement, msg );
      }
    }
    return lockAll;
  }
}
origin: deegree/deegree3

/**
 * Returns the object representation for the given <code>wfs:Insert</code> element.
 * <p>
 * NOTE: In order to allow stream-oriented processing, this method does *not* consume all events corresponding to
 * the <code>wfs:Insert</code> element from the given <code>XMLStream</code>. After a call to this method, the XML
 * stream points at the <code>START_ELEMENT</code> of the insert payload.
 * </p>
 * 
 * @param xmlStream
 *            cursor must point at the <code>START_ELEMENT</code> event (&lt;wfs:Insert&gt;)
 * @return corresponding {@link Insert} object, never <code>null</code>
 * @throws NoSuchElementException
 * @throws XMLStreamException
 * @throws XMLParsingException
 */
Insert readInsert( XMLStreamReader xmlStream )
            throws XMLStreamException {
  // optional: '@handle'
  String handle = xmlStream.getAttributeValue( null, "handle" );
  if ( xmlStream.nextTag() != START_ELEMENT ) {
    throw new XMLParsingException( xmlStream, Messages.get( "WFS_INSERT_MISSING_FEATURE_ELEMENT" ) );
  }
  return new Insert( handle, null, null, null, xmlStream );
}
origin: deegree/deegree3

private void checkCapabilities() {
  List<Version> supportedVersions = getIdentification().getServiceTypeVersion();
  for ( Version version : supportedVersions ) {
    if ( VERSION_111.equals( version ) || VERSION_130.equals( version ) ) {
      return;
    }
  }
  throw new IllegalArgumentException( get( "WMSCLIENT.WRONG_VERSION_CAPABILITIES", supportedVersions,
                       VERSION_111 + ", " + VERSION_130 ) );
}
origin: deegree/deegree3

@Override
protected Envelope parseLatLonBoundingBox( OMElement elem ) {
  double[] min = new double[2];
  double[] max = new double[2];
  while ( elem.getLocalName().equals( "Layer" ) ) {
    OMElement bbox = getElement( elem, new XPath( "LatLonBoundingBox", null ) );
    if ( bbox != null ) {
      try {
        min[0] = Double.parseDouble( bbox.getAttributeValue( new QName( "minx" ) ) );
        min[1] = Double.parseDouble( bbox.getAttributeValue( new QName( "miny" ) ) );
        max[0] = Double.parseDouble( bbox.getAttributeValue( new QName( "maxx" ) ) );
        max[1] = Double.parseDouble( bbox.getAttributeValue( new QName( "maxy" ) ) );
        return new GeometryFactory().createEnvelope( min, max, CRSManager.getCRSRef( WGS84 ) );
      } catch ( NumberFormatException nfe ) {
        LOG.warn( get( "WMSCLIENT.SERVER_INVALID_NUMERIC_VALUE", nfe.getLocalizedMessage() ) );
      }
    } else {
      elem = (OMElement) elem.getParent();
    }
  }
  return null;
}
origin: deegree/deegree3

protected WMSCapabilitiesAdapter getCapabilitiesAdapter( OMElement root, String version )
            throws IOException {
  if ( version != null ) {
    wmsVersion = Version.parseVersion( version );
  } else {
    LOG.warn( "No version attribute in WMS capabilities document. Defaulting to 1.1.1." );
    wmsVersion = VERSION_111;
  }
  if ( VERSION_111.equals( wmsVersion ) ) {
    return new WMS111CapabilitiesAdapter( root );
  } else if ( VERSION_130.equals( wmsVersion ) ) {
    return new WMS130CapabilitiesAdapter( root );
  }
  throw new IllegalArgumentException( get( "WMSCLIENT.WRONG_VERSION_CAPABILITIES",
                       getIdentification().getServiceTypeVersion(), VERSION_111 + ", "
                                             + VERSION_130 ) );
}
origin: deegree/deegree3

/**
 * Parses the {@link GetRecords} kvp request and decides which version has to parse because of the requested version
 * 
 * @param normalizedKVPParams
 *            that are requested as key to a value.
 * @return {@link GetRecords}
 */
public static GetRecords parse( Map<String, String> normalizedKVPParams, String defaultOutputFormat,
                String defaultOutputSchema ) {
  Version version = Version.parseVersion( KVPUtils.getRequired( normalizedKVPParams, "VERSION" ) );
  GetRecords result = null;
  if ( VERSION_202.equals( version ) ) {
    result = parse202( VERSION_202, normalizedKVPParams, defaultOutputFormat, defaultOutputSchema );
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

  /**
   * Parses a normalized KVP-map as a WFS {@link ListStoredQueries} request.
   * 
   * @param kvpParams
   *            normalized KVP-map; keys must be uppercase, each key only has one associated value
   * @return parsed {@link ListStoredQueries} request
   * @throws MissingParameterException
   *             if the request version is unsupported
   * @throws InvalidParameterValueException
   *             if a parameter contains a syntax error
   */
  public static ListStoredQueries parse( Map<String, String> kvpParams )
              throws MissingParameterException, InvalidParameterValueException {

    Version version = Version.parseVersion( KVPUtils.getRequired( kvpParams, "VERSION" ) );
    if ( !( VERSION_200.equals( version ) ) ) {
      String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_200 ) );
      throw new InvalidParameterValueException( msg );
    }
    return new ListStoredQueries( version, null );
  }
}
origin: deegree/deegree3

/**
 * Parses the {@link GetRecordById} kvp request and decides which version has to parse because of the requested
 * version
 * 
 * @param normalizedKVPParams
 *            that are requested containing all mandatory and optional parts regarding CSW spec
 * @return {@link GetRecordById}
 * @throws MetadataStoreException
 */
public static GetRecordById parse( Map<String, String> normalizedKVPParams, String defaultOutputFormat,
                  String defaultOuputSchema ) {
  Version version = Version.parseVersion( KVPUtils.getRequired( normalizedKVPParams, "VERSION" ) );
  GetRecordById result = null;
  if ( VERSION_202.equals( version ) ) {
    result = parse202( VERSION_202, normalizedKVPParams, defaultOutputFormat, defaultOuputSchema );
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

public TransactionXmlReader createReader( Version version ) {
  if ( VERSION_100.equals( version ) ) {
    return new TransactionXmlReader100();
  } else if ( VERSION_110.equals( version ) ) {
    return new TransactionXmlReader110();
  } else if ( VERSION_200.equals( version ) ) {
    return new TransactionXmlReader200();
  }
  String msg = Messages.get( "UNSUPPORTED_VERSION", version,
                Version.getVersionsString( VERSION_100, VERSION_110, VERSION_200 ) );
  throw new InvalidParameterValueException( msg );
}
origin: deegree/deegree3

/**
 * Parses the {@link DescribeRecord} XML request.
 * 
 * @param version
 * @return {@link DescribeRecord}
 */
public DescribeRecord parse( Version version ) {
  if ( version == null ) {
    version = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version", nsContext ) ) );
  }
  DescribeRecord result = null;
  if ( VERSION_202.equals( version ) ) {
    result = parse202();
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

  /**
   * Parses a normalized KVP-map as a WFS {@link DropStoredQuery} request.
   * 
   * @param kvpParams
   *            normalized KVP-map; keys must be uppercase, each key only has one associated value
   * @return parsed {@link DropStoredQuery} request
   * @throws MissingParameterException
   *             if the request version is unsupported
   * @throws InvalidParameterValueException
   *             if a parameter contains a syntax error
   */
  public static DropStoredQuery parse( Map<String, String> kvpParams )
              throws MissingParameterException, InvalidParameterValueException {

    Version version = Version.parseVersion( KVPUtils.getRequired( kvpParams, "VERSION" ) );
    if ( !( VERSION_200.equals( version ) ) ) {
      String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_200 ) );
      throw new InvalidParameterValueException( msg );
    }

    String id = KVPUtils.getRequired( kvpParams, "STOREDQUERY_ID" );
    return new DropStoredQuery( version, null, id );
  }
}
origin: deegree/deegree3

/**
 * Parses the {@link Transaction} XML request by deciding which version has to be parsed because of the requested
 * version.
 * 
 * @param version
 * @return {@link Transaction}
 */
public Transaction parse( Version version ) {
  if ( version == null ) {
    version = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version", nsContext ) ) );
  }
  Transaction result = null;
  if ( VERSION_202.equals( version ) ) {
    result = parse202();
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

/**
 * Parses the {@link GetRecords} XML request by deciding which version has to be parsed because of the requested
 * version.
 * 
 * @param version
 * @return {@Link GetRecords}
 */
public GetRecords parse( Version version, String defaultOutputFormat, String defaultOutputSchema ) {
  if ( version == null ) {
    version = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version", nsContext ) ) );
  }
  GetRecords result = null;
  if ( VERSION_202.equals( version ) ) {
    result = parse202( defaultOutputFormat, defaultOutputSchema );
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

public static GetRepositoryItem parse( Map<String, String> normalizedKVPParams ) {
  Version version = Version.parseVersion( KVPUtils.getRequired( normalizedKVPParams, "VERSION" ) );
  if ( VERSION_202.equals( version ) || VERSION_100.equals( version ) ) {
    return new GetRepositoryItem( KVPUtils.getRequired( normalizedKVPParams, "ID" ) );
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_202 )
                                  + Version.getVersionsString( VERSION_100 ) );
    throw new InvalidParameterValueException( msg );
  }
}
origin: deegree/deegree3

/**
 * Parses the {@link GetRecordById} XML request by deciding which version has to be parsed because of the requested
 * version.
 * 
 * @param requestVersion
 * @return {@link GetRecordById}
 */
public GetRecordById parse( Version requestVersion, String defaultOutputFormat, String defaultOutputSchema ) {
  if ( requestVersion == null ) {
    requestVersion = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version",
                                                nsContext ) ) );
  }
  GetRecordById result = null;
  if ( VERSION_202.equals( requestVersion ) ) {
    result = parse202( defaultOutputFormat, defaultOutputSchema );
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", requestVersion, Version.getVersionsString( VERSION_202 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
origin: deegree/deegree3

@Override
protected Envelope parseLatLonBoundingBox( OMElement elem ) {
  double[] min = new double[2];
  double[] max = new double[2];
  while ( elem.getLocalName().equals( "Layer" ) ) {
    OMElement bbox = getElement( elem, new XPath( "wms:EX_GeographicBoundingBox", nsContext ) );
    if ( bbox != null ) {
      try {
        min[0] = getRequiredNodeAsDouble( bbox, new XPath( "wms:westBoundLongitude", nsContext ) );
        min[1] = getRequiredNodeAsDouble( bbox, new XPath( "wms:southBoundLatitude", nsContext ) );
        max[0] = getRequiredNodeAsDouble( bbox, new XPath( "wms:eastBoundLongitude", nsContext ) );
        max[1] = getRequiredNodeAsDouble( bbox, new XPath( "wms:northBoundLatitude", nsContext ) );
        return new GeometryFactory().createEnvelope( min, max, CRSManager.getCRSRef( WGS84 ) );
      } catch ( NumberFormatException nfe ) {
        LOG.warn( get( "WMSCLIENT.SERVER_INVALID_NUMERIC_VALUE", nfe.getLocalizedMessage() ) );
      }
    } else {
      elem = (OMElement) elem.getParent();
    }
  }
  return null;
}
origin: deegree/deegree3

  /**
   * Parses a WFS <code>ListStoredQueries</code> document into a {@link ListStoredQueries} request.
   * 
   * @return parsed {@link ListStoredQueries} request, never <code>null</code>
   * @throws InvalidParameterValueException
   *             if a parameter contains a syntax error
   */
  public ListStoredQueries parse()
              throws InvalidParameterValueException {

    // <xsd:attribute name="version" type="xsd:string" use="required" fixed="2.0.0"/>
    Version version = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version", nsContext ) ) );
    if ( !( VERSION_200.equals( version ) ) ) {
      String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_200 ) );
      throw new InvalidParameterValueException( msg );
    }

    // <xsd:attribute name="handle" type="xsd:string"/>
    String handle = getNodeAsString( rootElement, new XPath( "@handle", nsContext ), null );

    return new ListStoredQueries( version, handle );
  }
}
origin: deegree/deegree3

  /**
   * Parses a WFS <code>DescribeStoredQueries</code> document into a {@link DescribeStoredQueries} request.
   * 
   * @return parsed {@link DescribeStoredQueries} request, never <code>null</code>
   * @throws InvalidParameterValueException
   *             if a parameter contains a syntax error
   */
  public DescribeStoredQueries parse()
              throws InvalidParameterValueException {

    // <xsd:attribute name="version" type="xsd:string" use="required" fixed="2.0.0"/>
    Version version = Version.parseVersion( getRequiredNodeAsString( rootElement, new XPath( "@version", nsContext ) ) );
    if ( !( VERSION_200.equals( version ) ) ) {
      String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_200 ) );
      throw new InvalidParameterValueException( msg );
    }

    // <xsd:attribute name="handle" type="xsd:string"/>
    String handle = getNodeAsString( rootElement, new XPath( "@handle", nsContext ), null );

    // <xsd:element name="StoredQueryId" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
    String[] storedQueryIds = getNodesAsStrings( rootElement, new XPath( "wfs200:StoredQueryId", nsContext ) );

    return new DescribeStoredQueries( version, handle, storedQueryIds );
  }
}
org.deegree.protocol.i18nMessagesget

Javadoc

Short version for lazy people.

Popular methods of Messages

  • getMessage
  • overrideMessages

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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