Package archmapper.main.model.stylemapping

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


   *
   * @return The template text or an empty string, if no template exists.
   *
   */
  public String getTemplateTextForFile(FileDefinition fileDef) {
    FileType ft = getFileTypeForFileDefinition(fileDef);
    if (ft != null && ft.getTemplateText() != null) {
      return ft.getTemplateText();
    }
   
    return "";
  }
View Full Code Here

    if (fileDef.getType() == null) {
      return null;
    }
   
    for (ImplementableTypeMapping typeMapping : styleMapping.getAllImplementableTypeMappings()) {
      FileType ft = typeMapping.getFileType(fileDef.getType());
      if (ft != null) {
        return ft;
      }
    }
   
View Full Code Here

    ComponentTypeMapping compT1Mapping = new ComponentTypeMapping();
    compT1Mapping.setTypeName("CompType1");
    styleMapping.getComponentTypeMapping().add(compT1Mapping);
    compT1Mapping.setExternal(true);
   
    FileType fileType1 = new FileType();
    compT1Mapping.getFileTypes().add(fileType1);
    fileType1.setFilenameEnding("txt");
    fileType1.setTemplateText("TestTemplate");
    fileType1.setOptional(true);
    fileType1.setTypeName("filetype1");
   
    ComponentTypeMapping compT2Mapping = new ComponentTypeMapping();
    compT2Mapping.setTypeName("CompType2");
    styleMapping.getComponentTypeMapping().add(compT2Mapping);
    compT2Mapping.setExternal(false);
View Full Code Here

TOP

Related Classes of archmapper.main.model.stylemapping.FileType

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.