Package org.openrdf.model

Examples of org.openrdf.model.BNode


            PropertyPath from,
            ResourceRoot to,
            TripleHandler th,
            ExtractionContext ec
    ) throws TripleHandlerException {
        final BNode fromObject = from.getObject();
        final String bNodeHash = from.getProperty().stringValue() + ( fromObject == null ? "" : fromObject.getID() );
        BNode bnode = RDFUtils.getBNode(bNodeHash);
        th.receiveTriple(bnode, vSINDICE.getProperty(SINDICE.NESTING_ORIGINAL), from.getProperty(), null, ec );
        th.receiveTriple(
                bnode,
                vSINDICE.getProperty(SINDICE.NESTING_STRUCTURED),
                from.getObject() == null ? to.getRoot() : from.getObject(),
View Full Code Here


    @Override
    protected boolean extractEntity(Node node, ExtractionResult out) throws ExtractionException {
        this.fragment = new HTMLDocument(node);
        fixIncludes(getHTMLDocument(), node, out);
        final BNode card = getBlankNodeFor(node);
        boolean foundSomething = false;

        readFn();
        readNames();
        readOrganization();
View Full Code Here

                n, bn, vCARD.getProperty(fieldName), valueFactory.createLiteral(fieldValue)
        );
    }

    private boolean addNames(Resource card) {
        BNode n = valueFactory.createBNode();
        addBNodeProperty(
                this.fragment.getDocument(),
                card, vCARD.n, n
        );
        addURIProperty(n, RDF.TYPE, vCARD.Name);
View Full Code Here

        name.setOrganizationUnit(doc.getSingularTextField("organization-unit"));
    }

    private boolean addOrganizationName(Resource card) {
        if (name.getOrganization() == null) return false;
        BNode org = valueFactory.createBNode();
        addBNodeProperty(
                this.fragment.getDocument(),
                card, vCARD.org, org
        );
        addURIProperty(org, RDF.TYPE, vCARD.Organization);
View Full Code Here

            String[] both = document.getSingularUrlField("geo").value().split(";");
            if (both.length != 2) return false;
            lat = both[0];
            lon = both[1];
        }
        BNode geo = getBlankNodeFor(node);
        out.writeTriple(geo, RDF.TYPE, vVCARD.Location);
        final String extractorName = getDescription().getExtractorName();
        conditionallyAddStringProperty(
                latNode.source(),
                geo, vVCARD.latitude , lat
View Full Code Here

    protected void resetExtractor() {
        // Empty.
    }

    protected boolean extractEntity(Node node, ExtractionResult out) throws ExtractionException {
        BNode rev = getBlankNodeFor(node);
        out.writeTriple(rev, RDF.TYPE, vREVIEW.Review);
        final HTMLDocument fragment = new HTMLDocument(node);
        addRating(fragment, rev);
        addSummary(fragment, rev);
        addTime(fragment, rev);
View Full Code Here

    }

    @Override
    protected boolean extractEntity(Node node, ExtractionResult out) {
        if (null == node) return false;
        BNode person = getBlankNodeFor(node);
        // we have a person, at least
        out.writeTriple(person, RDF.TYPE, vFOAF.Person);
        final HTMLDocument fragment = new HTMLDocument(node);
        addSummary(fragment, person);
        addContact(fragment, person);
View Full Code Here

    }

    private void addExperiences(HTMLDocument doc, Resource person) {
        List<Node> nodes = doc.findAllByClassName("experience");
        for (Node node : nodes) {
            BNode exp = valueFactory.createBNode();
            if (addExperience(exp, new HTMLDocument(node)))
            addBNodeProperty(
                    node,
                    person, vDOAC.experience, exp
            );
View Full Code Here

    }

    private void addEducations(HTMLDocument doc, Resource person) {
        List<Node> nodes = doc.findAllByClassName("education");
        for (Node node : nodes) {
            BNode exp = valueFactory.createBNode();
            if (addExperience(exp, new HTMLDocument(node)))
            addBNodeProperty(
                    node,
                    person, vDOAC.education, exp
            );
View Full Code Here

    }

    @Override
    protected boolean extractEntity(Node node, ExtractionResult out) throws ExtractionException {
        this.fragment = new HTMLDocument(node);
        BNode listing = getBlankNodeFor(node);
        out.writeTriple(listing, RDF.TYPE, hLISTING.Listing);

        for (String action : findActions(fragment)) {
            out.writeTriple(listing, hLISTING.action, hLISTING.getClass(action));
        }
View Full Code Here

TOP

Related Classes of org.openrdf.model.BNode

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.