Package org.apache.any23.extractor.html.HTMLDocument

Examples of org.apache.any23.extractor.html.HTMLDocument.TextField


                card, vCARD.uid, uid.value()
        );
    }

    private boolean addClass(Resource card) {
        TextField class_ = fragment.getSingularUrlField("class");
        return conditionallyAddStringProperty(
                fragment.getDocument(),
                card, vCARD.class_, class_.value()
        );
    }
View Full Code Here


                            value.source(),
                            n, fieldName, value.value()
                    );
                }
            } else {
                TextField value =  name.getField(fieldName);
                if(value == null) { continue; }
                addFieldTriple(
                        value.source(),
                        n, fieldName, value.value()
                );
            }
        }
        return true;
    }
View Full Code Here

    private void readFn() {
        name.setFullName(fragment.getSingularTextField("fn"));
    }

    private boolean addFn(Resource card) {
        final TextField fullNameTextField = name.getFullName();
        if(fullNameTextField == null) {
            return false;
        }
        return conditionallyAddStringProperty(
                fullNameTextField.source(),
                card, vCARD.fn, fullNameTextField.value()
        );
    }
View Full Code Here

        }
        nodeText = doc.getSingularTextField("organization-name").value();
        if(nodeText == null || "".equals(nodeText) ) {
            nodeText = HTMLDocument.readTextField(node).value();
        }
        name.setOrganization( new TextField(nodeText, node) );

        name.setOrganizationUnit(doc.getSingularTextField("organization-unit"));
    }
View Full Code Here

        addBNodeProperty(
                this.fragment.getDocument(),
                card, vCARD.org, org
        );
        addURIProperty(org, RDF.TYPE, vCARD.Organization);
        final TextField organizationTextField = name.getOrganization();
        conditionallyAddLiteralProperty(
                organizationTextField.source(),
                org, vCARD.organization_name, valueFactory.createLiteral( organizationTextField.value() )
        );
        final TextField organizationUnitTextField = name.getOrganizationUnit();
        if(organizationUnitTextField != null) {
            conditionallyAddStringProperty(
                    organizationUnitTextField.source(),
                    org, vCARD.organization_unit, organizationUnitTextField.value()
            );
        }
        return true;
    }
View Full Code Here

        return true;
    }

    private void addType(HTMLDocument doc, Resource rev) {
        TextField value = doc.getSingularTextField("type");
        conditionallyAddStringProperty(
                value.source(),
                rev, vREVIEW.type, value.value()
        );
    }
View Full Code Here

        }
    }

    private Resource findDummy(HTMLDocument item) throws ExtractionException {
        Resource blank = getBlankNodeFor(item.getDocument());
        TextField val = item.getSingularTextField("fn");
        conditionallyAddStringProperty(
                val.source(),
                blank, vVCARD.fn, val.value()
        );
        final TextField url = item.getSingularUrlField("url");
        conditionallyAddResourceProperty(blank, vVCARD.url, getHTMLDocument().resolveURI(url.value()));
        TextField pics[] = item.getPluralUrlField("photo");
        for (TextField pic : pics) {
            addURIProperty(blank, vVCARD.photo, getHTMLDocument().resolveURI(pic.value()));
        }
        return blank;
    }
View Full Code Here

                value.source(), rev, vREVIEW.rating, value.value()
        );
    }

    private void addSummary(HTMLDocument doc, Resource rev) {
        TextField value = doc.getSingularTextField("summary");
        conditionallyAddStringProperty(
                value.source(),
                rev, vREVIEW.title, value.value()
        );
    }
View Full Code Here

                rev, vREVIEW.title, value.value()
        );
    }

    private void addTime(HTMLDocument doc, Resource rev) {
        TextField value = doc.getSingularTextField("dtreviewed");
        conditionallyAddStringProperty(
                value.source(),
                rev, vDCTERMS.date, value.value()
        );
    }
View Full Code Here

                rev, vDCTERMS.date, value.value()
        );
    }

    private void addDescription(HTMLDocument doc, Resource rev) {
        TextField value = doc.getSingularTextField("description");
        conditionallyAddStringProperty(
                value.source(),
                rev, vREVIEW.text, value.value()
        );
    }
View Full Code Here

TOP

Related Classes of org.apache.any23.extractor.html.HTMLDocument.TextField

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.