Package org.woped.pnml

Examples of org.woped.pnml.ResourcesType


            iNetToolSpec.setTreeHeightOverview(layoutInfo.getTreeHeightOverview());
            iNetToolSpec.setTreePanelVisible(layoutInfo.getTreePanelVisible());
            //verticalLayout
            iNetToolSpec.setVerticalLayout(editor.isRotateSelected());
            // resources
            ResourcesType iNetResources = iNetToolSpec.addNewResources();
            // Rescources
            ResourceType iResourceType;
            ResourceModel rModelTemp;

            for (Iterator<ResourceModel> iter = petrinetModel.getResources().iterator(); iter.hasNext();)
            {
                rModelTemp = (ResourceModel) iter.next();
                iResourceType = iNetResources.addNewResource();
                iResourceType.setName(rModelTemp.getName());
                for (int i = 0; i < statusBars.length; i++)
                    statusBars[i].nextStep();
            }
            // Roles

            RoleType iRoleType;
            ResourceClassModel roleModelTemp;
            for (Iterator<ResourceClassModel> iter = petrinetModel.getRoles().iterator(); iter.hasNext();)
            {
                roleModelTemp = (ResourceClassModel) iter.next();
                iRoleType = iNetResources.addNewRole();
                iRoleType.setName(roleModelTemp.getName());
                if(roleModelTemp.getSuperModels()!= null){
                  for (Iterator<ResourceClassModel> i = roleModelTemp.getSuperModels();i.hasNext();)
                  {               
                    ResourceClassModel superMe = i.next();
                    SuperModelType newSuper =iRoleType.addNewSuperModel();
                    newSuper.setName(superMe.getName());
                  }
                }
                for (int i = 0; i < statusBars.length; i++)
                    statusBars[i].nextStep();
            }
            // Orga Units
            OrganizationUnitType iOrganizationUnitType;
            ResourceClassModel orgunitModelTemp;
            for (Iterator<ResourceClassModel> iter = petrinetModel.getOrganizationUnits().iterator(); iter.hasNext();)
            {
                orgunitModelTemp = (ResourceClassModel) iter.next();
                iOrganizationUnitType = iNetResources.addNewOrganizationUnit();
                iOrganizationUnitType.setName(orgunitModelTemp.getName());
                if(orgunitModelTemp.getSuperModels()!=null){
                  for (Iterator<ResourceClassModel> i = orgunitModelTemp.getSuperModels();i.hasNext();)
                  {
                    ResourceClassModel superMe = i.next();
                    SuperModelType newSuper= iOrganizationUnitType.addNewSuperModel();
                    newSuper.setName(superMe.getName());
                  }
                }
                for (int i = 0; i < statusBars.length; i++)
                    statusBars[i].nextStep();
            }
            // ResourceMap
            ResourceMappingType iNetResourceMap;           
            for (Iterator<String> iter = petrinetModel.getResourceMapping().keySet().iterator();iter.hasNext();)
            {
                String tempResourceClass = (String) iter.next();
                Vector<String> values = petrinetModel.getResourceMapping().get(tempResourceClass);
                // TODO check if mapping exists NullPointerExeption bei
                // speicherung ge�nderter orgUnit die keine zugeordnete Resource
                // hat!
                for (Iterator<String> iterator = values.iterator(); iterator.hasNext();)
                {
                    iNetResourceMap = iNetResources.addNewResourceMapping();
                    iNetResourceMap.setResourceClass(tempResourceClass);
                    iNetResourceMap.setResourceID(iterator.next().toString());
                }
                for (int i = 0; i < statusBars.length; i++)
                    statusBars[i].nextStep();
View Full Code Here

TOP

Related Classes of org.woped.pnml.ResourcesType

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.