Examples of convert()


Examples of net.sourceforge.stripes.validation.TypeConverter.convert()

                TypeConverter tc = StripesFilter.getConfiguration()
                        .getTypeConverterFactory().getTypeConverter(declaredType, locale);

                // If there is a type converter, try using it!
                if (tc != null) {
                    Object retval = tc.convert(stringKey, declaredType, errors);
                    if (errors.size() == 0) return retval;
                }
                // Otherwise look for a String constructor
                else {
                    Constructor c = declaredType.getConstructor(String.class);
View Full Code Here

Examples of nexj.core.meta.Primitive.convert()

      switch (((HL7MessagePartMapping)part.getMapping()).getSeq())
      {
         case 7: // Message time
            if (primitive != null)
            {
               return primitive.convert(new Timestamp(System.currentTimeMillis()));
            }

            break;

         case 9: // Message type
View Full Code Here

Examples of nexj.core.meta.Type.convert()

                        convertedList.add(((Primitive)type).getConverter(primitive).invoke(original));
                     }
                  }
                  else
                  {
                     convertedList.add(type.convert(original));
                  }
               }

               return (convertedList != null) ? convertedList : list;
            }
View Full Code Here

Examples of no.hal.jex.java.ReflectiveTestAnnotationsToModelConverter.convert()

      setReflectionClassLoader(requirementChecker.getReflectionHelper());
      Test suite = requirementChecker.createTest(name, null);
      if (suite instanceof TestSuite) {
        ReflectiveTestAnnotationsToModelConverter converter = new ReflectiveTestAnnotationsToModelConverter(JexFactory.eINSTANCE.createExercise(), (TestSuite) suite);
        setReflectionClassLoader(converter.getReflectionHelper());
        Exercise ex = converter.convert();
        openExercise(ex);
      } else {
        throw new IllegalArgumentException("Couldn't find class " + name + ", are you sure the classpath is correctly set?");
      }
    }
View Full Code Here

Examples of no.hal.jex.jdt.JdtTestAnnotationsToModelConverter.convert()

    URI testsResourceUri = URI.createPlatformResourceURI(resource.getFullPath() + "." + JexResource.JEX_EXTENSION, true);
    IJavaElement javaElement = JdtHelper.findIJavaElement(javaProject, segments, 1);
    if (javaElement != null) {
      JdtTestAnnotationsToModelConverter testAnnotationsToModelConverter = new JdtTestAnnotationsToModelConverter(JexFactory.eINSTANCE.createExercise(), javaElement);
      if (testAnnotationsToModelConverter.canConvert()) {
        Exercise exercise = testAnnotationsToModelConverter.convert();
        Resource jexResource = resourceSet.createResource(testsResourceUri);
        jexResource.getContents().add(exercise);
        return true;
      }
    }
View Full Code Here

Examples of no.ugland.utransprod.service.ArticleTypeToOrderLineConverter.convert()

  private OrderLine getOrderLine(Ordln ordln, Order order,
      ArticleTypeToOrderLineSelector selector,
      ManagerRepository managerRepository) {
    ArticleTypeToOrderLineConverter converter = selector
        .getConverter(managerRepository);
    return converter.convert(ordln.getArticleType(), ordln, order, null);
  }

  private ArticleType getArticleTypeByProdCatNo(Ordln ordln) {
    ArticleType articleType = ArticleType.UNKNOWN;
    if (ordln.getProd() != null) {
View Full Code Here

Examples of nu.xom.converters.SAXConverter.convert()

    
        String data = "<root/>";
        Document doc = builder.build(data, null);
        ContentHandler handler = new XMLPrefixTester2();
        SAXConverter converter = new SAXConverter(handler);
        converter.convert(doc);
       
    }
   
   
    public void testNoPrefixMappingEventsForXMLPrefix()
View Full Code Here

Examples of org.activiti.workflow.simple.converter.WorkflowDefinitionConversion.convert()

        modelData.setName(deployModelPopupWindow.getProcessName());
        workflowDefinition.setName(deployModelPopupWindow.getProcessName());
       
        WorkflowDefinitionConversion conversion =
                ExplorerApp.get().getWorkflowDefinitionConversionFactory().createWorkflowDefinitionConversion(workflowDefinition);
        conversion.convert();
       
        // Deploy to database
        byte[] bpmnBytes = null;
        try {
          bpmnBytes = conversion.getBpmn20Xml().getBytes("utf-8");
View Full Code Here

Examples of org.apache.aries.application.filesystem.IFile.convert()

    assertEquals(3, allFiles.size());
    IFile metaInf = files.get(0);
   
    assertTrue(metaInf.isDirectory());
    assertEquals("META-INF", metaInf.getName());
    assertNotNull(metaInf.convert());
   
    for (IFile aFile : dir) {
      if (!aFile.getName().equalsIgnoreCase(".svn")) {
        assertTrue(aFile.isDirectory());
        assertEquals("META-INF", aFile.getName());
View Full Code Here

Examples of org.apache.aries.application.management.spi.convert.BundleConverter.convert()

            List<ConversionException> conversionExceptions = Collections.emptyList();
            while (converters.hasNext() && convertedBinary == null) {
              try {
              BundleConverter converter = converters.next();
              _logger.debug("Converting file using {} converter", converter);
                convertedBinary = converter.convert(ebaFile, f);
              } catch (ServiceException sx) {
                // We'll get this if our optional BundleConverter has not been injected.
              } catch (ConversionException cx) {
                conversionExceptions.add(cx);
              }
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.