Statistics
| Revision:

root / branches / modelio3.7.x / src / main / java / org / modelio / togaf / profile / structure / model / TechnologyArchitecture.java @ 237

History | View | Annotate | Download (5.09 KB)

1
/** 
2
 * Licensed to the Apache Software Foundation (ASF) under one 
3
 * or more contributor license agreements.  See the NOTICE file 
4
 * distributed with this work for additional information 
5
 * regarding copyright ownership.  The ASF licenses this file 
6
 * to you under the Apache License, Version 2.0 (the 
7
 * "License"); you may not use this file except in compliance 
8
 * with the License.  You may obtain a copy of the License at 
9
 * 
10
 *        http://www.apache.org/licenses/LICENSE-2.0 
11
 * 
12
 *        Unless required by applicable law or agreed to in writing, 
13
 *        software distributed under the License is distributed on an 
14
 *        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
15
 *        KIND, either express or implied.  See the License for the 
16
 *        specific language governing permissions and limitations 
17
 *        under the License. 
18
 * 
19
 * 
20
 * @package    org.modelio.togaf. 
21
 * @author     Modelio 
22
 * @license    http://www.apache.org/licenses/LICENSE-2.0 
23
 * @version  1.0.00 
24
 **/
25
package org.modelio.togaf.profile.structure.model;
26

    
27
import java.util.List;
28

    
29
import org.modelio.metamodel.diagrams.AbstractDiagram;
30
import org.modelio.metamodel.diagrams.StaticDiagram;
31
import org.modelio.metamodel.uml.infrastructure.ModelTree;
32
import org.modelio.metamodel.uml.statik.Component;
33
import org.modelio.metamodel.uml.statik.Instance;
34
import org.modelio.metamodel.uml.statik.Node;
35
import org.modelio.metamodel.uml.statik.Package;
36
import org.modelio.togaf.impl.TogafArchitectModule;
37
import org.modelio.togaf.profile.applicationarchitecture.model.TogafApplicationComponent;
38
import org.modelio.togaf.profile.applicationarchitecture.model.TogafApplicationComponentInstance;
39
import org.modelio.togaf.profile.businessarchitecture.model.TogafLocation;
40
import org.modelio.togaf.profile.technologyarchitecture.model.HardwareTechnologyComponent;
41
import org.modelio.togaf.profile.technologyarchitecture.model.TechnologyArchitectureDomain;
42
import org.modelio.togaf.profile.technologyarchitecture.model.TogafPlatformDecompositionDiagram;
43
import org.modelio.togaf.profile.utils.ModelUtils;
44
import org.modelio.togaf.profile.utils.ResourceManager;
45

    
46
public class TechnologyArchitecture extends Layer {
47

    
48
        public TechnologyArchitecture() {
49
                super(TogafArchitectModule.getInstance().getModuleContext().getModelingSession().getModel().createPackage());
50
                ModelUtils.setStereotype(this.element, "TogafArchitect","TechnologyArchitecture");
51
                this.element.setName(ResourceManager.getName("TechnologyArchitecture"));
52
        }
53

    
54
        public TechnologyArchitecture(Package element) {
55
                super(element);
56
        }
57

    
58
        public List<TogafApplicationComponent> getTogafApplicationComponent() {
59
                List<TogafApplicationComponent> res = new java.util.ArrayList<>();
60
                for (ModelTree model_element : this.element.getOwnedElement()) {
61
                        res.add(new TogafApplicationComponent((Component) model_element));
62
                }
63
                return res;
64
        }
65

    
66
        public void addTogafApplicationComponent(TogafApplicationComponent model) {
67
                this.element.getOwnedElement().add(model.getElement());
68
        }
69

    
70
        public List<TogafApplicationComponentInstance> getTogafApplicationComponentInstance() {
71
                List<TogafApplicationComponentInstance> res = new java.util.ArrayList<>();
72
                for (Instance model_element : this.element.getDeclared()) {
73
                        res.add(new TogafApplicationComponentInstance(model_element));
74
                }
75
                return res;
76
        }
77

    
78
        public void addTogafApplicationComponentInstance(TogafApplicationComponentInstance model) {
79
                this.element.getDeclared().add(model.getElement());
80
        }
81

    
82
        public List<HardwareTechnologyComponent> getHardwareTechnologyComponent() {
83
                List<HardwareTechnologyComponent> res = new java.util.ArrayList<>();
84
                for (ModelTree model_element : this.element.getOwnedElement()) {
85
                        res.add(new HardwareTechnologyComponent((Node) model_element));
86
                }
87
                return res;
88
        }
89

    
90
        public void addHardwareTechnologyComponent(HardwareTechnologyComponent model) {
91
                this.element.getOwnedElement().add(model.getElement());
92
        }
93

    
94
        public List<TogafLocation> getTogafLocation() {
95
                List<TogafLocation> res = new java.util.ArrayList<>();
96
                for (ModelTree model_element : this.element.getOwnedElement()) {
97
                        res.add(new TogafLocation((Node) model_element));
98
                }
99
                return res;
100
        }
101

    
102
        public void addTogafLocation(TogafLocation model) {
103
                this.element.getOwnedElement().add(model.getElement());
104
        }
105

    
106
        public List<TogafPlatformDecompositionDiagram> getTogafPlatformDecompositionDiagram() {
107
                List<TogafPlatformDecompositionDiagram> res = new java.util.ArrayList<>();
108
                for (AbstractDiagram model_element : this.element.getProduct()) {
109
                        res.add(new TogafPlatformDecompositionDiagram((StaticDiagram) model_element));
110
                }
111
                return res;
112
        }
113

    
114
        public void addTogafPlatformDecompositionDiagram(TogafPlatformDecompositionDiagram model) {
115
                this.element.getProduct().add(model.getElement());
116
        }
117

    
118
        public List<TechnologyArchitectureDomain> getTechnologyArchitectureDomain() {
119
                List<TechnologyArchitectureDomain> res = new java.util.ArrayList<>();
120
                for (ModelTree model_element : this.element.getOwnedElement()) {
121
                        res.add(new TechnologyArchitectureDomain((Package) model_element));
122
                }
123
                return res;
124
        }
125

    
126
        public void addTechnologyArchitectureDomain(TechnologyArchitectureDomain model) {
127
                this.element.getOwnedElement().add(model.getElement());
128
        }
129

    
130
}