/** * Parse the supplied mapping model config stream and return the generated EdiMap. * * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(org.milyn.edisax.model.EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The EdifactModel for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(Reader mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(org.milyn.edisax.model.EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The EdifactModel for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(Reader mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(org.milyn.edisax.model.EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The EdifactModel for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(Reader mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(org.milyn.edisax.model.EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @return The EdifactModel for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(Reader mappingConfigStream) throws IOException, SAXException, EDIConfigurationException { return parseMappingModel(mappingConfigStream, null, null, URIResourceLocator.getSystemBaseURI()); }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @param mappingDescription Mapping Model Description. * @param resourceURI The resource URI. * @param importBaseURI The base URI for loading imports. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream, Description mappingDescription, URI resourceURI, URI importBaseURI) throws IOException, SAXException, EDIConfigurationException { AssertArgument.isNotNull(mappingConfigStream, "mappingConfigStream"); try { return parseMappingModel(new InputStreamReader(mappingConfigStream), mappingDescription, resourceURI, importBaseURI); } finally { mappingConfigStream.close(); } }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @param mappingDescription Mapping Model Description. * @param resourceURI The resource URI. * @param importBaseURI The base URI for loading imports. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream, Description mappingDescription, URI resourceURI, URI importBaseURI) throws IOException, SAXException, EDIConfigurationException { AssertArgument.isNotNull(mappingConfigStream, "mappingConfigStream"); try { return parseMappingModel(new InputStreamReader(mappingConfigStream), mappingDescription, resourceURI, importBaseURI); } finally { mappingConfigStream.close(); } }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @param mappingDescription Mapping Model Description. * @param resourceURI The resource URI. * @param importBaseURI The base URI for loading imports. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream, Description mappingDescription, URI resourceURI, URI importBaseURI) throws IOException, SAXException, EDIConfigurationException { AssertArgument.isNotNull(mappingConfigStream, "mappingConfigStream"); try { return parseMappingModel(new InputStreamReader(mappingConfigStream), mappingDescription, resourceURI, importBaseURI); } finally { mappingConfigStream.close(); } }
/** * Parse the supplied mapping model config stream and return the generated EdiMap. * <p/> * Can be used to set the mapping model to be used during the parsing operation. * See {@link #setMappingModel(EdifactModel)}. * @param mappingConfigStream Config stream. Must conform with the * <a href="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">edi-message-mapping-1.0.xsd</a> * schema. * @param mappingDescription Mapping Model Description. * @param resourceURI The resource URI. * @param importBaseURI The base URI for loading imports. * @return The Edimap for the mapping model. * @throws IOException Error reading the model stream. * @throws SAXException Invalid model. * @throws EDIConfigurationException when edi-mapping-configuration is incorrect. */ public static EdifactModel parseMappingModel(InputStream mappingConfigStream, Description mappingDescription, URI resourceURI, URI importBaseURI) throws IOException, SAXException, EDIConfigurationException { AssertArgument.isNotNull(mappingConfigStream, "mappingConfigStream"); try { return parseMappingModel(new InputStreamReader(mappingConfigStream), mappingDescription, resourceURI, importBaseURI); } finally { mappingConfigStream.close(); } }
private static boolean loadXMLMappingModel(String mappingModelFile, Map<String, EdifactModel> mappingModels, URI baseURI) throws EDIConfigurationException { try { EdifactModel model = EDIParser.parseMappingModel(mappingModelFile, baseURI); mappingModels.put(toLookupName(model.getEdimap().getDescription()), model); return true; } catch (IOException e) { return false; } catch (SAXException e) { logger.debug("Configured mapping model file '" + mappingModelFile + "' is not a valid Mapping Model xml file."); return false; } }
private static boolean loadXMLMappingModel(String mappingModelFile, Map<String, EdifactModel> mappingModels, URI baseURI) throws EDIConfigurationException { try { EdifactModel model = EDIParser.parseMappingModel(mappingModelFile, baseURI); mappingModels.put(toLookupName(model.getEdimap().getDescription()), model); return true; } catch (IOException e) { return false; } catch (SAXException e) { logger.debug("Configured mapping model file '" + mappingModelFile + "' is not a valid Mapping Model xml file."); return false; } }
private static boolean loadXMLMappingModel(String mappingModelFile, Map<String, EdifactModel> mappingModels, URI baseURI) throws EDIConfigurationException { try { EdifactModel model = EDIParser.parseMappingModel(mappingModelFile, baseURI); mappingModels.put(toLookupName(model.getEdimap().getDescription()), model); return true; } catch (IOException e) { return false; } catch (SAXException e) { logger.debug("Configured mapping model file '" + mappingModelFile + "' is not a valid Mapping Model xml file."); return false; } }
private static boolean loadXMLMappingModel(String mappingModelFile, Map<String, EdifactModel> mappingModels, URI baseURI) throws EDIConfigurationException { try { EdifactModel model = EDIParser.parseMappingModel(mappingModelFile, baseURI); mappingModels.put(toLookupName(model.getEdimap().getDescription()), model); return true; } catch (IOException e) { return false; } catch (SAXException e) { logger.debug("Configured mapping model file '" + mappingModelFile + "' is not a valid Mapping Model xml file."); return false; } }
public static void loadMappingModels(Map<String, EdifactModel> mappingModels, URI baseURI, List<String> rootMappingModels) throws IOException, SAXException, EDIConfigurationException { for (String rootMappingModel : rootMappingModels) { try { EdifactModel mappingModel = EDIParser.parseMappingModel(rootMappingModel, baseURI); mappingModel.setAssociateModels(mappingModels.values()); mappingModels.put(toLookupName(mappingModel.getDescription()), mappingModel); } catch(Exception e) { throw new EDIConfigurationException("Error parsing EDI Mapping Model '" + rootMappingModel + "'.", e); } } }
public static void loadMappingModels(Map<String, EdifactModel> mappingModels, URI baseURI, List<String> rootMappingModels) throws IOException, SAXException, EDIConfigurationException { for (String rootMappingModel : rootMappingModels) { try { EdifactModel mappingModel = EDIParser.parseMappingModel(rootMappingModel, baseURI); mappingModel.setAssociateModels(mappingModels.values()); mappingModels.put(toLookupName(mappingModel.getDescription()), mappingModel); } catch(Exception e) { throw new EDIConfigurationException("Error parsing EDI Mapping Model '" + rootMappingModel + "'.", e); } } }
public static void loadMappingModels(Map<String, EdifactModel> mappingModels, URI baseURI, List<String> rootMappingModels) throws IOException, SAXException, EDIConfigurationException { for (String rootMappingModel : rootMappingModels) { try { EdifactModel mappingModel = EDIParser.parseMappingModel(rootMappingModel, baseURI); mappingModel.setAssociateModels(mappingModels.values()); mappingModels.put(toLookupName(mappingModel.getDescription()), mappingModel); } catch(Exception e) { throw new EDIConfigurationException("Error parsing EDI Mapping Model '" + rootMappingModel + "'.", e); } } }
public static void loadMappingModels(Map<String, EdifactModel> mappingModels, URI baseURI, List<String> rootMappingModels) throws IOException, SAXException, EDIConfigurationException { for (String rootMappingModel : rootMappingModels) { try { EdifactModel mappingModel = EDIParser.parseMappingModel(rootMappingModel, baseURI); mappingModel.setAssociateModels(mappingModels.values()); mappingModels.put(toLookupName(mappingModel.getDescription()), mappingModel); } catch(Exception e) { throw new EDIConfigurationException("Error parsing EDI Mapping Model '" + rootMappingModel + "'.", e); } } }