Examples of SelectorImpl


Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                //read the RDF/XML file
                model.read(new InputStreamReader(new FileInputStream(modelpath)),
                    "");

                //Predicate for filtering the feedback type
                Selector selector = new SelectorImpl(null, RP.type,
                        (RDFNode) null);

                // Filtering
                StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                        //read the RDF/XML file
                        model.read(new InputStreamReader(
                                new FileInputStream(modelPath)), "");

                        //predicate for filtering the category location
                        Selector selector = new SelectorImpl(null,
                                RP.categoryLocation, (RDFNode) null);

                        // Filtering
                        StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                //read the RDF/XML file
                model.read(new InputStreamReader(new FileInputStream(modelPath)),
                    "");

                //predicate for filtering the category location
                Selector selector = new SelectorImpl(null, RP.directScore,
                        (RDFNode) null);

                // Filtering
                StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                //read the RDF/XML file
                model.read(new InputStreamReader(new FileInputStream(modelPath)),
                    "");

                //predicate for filtering the category location
                Selector selector = new SelectorImpl(null, RP.directScore,
                        (RDFNode) null);

                // Filtering
                StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                    //read the RDF/XML file
                    model.read(new InputStreamReader(
                            new FileInputStream(modelpath)), "");

                    //Predicate for filtering the linkToId
                    Selector selector = new SelectorImpl(null, RP.linkToId,
                            (RDFNode) null);

                    // Filtering
                    StmtIterator iter = model.listStatements(selector);

                    //sum for implied score
                    double sumImpliedScore = 0.00;

                    while (iter.hasNext()) {
                        //get the statement
                        Statement stmt = iter.nextStatement();

                        //get the resource 
                        Resource node = stmt.getSubject();

                        //get the resource properties (linktoid and linktocategory)
                        String linktoid = node.getProperty(RP.linkToId)
                                              .getObject().toString();
                        String linktocategory = node.getProperty(RP.linkToCategory)
                                                    .getObject().toString();

                        //construct the unique element (categname/documid)
                        String compare = linktocategory + SEPARATOR + linktoid;

                        //validate if the element was not already add it
                        if (listElemUnique.contains(compare)) {
                            listElemUnique.remove(compare);

                            //get the implied score
                            try {
                                sumImpliedScore = sumImpliedScore +
                                    getImpliedScore(linktocategory, linktoid);
                            } catch (RpException e) {
                                logger.info("Exception in calculate the implied weight",
                                    e);
                            }
                        }
                    }

                    //if there are still links-elements in the list and must to be add it to the model
                    if (!listElemUnique.isEmpty()) {
                        Iterator it = listElemUnique.iterator();

                        while (it.hasNext()) {
                            String elem = (String) it.next();
                            int index = elem.lastIndexOf(SEPARATOR);
                            String linktocategory = elem.substring(0, index);
                            String linktoid = elem.substring(index + 1);

                            //add the resource
                            Resource link = model.createResource()
                                                 .addProperty(RP.linkToCategory,
                                    linktocategory).addProperty(RP.linkToId,
                                    linktoid);
                        }
                    }

                    //update the calc_score of the node according to the average of the set
                    //Predicate for filtering the calc_score
                    Selector selScore = new SelectorImpl(null, RP.calcScore,
                            (RDFNode) null);

                    // Filtering
                    StmtIterator iterScore = model.listStatements(selScore);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                //read the RDF/XML file
                model.read(new InputStreamReader(new FileInputStream(modelpath)),
                    "");

                //Predicate for filtering direct score
                Selector selector = new SelectorImpl(null, RP.directScore,
                        (RDFNode) null);

                // Filtering
                StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.impl.SelectorImpl

                //read the RDF/XML file
                model.read(new InputStreamReader(new FileInputStream(modelpath)),
                    "");

                //Predicate for filtering the category score
                Selector selector = new SelectorImpl(null, RP.categoryScore,
                        (RDFNode) null);

                // Filtering
                StmtIterator iter = model.listStatements(selector);
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.SelectorImpl

        read();
        return s;
    }

    private SourceImpl parseSource() throws ParseException {
        SelectorImpl selector = parseSelector();
        selectors.put(selector.getSelectorName(), selector);
        SourceImpl source = selector;
        while (true) {
            JoinType joinType;
            if (readIf("RIGHT")) {
                read("OUTER");
                joinType = JoinType.RIGHT_OUTER;
            } else if (readIf("LEFT")) {
                read("OUTER");
                joinType = JoinType.LEFT_OUTER;
            } else if (readIf("INNER")) {
                joinType = JoinType.INNER;
            } else {
                break;
            }
            read("JOIN");
            selector = parseSelector();
            selectors.put(selector.getSelectorName(), selector);
            read("ON");
            JoinConditionImpl on = parseJoinCondition();
            source = factory.join(source, selector, joinType, on);
        }
        return source;
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.SelectorImpl

        if (selectorName == null) {
            for (SelectorImpl selector : selectors.values()) {
                addWildcardColumns(columns, selector);
            }
        } else {
            SelectorImpl selector = selectors.get(selectorName);
            if (selector != null) {
                addWildcardColumns(columns, selector);
            } else {
                throw getSyntaxError("Unknown selector: " + selectorName);
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.SelectorImpl

    ResultRowImpl currentRow() {
        int selectorCount = selectors.size();
        Tree[] trees = new Tree[selectorCount];
        for (int i = 0; i < selectorCount; i++) {
            SelectorImpl s = selectors.get(i);
            trees[i] = s.currentTree();
        }
        int columnCount = columns.length;
        PropertyValue[] values = new PropertyValue[columnCount];
        for (int i = 0; i < columnCount; i++) {
            ColumnImpl c = columns[i];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.