Search in sources :

Example 1 with FolderType

use of com.archimatetool.model.FolderType in project archi by archimatetool.

the class Folder method setType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setType(FolderType newType) {
    FolderType oldType = type;
    type = newType == null ? TYPE_EDEFAULT : newType;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, IArchimatePackage.FOLDER__TYPE, oldType, type));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) FolderType(com.archimatetool.model.FolderType)

Example 2 with FolderType

use of com.archimatetool.model.FolderType in project archi-modelrepository-plugin by archi-contribs.

the class GraficoModelImporter method loadModel.

private IArchimateModel loadModel(File folder) throws IOException {
    IArchimateModel model = (IArchimateModel) loadElement(new File(folder, IGraficoConstants.FOLDER_XML));
    IFolder tmpFolder;
    List<FolderType> folderList = new ArrayList<FolderType>();
    folderList.add(FolderType.STRATEGY);
    folderList.add(FolderType.BUSINESS);
    folderList.add(FolderType.APPLICATION);
    folderList.add(FolderType.TECHNOLOGY);
    folderList.add(FolderType.MOTIVATION);
    folderList.add(FolderType.IMPLEMENTATION_MIGRATION);
    folderList.add(FolderType.OTHER);
    folderList.add(FolderType.RELATIONS);
    folderList.add(FolderType.DIAGRAMS);
    // Loop based on FolderType enumeration
    for (FolderType folderType : folderList) {
        if ((tmpFolder = loadFolder(new File(folder, folderType.toString()))) != null) {
            model.getFolders().add(tmpFolder);
        }
    }
    return model;
}
Also used : ArrayList(java.util.ArrayList) IArchimateModel(com.archimatetool.model.IArchimateModel) File(java.io.File) IFolder(com.archimatetool.model.IFolder) FolderType(com.archimatetool.model.FolderType)

Aggregations

FolderType (com.archimatetool.model.FolderType)2 IArchimateModel (com.archimatetool.model.IArchimateModel)1 IFolder (com.archimatetool.model.IFolder)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1