Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (C) 2014-2020 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.schematron.pure.model;
import java.util.Map;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.NotThreadSafe;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.CollectionHelper;
import com.helger.commons.collection.impl.CommonsArrayList;
import com.helger.commons.collection.impl.CommonsLinkedHashMap;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.collection.impl.ICommonsOrderedMap;
import com.helger.commons.string.StringHelper;
import com.helger.commons.string.ToStringGenerator;
import com.helger.schematron.CSchematron;
import com.helger.schematron.CSchematronXML;
import com.helger.schematron.pure.errorhandler.IPSErrorHandler;
import com.helger.xml.microdom.IMicroElement;
import com.helger.xml.microdom.MicroElement;
/**
* A single Schematron rule-element.
* A list of assertions tested within the context specified by the required
* context attribute. The context attribute specifies the rule context
* expression.
* NOTE: It is not an error if a rule never fires in a document. In order to
* test that a document always has some context, a new pattern should be created
* from the context of the document, with an assertion requiring the element or
* attribute.
* The icon, see and fpi attributes allow rich interfaces and documentation.
* The flag attribute allows more detailed outcomes.
* The role and subject attributes allow explicit identification of some part of
* a pattern as part of the validation outcome.
* When the rule element has the attribute abstract with a value true, then the
* rule is an abstract rule. An abstract rule shall not have a context
* attribute. An abstract rule is a list of assertions that will be invoked by
* other rules belonging to the same pattern using the extends element. Abstract
* rules provide a mechanism for reducing schema size.
*
* @author Philip Helger
*/
@NotThreadSafe
public class PSRule implements
IPSElement,
IPSHasID,
IPSHasFlag,
IPSHasForeignElements,
IPSHasIncludes,
IPSHasLets,
IPSHasRichGroup,
IPSHasLinkableGroup
{
public static final boolean DEFAULT_ABSTRACT = false;
private String m_sFlag;
private PSRichGroup m_aRich;
private PSLinkableGroup m_aLinkable;
private boolean m_bAbstract = DEFAULT_ABSTRACT;
private String m_sContext;
private String m_sID;
private final ICommonsList