Package io.lumify.core.model.termMention

Examples of io.lumify.core.model.termMention.TermMentionBuilder


                    for (String workspaceId : workspaceIds) {
                        workspaceRepository.updateEntityOnWorkspace(workspaceRepository.findById(workspaceId, user), id, false, null, user);
                    }
                }

                Vertex resolvedMention = new TermMentionBuilder(termMention, sourceVertex)
                        .resolvedTo(resolvedToVertex, resolvedEdge)
                        .title(title)
                        .conceptIri(conceptType)
                        .process(processId)
                        .visibilityJson(LumifyProperties.TERM_MENTION_VISIBILITY_JSON.getPropertyValue(termMention))
View Full Code Here


            String ontologyClassUri = mapToOntologyIri(match.getConceptTitle());

            Vertex resolvedToVertex = findOrAddEntity(title, ontologyClassUri, visibility);
            Edge resolvedEdge = findOrAddEdge(sourceVertex, resolvedToVertex, visibilityJson, visibility);

            Vertex termMention = new TermMentionBuilder()
                    .sourceVertex(sourceVertex)
                    .propertyKey(propertyKey)
                    .start(start)
                    .end(end)
                    .title(title)
View Full Code Here

        Edge edge = graph.addEdge(artifactVertex, vertex, this.artifactHasEntityIri, lumifyVisibility.getVisibility(), authorizations);
        LumifyProperties.VISIBILITY_JSON.setProperty(edge, visibilityJson, metadata, lumifyVisibility.getVisibility(), authorizations);

        auditRepository.auditRelationship(AuditAction.CREATE, artifactVertex, vertex, edge, "", "", user, lumifyVisibility.getVisibility());

        new TermMentionBuilder()
                .sourceVertex(artifactVertex)
                .propertyKey(propertyKey)
                .start(mentionStart)
                .end(mentionEnd)
                .title(title)
View Full Code Here

                linkedPageVertex,
                WikipediaConstants.WIKIPEDIA_PAGE_INTERNAL_LINK_WIKIPEDIA_PAGE_CONCEPT_URI,
                visibility,
                authorizations);

        new TermMentionBuilder()
                .sourceVertex(pageVertex)
                .propertyKey(pageTextKey)
                .start(link.getStartOffset())
                .end(link.getEndOffset())
                .title(linkTarget)
View Full Code Here

        String edgeId = tweetVertex.getId() + "_HAS_" + keywordVertex.getId();
        Edge edge = getGraph().addEdge(edgeId, tweetVertex, keywordVertex, FoodTruckOntology.EDGE_LABEL_HAS_KEYWORD, visibility, getAuthorizations());
        getGraph().flush();

        new TermMentionBuilder()
                .sourceVertex(tweetVertex)
                .resolvedTo(keywordVertex, edge)
                .start(startOffset)
                .end(endOffset)
                .conceptIri(conceptUri)
View Full Code Here

        assertEquals("Test highlight of <span class=\"entity\" title=\"joe ferner\" data-info=\"{&quot;process&quot;:&quot;EntityHighlighterTest&quot;,&quot;id&quot;:&quot;TM_--18-28-EntityHighlighterTest&quot;,&quot;title&quot;:&quot;joe ferner&quot;,&quot;sandboxStatus&quot;:&quot;PRIVATE&quot;,&quot;http://lumify.io#conceptType&quot;:&quot;http://lumify.io/test/person&quot;,&quot;start&quot;:18,&quot;sourceVertexId&quot;:&quot;1&quot;,&quot;type&quot;:&quot;http://www.w3.org/2002/07/owl#Thing&quot;,&quot;end&quot;:28}\">Joe Ferner</span> and <span class=\"entity\" title=\"jeff kunkle\" data-info=\"{&quot;process&quot;:&quot;uniq1&quot;,&quot;id&quot;:&quot;TM_--33-44-uniq1&quot;,&quot;title&quot;:&quot;jeff kunkle&quot;,&quot;sandboxStatus&quot;:&quot;PRIVATE&quot;,&quot;http://lumify.io#conceptType&quot;:&quot;http://lumify.io/test/person&quot;,&quot;start&quot;:33,&quot;sourceVertexId&quot;:&quot;1&quot;,&quot;type&quot;:&quot;http://www.w3.org/2002/07/owl#Thing&quot;,&quot;end&quot;:44}\">Jeff Kunkle</span>.",
                highlightText);
    }

    private Vertex createTermMention(Vertex sourceVertex, String sign, String conceptIri, int start, int end) {
        return new TermMentionBuilder()
                .sourceVertex(sourceVertex)
                .propertyKey(PROPERTY_KEY)
                .conceptIri(conceptIri)
                .start(start)
                .end(end)
View Full Code Here

                .process(getClass().getSimpleName())
                .save(graph, visibilityTranslator, authorizations);
    }

    private Vertex createTermMention(Vertex sourceVertex, String sign, String conceptIri, int start, int end, String process) {
        return new TermMentionBuilder()
                .sourceVertex(sourceVertex)
                .propertyKey(PROPERTY_KEY)
                .conceptIri(conceptIri)
                .start(start)
                .end(end)
View Full Code Here

                for (String workspaceId : workspaceIds) {
                    workspaceRepository.updateEntityOnWorkspace(workspaceRepository.findById(workspaceId, user), id, false, null, user);
                }
            }

            new TermMentionBuilder(termMention, sourceVertex)
                    .resolvedTo(zipCodeVertex, resolvedEdge)
                    .title(title)
                    .conceptIri(zipCodeIri)
                    .process(getClass().getName())
                    .visibilityJson(LumifyProperties.TERM_MENTION_VISIBILITY_JSON.getPropertyValue(termMention))
View Full Code Here

        int start = charOffset + tokenListPositions[foundName.getStart()].getStart();
        int end = charOffset + tokenListPositions[foundName.getEnd() - 1].getEnd();
        String type = foundName.getType();
        String ontologyClassUri = mapToOntologyIri(type);

        return new TermMentionBuilder()
                .sourceVertex(sourceVertex)
                .propertyKey(propertyKey)
                .start(start)
                .end(end)
                .title(name)
View Full Code Here

        for (final PhoneNumberMatch phoneNumber : phoneNumbers) {
            final String formattedNumber = phoneNumberUtil.format(phoneNumber.number(), PhoneNumberUtil.PhoneNumberFormat.E164);
            int start = phoneNumber.start();
            int end = phoneNumber.end();

            Vertex termMention = new TermMentionBuilder()
                    .sourceVertex(sourceVertex)
                    .propertyKey(data.getProperty().getKey())
                    .start(start)
                    .end(end)
                    .title(formattedNumber)
View Full Code Here

TOP

Related Classes of io.lumify.core.model.termMention.TermMentionBuilder

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.