本文整理汇总了Java中com.archimatetool.model.FolderType类的典型用法代码示例。如果您正苦于以下问题:Java FolderType类的具体用法?Java FolderType怎么用?Java FolderType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FolderType类属于com.archimatetool.model包,在下文中一共展示了FolderType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateVersionModel
import com.archimatetool.model.FolderType; //导入依赖的package包/类
public IVersionModel generateVersionModel(IArchimateModel model) throws IOException {
versionModel = VersionFactory.init(model);
//add in the properties held on the model
Map<String, IProperty> modelProperties = ArchiUtils.getPropertiesMap(model.getProperties());
if(modelProperties.containsKey(IVersionModelPropertyConstants.MODEL_USER_PROPERTY_NAME))
versionModel.setModelUserName(modelProperties.get(IVersionModelPropertyConstants.MODEL_USER_PROPERTY_NAME).getValue());
if(modelProperties.containsKey(IVersionModelPropertyConstants.MODEL_USER_EMAIL_NAME))
versionModel.setModelUserEmail(modelProperties.get(IVersionModelPropertyConstants.MODEL_USER_EMAIL_NAME).getValue());
if(modelProperties.containsKey(IVersionModelPropertyConstants.WORKING_DIR_PROPERTY_NAME))
versionModel.setWorkingDirLocation(new File(modelProperties.get(IVersionModelPropertyConstants.WORKING_DIR_PROPERTY_NAME).getValue()));
if(modelProperties.containsKey(IVersionModelPropertyConstants.MODEL_REPO_BRANCH_PROPERTY_NAME))
versionModel.setRepoBranch(modelProperties.get(IVersionModelPropertyConstants.MODEL_REPO_BRANCH_PROPERTY_NAME).getValue());
this.createFolderObjects(model.getFolder(FolderType.BUSINESS));
this.createFolderObjects(model.getFolder(FolderType.APPLICATION));
this.createFolderObjects(model.getFolder(FolderType.TECHNOLOGY));
this.createFolderObjects(model.getFolder(FolderType.MOTIVATION));
this.createFolderObjects(model.getFolder(FolderType.IMPLEMENTATION_MIGRATION));
this.createFolderObjects(model.getFolder(FolderType.CONNECTORS));
if (model.getFolder(FolderType.DERIVED) != null)
this.createFolderObjects(model.getFolder(FolderType.DERIVED));
this.createFolderObjects(model.getFolder(FolderType.RELATIONS));
this.createFolderObjects(model.getFolder(FolderType.DIAGRAMS));
//versionModel.createBusinessVersionObjects(model.getFolder(FolderType.BUSINESS));
//model.getFolder(FolderType.BUSINESS)
return versionModel;
}
示例2: addVersionElementToModel
import com.archimatetool.model.FolderType; //导入依赖的package包/类
public void addVersionElementToModel(IVersionElement element, FolderType elementType) {
switch(elementType.getValue()) {
case FolderType.BUSINESS_VALUE:
businessElements.put(element.getId(), element);
break;
case FolderType.APPLICATION_VALUE:
applicationElements.put(element.getId(), element);
break;
case FolderType.TECHNOLOGY_VALUE:
technologyElements.put(element.getId(), element);
break;
case FolderType.MOTIVATION_VALUE:
motivationElements.put(element.getId(), element);
break;
case FolderType.IMPLEMENTATION_MIGRATION_VALUE:
implementationElements.put(element.getId(), element);
break;
case FolderType.CONNECTORS_VALUE:
connectorElements.put(element.getId(), element);
break;
case FolderType.RELATIONS_VALUE:
relationshipElements.put(element.getId(), element);
break;
case FolderType.DERIVED_VALUE:
derivedRelationshipElements.put(element.getId(), element);
break;
case FolderType.DIAGRAMS_VALUE:
diagramElements.put(element.getId(), element);
break;
}
}
示例3: FolderPath
import com.archimatetool.model.FolderType; //导入依赖的package包/类
public FolderPath(FolderType folderPathType, String folderPathString) {
this.folderPathType = folderPathType;
StringTokenizer dirs = new StringTokenizer(folderPathString, "/");
while(dirs.hasMoreElements()) {
this.addFolderToPath((String) dirs.nextElement());
}
}
示例4: export
import com.archimatetool.model.FolderType; //导入依赖的package包/类
@Override
public void export(final IArchimateModel model) throws IOException {
writer = fileChooser.chooseFileAndCreateWriter();
Header header = new Header(model);
writer.write(header.toString());
writeFolder(model.getFolder(FolderType.BUSINESS));
writeFolder(model.getFolder(FolderType.APPLICATION));
writeFolder(model.getFolder(FolderType.TECHNOLOGY));
writeFolder(model.getFolder(FolderType.CONNECTORS));
writeFolder(model.getFolder(FolderType.MOTIVATION));
writeFolder(model.getFolder(FolderType.RELATIONS));
writer.close();
}
示例5: createMainHTMLPage
import com.archimatetool.model.FolderType; //导入依赖的package包/类
private File createMainHTMLPage() throws IOException {
// Instantiate templates files
File mainFile = new File(
ArchimateEditorReportsPlugin.INSTANCE.getTemplatesFolder(),
"st/main.stg"); //$NON-NLS-1$
STGroupFile groupFile = new STGroupFile(mainFile.getAbsolutePath(),
'^', '^');
stFrame = groupFile.getInstanceOf("frame"); //$NON-NLS-1$
ST stModel = groupFile.getInstanceOf("modelreport"); //$NON-NLS-1$
// Copy HTML skeleton to target
File srcDir = new File(
ArchimateEditorReportsPlugin.INSTANCE.getTemplatesFolder(),
"html"); //$NON-NLS-1$
FileUtils.copyFolder(srcDir, fMainFolder);
// Copy hints files from the help plug-in
Bundle bundle = Platform.getBundle("com.archimatetool.help"); //$NON-NLS-1$
URL url = FileLocator.resolve(bundle.getEntry("hints")); //$NON-NLS-1$
FileUtils.copyFolder(new File(url.getPath()), new File(fMainFolder,
"hints")); //$NON-NLS-1$
// Set folders
fElementsFolder = new File(fMainFolder, "elements"); //$NON-NLS-1$
fElementsFolder.mkdirs(); // Make dir
fViewsFolder = new File(fMainFolder, "views"); //$NON-NLS-1$
fViewsFolder.mkdirs(); // Make dir
fImagesFolder = new File(fMainFolder, "images"); //$NON-NLS-1$
fImagesFolder.mkdirs(); // Make dir
// write (elements).html
writeElement(fModel, new File(fViewsFolder, "model.html")); //$NON-NLS-1$
writeFolders(fModel.getFolders());
// write (diagrams).html
writeDiagrams();
// Write root model.html
File modeltreeF = new File(fMainFolder, "model.html"); //$NON-NLS-1$
OutputStreamWriter modeltreeW = new OutputStreamWriter(
new FileOutputStream(modeltreeF), "UTF8"); //$NON-NLS-1$
stModel.add("model", fModel); //$NON-NLS-1$
stModel.add("businessFolder", fModel.getFolder(FolderType.BUSINESS)); //$NON-NLS-1$
stModel.add(
"applicationFolder", fModel.getFolder(FolderType.APPLICATION)); //$NON-NLS-1$
stModel.add("technologyFolder", fModel.getFolder(FolderType.TECHNOLOGY)); //$NON-NLS-1$
stModel.add("motivationFolder", fModel.getFolder(FolderType.MOTIVATION)); //$NON-NLS-1$
stModel.add(
"implementationFolder", fModel.getFolder(FolderType.IMPLEMENTATION_MIGRATION)); //$NON-NLS-1$
stModel.add("connectorsFolder", fModel.getFolder(FolderType.CONNECTORS)); //$NON-NLS-1$
stModel.add("relationsFolder", fModel.getFolder(FolderType.RELATIONS)); //$NON-NLS-1$
stModel.add("viewsFolder", fModel.getFolder(FolderType.DIAGRAMS)); //$NON-NLS-1$
modeltreeW.write(stModel.render());
modeltreeW.close();
return new File(fMainFolder, "model.html"); //$NON-NLS-1$
}
示例6: addVersionElementToModel
import com.archimatetool.model.FolderType; //导入依赖的package包/类
public void addVersionElementToModel(IVersionElement element, FolderType elementType);