Policy policy = reg.lookup(uriString);
if (policy == null) {
try {
URI policyURI = new URI(uriString);
URL policyURL = policyURI.toURL();
PolicyReader reader = PolicyFactory
.getPolicyReader(PolicyFactory.OM_POLICY_READER);
Policy newPolicy = reader
.readPolicy(policyURL.openStream());
reg.register(uriString, newPolicy);
} catch (Exception e) {
e.printStackTrace();