Examples of validate()


Examples of org.apache.lucene.spatial.query.SpatialArgs.validate()

        if (!aa.isEmpty()) {
          throw new IllegalArgumentException("unused parameters: " + aa, null);
        }
      }
    }
    args.validate();
    return args;
  }

  protected static Double readDouble(String v) {
    return v == null ? null : Double.valueOf(v);
View Full Code Here

Examples of org.apache.mahout.classifier.naivebayes.NaiveBayesModel.validate()

    thetaSummer.getConfiguration().setFloat(ThetaMapper.ALPHA_I, alphaI);
    thetaSummer.getConfiguration().setBoolean(ThetaMapper.TRAIN_COMPLEMENTARY, trainComplementary);
    thetaSummer.waitForCompletion(true);
    //validate our model and then write it out to the official output
    NaiveBayesModel naiveBayesModel = BayesUtils.readModelFromDir(getTempPath(), getConf());
    naiveBayesModel.validate();
    naiveBayesModel.serialize(getOutputPath(), getConf());

    return 0;
  }
View Full Code Here

Examples of org.apache.maven.plugin.MavenPluginValidator.validate()

            throw new PluginDescriptorParsingException( plugin, pluginFile.getAbsolutePath(), e );
        }

        MavenPluginValidator validator = new MavenPluginValidator( pluginArtifact );

        validator.validate( pluginDescriptor );

        if ( validator.hasErrors() )
        {
            throw new InvalidPluginDescriptorException( "Invalid plugin descriptor for " + plugin.getId() + " ("
                + pluginFile + ")", validator.getErrors() );
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy.validate()

                            validationStrategy.getClass(), ValidationStrategy.class), entry))
                    {
                        continue;
                    }

                    validationStrategy.validate(facesContext, uiComponent, entry, convertedObject);
                }
                else
                {
                    logger.finest("no validation strategy found for " + entry.getValue());
                }
View Full Code Here

Examples of org.apache.myfaces.trinidad.validator.ByteLengthValidator.validate()

    String expected = "\"" + values[0] + "\"" + _IS_GREATER + maxBytes[0];
    try
    {
      validator.setMaximum(maxBytes[0]);
      validator.setEncoding(encodings[0]);
      validator.validate(facesContext, component, values[0]);
    }
    catch (ValidatorException ve)
    {
      String msg = ve.getFacesMessage().getDetail();
      assertEquals(msg, expected);
View Full Code Here

Examples of org.apache.myfaces.trinidad.validator.RegExpValidator.validate()

    UIComponent component = (UIComponent) mock.proxy();

    try
    {
      RegExpValidator validator = new RegExpValidator();
      validator.validate(facesContext, component, "someValue");
      // test fails if it is here

      fail("Expected Null pointer exception");
    }
    catch (NullPointerException npe)
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.ExpressionValidator.validate()

            OExpression oexpr;
            if (isJoinCondition) {
                oexpr = ec.compileJoinCondition(expression);
            } else {
                oexpr = ec.compile(expression);
                resultType[0] = ev.validate(expression, rootNodeType, requestedResultType);
            }

            oexpr.debugInfo = createDebugInfo(expression, expression.toString());

            OExpressionLanguage expLanguage = _expLanguages.get(expLang);
View Full Code Here

Examples of org.apache.ode.bpel.extension.ExtensionValidator.validate()

              if (!_context.isExtensionDeclared(el.getNamespaceURI())) {
                throw new CompilationException(__cmsgs.errUndeclaredExtensionAssignOperation().setSource(seaop));
              }
                  ExtensionValidator validator = _context.getExtensionValidator(DOMUtils.getElementQName(el));
                  if (validator != null) {
                    validator.validate(_context, seaop);
                  }
                  oext.extensionName = DOMUtils.getElementQName(el);
              oext.nestedElement = new SerializableElement(el);
                oassign.operations.add(oext);
            } catch (CompilationException ce) {
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.MockQueryResponseDocument.validate()

                MockQueryResponseDocument response = MockQueryResponseDocument.Factory.parse(result.getSequenceAsStream());
                {
                    XmlOptions opts = new XmlOptions();
                    List<Object> errors = new ArrayList<Object>();
                    opts.setErrorListener(errors);
                    if (!response.validate(opts)) {
                        __log.error("MockQuery response doesn't validate. Errors: " + errors + " Request: " + request.toString() + " Response: " + response.toString(), new Exception());
                        throw new IllegalStateException("MockQuery response doesn't validate.");
                    }
                }
                ResponseType response2 = response.getMockQueryResponse();
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleType.validate()

    for (EdmSimpleTypeKind kind : EdmSimpleTypeKind.values()) {
      if (kind == EdmSimpleTypeKind.Null) {
        continue;
      }
      final EdmSimpleType instance = kind.getEdmSimpleTypeInstance();
      assertTrue(instance.validate(null, null, null));
      assertTrue(instance.validate(null, null, getNullableFacets(null)));
      assertTrue(instance.validate(null, null, getNullableFacets(true)));
      assertFalse(instance.validate(null, null, getNullableFacets(false)));
      assertFalse(instance.validate("", null, null));
      assertFalse(instance.validate("ä", EdmLiteralKind.DEFAULT, getUnicodeFacets(false)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.