Class SSSOMTCheckSubjectExistenceFunction

java.lang.Object
org.incenp.obofoundry.sssom.owl.SSSOMTCheckSubjectExistenceFunction
All Implemented Interfaces:
IMappingTransformer<Mapping>, ISSSOMTFunction<IMappingTransformer<Mapping>>

@Deprecated public class SSSOMTCheckSubjectExistenceFunction extends Object implements ISSSOMTFunction<IMappingTransformer<Mapping>>, IMappingTransformer<Mapping>
Deprecated.
Maintained for backwards compatibility only. Use !exists(%{subject_id}) -> stop(); instead.
Represents the SSSOM/T-OWL preprocessor function "check_subject_existence".

That function may be used to drop any mapping whose subject does not exist (or is obsolete) in the helper ontology. It does not take any argument.

  • Constructor Details

    • SSSOMTCheckSubjectExistenceFunction

      public SSSOMTCheckSubjectExistenceFunction(SSSOMTOwlApplication application)
      Deprecated.
      Creates a new instance.
      Parameters:
      application - The SSSOM/T-OWL application object.
  • Method Details

    • getName

      public String getName()
      Deprecated.
      Description copied from interface: ISSSOMTFunction
      Gets the name of the function, by which it can be called in a SSSOM/T ruleset.
      Specified by:
      getName in interface ISSSOMTFunction<IMappingTransformer<Mapping>>
      Returns:
      The function name.
    • getSignature

      public String getSignature()
      Deprecated.
      Description copied from interface: ISSSOMTFunction
      Gets the expected signature of the function. It should be a string that represents how many arguments (excluding keyed arguments) the function is expecting, where a single S character represents an argument.

      Regular expression syntax may be used to represent arguments that are optional or represent other kinds of constraints about the arguments list.

      Examples:

      • SSS for a function that expects exactly 3 arguments;
      • S+ for a function that expects at least one argument, possibly more;
      • (SS)+ for a function that one or more pairs of arguments (e.g. 2, 4, 6, but not 3 or 5).
      Specified by:
      getSignature in interface ISSSOMTFunction<IMappingTransformer<Mapping>>
      Returns:
      The function signature.
    • call

      public IMappingTransformer<Mapping> call(List<String> arguments, Map<String,String> keyedArguments) throws SSSOMTransformError
      Deprecated.
      Description copied from interface: ISSSOMTFunction
      Executes the function.

      Before this method is called, the arguments list will have been checked against the signature and will be guaranteed to be correct (e.g. if the function declared to expects two arguments, it is guaranteed the arguments list will contains two items).

      Specified by:
      call in interface ISSSOMTFunction<IMappingTransformer<Mapping>>
      Parameters:
      arguments - The arguments to the function. May be empty, but not null.
      keyedArguments - The keyed arguments to the function. May be empty, but null.
      Returns:
      The result of executing the function.
      Throws:
      SSSOMTransformError - If any error occurred when executing the function (which may include the case where the number of arguments was correct but their contents was not).
    • transform

      public Mapping transform(Mapping mapping)
      Deprecated.
      Description copied from interface: IMappingTransformer
      Transform a mapping into something else.
      Specified by:
      transform in interface IMappingTransformer<Mapping>
      Parameters:
      mapping - The mapping to transform.
      Returns:
      The object generated from the mapping.