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)Create a leaf node as defined by the params.
// this is a new node
nodeCount++;
if (DEBUG) {
System.err.println("CMNodeFactory#getCMBinOpNode("
+ "type[" + type + "], "
+ "leftNode[" + leftNode.toString() + "], "
+ "rightNode[" + rightNode.toString() + "])\n"
+ "\tnodeCount=" + nodeCount);
}
// create new node as defined by the params
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)Create a new leaf node as defined by the params.
// this is a new node
nodeCount++;
if (DEBUG) {
System.err.println("CMNodeFactory#getCMLeafNode("
+ "type[" + type + "], "
+ "leaf[" + leaf.toString() + "], "
+ "id[" + id + "], "
+ "position[" + position + "])\n"
+ "\tnodeCount=" + nodeCount);
}
// create new node as defined by the params
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)Create a leaf node as defined by the params.
// this is a new node
nodeCount++;
if (DEBUG) {
System.err.println("CMNodeFactory#getCMUniOpNode("
+ "type[" + type + "], "
+ "childNode[" + childNode.toString() + "])\n"
+ "\tnodeCount=" + nodeCount);
}
// create new node as defined by the params
return new XSCMUniOp(type, childNode);
|
public void | reset(com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager componentManager)Reset internal state using componentManager provided values.
if (DEBUG) {
System.err.println("CMNodeFactory#reset("
+ "componentManager[" + componentManager.toString() + "])");
}
// error reporter
fErrorReporter = (XMLErrorReporter) componentManager.getProperty(ERROR_REPORTER);
|
public void | resetNodeCount()Reset the internal node count to 0.
nodeCount = 0;
if (DEBUG) {
System.err.println("CMNodeFactory#resetNodeCount: "
+ "nodeCount=" + nodeCount + " (after reset)");
}
|
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.
if (DEBUG) {
System.err.println("CMNodeFactory#setProperty("
+ "propertyId[" + propertyId + "], "
+ "value[" + value.toString() + "])");
}
// Xerces properties?
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
// error reporter?
if (property.equals(Constants.ERROR_REPORTER_PROPERTY)) {
fErrorReporter = (XMLErrorReporter) value;
return;
}
// silently ignore unknown Xerces property
return;
} else {
// silently ignore unknown non-Xerces property
return;
}
|