@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)); }
private PolicyType readPolicyPrefs(String path) throws JAXBException, SyntaxException { UnmarshallImpl unmarshal = new UnmarshallImpl(PolicyType.class.getPackage()); return (PolicyType) unmarshal.unmarshal(getClass().getResourceAsStream(path)); }