Class TextExtractorUseLongestLiteralOrFragment

java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.textExtractors.TextExtractorUseLongestLiteralOrFragment
All Implemented Interfaces:
TextExtractor

public class TextExtractorUseLongestLiteralOrFragment extends Object implements TextExtractor
A text textractor which extracts texts from a resource which can be used by transformer based matchers like TransformersFilter or TransformersFilterFineTuner. It will extract the longest text literal which is attached to the resource or the fragment if no literal is available.
  • Field Details

  • Constructor Details

    • TextExtractorUseLongestLiteralOrFragment

      public TextExtractorUseLongestLiteralOrFragment()
  • Method Details

    • extract

      public Set<String> extract(org.apache.jena.rdf.model.Resource r)
      Description copied from interface: TextExtractor
      Given a Jena resource this method extracts textual/string representations from it.
      Specified by:
      extract in interface TextExtractor
      Parameters:
      r - the jena resource which also allows to traverse the whole rdf graph
      Returns:
      a set of textual representations of the given resource.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object