Methods Summary |
---|
public com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode | getCMBinOpNode(int type, com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode leftNode, com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode rightNode)
return new XSCMBinOp(type, leftNode, rightNode) ;
|
public com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode | getCMLeafNode(int type, java.lang.Object leaf, int id, int position)
return new XSCMLeaf(type, leaf, id, position) ;
|
public com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode | getCMUniOpNode(int type, com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode childNode)
return new XSCMUniOp(type, childNode) ;
|
public void | nodeCountCheck()
if( fSecurityManager != null && nodeCount++ > maxNodeLimit){
if(DEBUG){
System.out.println("nodeCount = " + nodeCount ) ;
System.out.println("nodeLimit = " + maxNodeLimit ) ;
}
fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "maxOccurLimit", new Object[]{ new Integer(maxNodeLimit) }, XMLErrorReporter.SEVERITY_FATAL_ERROR);
// similarly to entity manager behaviour, take into accont
// behaviour if continue-after-fatal-error is set.
nodeCount = 0;
}
|
public void | reset(com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager componentManager)
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
try {
fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER);
//we are setting the limit of number of nodes to 3times the maxOccur value..
if(fSecurityManager != null){
maxNodeLimit = fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY ;
}
}
catch (XMLConfigurationException e) {
fSecurityManager = null;
}
|
public void | resetNodeCount()
nodeCount = 0 ;
|
public void | setProperty(java.lang.String propertyId, java.lang.Object value)Sets the value of a property. This method is called by the component
manager any time after reset when a property changes value.
Note: Components should silently ignore properties
that do not affect the operation of the component.
// Xerces properties
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
fSecurityManager = (SecurityManager)value;
maxNodeLimit = (fSecurityManager != null) ? fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY : 0 ;
return;
}
if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
propertyId.endsWith(Constants.ERROR_REPORTER_PROPERTY)) {
fErrorReporter = (XMLErrorReporter)value;
return;
}
}
|