Class DefaultTermFactory

java.lang.Object
fr.lirmm.graphik.integraal.core.term.DefaultTermFactory
All Implemented Interfaces:
TermFactory

public class DefaultTermFactory extends Object implements TermFactory
Default singleton implementation of TermFactory.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • instance

      public static TermFactory instance()
      Returns the shared term factory instance.
      Returns:
      the shared term factory instance
    • createTerm

      public Term createTerm(Term term)
      Description copied from interface: TermFactory
      Creates a term equivalent to the provided one.
      Specified by:
      createTerm in interface TermFactory
      Parameters:
      term - the term to copy or normalize
      Returns:
      the created term
    • createTerm

      @Deprecated public Term createTerm(Object o, Term.Type type)
      Deprecated.
      Description copied from interface: TermFactory
      Specified by:
      createTerm in interface TermFactory
      Parameters:
      o - the underlying value or identifier
      type - the term kind to create
      Returns:
      a new Term.
    • createVariable

      public Variable createVariable(Object identifier)
      Description copied from interface: TermFactory
      Creates a variable with the provided identifier.
      Specified by:
      createVariable in interface TermFactory
      Parameters:
      identifier - the variable identifier
      Returns:
      the created variable
    • createLiteral

      public Literal createLiteral(Object value)
      Description copied from interface: TermFactory
      Creates a literal with an inferred datatype.
      Specified by:
      createLiteral in interface TermFactory
      Parameters:
      value - the literal value
      Returns:
      the created literal
    • createLiteral

      public Literal createLiteral(fr.lirmm.graphik.util.URI datatype, Object value)
      Description copied from interface: TermFactory
      Creates a literal with the provided datatype and value.
      Specified by:
      createLiteral in interface TermFactory
      Parameters:
      datatype - the literal datatype
      value - the literal value
      Returns:
      the created literal
    • createConstant

      public Constant createConstant(Object identifier)
      Description copied from interface: TermFactory
      Creates a constant with the provided identifier.
      Specified by:
      createConstant in interface TermFactory
      Parameters:
      identifier - the constant identifier
      Returns:
      the created constant