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);