model.setRoleDirectionInArchitecture(true);
}
protected void createArchitectureMapping() {
// create a component mapping
ComponentMapping compMapping = new ComponentMapping();
compMapping.setParent(archMapping);
archMapping.getComponentMapping().add(compMapping);
compMapping.setComponentName("Comp1");
compMapping.setDefaultPackage("de.superpackage");
// add a class definition to the component mapping
ClassDefinition classDef = new ClassDefinition();
classDef.setParent(compMapping);
compMapping.getClassDefinition().add(classDef);
classDef.setType("ClassType1");
classDef.setClassName("ClassName1");
// add a file definition
FileDefinition fileDef = new FileDefinition();
fileDef.setParent(compMapping);
compMapping.getFileDefinition().add(fileDef);
fileDef.setFilename("file1");
fileDef.setType("filetype1");
// create a port mapping
PortMapping portMapping = new PortMapping();
compMapping.getPortMapping().add(portMapping);
portMapping.setParent(compMapping);
portMapping.setPortName("p");
portMapping.getExposedClass().add(classDef);
portMapping.getUsingClass().add(classDef);
// Mapping for component2
ComponentMapping comp2Mapping = new ComponentMapping();
comp2Mapping.setComponentName("Comp2");
archMapping.getComponentMapping().add(comp2Mapping);
comp2Mapping.setParent(archMapping);
ClassDefinition classDef2 = new ClassDefinition();
comp2Mapping.getClassDefinition().add(classDef2);
classDef2.setParent(comp2Mapping);
classDef2.setClassName("Class2");
classDef2.setType("ClassType2");
// create a connector mapping