Package org.apache.stanbol.entityhub.servicesapi.model

Examples of org.apache.stanbol.entityhub.servicesapi.model.Representation


        if(bnodePrefix != null && id.startsWith(bnodePrefix)){
            resource = Node.createAnon(AnonId.create(id.substring(bnodePrefix.length())));
        } else {
            resource = Node.createURI(id);
        }
        Representation source = vf.createRepresentation(id);
        boolean found;
        ExtendedIterator<Triple> outgoing = null;
        try { // There may still be exceptions while reading triples
            outgoing = indexingDataset.getDefaultGraph().find(resource, null, null);
            found = outgoing.hasNext();
View Full Code Here


   
    private static void validateTestIndex() throws Exception {
        log.info("check availability of {} entities", REQUIRED_ENTITIES.size());
        for(String context : REQUIRED_ENTITIES){
            log.debug("  > check Entity {}",context);
            Representation rep = yard.getRepresentation(context);
            assertNotNull(rep);
            assertEquals(rep.getId(),context);
            if(log.isDebugEnabled()){
                log.debug("Data for Entity {}: \n {}",rep.getId(),
                    ModelUtils.getRepresentationInfo(rep));
            }
        }
        log.info("   ... all Entities present");
    }   
View Full Code Here

        rep.getFirstReference("");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldGetFirstDataType() {
        Representation rep = createRepresentation(null);
        rep.getFirst("", Integer.class);
    }
View Full Code Here

        rep.getFirst("", Integer.class);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldGetFirstNaturalLanguage() {
        Representation rep = createRepresentation(null);
        rep.getFirst("", "en");
    }
View Full Code Here

        rep.getFirst("", "en");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldGetReferences() {
        Representation rep = createRepresentation(null);
        rep.getReferences("");
    }
View Full Code Here

        rep.getReferences("");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldGetText() {
        Representation rep = createRepresentation(null);
        rep.getText("");
    }
View Full Code Here

        rep.getText("");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldRemove() {
        Representation rep = createRepresentation(null);
        rep.remove("", "test");
    }
View Full Code Here

        rep.remove("", "test");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldRemoveAll() {
        Representation rep = createRepresentation(null);
        rep.removeAll("");
    }
View Full Code Here

        rep.removeAll("");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldRemoveAllNaturalText() {
        Representation rep = createRepresentation(null);
        rep.removeAllNaturalText("", "de");
    }
View Full Code Here

        rep.removeAllNaturalText("", "de");
    }

    @Test(expected = IllegalArgumentException.class)
    public void testEmptyFieldRemoveNaturalText() {
        Representation rep = createRepresentation(null);
        rep.removeNaturalText("", "test");
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.model.Representation

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.