private String getCommmonMessageName() { return EDIUtils.MODEL_SET_DEFINITIONS_DESCRIPTION.getName(); }
private static void addModel(Edimap model, String pathPrefix, StringBuilder modelListBuilder, StringWriter messageEntryWriter, Archive archive) throws IOException { Description modelDesc = model.getDescription(); String messageEntryPath = pathPrefix + "/" + modelDesc.getName() + ".xml"; // Generate the mapping model for this message... messageEntryWriter.getBuffer().setLength(0); model.write(messageEntryWriter); // Add the generated mapping model to the archive... archive.addEntry(messageEntryPath, messageEntryWriter.toString()); // Add this messages archive entry to the mapping model list file... modelListBuilder.append("/" + messageEntryPath); modelListBuilder.append("!" + modelDesc.getName()); modelListBuilder.append("!" + modelDesc.getVersion()); modelListBuilder.append("!" + modelDesc.getNamespace()); modelListBuilder.append("\n"); }
final EPackage pkg = EcoreFactory.eINSTANCE.createEPackage(); Description desc = mapModel.getDescription(); pkg.setName(desc.getName().toLowerCase()); pkg.setNsPrefix(desc.getName().toLowerCase()); pkg.setNsURI(desc.getNamespace()); if (mapModel.getSrc() != null) { annotate(pkg, "src", mapModel.getSrc().toASCIIString()); annotate(pkg, "description.name", mapModel.getDescription().getName()); annotate(pkg, "description.version", mapModel.getDescription() .getVersion());
/** * Convert {@link Description} to the string representation * that is used for lookup in the hashmaps * * @param description * @return */ public static String toLookupName(Description description) { return description.getName() + ":" + description.getVersion(); }
if(nameComponentIndex != -1) { commonNS = namespace.substring(0, nameComponentIndex) + ":common"; messageNSPrefix = description.getName().toLowerCase(); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "c", "xmlns:c", "CDATA", commonNS); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, messageNSPrefix, "xmlns:" + messageNSPrefix, "CDATA", namespace);
/** * Convert {@link Description} to the string representation * that is used for lookup in the hashmaps * * @param description * @return */ public static String toLookupName(Description description) { return description.getName() + ":" + description.getVersion(); }
if(nameComponentIndex != -1) { commonNS = namespace.substring(0, nameComponentIndex) + ":common"; messageNSPrefix = description.getName().toLowerCase(); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "c", "xmlns:c", "CDATA", commonNS); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, messageNSPrefix, "xmlns:" + messageNSPrefix, "CDATA", namespace);
/** * Convert {@link Description} to the string representation * that is used for lookup in the hashmaps * * @param description * @return */ public static String toLookupName(Description description) { return description.getName() + ":" + description.getVersion(); }
if(nameComponentIndex != -1) { commonNS = namespace.substring(0, nameComponentIndex) + ":common"; messageNSPrefix = description.getName().toLowerCase(); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "c", "xmlns:c", "CDATA", commonNS); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, messageNSPrefix, "xmlns:" + messageNSPrefix, "CDATA", namespace);
public Set<String> getMessageNames() { Set<String> names = new LinkedHashSet<String>(); names.add(definitionModel.getDescription().getName()); names.addAll(messageFiles.keySet()); return names; }
if(nameComponentIndex != -1) { commonNS = namespace.substring(0, nameComponentIndex) + ":common"; messageNSPrefix = description.getName().toLowerCase(); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "c", "xmlns:c", "CDATA", commonNS); attrs.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, messageNSPrefix, "xmlns:" + messageNSPrefix, "CDATA", namespace);
public static String toLookupName(Description description) { return description.getName() + ":" + description.getVersion(); }
public Edimap getMappingModel(String messageName) throws IOException { if(messageName.equals(definitionModel.getDescription().getName())) { return definitionModel; } else { return parseEdiMessage(messageName).getEdimap(); } }
private static String getMessagePrefix(Edimap mappingModel) { return "EDI message processing failed [" + mappingModel.getDescription().getName() + "][" + mappingModel.getDescription().getVersion() + "]."; }
private static String getMessagePrefix(Edimap mappingModel) { return "EDI message processing failed [" + mappingModel.getDescription().getName() + "][" + mappingModel.getDescription().getVersion() + "]."; }
private static String getMessagePrefix(Edimap mappingModel) { return "EDI message processing failed [" + mappingModel.getDescription().getName() + "][" + mappingModel.getDescription().getVersion() + "]."; }
private static String getMessagePrefix(Edimap mappingModel) { return "EDI message processing failed [" + mappingModel.getDescription().getName() + "][" + mappingModel.getDescription().getVersion() + "]."; }
logger.debug("Parsed, validated and cached EDI mapping model [" + edifactModel.getEdimap().getDescription().getName() + ", Version " + edifactModel.getEdimap().getDescription().getVersion() + "]. Target Profile(s) " + getTargetProfiles() + "."); } else if(logger.isInfoEnabled()) { logger.debug("Found EDI mapping model [" + edifactModel.getEdimap().getDescription().getName() + ", Version " + edifactModel.getEdimap().getDescription().getVersion() + "] in the model cache. Target Profile(s) " + getTargetProfiles() + ".");
logger.debug("Parsed, validated and cached EDI mapping model [" + edifactModel.getEdimap().getDescription().getName() + ", Version " + edifactModel.getEdimap().getDescription().getVersion() + "]. Target Profile(s) " + getTargetProfiles() + "."); } else if(logger.isInfoEnabled()) { logger.debug("Found EDI mapping model [" + edifactModel.getEdimap().getDescription().getName() + ", Version " + edifactModel.getEdimap().getDescription().getVersion() + "] in the model cache. Target Profile(s) " + getTargetProfiles() + ".");
Import ediImport = new Import(); ediImport.setNamespace(agency); ediImport.setResource(definitionModel.getDescription().getName() + ".xml"); // TODO: Review with B�rd edimap.getImports().add(ediImport); } else {