Package org.apache.stanbol.enhancer.ldpath.backend

Examples of org.apache.stanbol.enhancer.ldpath.backend.ContentItemBackend


                }
            }
        }

        // execute the LDPath on the given ContentItem
        ContentItemBackend contentItemBackend = new ContentItemBackend(ci, true);
        LDPath<Resource> resourceLDPath = new LDPath<Resource>(contentItemBackend, EnhancerLDPath.getConfig());
        Program<Resource> resourceProgram;
        try {
            resourceProgram = resourceLDPath.parseProgram(new StringReader(ldPathProgram));
            Map<String,Collection<?>> ciBackendResults = resourceProgram.execute(contentItemBackend,
View Full Code Here


    }
   
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ContentItemBackend(ci);
        }
        if(ldpath == null){
            ldpath = new LDPath<Resource>(backend, EnhancerLDPath.getConfig());
        }
    }
View Full Code Here

        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral("Michael Jackson");
        UriRef subject = new UriRef("dummyUri");
        tc.add(new TripleImpl(subject, new UriRef("http://xmlns.com/foaf/0.1/givenName"), literal));
        contentItem.addPart(new UriRef(uri.getUnicodeString() + "_additionalMetadata"), tc);

        ContentItemBackend ciBackend = new ContentItemBackend(contentItem, true);
        LDPath<Resource> ldPath = new LDPath<Resource>(ciBackend, EnhancerLDPath.getConfig());
        Collection<Resource> result = ldPath.pathQuery(subject, "foaf:givenName", null);

        assertTrue("Additional metadata cannot be found", result.contains(literal));
    }
View Full Code Here

        ci.getMetadata().addAll(rdfData);
    }
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ContentItemBackend(ci);
        }
        if(ldpath == null){
            ldpath = new LDPath<Resource>(backend, EnhancerLDPath.getConfig());
        }
    }
View Full Code Here

    }
   
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ContentItemBackend(ci);
        }
        if(ldpath == null){
            ldpath = new LDPath<Resource>(backend, EnhancerLDPath.getConfig());
        }
    }
View Full Code Here

        ci.getMetadata().addAll(rdfData);
    }
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ContentItemBackend(ci);
        }
        if(ldpath == null){
            ldpath = new LDPath<Resource>(backend, EnhancerLDPath.getConfig());
        }
    }
View Full Code Here

    }
   
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ContentItemBackend(ci);
        }
        if(ldpath == null){
            ldpath = new LDPath<Resource>(backend, EnhancerLDPath.getConfig());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.ldpath.backend.ContentItemBackend

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.