1 /* 2 * Copyright 2009 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.openehealth.ipf.commons.xml; 17 18 import java.util.Map; 19 20 /** 21 * Validation profile exclusively used by {@link SchematronValidator}. The 22 * following standard Schematron parameters can be passed in as Map parameter: 23 * <ul> 24 * <li>phase : NMTOKEN | "#ALL" (default) Select the phase for validation 25 * <li>allow-foreign : "true" | "false" (default) Pass non-Schematron elements 26 * and rich markup to the generated stylesheet 27 * <li>diagnose : "true" (default) | "false" Add the diagnostics to the 28 * assertion test in reports 29 * <li>property : "true" (default) | "false" Experimental: Add properties to the 30 * assertion test in reports 31 * <li>generate-paths : "true" (default) | "false" Generate the @location 32 * attribute with XPaths 33 * <li>sch.exslt.imports : semi-colon delimited string of filenames for some 34 * EXSLT implementations 35 * <li>optimize : "visit-no-attributes" Use only when the schema has no 36 * attributes as the context nodes 37 * <li>generate-fired-rule: "true" (default) | "false" Generate fired-rule 38 * elements 39 * </ul> 40 * 41 * @author Christian Ohr 42 * @see SchematronValidator 43 */ 44 public class SchematronProfile { 45 46 public SchematronProfile() { 47 super(); 48 } 49 50 public SchematronProfile(String rules) { 51 super(); 52 this.rules = rules; 53 } 54 55 public SchematronProfile(String rules, Map<String, Object> parameters) { 56 super(); 57 this.rules = rules; 58 this.parameters = parameters; 59 } 60 61 private String rules; 62 63 private Map<String, Object> parameters; 64 65 public String getRules() { 66 return rules; 67 } 68 69 public void setRules(String rules) { 70 this.rules = rules; 71 } 72 73 public Map<String, Object> getParameters() { 74 return parameters; 75 } 76 77 public void setParameters(Map<String, Object> parameters) { 78 this.parameters = parameters; 79 } 80 81 }