FileDocCategorySizeDatePackage
XSCMUniOp.javaAPI DocApache Xerces 3.0.13574Fri Sep 14 20:33:56 BST 2007org.apache.xerces.impl.xs.models

XSCMUniOp

public class XSCMUniOp extends org.apache.xerces.impl.dtd.models.CMNode
Content model Uni-Op node.
xerces.internal
author
Neil Graham, IBM
version
$Id: XSCMUniOp.java 476309 2006-11-17 20:49:31Z mrglavas $

Fields Summary
private org.apache.xerces.impl.dtd.models.CMNode
fChild
Constructors Summary
public XSCMUniOp(int type, org.apache.xerces.impl.dtd.models.CMNode childNode)

        super(type);

        // Insure that its one of the types we require
        if ((type() != XSParticleDecl.PARTICLE_ZERO_OR_ONE)
        &&  (type() != XSParticleDecl.PARTICLE_ZERO_OR_MORE)
        &&  (type() != XSParticleDecl.PARTICLE_ONE_OR_MORE)) {
            throw new RuntimeException("ImplementationMessages.VAL_UST");
        }

        // Store the node and init any data that needs it
        fChild = childNode;
    
Methods Summary
protected voidcalcFirstPos(org.apache.xerces.impl.dtd.models.CMStateSet toSet)

        // Its just based on our child node's first pos
        toSet.setTo(fChild.firstPos());
    
protected voidcalcLastPos(org.apache.xerces.impl.dtd.models.CMStateSet toSet)

        // Its just based on our child node's last pos
        toSet.setTo(fChild.lastPos());
    
final org.apache.xerces.impl.dtd.models.CMNodegetChild()

        return fChild;
    
public booleanisNullable()

        //
        //  For debugging purposes, make sure we got rid of all non '*'
        //  repetitions. Otherwise, '*' style nodes are always nullable.
        //
        if (type() == XSParticleDecl.PARTICLE_ONE_OR_MORE)
	        return fChild.isNullable();
	    else
	        return true;