Examples of ActionInfo


Examples of eu.scape_project.planning.services.action.ActionInfo

            log.error("querying miniREEF/P2 knowledge base failed for statement: " + statement);
            return result;
        }

        for (int i = 0; i < resultSet.size(); i++) {
            ActionInfo def = new ActionInfo();
            def.setShortname("Convert using " + resultSet.getRow(i).get(0) + " " + resultSet.getRow(i).get(1));
            def.setTargetFormat(resultSet.getRow(i).get(2) + " " + resultSet.getRow(i).get(3));
            def.setInfo("by " + resultSet.getRow(i).get(4));
            def.setActionIdentifier("P2");
            def.setExecutable(false);
            // if (service.getTargetFormat() != null) {
            // def.setTargetFormat(service.getTargetFormat().getDefaultExtension());
            // def.setTargetFormatInfo(service.getTargetFormat());
            // }
            // def.setInfo(service.getDescription());
View Full Code Here

Examples of eu.scape_project.planning.services.action.ActionInfo

    public List<IServiceInfo> getAvailableActions(FormatInfo sourceFormat) throws PlatoException {
        List<PreservationActionService> services = registry.findServices(sourceFormat, null);
        ArrayList<IServiceInfo> result = new ArrayList<IServiceInfo>();
        for (PreservationActionService service : services) {
            ActionInfo def = new ActionInfo();
            def.setShortname(service.getName());
            if (service.getTargetFormat() != null) {
                def.setTargetFormat(service.getTargetFormat().getDefaultExtension());
                def.setTargetFormatInfo(service.getTargetFormat());
            }
            def.setInfo(service.getDescription());
            def.setUrl(service.getUrl());
            def.setDescriptor(service.getDescriptor());
            if (service.isMigration())
                def.setServiceIdentifier("MiniMEE-migration");
            else {
                def.setEmulated(true);
                def.setServiceIdentifier("MiniMEE-emulation");
                // TODO: refine setting type according to sourceFormat
                if ("avi".equals(sourceFormat.getDefaultExtension())
                    || "mpg".equals(sourceFormat.getDefaultExtension())
                    || "mpeg".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "1");
                } else if ("jpg".equals(sourceFormat.getDefaultExtension())
                    || "gif".equals(sourceFormat.getDefaultExtension())
                    || "tif".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "2");
                } else if ("pdf".equals(sourceFormat.getDefaultExtension())
                    || "sam".equals(sourceFormat.getDefaultExtension())) {
                    def.setParamByName("filetype", "3");
                }
            }
            result.add(def);
        }
View Full Code Here

Examples of eu.scape_project.planning.services.action.ActionInfo

        actionInfos = new HashMap<Alternative, ActionInfo>(alternatives.size());
        for (Alternative a : alternatives) {
            PreservationActionDefinition pad = a.getAction();
            if (pad != null) {
                targetMimetypes.put(a, "");
                ActionInfo actionInfo = ActionInfoFactory.createActionInfo(pad);
                actionInfos.put(a, actionInfo);
                myExperimentServices.load(actionInfo);
            }
        }
View Full Code Here

Examples of org.apache.uima.pear.tools.InstallationDescriptor.ActionInfo

      oWriter.println();
    }
    // installation actions, if specified
    Iterator<ActionInfo> actList = insdObject.getInstallationActions().iterator();
    while (actList.hasNext()) {
      ActionInfo actInfo = actList.next();
      // PROCESS specs - 2nd level
      XMLUtil.printXMLTag(PROCESS_TAG, oWriter, false, 2);
      oWriter.println();
      // 3rd level elements
      XMLUtil.printXMLElement(ACTION_TAG, actInfo.getName(), oWriter, 3);
      oWriter.println();
      // PARAMETERS specs - 3rd level
      XMLUtil.printXMLTag(PARAMETERS_TAG, oWriter, false, 3);
      oWriter.println();
      // 4th level elements - no order
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

public abstract class Loadings {

  private static final Log log = Logs.get();

  public static ActionInfo createInfo(Class<?> type) {
    ActionInfo ai = new ActionInfo();
    evalEncoding(ai, type.getAnnotation(Encoding.class));
    evalHttpAdaptor(ai, type.getAnnotation(AdaptBy.class));
    evalActionFilters(ai, type.getAnnotation(Filters.class));
    evalPathMap(ai, type.getAnnotation(PathMap.class));
    evalOk(ai, type.getAnnotation(Ok.class));
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

    evalModule(ai, type);
    return ai;
  }

  public static ActionInfo createInfo(Method method) {
    ActionInfo ai = new ActionInfo();
    evalEncoding(ai, method.getAnnotation(Encoding.class));
    evalHttpAdaptor(ai, method.getAnnotation(AdaptBy.class));
    evalActionFilters(ai, method.getAnnotation(Filters.class));
    evalOk(ai, method.getAnnotation(Ok.class));
    evalFail(ai, method.getAnnotation(Fail.class));
    evalAt(ai, method.getAnnotation(At.class), method.getName());
    evalActionChainMaker(ai, method.getAnnotation(Chain.class));
    evalHttpMethod(ai, method);
    ai.setMethod(method);
    return ai;
  }
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

    ActionChainMaker maker = createChainMaker(config, mainModule);

    /*
     * 创建主模块的配置信息
     */
    ActionInfo mainInfo = Loadings.createInfo(mainModule);

    /*
     * 准备要加载的模块列表
     */
    //TODO 为什么用Set呢? 用List不是更快吗?
    Set<Class<?>> modules = Loadings.scanModules(mainModule);

    /*
     * 分析所有的子模块
     */
    for (Class<?> module : modules) {
      ActionInfo moduleInfo = Loadings.createInfo(module).mergeWith(mainInfo);
      for (Method method : module.getMethods()) {
        /*
         * public 并且声明了 @At 的函数,才是入口函数
         */
        if (!Modifier.isPublic(method.getModifiers())
          || !method.isAnnotationPresent(At.class))
          continue;
        // 增加到映射中
        ActionInfo info = Loadings.createInfo(method).mergeWith(moduleInfo);
        info.setViewMakers(makers);
        mapping.add(maker, info, config);
      }
     
      //记录pathMap
      if(null != moduleInfo.getPathMap()){
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

        ActionChainMaker maker = createChainMaker(config, mainModule);

        /*
         * 创建主模块的配置信息
         */
        ActionInfo mainInfo = Loadings.createInfo(mainModule);

        /*
         * 准备要加载的模块列表
         */
        // TODO 为什么用Set呢? 用List不是更快吗?
        Set<Class<?>> modules = Loadings.scanModules(mainModule);

        if (modules.isEmpty())
            if (log.isWarnEnabled())
                log.warn("None module classes found!!!");

        boolean hasAtMethod = false;
        /*
         * 分析所有的子模块
         */
        for (Class<?> module : modules) {
            ActionInfo moduleInfo = Loadings.createInfo(module).mergeWith(mainInfo);
            for (Method method : module.getMethods()) {
                /*
                 * public 并且声明了 @At 的函数,才是入口函数
                 */
                if (!Modifier.isPublic(method.getModifiers())
                    || !method.isAnnotationPresent(At.class))
                    continue;
                // 增加到映射中
                ActionInfo info = Loadings.createInfo(method).mergeWith(moduleInfo);
                info.setViewMakers(makers);
                mapping.add(maker, info, config);
                hasAtMethod = true;
            }

            // 记录pathMap
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

public abstract class Loadings {

    private static final Log log = Logs.get();

    public static ActionInfo createInfo(Class<?> type) {
        ActionInfo ai = new ActionInfo();
        evalEncoding(ai, type.getAnnotation(Encoding.class));
        evalHttpAdaptor(ai, type.getAnnotation(AdaptBy.class));
        evalActionFilters(ai, type.getAnnotation(Filters.class));
        evalPathMap(ai, type.getAnnotation(PathMap.class));
        evalOk(ai, type.getAnnotation(Ok.class));
View Full Code Here

Examples of org.nutz.mvc.ActionInfo

        evalModule(ai, type);
        return ai;
    }

    public static ActionInfo createInfo(Method method) {
        ActionInfo ai = new ActionInfo();
        evalEncoding(ai, method.getAnnotation(Encoding.class));
        evalHttpAdaptor(ai, method.getAnnotation(AdaptBy.class));
        evalActionFilters(ai, method.getAnnotation(Filters.class));
        evalOk(ai, method.getAnnotation(Ok.class));
        evalFail(ai, method.getAnnotation(Fail.class));
        evalAt(ai, method.getAnnotation(At.class), method.getName());
        evalActionChainMaker(ai, method.getAnnotation(Chain.class));
        evalHttpMethod(ai, method);
        ai.setMethod(method);
        return ai;
    }
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.