Class ExtractionResultImpl

    • Method Detail

      • hasIssues

        public boolean hasIssues()
      • getIssuesCount

        public int getIssuesCount()
      • writeTriple

        public void writeTriple​(org.eclipse.rdf4j.model.Resource s,
                                org.eclipse.rdf4j.model.IRI p,
                                org.eclipse.rdf4j.model.Value o,
                                org.eclipse.rdf4j.model.IRI g)
        Description copied from interface: ExtractionResult
        Writes a triple. Parameters can be null, then the triple will be silently ignored.
        Specified by:
        writeTriple in interface ExtractionResult
        Parameters:
        s - subject
        p - predicate
        o - object
        g - graph
      • writeTriple

        public void writeTriple​(org.eclipse.rdf4j.model.Resource s,
                                org.eclipse.rdf4j.model.IRI p,
                                org.eclipse.rdf4j.model.Value o)
        Description copied from interface: ExtractionResult
        Write a triple. Parameters can be null, then the triple will be silently ignored.
        Specified by:
        writeTriple in interface ExtractionResult
        Parameters:
        s - subject
        p - predicate
        o - object
      • writeNamespace

        public void writeNamespace​(String prefix,
                                   String uri)
        Description copied from interface: ExtractionResult
        Write a namespace.
        Specified by:
        writeNamespace in interface ExtractionResult
        Parameters:
        prefix - the prefix of the namespace
        uri - the long IRI identifying the namespace
      • notifyIssue

        public void notifyIssue​(IssueReport.IssueLevel level,
                                String msg,
                                long row,
                                long col)
        Description copied from interface: IssueReport
        Notifies an issue occurred while performing an extraction on an input stream.
        Specified by:
        notifyIssue in interface IssueReport
        Parameters:
        level - issue level.
        msg - issue message.
        row - issue row.
        col - issue column.
      • close

        public void close()
        Description copied from interface: ExtractionResult

        Close the result.

        Extractors should close their results as soon as possible, but don't have to, the environment will close any remaining ones. Implementations should be robust against multiple close() invocations.
        Specified by:
        close in interface ExtractionResult
      • addResourceRoot

        public void addResourceRoot​(String[] path,
                                    org.eclipse.rdf4j.model.Resource root,
                                    Class<? extends MicroformatExtractor> extractor)
        Description copied from interface: TagSoupExtractionResult
        Adds a root property to the extraction result, specifying also the path corresponding to the root of data which generated the property and the extractor responsible for such addition.
        Specified by:
        addResourceRoot in interface TagSoupExtractionResult
        Parameters:
        path - the path from the document root to the local root of the data generating the property.
        root - the property root node.
        extractor - the extractor responsible of such extraction.
      • addPropertyPath

        public void addPropertyPath​(Class<? extends MicroformatExtractor> extractor,
                                    org.eclipse.rdf4j.model.Resource propertySubject,
                                    org.eclipse.rdf4j.model.Resource property,
                                    org.eclipse.rdf4j.model.BNode object,
                                    String[] path)
        Description copied from interface: TagSoupExtractionResult
        Adds a property path to the list of the extracted data.
        Specified by:
        addPropertyPath in interface TagSoupExtractionResult
        Parameters:
        extractor - the identifier of the extractor responsible for retrieving such property.
        propertySubject - the subject of the property.
        property - the property IRI.
        object - the property object if any, null otherwise.
        path - the path of the HTML node from which the property literal has been extracted.