Class TupleOps

java.lang.Object
org.aksw.jenax.arq.util.tuple.TupleOps

public class TupleOps extends Object
Author:
Claus Stadler 11/09/2020
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <DomainType, ComponentType>
    Function<DomainType,org.apache.jena.atlas.lib.tuple.Tuple<ComponentType>>
    createProjector(int[] project, org.aksw.commons.tuple.accessor.TupleAccessor<? super DomainType,? extends ComponentType> accessor)
    Prepare and return a mapping function that projects specified components into Tuples from input tuple-like objects.
    static <DomainType, ComponentType>
    org.apache.jena.atlas.lib.tuple.Tuple<ComponentType>
    project(int[] proj, DomainType domainObject, org.aksw.commons.tuple.accessor.TupleAccessor<? super DomainType,? extends ComponentType> accessor)
    Generic projection method
    static <D, C> Function<D,org.apache.jena.atlas.lib.tuple.Tuple<C>>
    tupelizer(org.aksw.commons.tuple.bridge.TupleBridge<? super D,? extends C> accessor)
    Return a function that converts domain objects to (jena) tuples.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TupleOps

      public TupleOps()
  • Method Details

    • createProjector

      public static <DomainType, ComponentType> Function<DomainType,org.apache.jena.atlas.lib.tuple.Tuple<ComponentType>> createProjector(int[] project, org.aksw.commons.tuple.accessor.TupleAccessor<? super DomainType,? extends ComponentType> accessor)
      Prepare and return a mapping function that projects specified components into Tuples from input tuple-like objects.
      Type Parameters:
      DomainType - The type of the tuple like object
      ComponentType - The type of the components of the tuple
      Parameters:
      project - The indices of the projected components
      accessor - The accessor for the tuple tike object
      Returns:
    • project

      public static <DomainType, ComponentType> org.apache.jena.atlas.lib.tuple.Tuple<ComponentType> project(int[] proj, DomainType domainObject, org.aksw.commons.tuple.accessor.TupleAccessor<? super DomainType,? extends ComponentType> accessor)
      Generic projection method
      Type Parameters:
      DomainType -
      ComponentType -
      Parameters:
      proj -
      domainObject -
      accessor -
      Returns:
    • tupelizer

      public static <D, C> Function<D,org.apache.jena.atlas.lib.tuple.Tuple<C>> tupelizer(org.aksw.commons.tuple.bridge.TupleBridge<? super D,? extends C> accessor)
      Return a function that converts domain objects to (jena) tuples.
      Type Parameters:
      DomainType -
      ComponentType -
      Parameters:
      proj -
      domainObject -
      accessor -
      Returns: