Examples of FileType


Examples of LONI.tree.module.format.FileType

    LONI.tree.module.Output runWorkflow = new LONI.tree.module.Output();
    runWorkflow.setEnabled(true);
    runWorkflow.setFormat(new Format());
    runWorkflow.getFormat().setCardinality(1);
    runWorkflow.getFormat().setType("File");
    FileType runFileType = new FileType();
    runFileType.setName(GENERIC_DICT_TYPE);
    runFileType.setDescription("");
    runFileType.setExtension("");
    runWorkflow.getFormat().getFileTypes().addFileType(runFileType);
    runWorkflow.setOrder(0);
    runWorkflow.setPrefix("-workflow");
    runWorkflow.setPrefixSpaced(true);
    runWorkflow.setName("Workflow Data");
    runModule.getOutputs().add(runWorkflow);
   
    //Add the setup and run modules to the setup and run contexts respectively.
    setupContext.getPathContext().addContext("Setup");
    runContext.getPathContext().addContext("Run");
   
    /*
     *VISIT THE STEPS IN THE WORKFLOW
     */
     //used to place run, setup modules
    int totalY=0; // running sum of y values.
    int leftX = -1; //furthest left x position
    int rightX = 0; //furthest right y position
    int spacing = 200; //spacing between modules.
   
    // TODO Auto-generated method stub
    for(Step s : workflow.getSteps()){
      //visit each step in the workflow
      Pair<GraphObject,LoniEnvironment> step = stepVisitor.visit(s, new LoniContext());
      //add the returned environment to the pipeline environment.
      le.addEnvironment(step.getElem2());
      //add the returned graphobject to the pipeline modulegroup
      moduleGroup.getModules().add(step.getElem1());
      //add the step's y value to the running sum of y values.
      totalY += s.getPosition().getFromTop();
      //update furthest left position
      if(leftX < 0 || leftX > s.getPosition().getFromLeft())
        leftX =s.getPosition().getFromLeft();
      //update furthest right position
      if(rightX < s.getPosition().getFromLeft())
        rightX=s.getPosition().getFromLeft();
    }
    //calculate the average y value from the total.
    int avgY = totalY;
    if(workflow.getSteps().size() > 0)
      avgY = totalY / workflow.getSteps().size();
   
    //place the setup module futhest to the left, at the
    //average y value.
    setupModule.setPosX(leftX);
    setupModule.setPosY(avgY + spacing);
    //Place the run module furthest to the right, at the
    //average y value.
    runModule.setPosX(rightX+ spacing);
    runModule.setPosY(avgY);
   
    //add the run, setupmodule
    moduleGroup.getModules().add(setupModule);
    moduleGroup.getModules().add(runModule);
   
    /*
     * Connect module outputs that are not connected to anything to the
     * run module.
     */
    int conncount=1;
   
    /*
     * For each module output
     */
    for(String id : le.getOutputAliases().keySet()){
      boolean isConnected = false;
      //check if any connections link the output of that module
      //to the input of some other module.
      for(Connection c : le.getConnections()){
        if(c.getSource().equals(id))
          isConnected = true;
      }
      //If the output is not connected to any other modules.
      if(isConnected == false){
        Connection runConn; //connection to the run module
       
        //Create a new parameter for the runmodule that is connected
        //to the connectionless output.
        LONI.tree.module.Parameter runInput = new LONI.tree.module.Parameter();
        runInput.setId(runContext.getPathContext().getAbsoluteContext("conn"+conncount));
        runInput.setFileFormat(new Format());
        runInput.getFormat().setCardinality(1);
        runInput.getFormat().setType("File");
        runFileType = new FileType();
        runFileType.setName(GENERIC_DICT_TYPE);
        runFileType.setDescription("");
        runFileType.setExtension("");
        runInput.getFormat().getFileTypes().addFileType(runFileType);
        runInput.setOrder(conncount);
        runInput.setPrefix("-input");
        runInput.setPrefixSpaced(true);
        runInput.setEnabled(true);
View Full Code Here

Examples of archmapper.main.model.stylemapping.FileType

    if (fileDef.getType() != null && fileDef.getParent() instanceof ComponentMapping) {
      String compType = getComponentTypeOf((ComponentMapping) fileDef.getParent());
      ComponentTypeMapping typeMapping = styleMapping.getComponentType(compType);
     
      if (typeMapping != null) {
        FileType fileType = typeMapping.getFileType(fileDef.getType());
        String ending = fileType.getFilenameEnding();
        if (ending != null && !name.endsWith("." + ending)) {
          name = name + "." + ending;
        }
      }
    }
View Full Code Here

Examples of br.com.jteam.jfcm.model.FileType

    try {
      File file =
        showFileContentService.createSpecificFileToBeViewed(
          presentationFile.getName(),
          presentationFile.getPath());
      FileType fileType = FileType.getFileTypeByFileName(file.getName());
      RenderedFileType renderedFileType = RenderedFileType.getRenderedFileType(fileType);
      PresentationFile<?> presentationFileToBeViewed;
      if (renderedFileType == RenderedFileType.TEXT) {
        presentationFileToBeViewed =
          new PresentationFile<String>(presentationFile.getName(), presentationFile
View Full Code Here

Examples of cascading.tap.type.FileType

    boolean isNotEmpty = false;

    for( String childIdentifier : childIdentifiers )
      {
      FileType childTap = (FileType) createTapFor( schemaDef, childIdentifier );

      isNotEmpty |= childTap.getSize( config ) != 0;
      }

    return isNotEmpty;
    }
View Full Code Here

Examples of com.cedarsoft.file.FileType

  public FileType deserialize( @NotNull XMLStreamReader deserializeFrom, @NotNull Version formatVersion ) throws IOException, XMLStreamException {
    boolean dependent = Boolean.parseBoolean( deserializeFrom.getAttributeValue( null, ATTRIBUTE_DEPENDENT ) );
    String id = getChildText( deserializeFrom, ELEMENT_ID );

    List<? extends Extension> extensions = deserializeCollection( deserializeFrom, Extension.class, formatVersion );
    return new FileType( id, dependent, extensions );
  }
View Full Code Here

Examples of com.common.datatype.FileType

    FileComp fileComp = new FileComp(intOrder);
    Arrays.sort(fileList, fileComp);
    List<FileType> ls = new ArrayList<FileType>();
    Long longTemp = new Long(0);
    StringBuffer strTemp = new StringBuffer("");
    ls.add(new FileType());
    for (File fl : fileList) {
      if (fl.isFile()) {
        ls.add(new FileType(fl));
        longTemp += fl.length();
        strTemp.append(fl.getName() + ",");
      }
    }
    String strName = strTemp.toString();
    if (!strName.equals("") && strName.length() > 0) {
      FileType ft = new FileType();
      ft.setStrName(strName.substring(0, strName.length() - 1));
      ft.setLongLength(longTemp);
      ls.set(0, ft);
    }
    return ls;
  }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.FileType

   *     Content of the Mathematica file
   * @return The newly created PsiFile with content code
   */
  @NotNull
  private MathematicaPsiFile createDummyFile(@NotNull CharSequence code) {
    final FileType type = MathematicaFileType.INSTANCE;
    return (MathematicaPsiFile) PsiFileFactory.getInstance(myProject).createFileFromText(DUMMY_FILE_NAME, type, code);
  }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.FileType

    myCommenterLanguage.setRenderer(new ListCellRendererWrapper(myCommenterLanguage.getRenderer()) {
      @Override
      public void customize(JList list, Object value, int index, boolean selected, boolean hasFocus) {
        setText(value == null ? "" : ((Language)value).getDisplayName());
        if (value != null) {
          final FileType type = ((Language)value).getAssociatedFileType();
          if (type != null) {
            setIcon(type.getIcon());
          }
        }
      }
    });
    myCommenterLanguage.setSelectedItem(commentLanguage);
View Full Code Here

Examples of com.intellij.openapi.fileTypes.FileType

        ModuleFileIndex index = ModuleRootManager.getInstance(module).getFileIndex();
        final List<String> files = new ArrayList<String>();
        index.iterateContent(new ContentIterator() {
            public boolean processFile(VirtualFile fileOrDir) {
                if (!fileOrDir.isDirectory()) {
                    FileType fileType = fileOrDir.getFileType();
                    String path = fileOrDir.getPath();
                    if (HaskellFileType.INSTANCE.equals(fileType) && !Paths.get(path).equals(except)) {
                        files.add(path);
                    }
                }
View Full Code Here

Examples of com.intellij.openapi.fileTypes.FileType

    public boolean isCompilableFile(VirtualFile file, CompileContext context) {
        return isCompilableFile(file);
    }

    public static boolean isCompilableFile(VirtualFile file) {
        FileType fileType = FileTypeManager.getInstance().getFileTypeByFile(file);
        return HaskellFileType.INSTANCE.equals(fileType);
    }
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.