Package org.cishell.framework.algorithm

Examples of org.cishell.framework.algorithm.AlgorithmFactory


  /**
     * @see org.cishell.service.conversion.Converter#convert(org.cishell.framework.data.Data)
     */
    public Data convert(Data inData) throws ConversionException {
        AlgorithmFactory factory = getAlgorithmFactory();
        Algorithm algorithm = factory.createAlgorithm(new Data[]{inData}, new Hashtable<String, Object>(), ciContext);

        Data[] resultDataArray;
        try {
          resultDataArray = algorithm.execute();
    } catch (AlgorithmExecutionException e) {
View Full Code Here


        public Data[] execute() throws AlgorithmExecutionException {
            Data[] convertedData = this.inData;
           
            // For each converter in the converter chain (serviceReferences)
            for (int ii = 0; ii < serviceReferences.size(); ii++) {
                AlgorithmFactory factory =
                  bContext.getService(serviceReferences.get(ii));
               
                if (factory != null) {
                    Algorithm algorithm = factory.createAlgorithm(
                      convertedData, this.parameters, this.ciShellContext);
                   
                    try {
                      convertedData = algorithm.execute();
                    } catch(AlgorithmExecutionException e) {
View Full Code Here

  /**
   * @see org.cishell.framework.algorithm.Algorithm#execute()
   */
  public Data[] execute() throws AlgorithmExecutionException {
    try {
      AlgorithmFactory factory = getAlgorithmFactory(bundleContext, this.serviceReference);

      if (factory == null) {
        return null;
      }

View Full Code Here

    return null;
  }

  protected AlgorithmFactory getAlgorithmFactory(
      BundleContext bundleContext, ServiceReference serviceReference) {
    AlgorithmFactory algorithmFactory =
      (AlgorithmFactory) bundleContext.getService(serviceReference);

    if (algorithmFactory == null) {
      String errorMessage = "Could not create AlgorithmFactory for the algorithm "
          + "\""
View Full Code Here

TOP

Related Classes of org.cishell.framework.algorithm.AlgorithmFactory

Copyright © 2018 www.massapicom. 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.