Package org.apache.any23.extractor.xpath

## Class QuadTemplate

- java.lang.Object
- - org.apache.any23.extractor.xpath.QuadTemplate

-     public class QuadTemplate
      extends Object

  This class models a NQuads template, that is a quadruple in which any component can be a variable.
  Author:
    Michele Mostarda (mostarda@fbk.eu)

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `QuadTemplate​(TemplateSubject subject, TemplatePredicate predicate, TemplateObject object)` | Constructor for template with no graph.
    `QuadTemplate​(TemplateSubject subject, TemplatePredicate predicate, TemplateObject object, TemplateGraph graph)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `TemplateGraph` | `getGraph()` |
    `TemplateObject` | `getObject()` |
    `TemplatePredicate` | `getPredicate()` |
    `TemplateSubject` | `getSubject()` |
    `void` | `printOut​(org.apache.any23.extractor.ExtractionResult er, Map<String,​String> variableAssignment)` | Prints out this quad template in the given `ExtractionResult`, using the passed variableAssignment to expand variables.
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### QuadTemplate

          public QuadTemplate​(TemplateSubject subject,
                              TemplatePredicate predicate,
                              TemplateObject object,
                              TemplateGraph graph)

      Constructor.
      Parameters:
        `subject` - not `null` subject template.
        `predicate` - not `null` predicate template.
        `object` - not `null` object template.
        `graph` - graph template, can be `null`.

    - #### QuadTemplate

          public QuadTemplate​(TemplateSubject subject,
                              TemplatePredicate predicate,
                              TemplateObject object)

      Constructor for template with no graph.
      Parameters:
        `subject` - a populated `TemplateSubject`
        `predicate` - a populated `TemplatePredicate`
        `object` - a populated `TemplateObject`

  - ### Method Detail

    - #### getSubject

          public TemplateSubject getSubject()

      Returns:
        the template subject.

    - #### getPredicate

          public TemplatePredicate getPredicate()

      Returns:
        the template predicate.

    - #### getObject

          public TemplateObject getObject()

      Returns:
        the template object.

    - #### getGraph

          public TemplateGraph getGraph()

      Returns:
        the template graph, can be `null`.

    - #### printOut

          public void printOut​(org.apache.any23.extractor.ExtractionResult er,
                               Map<String,​String> variableAssignment)

      Prints out this quad template in the given `ExtractionResult`, using the passed variableAssignment to expand variables.
      Parameters:
        `er` - extraction result instance on which write the quad produced by this template.
        `variableAssignment` - the assignment used to expand variables.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`