throw new RuntimeException("unknown element ..");
}
}
public Policy readPolicy(OMElement element) {
Policy policy = new Policy();
OMAttribute attri;
attri = element.getAttribute(new QName(
PolicyConstants.WSU_NAMESPACE_URI, "Id"));
if (attri != null) {
policy.setId(attri.getAttributeValue());
}
attri = element.getAttribute(new QName(
PolicyConstants.XML_NAMESPACE_URI, "base"));
if (attri != null) {
policy.setBase(attri.getAttributeValue());
}
policy.addTerms(readTerms(element));
return policy;
}