Package com.phloc.schematron

Examples of com.phloc.schematron.ISchematronResource


  private Map<Class<? extends IResource>, ISchematronResource> myClassToSchematron = new HashMap<Class<? extends IResource>, ISchematronResource>();

  @Override
  public void validateResource(ValidationContext<IResource> theCtx) {

    ISchematronResource sch = getSchematron(theCtx);
    StreamSource source = new StreamSource(new StringReader(theCtx.getXmlEncodedResource()));

    SchematronOutputType results = SchematronHelper.applySchematron(sch, source);
    if (results == null) {
      return;
View Full Code Here


    return getSchematronAndCache(theCtx, "dstu", baseResourceClass);
  }

  private ISchematronResource getSchematronAndCache(ValidationContext<IResource> theCtx, String theVersion, Class<? extends IResource> theClass) {
    synchronized (myClassToSchematron) {
      ISchematronResource retVal = myClassToSchematron.get(theClass);
      if (retVal != null) {
        return retVal;
      }

      String pathToBase = "ca/uhn/fhir/model/" + theVersion + "/schema/" + theCtx.getFhirContext().getResourceDefinition(theCtx.getResource()).getBaseDefinition().getName().toLowerCase()
View Full Code Here

TOP

Related Classes of com.phloc.schematron.ISchematronResource

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.