Ejemplo n.º 1
0
  public EnhancedReport validate(
      String msg,
      String profile,
      ArrayList<String> constraints,
      String vs,
      String id,
      Context context)
      throws Exception {

    // Extract Profile
    String pr = Util.streamAsString(profile);

    // Conf
    List<InputStream> l = new ArrayList<InputStream>();
    for (String s : constraints) {
      InputStream contextXML = ValidationProxy.class.getResourceAsStream(s);
      l.add(contextXML);
    }
    ConformanceContext c = DefaultConformanceContext.apply(l).get();

    // VS
    InputStream vsXML = ValidationProxy.class.getResourceAsStream(vs);
    ValueSetLibrary valueSetLibrary = ValueSetLibraryImpl.apply(vsXML).get();

    return this.validate(msg, pr, c, valueSetLibrary, id, context);
  }
 protected ValueSetLibrary getValueSetLibrary(InputStream vsLibXML) {
   ValueSetLibrary valueSetLibrary = ValueSetLibraryImpl.apply(vsLibXML).get();
   return valueSetLibrary;
 }