Examples of validate()


Examples of com.adactus.mpeg21.didl.xml.DigitalItemDeclarationsDocumentSource.validate()

   */
 
  public void testFactory() throws Exception {
    DigitalItemDeclarationsDocumentSource digitalItemDeclarationsDocumentSource = new DigitalItemDeclarationsDocumentSource("src/main/resources/schema/didmodel.xsd", "src/main/resources/schema/didl.xsd");
   
    digitalItemDeclarationsDocumentSource.validate(getFileContent("src/test/resources/xml/ComplexDigitalItem.xml"), "UTF-8");
    digitalItemDeclarationsDocumentSource.validate(getFileContent("src/test/resources/xml/MediumDigitalItem.xml"), "UTF-8");
    digitalItemDeclarationsDocumentSource.validate(getFileContent("src/test/resources/xml/ComplexDigitalItem.xml"), "UTF-8");
  }
}
View Full Code Here

Examples of com.adito.boot.DefaultPropertyDefinition.validate()

    @Test
    public void defaultBooleanPropertyDefinitionWithNoValidator() {
        DefaultPropertyDefinition def = new DefaultPropertyDefinition(DefaultPropertyDefinition.TYPE_BOOLEAN, "bool1", "on,off",
                        10, "on", 50, "test", true, "com.adito.input.validators.BooleanValidator", null, null);
        try {
            def.validate("off", getClass().getClassLoader());
        } catch (CodedException ce) {
            Assert.fail("Validation failed when it shouldn't.");
        }
    }
View Full Code Here

Examples of com.adito.boot.PropertyDefinition.validate()

            ActionErrors errs = null;
            PropertyItem[] items = getPropertyItems();
            for (int i = 0; i < items.length; i++) {
                PropertyDefinition def = items[i].getDefinition();
                try {
                    def.validate(String.valueOf(items[i].getPropertyValue()), getClass().getClassLoader());
                } catch (CoreException ce) {
                    if (errs == null) {
                        errs = new ActionErrors();
                    }
                    ce.getBundleActionMessage().setArg3(
View Full Code Here

Examples of com.adito.boot.PropertyValidator.validate()

    p.remove("className");
    try {
      Class clazz = getClass().forName(className);
      PropertyValidator pv = (PropertyValidator)clazz.newInstance();
      for(String item : pl) {
        pv.validate(definition, item, p);
      }
    }
    catch(CoreException ce) {
      throw ce;
    }
View Full Code Here

Examples of com.adito.input.validators.PortValidator.validate()

    @Test
    public void validPortWithNoMetaData() throws IOException, JDOMException, CodedException {
        PropertyDefinition definition = getWebServerPortDefinition();
        definition.setTypeMeta("");
        PortValidator validator = new PortValidator();
        validator.validate(definition, "69", null);
    }

    /**
     * @throws IOException
     * @throws JDOMException
View Full Code Here

Examples of com.adito.keystore.wizards.AbstractKeyStoreImportType.validate()

                AbstractWizardSequence seq = (AbstractWizardSequence) request.getSession().getAttribute(Constants.WIZARD_SEQUENCE);

                AbstractKeyStoreImportType importType = KeyStoreImportTypeManager.getInstance().getType(
                    (String)seq.getAttribute(KeyStoreImportTypeForm.ATTR_TYPE, ReplyFromCAImportType.REPLY_FROM_CA));
                SessionInfo sessionInfo = getSessionInfo(request);
                importType.validate(errs, alias, passphrase, seq, sessionInfo);

                if (errs.size() == 0) {

                    in = uploadFile.getInputStream();
                    out = new FileOutputStream(uploadedFile);
View Full Code Here

Examples of com.adito.properties.attributes.AttributeDefinition.validate()

                            (String)getWizardSequence().getAttribute(AttributeDefinitionDetailsAction.ATTR_DESCRIPTION, null),
                            false,
                            true,
                            validationString);
                        try {
                          def.validate(defaultValue, getClass().getClassLoader());
                        } catch (CoreException ce) {
                            ce.getBundleActionMessage().setArg3(def.getLabel());
                            if (errs == null) {
                                errs = new ActionErrors();
                            }
View Full Code Here

Examples of com.adobe.epubcheck.api.EpubCheck.validate()

    for(File epubDir : parent.listFiles(dirFilter)) {
      Archive epub = new Archive(epubDir.getAbsolutePath(), false);
      epub.createArchive();
      Report report = new DefaultReportImpl(epub.getEpubName());
      EpubCheck check = new EpubCheck(epub.getEpubFile(), report);
      if (check.validate()) {
        System.out.println(Messages.NO_ERRORS__OR_WARNINGS);
        String name = epub.getEpubName();
        name = name.replace(".epub", "-"+now+".epub");
        epub.getEpubFile().renameTo(new File(buildDir,name));
      } else {
View Full Code Here

Examples of com.adobe.epubcheck.opf.DocumentValidator.validate()

      System.err.println(Messages.get("there_were_errors"));
      return 1;
    }
    else
    {
      if (check.validate())
      {
        outWriter.println(Messages.get("no_errors__or_warnings"));
        return 0;
      }
      System.err.println(Messages.get("there_were_errors"));
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute.LinkAttribute.validate()

        AttributeTracer areaTracer = (AttributeTracer) tracer.clone();
        areaTracer.setMonoListElement(true);
        areaTracer.setListIndex(i);
        LinkAttribute linkAttribute = area.getLink();
        if (null != linkAttribute) {
          errors.addAll(linkAttribute.validate(areaTracer));
        }
        String coords = area.getCoords();
        boolean isShapeValued = (area.getShape() != null && area.getShape().trim().length() > 0 );
        boolean isCoordsValued = (coords!= null && coords.trim().length() > 0 && this.isValidNumber(coords));
        if (!isShapeValued || !isCoordsValued) {
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.