Search in sources :

Example 6 with TOperation

use of org.eclipse.winery.model.tosca.TOperation in project winery by eclipse.

the class GeneratorTest method testInOut.

@Test
public void testInOut() throws Exception {
    TInterface tinterface = new TInterface();
    tinterface.setName("http://www.example.org/interfaces/lifecycle");
    TOperation op1 = new TOperation();
    op1.setName("Op1InOut");
    tinterface.getOperation().add(op1);
    TOperation.InputParameters op1InputParameters = new TOperation.InputParameters();
    TParameter op1ip1 = new TParameter();
    op1ip1.setName("op1ip1");
    op1ip1.setType("xs:string");
    op1InputParameters.getInputParameter().add(op1ip1);
    TParameter op1ip2 = new TParameter();
    op1ip2.setName("op1ip2");
    op1ip2.setType("xs:string");
    op1InputParameters.getInputParameter().add(op1ip2);
    op1.setInputParameters(op1InputParameters);
    TOperation.OutputParameters op1OutputParameters = new TOperation.OutputParameters();
    TParameter op1op1 = new TParameter();
    op1op1.setName("op1op1");
    op1op1.setType("xs:string");
    op1OutputParameters.getOutputParameter().add(op1op1);
    TParameter op1op2 = new TParameter();
    op1op2.setName("op1op2");
    op1op1.setType("xs:string");
    op1OutputParameters.getOutputParameter().add(op1op2);
    op1.setOutputParameters(op1OutputParameters);
    TNodeType nodeType = new TNodeType();
    nodeType.setName("test");
    nodeType.setTargetNamespace("http://asd.com");
    Generator gen = new Generator(tinterface, "org.opentosca.ia", new URL("http://asd.com"), "testname", WORKING_DIR.toFile());
    Path generateProject = gen.generateProject();
    System.out.println(generateProject);
}
Also used : Path(java.nio.file.Path) TInterface(org.eclipse.winery.model.tosca.TInterface) TOperation(org.eclipse.winery.model.tosca.TOperation) TParameter(org.eclipse.winery.model.tosca.TParameter) URL(java.net.URL) TNodeType(org.eclipse.winery.model.tosca.TNodeType) Test(org.junit.Test)

Aggregations

TOperation (org.eclipse.winery.model.tosca.TOperation)6 TInterface (org.eclipse.winery.model.tosca.TInterface)5 TNodeType (org.eclipse.winery.model.tosca.TNodeType)4 URL (java.net.URL)3 Path (java.nio.file.Path)3 TParameter (org.eclipse.winery.model.tosca.TParameter)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 Charset (java.nio.charset.Charset)1 TRelationshipType (org.eclipse.winery.model.tosca.TRelationshipType)1 InterfacesSelectApiData (org.eclipse.winery.repository.rest.resources.apiData.InterfacesSelectApiData)1 NodeTypeResource (org.eclipse.winery.repository.rest.resources.entitytypes.nodetypes.NodeTypeResource)1 RelationshipTypeResource (org.eclipse.winery.repository.rest.resources.entitytypes.relationshiptypes.RelationshipTypeResource)1