COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.databuilders
Class ElementSchematronCacheBuilder.RuleBindings

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.databuilders.ElementSchematronCacheBuilder.RuleBindings
Enclosing class:
ElementSchematronCacheBuilder

public static class ElementSchematronCacheBuilder.RuleBindings
extends java.lang.Object

A data structure that stores the schematron rule bindings


Field Summary
protected  java.util.Map data
          The data structure associated with this builder KEY = taget namespace of the schema containing the schematron rule OR UNTARGETED VALUE = An object of type Map that contains: KEY = The document alias, the element name, or the element type VALUE = The schematron node that should be applied to the element
 
Constructor Summary
ElementSchematronCacheBuilder.RuleBindings()
           
 
Method Summary
 void addGloballyBoundRule(Schematron schematronRule)
          Adds a globally bound rule
 void bindRule(java.lang.String alias, Schematron schematronRule)
          Binds a rule with the document alias passed in
 void bindRule(java.lang.String uri, java.lang.String localName, Schematron schematronRule)
          Binds a rule with a namespace and a localname
 java.util.List getBoundRules(java.lang.String alias)
          Returns a rule that's been bound to an alias via the ruleBindings element
 java.util.List getBoundRules(java.lang.String uri, java.lang.String localName)
          Returns a rule that's been bound to an element name or a element type declaration.
 java.util.List getGloballyBoundRules()
          Returns the list of the rules bound to all documents in the model.
 boolean isRuleBindingPresent()
          Returns true if the SML-IF document being parsed contains a ruleBindings element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.util.Map data
The data structure associated with this builder KEY = taget namespace of the schema containing the schematron rule OR UNTARGETED VALUE = An object of type Map that contains: KEY = The document alias, the element name, or the element type VALUE = The schematron node that should be applied to the element

Constructor Detail

ElementSchematronCacheBuilder.RuleBindings

public ElementSchematronCacheBuilder.RuleBindings()
Method Detail

bindRule

public void bindRule(java.lang.String alias,
                     Schematron schematronRule)
Binds a rule with the document alias passed in

Parameters:
alias - The document alias
schematronRule - The schematron rule

bindRule

public void bindRule(java.lang.String uri,
                     java.lang.String localName,
                     Schematron schematronRule)
Binds a rule with a namespace and a localname

Parameters:
uri - The namespace
localName - The local name
schematronRule - The schematron rule

addGloballyBoundRule

public void addGloballyBoundRule(Schematron schematronRule)
Adds a globally bound rule

Parameters:
schematronRule - The rule

getBoundRules

public java.util.List getBoundRules(java.lang.String alias)
Returns a rule that's been bound to an alias via the ruleBindings element

Parameters:
alias - The alias
Returns:
The list of associated rules

getBoundRules

public java.util.List getBoundRules(java.lang.String uri,
                                    java.lang.String localName)
Returns a rule that's been bound to an element name or a element type declaration.

Parameters:
uri - The URI
localName - The local name
Returns:
The list of schematron rules

getGloballyBoundRules

public java.util.List getGloballyBoundRules()
Returns the list of the rules bound to all documents in the model. This occurs when a ruleBinding element is encountered in a SML-IF document that specifies a ruleAlias but does not specify a documentAlias.

Returns:
The globally bound rules

isRuleBindingPresent

public boolean isRuleBindingPresent()
Returns true if the SML-IF document being parsed contains a ruleBindings element

Returns:
true if the ruleBindings element is present; false otherwise

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification