The REQIFlib Model

The REQIFlib model mirrors the XML schema where the ReqIFFile class mirrors the REQ-IF XML element at the root of any ReqIF file.

 

 

The following snippet illustrates this representation.

 

// Path is relative to current directory
final String reqIF = "sample-files\\_EV_Specification.reqif";
// load an existing ReqIF file
final ReqIFFile reqIFFile = ReqIFFile.load(reqIFPath, m -> System.out.println(m));
// Get THE-HEADER
final TheHeader theHeader = reqIFFile.getTheHeader();
// Get REQ-IF-HEADER
final ReqIFHeader reqIFHeader = theHeader.getReqIFHeader();
// Get CORE-CONTENT
final CoreContent coreContent = reqIFFile.getCoreContent();
// Get REQ-IF-CONTENT
final ReqIFContent reqIFContent = coreContent.getReqIFContent();
// Get TOOL-EXTENSIONS
final ToolExtensions toolExtensions = reqIFFile.getToolExtensions();
// Get REQ-IF-TOOL-EXTENSION
for (final ReqIFToolExtension reqIFToolExtension : toolExtensions) {
    final ReqIFToolExtensionElements reqIFToolExtensionElements = reqIFToolExtension.getReqIFToolExtensionElements();
    for (final Element e reqIFToolExtensionElements) {
        // Tool vendor specific...
    }
}

 

This model extends throughout REQIFlib by using properties, methods and collections in a class structure similarly defined to the ReqIF Standard.