Examples of ReqIF10Factory


Examples of org.eclipse.rmf.reqif10.ReqIF10Factory

    }
   
  }

  private ReqIF buildTestReqif() throws IOException {
    ReqIF10Factory rf = ReqIF10Factory.eINSTANCE;
    ConfigurationFactory cf = ConfigurationFactory.eINSTANCE;
    ReqIF reqif = rf.createReqIF();
    ReqIFContent content = rf.createReqIFContent();
    reqif.setCoreContent(content);
   
    // Build the Datatypes
    DatatypeDefinitionString t_string = rf.createDatatypeDefinitionString();
    content.getDatatypes().add(t_string);
   
    // Build SpecObject Type for requirements.
    SpecObjectType requirementType = rf.createSpecObjectType();
    AttributeDefinitionString ad_requirement = rf.createAttributeDefinitionString();
    ad_requirement.setType(t_string);
    requirementType.getSpecAttributes().add(ad_requirement);
    content.getSpecTypes().add(requirementType);
   
    // Build SpecObject Type for proxy.
    SpecObjectType proxyType = rf.createSpecObjectType();
    AttributeDefinitionString ad_proxy = rf.createAttributeDefinitionString();
    ad_proxy.setType(t_string);
    proxyType.getSpecAttributes().add(ad_proxy);
    content.getSpecTypes().add(proxyType);
   
    // Build SpecRelationType for linking
    SpecRelationType linkType = rf.createSpecRelationType();
    content.getSpecTypes().add(linkType);

    // Add the Config Element
    ProrToolExtension toolExtension = cf.createProrToolExtension();
    ReqIFToolExtensionUtil.addToolExtension(reqif, toolExtension);
    ProrPresentationConfigurations presentationConfigs = cf.createProrPresentationConfigurations();
    toolExtension.setPresentationConfigurations(presentationConfigs);
    config = TracingFactory.eINSTANCE.createTracingConfiguration();
   
    // Configure the Config Element
    presentationConfigs.getPresentationConfigurations().add(config);
    config.setDatatype(t_string);
    config.setLinkType(linkType);
    config.setProxyAttribute(ad_proxy);
    config.setProxyType(proxyType);
   
    requirement = rf.createSpecObject();
    requirement.setType(requirementType);
    content.getSpecObjects().add(requirement);
    return reqif;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.