FileDocCategorySizeDatePackage
PKIXPolicyNode.javaAPI DocAzureus 3.0.3.43454Tue Jun 08 05:12:56 BST 2004org.bouncycastle.jce.provider

PKIXPolicyNode

public class PKIXPolicyNode extends Object implements PolicyNode

Fields Summary
protected List
children
protected int
depth
protected Set
expectedPolicies
protected PolicyNode
parent
protected Set
policyQualifiers
protected String
validPolicy
protected boolean
critical
Constructors Summary
public PKIXPolicyNode(List _children, int _depth, Set _expectedPolicies, PolicyNode _parent, Set _policyQualifiers, String _validPolicy, boolean _critical)

		children         = _children;
		depth            = _depth;
		expectedPolicies = _expectedPolicies;
		parent           = _parent;
		policyQualifiers = _policyQualifiers;
		validPolicy      = _validPolicy;
		critical         = _critical;
	
Methods Summary
public voidaddChild(org.bouncycastle.jce.provider.PKIXPolicyNode _child)

		children.add(_child);
		_child.setParent(this);
	
public java.lang.Objectclone()

		return copy();
	
public org.bouncycastle.jce.provider.PKIXPolicyNodecopy()

		HashSet _expectedPolicies = new HashSet();
		Iterator _iter = expectedPolicies.iterator();
		while (_iter.hasNext())
        {
			_expectedPolicies.add(new String((String)_iter.next()));
		}
		
		HashSet _policyQualifiers = new HashSet();
		_iter = policyQualifiers.iterator();
		while (_iter.hasNext())
        {
			_policyQualifiers.add(new String((String)_iter.next()));
		}
		
		PKIXPolicyNode _node = new PKIXPolicyNode(new ArrayList(),
		                                          depth,
		                                          _expectedPolicies,
		                                          null,
		                                          _policyQualifiers,
		                                          new String(validPolicy),
		                                          critical);
		
		_iter = children.iterator();
		while (_iter.hasNext())
        {
			PKIXPolicyNode _child = ((PKIXPolicyNode)_iter.next()).copy();
			_child.setParent(_node);
			_node.addChild(_child);
		}
		
		return _node;
	
public java.util.IteratorgetChildren()

		return children.iterator();
	
public intgetDepth()

		return depth;
	
public java.util.SetgetExpectedPolicies()

		return expectedPolicies;
	
public java.security.cert.PolicyNodegetParent()

		return parent;
	
public java.util.SetgetPolicyQualifiers()

		return policyQualifiers;
	
public java.lang.StringgetValidPolicy()

		return validPolicy;
	
public booleanhasChildren()

		return !children.isEmpty();
	
public booleanisCritical()

		return critical;
	
public voidremoveChild(org.bouncycastle.jce.provider.PKIXPolicyNode _child)

		children.remove(_child);
	
public voidsetCritical(boolean _critical)

		critical = _critical;
	
public voidsetParent(org.bouncycastle.jce.provider.PKIXPolicyNode _parent)

		parent = _parent;
	
public java.lang.StringtoString()

		return toString("");
	
public java.lang.StringtoString(java.lang.String _indent)

		StringBuffer _buf = new StringBuffer();
		_buf.append(_indent);
		_buf.append(validPolicy);
		_buf.append(" {\n");
		
		for(int i = 0; i < children.size(); i++) {
			_buf.append(((PKIXPolicyNode)children.get(i)).toString(_indent + "    "));
		}
		
		_buf.append(_indent);
		_buf.append("}\n");
		return _buf.toString();