Package io.lumify.core.ingest.graphProperty

Examples of io.lumify.core.ingest.graphProperty.GraphPropertyWorkData


        createVertex(data, "text/html");

        InputStream in = new ByteArrayInputStream(data.getBytes());
        Vertex vertex = graph.getVertex("v1", authorizations);
        Property property = vertex.getProperty(LumifyProperties.RAW.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        textExtractor.execute(in, workData);

        vertex = graph.getVertex("v1", authorizations);
        assertEquals("Test Title", LumifyProperties.TITLE.getPropertyValue(vertex));
View Full Code Here


        createVertex(data, "text/html");

        InputStream in = new ByteArrayInputStream(data.getBytes());
        Vertex vertex = graph.getVertex("v1", authorizations);
        Property property = vertex.getProperty(LumifyProperties.RAW.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        textExtractor.execute(in, workData);

        vertex = graph.getVertex("v1", authorizations);
        assertEquals("Test Title", LumifyProperties.TITLE.getPropertyValue(vertex));
        assertEquals("", IOUtils.toString(LumifyProperties.TEXT.getPropertyValue(vertex).getInputStream(), "UTF-8"));
View Full Code Here

        createVertex(data, "text/html");

        InputStream in = new ByteArrayInputStream(data.getBytes());
        Vertex vertex = graph.getVertex("v1", authorizations);
        Property property = vertex.getProperty(LumifyProperties.RAW.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        textExtractor.execute(in, workData);

        vertex = graph.getVertex("v1", authorizations);
        assertEquals("Test Title", LumifyProperties.TITLE.getPropertyValue(vertex));
        assertEquals(
View Full Code Here

        createVertex(data, "text/plain; charset=utf-8");

        InputStream in = new ByteArrayInputStream(data.getBytes("UTF-8"));
        Vertex vertex = graph.getVertex("v1", authorizations);
        Property property = vertex.getProperty(LumifyProperties.RAW.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        textExtractor.execute(in, workData);

        vertex = graph.getVertex("v1", authorizations);
        String expected = "the Quita Suená bank ";
        String actual = IOUtils.toString(LumifyProperties.TEXT.getPropertyValue(vertex).getInputStream(), "UTF-8");
View Full Code Here

        Vertex vertex = graph.prepareVertex("v1", new Visibility(""))
                .setProperty("text", "none", new Visibility(""))
                .setProperty(LumifyProperties.VISIBILITY_JSON.getPropertyName(), visibilityJson, new Visibility(""))
                .save(new InMemoryAuthorizations());

        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, vertex.getProperty("text"), null, null);
        extractor.setVisibilityTranslator(visibilityTranslator);
        extractor.execute(new ByteArrayInputStream(text.getBytes("UTF-8")), workData);

        List<Vertex> termMentions = toList(vertex.getVertices(Direction.OUT, LumifyProperties.TERM_MENTION_LABEL_HAS_TERM_MENTION, authorizations));
View Full Code Here

                .setProperty("text", "none", new Visibility(""))
                .setProperty(LumifyProperties.VISIBILITY_JSON.getPropertyName(), visibilityJson, new Visibility(""))
                .save(new InMemoryAuthorizations());
        graph.flush();

        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, vertex.getProperty("text"), null, "");
        extractor.execute(new ByteArrayInputStream(text.getBytes()), workData);

        List<Vertex> termMentions = toList(termMentionRepository.findBySourceGraphVertex(vertex.getId(), authorizations));

        assertEquals(3, termMentions.size());
View Full Code Here

        LumifyProperties.TEXT.setProperty(vertexBuilder, textPropertyValue, visibility);
        Vertex vertex = vertexBuilder.save(authorizations);

        in = getClass().getResourceAsStream("bffls.txt");
        Property property = vertex.getProperty(LumifyProperties.TEXT.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        extractor.execute(in, workData);

        List<Vertex> termMentions = toList(vertex.getVertices(Direction.OUT, LumifyProperties.TERM_MENTION_LABEL_HAS_TERM_MENTION, termMentionAuthorizations));

        assertEquals(3, termMentions.size());
View Full Code Here

        LumifyProperties.TEXT.setProperty(vertexBuilder, textPropertyValue, visibility);
        LumifyProperties.VISIBILITY_JSON.setProperty(vertexBuilder, visibilityJson, visibility);
        Vertex vertex = vertexBuilder.save(authorizations);

        Property property = vertex.getProperty(LumifyProperties.TEXT.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        in = asStream(PHONE_TEXT);
        extractor.execute(in, workData);

        List<Vertex> termMentions = toList(vertex.getVertices(Direction.OUT, LumifyProperties.TERM_MENTION_LABEL_HAS_TERM_MENTION, authorizations));
View Full Code Here

        LumifyProperties.TEXT.setProperty(vertexBuilder, textPropertyValue, visibility);
        LumifyProperties.VISIBILITY_JSON.setProperty(vertexBuilder, visibilityJson, visibility);
        Vertex vertex = vertexBuilder.save(authorizations);

        Property property = vertex.getProperty(LumifyProperties.TEXT.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        in = asStream(PHONE_NEW_LINES);
        extractor.execute(in, workData);

        List<Vertex> termMentions = toList(vertex.getVertices(Direction.OUT, LumifyProperties.TERM_MENTION_LABEL_HAS_TERM_MENTION, authorizations));
View Full Code Here

        StreamingPropertyValue textPropertyValue = new StreamingPropertyValue(in, String.class);
        LumifyProperties.TEXT.setProperty(vertexBuilder, textPropertyValue, visibility);
        Vertex vertex = vertexBuilder.save(authorizations);

        Property property = vertex.getProperty(LumifyProperties.TEXT.getPropertyName());
        GraphPropertyWorkData workData = new GraphPropertyWorkData(vertex, property, null, null);
        in = asStream(PHONE_MISSING);
        extractor.execute(in, workData);

        List<Vertex> termMentions = toList(vertex.getVertices(Direction.OUT, LumifyProperties.TERM_MENTION_LABEL_HAS_TERM_MENTION, authorizations));
View Full Code Here

TOP

Related Classes of io.lumify.core.ingest.graphProperty.GraphPropertyWorkData

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.