Ejemplo n.º 1
0
  @Test
  public void testMatch()
      throws SyntaxException, JAXBException, WritingException,
          org.herasaf.xacml.core.SyntaxException, IOException {
    ObligationsSet obligPref =
        (ObligationsSet) unmarshallerPrime.unmarshal(getClass().getResourceAsStream("pref.xml"));

    ObligationsSet obligPolicy =
        (ObligationsSet) unmarshallerPrime.unmarshal(getClass().getResourceAsStream("oblig.xml"));

    // matcher.match(obligPref, obligPolicy);

    ObligationsMatcher obligationsMatcher = new ObligationsMatcher();
    System.out.println(obligationsMatcher.getStickyPolicy(obligPolicy, obligPref));
  }
Ejemplo n.º 2
0
 private PolicyType readPolicyPrefs(String path) throws JAXBException, SyntaxException {
   UnmarshallImpl unmarshal = new UnmarshallImpl(PolicyType.class.getPackage());
   return (PolicyType) unmarshal.unmarshal(getClass().getResourceAsStream(path));
 }