Package com.google.refine.freebase.protograph

Examples of com.google.refine.freebase.protograph.Link


        Node node,
        Context context
    ) {
        List<TransposedNode> tnodes = new LinkedList<TransposedNode>();
       
        Link link = context.parent == null ? null : context.link;
       
        if (node instanceof CellNode) {
            if (!descendCellNode(project, nodeFactory, rowIndex, row, node, context, tnodes, link)) {
                return;
            }
        } else if (node instanceof AnonymousNode) {
            descendAnonymousNode(nodeFactory, rowIndex, node, context, tnodes, link);
        } else if (node instanceof FreebaseTopicNode) {
            descendFreebaseTopicNode(nodeFactory, rowIndex, node, context, tnodes, link);
        } else if (node instanceof ValueNode) {
            descendValueNode(nodeFactory, rowIndex, node, context, tnodes, link);
        }
       
        if (tnodes.size() > 0) {
            context.transposedNodes.clear();
            context.transposedNodes.addAll(tnodes);
        }
       
        if (node instanceof NodeWithLinks) {
            NodeWithLinks node2 = (NodeWithLinks) node;
            int linkCount = node2.getLinkCount();
           
            for (int i = 0; i < linkCount; i++) {
                Link link2 = node2.getLink(i);
                if (link2.condition == null || link2.condition.test(project, rowIndex, row)) {
                    descend(
                        project,
                        protograph,
                        nodeFactory,
                        rowIndex,
                        row,
                        link2.getTarget(),
                        context.subContexts.get(i)
                    );
                }
            }
        }
View Full Code Here


               
                int subContextCount = node2.getLinkCount();
               
                subContexts = new LinkedList<Context>();
                for (int i = 0; i < subContextCount; i++) {
                    Link link2 = node2.getLink(i);
                    subContexts.add(
                        new Context(link2.getTarget(), this, link2, -1));
                }
            }
        }
View Full Code Here

                    (subjectCell.recon.judgment == Judgment.Matched || subjectCell.recon.judgment == Judgment.New)
                ? subjectCell.recon : null;
           
            for (int i = 0; i < children.size(); i++) {
                WritingTransposedNode child = children.get(i);
                Link link = links.get(i);
                String predicate = link.property.id;
               
                if (recon != null) {
                    ensureFromTypesAsserted(recon, predicate);
                }
View Full Code Here

                firstRecon = false;
            }
           
            for (int i = 0; i < children.size(); i++) {
                WritingTransposedNode child = children.get(i);
                Link link = links.get(i);
               
                FreebaseProperty property = link.property;
               
                Object c = child.internalWrite(null, null, project, subjectRowIndex, subjectCellIndex, null);
                if (c != null) {
View Full Code Here

TOP

Related Classes of com.google.refine.freebase.protograph.Link

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.