return elementPolicy;
}
List<UnknownExtensibilityElement> extensions =
ex.getExtensors(UnknownExtensibilityElement.class);
PolicyConstants constants = bus.getExtension(PolicyConstants.class);
if (null != extensions) {
for (UnknownExtensibilityElement e : extensions) {
Policy p = null;
if (constants.getPolicyElemQName().equals(e.getElementType())) {
p = builder.getPolicy(e.getElement());
} else if (constants.getPolicyReferenceElemQName().equals(e.getElementType())) {
PolicyReference ref = builder.getPolicyReference(e.getElement());
if (null != ref) {
p = resolveReference(ref, di);
}
}
if (null != p) {
elementPolicy = elementPolicy.merge(p);
}
}
}
if (includeAttributes) {
Object attr = ex.getExtensionAttribute(constants.getPolicyURIsAttrQName());
// can be of type a String, a QName, a list of Srings or a list of QNames
String uris = null;
if (attr instanceof QName) {
uris = ((QName)attr).getLocalPart();
} else if (attr instanceof String) {