manager.createContainer(CONTAINER,
containerCfg);
// if we just created a container we also need to add an
// index
XmlIndexSpecification is =
container.getIndexSpecification();
int idxType = 0;
int syntaxType = 0;
// Add the attribute value index
idxType |= XmlIndexSpecification.PATH_EDGE;
idxType |= XmlIndexSpecification.NODE_ELEMENT;
idxType |= XmlIndexSpecification.KEY_EQUALITY;
syntaxType = XmlValue.STRING;
is.addIndex(XACML20_POLICY_NS,
"AttributeValue",
idxType,
syntaxType);
// Add the metadata default index
idxType = 0;
idxType |= XmlIndexSpecification.PATH_NODE;
idxType |= XmlIndexSpecification.NODE_METADATA;
idxType |= XmlIndexSpecification.KEY_PRESENCE;
syntaxType = XmlValue.NONE;
is.addDefaultIndex(idxType, syntaxType);
container.setIndexSpecification(is, updateContext);
} else {
container =
manager.openContainer(CONTAINER, containerCfg);