Ejemplo n.º 1
0
  @Test
  public void testCheckForNonExclusion() {
    ExcludeBasedOnType ebot = new ExcludeBasedOnType();
    ebot.addTypeToExclude("http://xmlns.com/foaf/0.1/Person");

    IndividualImpl ind = new IndividualImpl();
    ind.setURI("http://example.com/n2343");
    VClass personClass = new VClass("http://xmlns.com/foaf/0.1/Robot");
    ind.setVClasses(Collections.singletonList(personClass), false);

    String excludeResult = ebot.checkForExclusion(ind);
    assertNull(excludeResult);
  }
Ejemplo n.º 2
0
  @Test
  public void testCheckForNonExclusion2() {
    ExcludeBasedOnType ebot = new ExcludeBasedOnType();
    ebot.addTypeToExclude("http://xmlns.com/foaf/0.1/Person");

    IndividualImpl ind = new IndividualImpl();
    ind.setURI("http://example.com/n2343");

    List<VClass> vClassList = new ArrayList<VClass>();
    vClassList.add(new VClass("http://xmlns.com/foaf/0.1/Agent"));
    vClassList.add(new VClass("http://example.com/Robot"));
    vClassList.add(new VClass("http://example.com/KillerRobot"));
    vClassList.add(new VClass("http://example.com/Droid"));
    ind.setVClasses(vClassList, false);

    String excludeResult = ebot.checkForExclusion(ind);
    assertNull(excludeResult);
  }