Tabnine Logo
org.deegree.protocol.i18n
Code IndexAdd Tabnine to your IDE (free)

How to use org.deegree.protocol.i18n

Best Java code snippets using org.deegree.protocol.i18n (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

/**
 * 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

/**
 * Returns the object representation for the given <code>wfs:Replace</code> element.
 * <p>
 * NOTE: In order to allow stream-oriented processing, this method does *not* consume all events corresponding to
 * the <code>wfs:Replace</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 replacement feature. The replacement feature is followed
 * by a <code>fes:Filter</code> element.
 * </p>
 * 
 * @param xmlStream
 *            cursor must point at the <code>START_ELEMENT</code> event (&lt;wfs:Replace&gt;)
 * @return corresponding {@link Replace} object, never <code>null</code>
 * @throws NoSuchElementException
 * @throws XMLStreamException
 * @throws XMLParsingException
 */
Replace readReplace( XMLStreamReader xmlStream )
            throws NoSuchElementException, XMLStreamException {
  // <xsd:attribute name="handle" type="xsd:string"/>
  String handle = xmlStream.getAttributeValue( null, "handle" );
  nextElement( xmlStream );
  if ( !xmlStream.isStartElement() ) {
    throw new XMLParsingException( xmlStream, Messages.get( "WFS_REPLACE_MISSING_FEATURE_ELEMENT" ) );
  }
  return new Replace( handle, 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

/**
 * Parses a WFS <code>GetGmlObject</code> document into a {@link GetGmlObject} request.
 * <p>
 * Supported versions:
 * <ul>
 * <li>WFS 1.1.0</li>
 * </ul>
 * 
 * @return parsed {@link GetGmlObject} request
 * @throws XMLParsingException
 *             if a syntax error occurs in the XML
 * @throws MissingParameterException
 *             if the request version is unsupported
 * @throws InvalidParameterValueException
 *             if a parameter contains a syntax error
 */
public GetGmlObject parse() {
  Version version = determineVersion110Safe();
  GetGmlObject result = null;
  if ( VERSION_110.equals( version ) ) {
    result = parse110();
  } else {
    String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_110 ) );
    throw new InvalidParameterValueException( msg );
  }
  return result;
}
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

/**
 * 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

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 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

  result = parse200();
} else {
  String msg = Messages.get( "UNSUPPORTED_VERSION", version,
                Version.getVersionsString( VERSION_100, VERSION_110, VERSION_200 ) );
  throw new InvalidParameterValueException( msg );
origin: deegree/deegree3

  result = parse200();
} else {
  String msg = Messages.get( "UNSUPPORTED_VERSION", version,
                Version.getVersionsString( VERSION_100, VERSION_110, VERSION_200 ) );
  throw new InvalidParameterValueException( msg );
org.deegree.protocol.i18n

Most used classes

  • Messages
    Responsible for the access to messages that are visible to the user. Messages are read from the prop
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