Class TMExporterDecider

java.lang.Object
net.ontopia.topicmaps.utils.deciders.TMExporterDecider
All Implemented Interfaces:
Predicate<Object>

public class TMExporterDecider extends Object implements Predicate<Object>
INTERNAL: Accepts or rejects topic map constructs based on their relations to other topic map constructs and a filter that makes decisions on an individual basis. Used by the topic map exporters to support topic filtering.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new TMExporterDecider.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(Object object)
    Accepts or rejects AssociationIFs, TopicNameIFs, Collections, OccurrenceIFs, TopicIFs and VariantNameIFs, base on the filter and their relations to other objects.
    boolean
    test(AssociationIF association)
    Return true iff the association type, each role player and each role type are accepted.
    boolean
    test(OccurrenceIF occurrence)
    Return true iff the type of the occurrence is accepted
    boolean
    test(TopicIF topic)
    Return true iff the given topic, all of it's types and all types of the types (etc. recursively) are accepted by the filter that was given in the constructor.
    boolean
    test(TopicNameIF baseName)
    Accepts or rejects a TopicNameIF
    boolean
    test(VariantNameIF variantName)
    Accepts or rejects a VariantNameIF

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Constructor Details

    • TMExporterDecider

      public TMExporterDecider(Predicate<Object> filter)
      Creates a new TMExporterDecider.
      Parameters:
      filter - accepts or rejects an individual object
  • Method Details

    • test

      public boolean test(Object object)
      Accepts or rejects AssociationIFs, TopicNameIFs, Collections, OccurrenceIFs, TopicIFs and VariantNameIFs, base on the filter and their relations to other objects. @param object The object to accept or reject.
      Specified by:
      test in interface Predicate<Object>
    • test

      public boolean test(TopicNameIF baseName)
      Accepts or rejects a TopicNameIF
      Parameters:
      baseName - to be accepted/rejected.
      Returns:
      true iff baseName is accepted by the filter and its scope is also accepted by the filter.
    • test

      public boolean test(VariantNameIF variantName)
      Accepts or rejects a VariantNameIF
      Parameters:
      variantName - to be accepted/rejected.
      Returns:
      true iff variantName is accepted by the filter and its scope is also accepted by the filter.
    • test

      public boolean test(AssociationIF association)
      Return true iff the association type, each role player and each role type are accepted.
      Parameters:
      association - the association to test for acceptance.
      Returns:
      true iff the association is accepted.
    • test

      public boolean test(OccurrenceIF occurrence)
      Return true iff the type of the occurrence is accepted
      Parameters:
      occurrence - The occurence to test for acceptance. It is assumed that occurrence will only be tested for acceptance if its parent topic has already been tested and passed.
      Returns:
      true iff occurrence is accepted.
    • test

      public boolean test(TopicIF topic)
      Return true iff the given topic, all of it's types and all types of the types (etc. recursively) are accepted by the filter that was given in the constructor.
      Parameters:
      topic - The topic to test for acceptance.
      Returns:
      true iff the topic is accepted.