Exemplo n.º 1
0
 /**
  * Builds an object graph representing an MDMI map.
  *
  * @param inputStream XMI document stream which contains map definition.
  * @return
  */
 public static List<MessageGroup> build(
     InputStream inputStream, ModelValidationResults valResults) {
   try {
     return buildFromRawModel(XMIParser.parse(inputStream), valResults);
   } catch (XMLStreamException exc) {
     throw new MdmiException(exc, "MapBuilder: file XML parser error!");
   }
 }
Exemplo n.º 2
0
 /**
  * Builds an object graph representing an MDMI map.
  *
  * @param filePath Path to XMI file containing the map definition.
  * @return
  */
 public static List<MessageGroup> build(String filePath, ModelValidationResults valResults) {
   try {
     return buildFromRawModel(XMIParser.parse(filePath), valResults);
   } catch (FileNotFoundException exc) {
     throw new MdmiException(exc, "MapBuilder: file {0} not found!", filePath);
   } catch (XMLStreamException exc) {
     throw new MdmiException(exc, "MapBuilder: file {0} is not a valid XML file!", filePath);
   }
 }