lib/export/jdl_exporter.js
function toJDL(parsedData, options) {
  assertParsedDataIsValid(parsedData);
  const jdlObject = new JDLObject();
  const jdlEnumArray = convertEnums(parsedData.enums);
  addEnumsToJDLObject(jdlObject, jdlEnumArray);
  const jdlEntityObject = convertClasses(parsedData);
  addEntitiesToJDLObject(jdlObject, jdlEntityObject);
  const jdlRelationshipArray = convertAssociations(parsedData, jdlObject.entities);
  addRelationshipsToJDLObject(jdlObject, jdlRelationshipArray);
  if (options) {
    const jdlOptionArray = convertOptions(options, parsedData.classNames.length);
    addOptionsToJDLObject(jdlObject, jdlOptionArray);
  }
  return jdlObject;
}
function toJDL(parsedData, options) {
  assertParsedDataIsValid(parsedData);
  const jdlObject = new JDLObject();
  const jdlEnumArray = convertEnums(parsedData.enums);
  addEnumsToJDLObject(jdlObject, jdlEnumArray);
  const jdlEntityObject = convertClasses(parsedData);
  addEntitiesToJDLObject(jdlObject, jdlEntityObject);
  const jdlRelationshipArray = convertAssociations(parsedData, jdlObject.entities);
  addRelationshipsToJDLObject(jdlObject, jdlRelationshipArray);
  if (options) {
    const jdlOptionArray = convertOptions(options, parsedData.classNames.length);
    addOptionsToJDLObject(jdlObject, jdlOptionArray);
  }
  return jdlObject;
}
function toJDL ( parsedData , options ) { assertParsedDataIsValid ( parsedData ) ; const jdlObject = new JDLObject ( ) ; const jdlEnumArray = convertEnums ( parsedData . enums ) ; addEnumsToJDLObject ( jdlObject , jdlEnumArray ) ; const jdlEntityObject = convertClasses ( parsedData ) ; addEntitiesToJDLObject ( jdlObject , jdlEntityObject ) ; const jdlRelationshipArray = convertAssociations ( parsedData , jdlObject . entities ) ; addRelationshipsToJDLObject ( jdlObject , jdlRelationshipArray ) ; if ( options ) { const jdlOptionArray = convertOptions ( options , parsedData . classNames . length ) ; addOptionsToJDLObject ( jdlObject , jdlOptionArray ) ; } return jdlObject ; }
Converts the parsed data from any XMI file to a JDLObject.
@param parsedData the parsed data.
@param options an object having as keys:
- listDTO,
- listPagination,
- listService,
- listOfNoClient,
- listOfNoServer,
- angularSuffixes,
- microserviceNames,
- searchEngines
Converts the parsed data from any XMI file to a JDLObject .