Search in sources :

Example 1 with AssemblerBase

use of org.apache.jena.assembler.assemblers.AssemblerBase in project jena by apache.

the class TestAssemblerGroup method testPassesSelfIn.

public void testPassesSelfIn() {
    final AssemblerGroup group = AssemblerGroup.create();
    final Object result = new Object();
    Assembler fake = new AssemblerBase() {

        @Override
        public Object open(Assembler a, Resource root, Mode irrelevant) {
            assertSame("nested call should pass in assembler group:", group, a);
            return result;
        }
    };
    group.implementWith(JA.Object, fake);
    assertSame(result, group.open(resourceInModel("x rdf:type ja:Object")));
}
Also used : Mode(org.apache.jena.assembler.Mode) Resource(org.apache.jena.rdf.model.Resource) ExpandingAssemblerGroup(org.apache.jena.assembler.assemblers.AssemblerGroup.ExpandingAssemblerGroup) AssemblerGroup(org.apache.jena.assembler.assemblers.AssemblerGroup) Assembler(org.apache.jena.assembler.Assembler) InfModelAssembler(org.apache.jena.assembler.assemblers.InfModelAssembler) AssemblerBase(org.apache.jena.assembler.assemblers.AssemblerBase)

Aggregations

Assembler (org.apache.jena.assembler.Assembler)1 Mode (org.apache.jena.assembler.Mode)1 AssemblerBase (org.apache.jena.assembler.assemblers.AssemblerBase)1 AssemblerGroup (org.apache.jena.assembler.assemblers.AssemblerGroup)1 ExpandingAssemblerGroup (org.apache.jena.assembler.assemblers.AssemblerGroup.ExpandingAssemblerGroup)1 InfModelAssembler (org.apache.jena.assembler.assemblers.InfModelAssembler)1 Resource (org.apache.jena.rdf.model.Resource)1