public Float unmarshall(Node in) throws Exception { return XpathUtils.asFloat(".", in); }
/** * Evaluates the specified XPath expression and returns the result as a * Float. * <p> * This method can be expensive as a new xpath is instantiated per * invocation. Consider passing in the xpath explicitly via { * {@link #asDouble(String, Node, XPath)} instead. Note {@link XPath} is * not thread-safe and not reentrant. * * @param expression * The XPath expression to evaluate. * @param node * The node to run the expression on. * * @return The Float result. * * @throws XPathExpressionException * If there was a problem processing the specified XPath * expression. */ public static Float asFloat(String expression, Node node) throws XPathExpressionException { return asFloat(expression, node, xpath()); }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberDomainsExceeded")) return null; NumberDomainsExceededException e = (NumberDomainsExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidNextToken")) return null; InvalidNextTokenException e = (InvalidNextTokenException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberDomainAttributesExceeded")) return null; NumberDomainAttributesExceededException e = (NumberDomainAttributesExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("DuplicateItemName")) return null; DuplicateItemNameException e = (DuplicateItemNameException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberDomainBytesExceeded")) return null; NumberDomainBytesExceededException e = (NumberDomainBytesExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberSubmittedItemsExceeded")) return null; NumberSubmittedItemsExceededException e = (NumberSubmittedItemsExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("RequestTimeout")) return null; RequestTimeoutException e = (RequestTimeoutException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidNumberPredicates")) return null; InvalidNumberPredicatesException e = (InvalidNumberPredicatesException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberSubmittedAttributesExceeded")) return null; NumberSubmittedAttributesExceededException e = (NumberSubmittedAttributesExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("TooManyRequestedAttributes")) return null; TooManyRequestedAttributesException e = (TooManyRequestedAttributesException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NumberItemAttributesExceeded")) return null; NumberItemAttributesExceededException e = (NumberItemAttributesExceededException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("NoSuchDomain")) return null; NoSuchDomainException e = (NoSuchDomainException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidNumberValueTests")) return null; InvalidNumberValueTestsException e = (InvalidNumberValueTestsException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidQueryExpression")) return null; InvalidQueryExpressionException e = (InvalidQueryExpressionException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("AttributeDoesNotExist")) return null; AttributeDoesNotExistException e = (AttributeDoesNotExistException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("MissingParameter")) return null; MissingParameterException e = (MissingParameterException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
@Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidParameterValue")) return null; InvalidParameterValueException e = (InvalidParameterValueException) super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }
public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands. String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidNumberValueTests")) return null; InvalidNumberValueTestsException e = (InvalidNumberValueTestsException)super.unmarshall(node); e.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return e; } }