public static MappingScriptProxy getExistingMappingModel(TransformationUI transformationUI) { try { File xmapDir = ConfigSingleton.getRepoxContextUtil() .getRepoxManager() .getMetadataTransformationManager() .getXmapDir(); String mapFilePath = xmapDir.getPath() + File.separator + FilenameUtils.removeExtension(transformationUI.getXslFilePath()) + ".xmap"; URL tmp = new URL(transformationUI.getSourceSchema()); XMLSchema source = getXSDSchema(tmp); tmp = new URL(transformationUI.getDestSchema()); XMLSchema target = getXSDSchema(tmp); MappingScript mapping = getMapping(source, target, mapFilePath); return new Mapping2UIAdapter().adapt(mapping); } catch (IOException e) { e.printStackTrace(); return null; } }