Package com.damnhandy.uri.template.impl

Examples of com.damnhandy.uri.template.impl.Operator


    * @throws VariableExpansionException
    * @return
    */
   private String expressionReplacementString(Expression expression) throws VariableExpansionException
   {
      final Operator operator = expression.getOperator();
      final List<String> replacements = expandVariables(expression);
      String result = joinParts(operator.getSeparator(), replacements);
      if (result != null)
      {
         if (operator != Operator.RESERVED)
         {
            result = operator.getPrefix() + result;
         }
      }
      else
      {
         result = "";
View Full Code Here


   @SuppressWarnings(
   {"rawtypes", "unchecked"})
   private List<String> expandVariables(Expression expression) throws VariableExpansionException
   {
      final List<String> replacements = new ArrayList<String>();
      final Operator operator = expression.getOperator();
      for (VarSpec varSpec : expression.getVarSpecs())
      {
         if (values.containsKey(varSpec.getVariableName()))
         {
            Object value = values.get(varSpec.getVariableName());
View Full Code Here

   private void parseRawExpression(String rawExpression) throws MalformedUriTemplateException
   {
      final String expressionReplacement = Pattern.quote(rawExpression);
      String token = rawExpression.substring(1, rawExpression.length() - 1);
      // Check for URI operators
      Operator operator = Operator.NUL;
      String firstChar = token.substring(0, 1);
      if (UriTemplate.containsOperator(firstChar))
      {
         try
         {
View Full Code Here

    * @throws VariableExpansionException
    * @return
    */
   private String expressionReplacementString(Expression expression) throws VariableExpansionException
   {
      final Operator operator = expression.getOperator();
      final List<String> replacements = expandVariables(expression);
      String result = joinParts(operator.getSeparator(), replacements);
      if (result != null)
      {
         if (operator != Operator.RESERVED)
         {
            result = operator.getPrefix() + result;
         }
      }
      else
      {
         result = "";
View Full Code Here

   @SuppressWarnings(
   {"rawtypes", "unchecked"})
   private List<String> expandVariables(Expression expression) throws VariableExpansionException
   {
      final List<String> replacements = new ArrayList<String>();
      final Operator operator = expression.getOperator();
      for (VarSpec varSpec : expression.getVarSpecs())
      {
         if (values.containsKey(varSpec.getVariableName()))
         {
            Object value = values.get(varSpec.getVariableName());
View Full Code Here

   private void parseRawExpression(String rawExpression) throws MalformedUriTemplateException
   {
      final String expressionReplacement = Pattern.quote(rawExpression);
      String token = rawExpression.substring(1, rawExpression.length() - 1);
      // Check for URI operators
      Operator operator = Operator.NUL;
      String firstChar = token.substring(0, 1);
      if (UriTemplate.containsOperator(firstChar))
      {
         try
         {
View Full Code Here

    * @throws VariableExpansionException
    * @return
    */
   private String expressionReplacementString(Expression expression) throws VariableExpansionException
   {
      final Operator operator = expression.getOperator();
      final List<String> replacements = expandVariables(expression);
      String result = joinParts(operator.getSeparator(), replacements);
      if (result != null)
      {
         if (operator != Operator.RESERVED)
         {
            result = operator.getPrefix() + result;
         }
      }
      else
      {
         result = "";
View Full Code Here

   @SuppressWarnings(
   {"rawtypes", "unchecked"})
   private List<String> expandVariables(Expression expression) throws VariableExpansionException
   {
      final List<String> replacements = new ArrayList<String>();
      final Operator operator = expression.getOperator();
      for (VarSpec varSpec : expression.getVarSpecs())
      {
         if (values.containsKey(varSpec.getVariableName()))
         {
            Object value = values.get(varSpec.getVariableName());
View Full Code Here

   private void parseRawExpression(String rawExpression) throws MalformedUriTemplateException
   {
      final String expressionReplacement = Pattern.quote(rawExpression);
      String token = rawExpression.substring(1, rawExpression.length() - 1);
      // Check for URI operators
      Operator operator = Operator.NUL;
      String firstChar = token.substring(0, 1);
      if (UriTemplate.containsOperator(firstChar))
      {
         operator = Operator.fromOpCode(firstChar);
         token = token.substring(1, token.length());
View Full Code Here

    * @throws VariableExpansionException
    * @return
    */
   private String expressionReplacementString(Expression expression) throws VariableExpansionException
   {
      final Operator operator = expression.getOperator();
      final List<String> replacements = expandVariables(expression);
      String result = joinParts(operator.getSeparator(), replacements);
      if (result != null)
      {
         if (operator != Operator.RESERVED)
         {
            result = operator.getPrefix() + result;
         }
      }
      else
      {
         result = "";
View Full Code Here

TOP

Related Classes of com.damnhandy.uri.template.impl.Operator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.