All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.ontopia.topicmaps.utils.tmrap.TopicIndexIF Maven / Gradle / Ivy

There is a newer version: 5.4.0
Show newest version
/*
 * #!
 * Ontopia TMRAP
 * #-
 * Copyright (C) 2001 - 2013 The Ontopia Project
 * #-
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * !#
 */

package net.ontopia.topicmaps.utils.tmrap;

import java.util.Collection;

import net.ontopia.infoset.core.LocatorIF;
import net.ontopia.topicmaps.core.TopicIF;
import net.ontopia.topicmaps.core.index.IndexIF;

/**
 * EXPERIMENTAL: An index through which information about topics with
 * a particular subject can be located, irrespective of where these
 * topics happen to be stored.
 */
public interface TopicIndexIF extends IndexIF {

  /**
   * Returns all topics the index knows about whose identity matches
   * one the of the locators passed as arguments.
   *
   * @param indicators A collection of subject identifiers as
   * LocatorIF objects.   
   * @param sources A collection of source locators as LocatorIF objects.
   * @param subjects A colleciton of subject locators as LocatorIF objects.
   *
   * @return Collection of TopicIF
   */
  public Collection getTopics(Collection indicators,
                              Collection sources,
                              Collection subjects);

  /*
   * Loads all the topics that are directly associated with the given topics.
   * @param two_steps If true, topics two steps out will also be loaded.
   */  
  public Collection loadRelatedTopics(Collection indicators,
                                      Collection sources,
                                      Collection subjects,
                                      boolean two_steps);

  /**
   * Returns all known topic pages for the topics whose identity
   * matches one of the locators passed as arguments.
   *
   * @param indicators A collection of subject identifiers as
   * LocatorIF objects.   
   * @param sources A collection of source locators as LocatorIF objects.
   * @param subjects A colleciton of subject locators as LocatorIF objects.
   *
   * @return Collection of TopicPage
   */
  public Collection getTopicPages(Collection indicators,
                                  Collection sources,
                                  Collection subjects);

  /**
   * Returns all known topic pages for the topics whose identity
   * matches one of the locators passed as arguments.
   *
   * @param indicators A collection of subject identifiers as
   * LocatorIF objects.   
   * @param sources A collection of source locators as LocatorIF objects.
   * @param subjects A colleciton of subject locators as LocatorIF objects.
   *
   * @return Collection of TopicPage
   */
  public TopicPages getTopicPages2(Collection indicators,
                                   Collection sources,
                                   Collection subjects);

  /**
   * Lets go of any underlying resources used by the index. Must be
   * called when used with the RDBMS backend.
   */
  public void close();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy