Examples of convert()


Examples of org.obolibrary.obo2owl.OWLAPIOwl2Obo.convert()

            @Nonnull Writer writer, OWLDocumentFormat format)
            throws OWLOntologyStorageException {
        try {
            OWLAPIOwl2Obo translator = new OWLAPIOwl2Obo(
                    ontology.getOWLOntologyManager());
            final OBODoc result = translator.convert(ontology);
            boolean hasImports = ontology.getImports().isEmpty() == false;
            NameProvider nameProvider;
            if (hasImports) {
                // if the ontology has imports
                // use it as secondary lookup for labels
View Full Code Here

Examples of org.ofbiz.base.conversion.Converter.convert()

    private static boolean encodeObject(Writer writer, Object value, boolean allowJsonResolve) throws Exception {
        Converter converter = Converters.getConverter(value.getClass(), String.class);
        if (converter != null) {
            Class clz = converter.getSourceClass();
            String str = (String) converter.convert(value);
            if (clz != null) {
                writer.write(clz.getName());
            } else {
                writer.write(value.getClass().getName());
            }
View Full Code Here

Examples of org.ofbiz.base.conversion.DateTimeConverters.StringToTimestamp.convert()

                }

                StringToTimestamp stringToTimestamp = new DateTimeConverters.StringToTimestamp();
                Timestamp timestamp = null;
                try {
                    timestamp = stringToTimestamp.convert(retVal);
                    Date date = new Date(timestamp.getTime());

                    DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
                    retVal = dateFormatter.format(date);
                }
View Full Code Here

Examples of org.openbel.framework.common.bel.converters.BELDocumentConverter.convert()

        sglist.add(sg);
        final BELDocument beldoc = new BELDocument(dh, null, nsset, sglist);

        // convert to common model
        final BELDocumentConverter converter = new BELDocumentConverter();
        final Document doc = converter.convert(beldoc);

        // validate namespace group
        final NamespaceGroup nsgroup = doc.getNamespaceGroup();
        assertThat("More than one custom namespace exists.", nsgroup
                .getNamespaces().size(), is(1));
View Full Code Here

Examples of org.openengsb.framework.edbi.hook.internal.CommitConverter.convert()

    public void onPostCommit(EKBCommit ekbCommit) {
        LOG.info("Caught onPostCommit event for EKBCommit {}", ekbCommit.getRevisionNumber());

        CommitConverter commitConverter = new CommitConverter(getAuthenticationContext(), getContextHolder());

        IndexCommit commit = commitConverter.convert(ekbCommit);

        indexEngine.commit(commit);
    }

    public ContextHolder getContextHolder() {
View Full Code Here

Examples of org.openinvoice.ubl4j.core.common.text.QuantityConverter.convert()

            // If the conversion enabled, it converts the WorkTimeUnit to the specified
            //  WorkTimeUnit in the UBL4J configuration file. It also adapts the
            // price accordingly.
            if (ubl4JConfigurationBean.isWorkTimeUnitConversionEnabled()) {
                QuantityConverter quantityConverter = new QuantityConverter(invoicedQuantityType, invoiceLineTypePrice);
                quantityConverter.convert(ubl4JConfigurationBean.getPersistenceWorkTimeUnit(), ubl4JConfigurationBean.getWorkHourPerDay());
                invoiceLineTypePrice.setPriceAmount(quantityConverter.getPriceType().getPriceAmount());
                invoiceLineType.setInvoicedQuantity(invoicedQuantityType);

                // Convert Base Quantity
                invoiceLineTypePrice.setBaseQuantity(org.openinvoice.ubl4j.core.invoice.InvoiceTypeHelper
View Full Code Here

Examples of org.openoffice.xmerge.Convert.convert()

        }

        ConvertData dataOut = null;

        try {
            dataOut = myConvert.convert();
        } catch (Exception convertExcept) {
            System.out.println("\nThere was an error in the conversion");
            convertExcept.printStackTrace();
        }
View Full Code Here

Examples of org.openqa.selenium.remote.BeanToJsonConverter.convert()

      Response response = new Response();
      response.setSessionId(getSessionId());
      response.setStatus(0);
      response.setValue(STOP_RESPONSE);
      BeanToJsonConverter converter = new BeanToJsonConverter();
      String json = converter.convert(response);
      UIAScriptResponse r = new UIAScriptResponse(json);
      setNextResponse(r);
    }
  }
View Full Code Here

Examples of org.openqa.selenium.remote.JsonToBeanConverter.convert()

      JSONObject status = new ServerStatusNHandler.StatusGenerator(driver).generate();
      JSONArray caps = status.getJSONArray(ServerStatusNHandler.SUPPORTED_APPS);

      JsonToBeanConverter convertor = new JsonToBeanConverter();
      for (int i = 0; i < caps.length(); i++) {
        Capabilities c = convertor.convert(Capabilities.class, caps.get(i).toString());
        DesiredCapabilities c2 = new DesiredCapabilities(c);
        registrationRequest.addDesiredCapability(c2);
      }

      registrationRequest.getConfiguration()
View Full Code Here

Examples of org.osgi.service.blueprint.container.Converter.convert()

        Converter converter = selectMatchingConverter(source,type);

        if (converter == nullreturn null;

        Object value = converter.convert(source, type);
        return new ConversionResult(converter,value);
    }
   
    public Object convertToNumber(Number value, Class toType) throws Exception {
        toType = unwrap(toType);
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.