當前位置: 首頁>>代碼示例>>Java>>正文


Java FolderType類代碼示例

本文整理匯總了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;
}
 
開發者ID:CymaLtd,項目名稱:ArchiGITPlugin,代碼行數:35,代碼來源:ModelPreparer.java

示例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;	
	}
	
}
 
開發者ID:CymaLtd,項目名稱:ArchiGITPlugin,代碼行數:33,代碼來源:VersionModel.java

示例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());
	}
}
 
開發者ID:CymaLtd,項目名稱:ArchiGITPlugin,代碼行數:8,代碼來源:FolderPath.java

示例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();
}
 
開發者ID:fkoehne,項目名稱:archi-prolog-exporter,代碼行數:16,代碼來源:PrologExporter.java

示例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$
}
 
開發者ID:guerrilla-ea,項目名稱:archi-export-cli,代碼行數:59,代碼來源:HTMLReportExporter.java

示例6: addVersionElementToModel

import com.archimatetool.model.FolderType; //導入依賴的package包/類
public void addVersionElementToModel(IVersionElement element, FolderType elementType); 
開發者ID:CymaLtd,項目名稱:ArchiGITPlugin,代碼行數:2,代碼來源:IVersionModel.java


注:本文中的com.archimatetool.model.FolderType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。