Package au.csiro.ontology.snomed.refset.rf2

Examples of au.csiro.ontology.snomed.refset.rf2.ValidationException


                log.error(message, e);
                throw new ImportException(message, e);
            }
        }

        IModuleDependencyRefset res = RefsetImporter.importModuleDependencyRefset(iss);
        return res;
    }
View Full Code Here


        private void processNext() throws ImportException {
            RF2Input in = inputs.remove();

            // 1. Load module dependencies
            log.info("Loading module dependencies");
            IModuleDependencyRefset mdr = loadModuleDependencies(in);

            if(mdr == null) {
                throw new ImportException("Couldn't load module dependency reference set for RF2 input files.");
            }

            // Each map entry contains a map of modules indexed by version
            Map<String, Map<String, ModuleDependency>> deps =
                    mdr.getModuleDependencies();

            // 2. Determine which modules and versions must be loaded
            log.info("Determining which root modules and versions to load");
            Map<String, Set<Version>> toLoad = getModuleVersionsToLoad(in);
View Full Code Here

                    try { br.close(); } catch(Exception e) {}
                }
            }
        }

        IModuleDependencyRefset res = new ModuleDependencyRefset(members);
        return res;
    }
View Full Code Here

                log.error(message, e);
                throw new ImportException(message, e);
            }
        }

        IModuleDependencyRefset res = RefsetImporter.importModuleDependencyRefset(iss);
        return res;
    }
View Full Code Here

        private void processNext() throws ImportException {
            RF2Input in = inputs.remove();

            // 1. Load module dependencies
            log.info("Loading module dependencies");
            IModuleDependencyRefset mdr = loadModuleDependencies(in);

            if(mdr == null) {
                throw new ImportException("Couldn't load module dependency reference set for RF2 input files.");
            }

            // Each map entry contains a map of modules indexed by version
            Map<String, Map<String, ModuleDependency>> deps =
                    mdr.getModuleDependencies();

            // 2. Determine which modules and versions must be loaded
            log.info("Determining which root modules and versions to load");
            Map<String, Set<Version>> toLoad = getModuleVersionsToLoad(in);
View Full Code Here

            for(String rootModuleId : toLoad.keySet()) {
                Set<Version> versions = toLoad.get(rootModuleId);
                for(Version version : versions) {
                    String ver = version.getId();
                    Map<String, String> metadata = version.getMetadata();
                    ModuleDependency md = deps.get(rootModuleId).get(ver);
                    Set<Module> modules = new HashSet<Module>();

                    Queue<ModuleDependency> depends = new LinkedList<ModuleDependency>();
                    depends.add(md);

                    while (!depends.isEmpty()) {
                        ModuleDependency d = depends.poll();
                        modules.add(new Module(d.getId(), d.getVersion()));
                        depends.addAll(d.getDependencies());
                    }

                    entries.add(new ImportEntry(rootModuleId, ver, metadata, modules, in));
                }
            }
View Full Code Here

                    Map<String, String> metadata = version.getMetadata();
                    Map<String, ModuleDependency> versionMap = deps.get(rootModuleId);
                    if (null == versionMap) {
                        throw new ImportException("Root module not found in MDRS: " + rootModuleId);
                    }
                    ModuleDependency md = versionMap.get(ver);
                    Set<Module> modules = new HashSet<Module>();

                    Queue<ModuleDependency> depends = new LinkedList<ModuleDependency>();
                    depends.add(md);

                    while (!depends.isEmpty()) {
                        ModuleDependency d = depends.poll();
                        modules.add(new Module(d.getId(), d.getVersion()));
                        depends.addAll(d.getDependencies());
                    }

                    entries.add(new ImportEntry(rootModuleId, ver, metadata, modules, in));
                }
            }
View Full Code Here

                    try { br.close(); } catch(Exception e) {}
                }
            }
        }

        IModuleDependencyRefset res = new ModuleDependencyRefset(members);
        return res;
    }
View Full Code Here

                }
            }
        }

        try {
            return new ModuleDependencyRefset(members, !Boolean.getBoolean("mdrs.ignoreErrors"));
        } catch (ValidationException e) {
            throw new ImportException("Can not continue import with invalid MDRS", e);
        }
    }
View Full Code Here

                        && cols[7].equals("targetEffectiveTime")) {

                    while (null != (line = br.readLine())) {
                        cols = line.split("[\t]");
                        boolean active = cols[2].equals("1");
                        ModuleDependencyRow m =
                                new ModuleDependencyRow(cols[0],
                                        cols[1], active , cols[3], cols[4],
                                        cols[5], cols[6], cols[7]);
                        members.add(m);
                    }
                } else {
View Full Code Here

TOP

Related Classes of au.csiro.ontology.snomed.refset.rf2.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.