Examples of validate()


Examples of org.geoserver.catalog.impl.CatalogImpl.validate()

        LayerGroupInfo group = persister.load(new ByteArrayInputStream(xml.getBytes()), LayerGroupInfo.class);

        Assert.assertEquals(LayerGroupInfo.Mode.SINGLE, group.getMode());
       
        Catalog catalog = new CatalogImpl();
        Assert.assertTrue(catalog.validate(group, false).isValid());
    }
   
    @Test
    public void testVirtualTable() throws Exception {
        Catalog catalog = new CatalogImpl();
View Full Code Here

Examples of org.geotools.data.efeature.EFeatureContextInfo.validate()

        EFeatureTestsContextHelper eHelper =
            new EFeatureTestsContextHelper(new EFeatureContextFactory(),false, false);
        EFeatureContext eContext = eHelper.eContext();
        EFeatureContextInfo eStructure = eContext.eStructure();
        assertState(eStructure,false,false,false);
        assertStatus(eStructure.validate(),EFeatureStatus.SUCCESS);
        assertState(eStructure,true,true,false);
        assertStructure("EFeatureContext structure mismatch",eStructure);
    }   

    /** Test SPI. */
 
View Full Code Here

Examples of org.geotools.swing.wizard.ParamField.validate()

        // populate panel
        for (Entry<Parameter<?>, ParamField> entry : fields.entrySet()) {
            Parameter<?> param = entry.getKey();
            ParamField field = entry.getValue();

            if (!field.validate()) {               
                return false; // not validate
            }
            if (param.required && field.getValue() == null) {
                return false; // a value is required here
            }
View Full Code Here

Examples of org.geotools.validation.FeatureValidation.validate()

                    }
                    //validate this feature
                    monitor.subTask(++position + "/" + count); //$NON-NLS-1$
                    SimpleFeature feature = (SimpleFeature) reader.next();
          try {
            validator.validate(feature, type, results);
          } catch (Throwable e) {
            results.error(feature, e.getMessage());
          }
                    monitor.worked(1);
            }
View Full Code Here

Examples of org.geotools.validation.IntegrityValidation.validate()

              source = layers[i].getResource(FeatureSource.class, monitor);
              String typeRef = nameSpace.toString()+":"+typeName; //$NON-NLS-1$
              stores.put(typeRef, source);
          }
      // run the test
      validator.validate(stores, envelope, results);
    }
  }

 
  /**
 
View Full Code Here

Examples of org.geotools.validation.attributes.UniqueFIDValidation.validate()

        HashMap layers = new HashMap();
        layers.put("road", store.getFeatureSource("road"));
        layers.put("river", store.getFeatureSource("river"));

        assertTrue(validator.validate(layers, null, validationResults)); // validate will return true
    }
}
View Full Code Here

Examples of org.geotools.validation.spatial.IsValidGeometryValidation.validate()

        IsValidGeometryValidation validator = new IsValidGeometryValidation();
        validator.setName("isValidRoad");
        validator.setDescription("Tests to see if a road is valid");
        validator.setTypeRef( "*" );
        validationResults.setValidation(validator);
        assertTrue(validator.validate(this.newRoad, this.roadType,
                validationResults));

        try {
            this.newRoad = SimpleFeatureBuilder.build(this.roadType,(new Object[] {
                        new Integer(2), line(new int[] { 1, 2, 1, 2 }), "r4"
View Full Code Here

Examples of org.geotools.xml.Parser.validate()

    }
   
    List<Exception> validateSLD() {
        Parser parser = new Parser(new SLDConfiguration());
        try {
            parser.validate( new ByteArrayInputStream(editor.getInput().getBytes()) );
        } catch( Exception e ) {
            return Arrays.asList( e );
        }
       
        return parser.getValidationErrors();
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXValidator.validate()

                final AMXValidator validator = new AMXValidator(mServer, mValidationLevel, mUnregisterNonCompliant, mLogInaccessibleAttributes);
                try {
                    //debug( "VALIDATING MBeans: " + toValidate.size() );
                    final ObjectName[] objectNames = new ObjectName[toValidate.size()];
                    toValidate.toArray(objectNames);
                    final AMXValidator.ValidationResult result = validator.validate(objectNames);
                    if (result.numFailures() != 0) {
                        mFailures.putAll(result.failures());

                        mComplianceFailures.addAndGet(result.numFailures());
                        mLogger.log(Level.INFO,"amx.validatingMbean",result.toString());
View Full Code Here

Examples of org.glassfish.jersey.server.model.ComponentModelValidator.validate()

            resourceModel = new ResourceModel.Builder(resourceBag.getRootResources(), false).build();
            resourceModel = processResourceModel(resourceModel);

            if (!disableValidation) {
                final ComponentModelValidator validator = new ComponentModelValidator(locator);
                validator.validate(resourceModel);
            }

            if (Errors.fatalIssuesFound() && !ignoreValidationErrors) {
                throw new ModelValidationException(LocalizationMessages.RESOURCE_MODEL_VALIDATION_FAILED_AT_INIT(),
                        ModelErrors.getErrorsAsResourceModelIssues(true));
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.