Code Search for Developers
 
 
  

AssociationFinderLocal.java from Texai at Krugle


Show AssociationFinderLocal.java syntax highlighted

/*
 * AssociationFinderLocal.java
 *
 * Created on November 1, 2006, 2:00 PM
 *
 * Description: This is the business interface for AssociationFinder enterprise bean.
 *
 * Copyright (C) 2006 Stephen L. Reed.
 *
 * This program is free software; you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
package org.texai.kb.ejb.session.shared;

import com.sleepycat.persist.EntityStore;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.ejb.Local;
import org.texai.kb.entity.AtomicTerm;
import org.texai.kb.entity.BinaryGAF;
import org.texai.kb.entity.AbstractReifiedTerm;
import org.texai.kb.entity.AbstractTerm;


/**
 * This is the business interface for AssociationFinder enterprise bean.
 */
@Local
public interface AssociationFinderLocal {
  
  /** Gathers the stub terms and stub contexts from the arg1 position of matching binary ground atomic formulas in every context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg2 the first argument term of matching binary gafs
   * @return the set of pairs of stub terms from the arg1 position of matching binary ground atomic formulas and
   * the stub context in which they were found
   */
  Set<List<AbstractTerm>> gatherArg1TermsAndContextsFromBinaryGAFs(
          final AtomicTerm predicate,
          final AbstractTerm arg2);
          
  /** Gathers the stub terms and stub contexts from the arg2 position of matching binary ground atomic formulas in every context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg1 the first argument term of matching binary gafs
   * @return the set of pairs of stub terms from the arg2 position of matching binary ground atomic formulas and
   * the stub context in which they were found
   */
  Set<List<AbstractTerm>> gatherArg2TermsAndContextsFromBinaryGAFs(
          final AtomicTerm predicate,
          final AbstractTerm arg1);

  /** Gathers ordered list of the stub terms, strengths and stub contexts from the arg1 position of matching
   * binary ground atomic formulas in every context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg2 the second argument term of matching binary gafs
   * @return the ordered list of triples of stub terms from the arg1 position of matching binary ground atomic formulas, the strength and
   * the stub context in which they were found
   */
  List<List<Object>> gatherArg1TermsStrengthsAndContextsFromBinaryGAFs(
          final AtomicTerm predicate,
          final AbstractTerm arg2);
  
  /** Gathers ordered list of the stub terms, strengths and stub contexts from the arg2 position of matching
   * binary ground atomic formulas in every context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg1 the first argument term of matching binary gafs
   * @return the ordered list of triples of stub terms from the arg2 position of matching binary ground atomic formulas, the strength and
   * the stub context in which they were found
   */
  List<List<Object>> gatherArg2TermsStrengthsAndContextsFromBinaryGAFs(
          final AtomicTerm predicate,
          final AbstractTerm arg1);
  
  /** Gathers the stub terms from the arg2 position of matching binary ground atomic formulas that
   * occur only in the given context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg1 the first argument term of matching binary gafs
   * @param context the most specific context of those from which matching gafs are gathered
   * @return the stub terms from the arg2 position of match binary ground atomic formulas
   */
  Set<AbstractTerm> gatherArg2TermsFromBinaryGAFsWithinContext(
          final AtomicTerm predicate,
          final AbstractTerm arg1,
          final AbstractReifiedTerm context);
  
  /** Gathers the term ids from the arg1 position of matching binary ground atomic formulas that
   * occur only in the given context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param arg2 the first argument term of matching binary gafs
   * @param context the most specific context of those from which matching gafs are gathered
   * @return the term ids from the arg1 position of match binary ground atomic formulas
   */
  Set<Integer> gatherArg1TermIdsFromBinaryGAFsWithinContext(
          final AtomicTerm predicate,
          final AbstractTerm arg2,
          final AbstractReifiedTerm context);
  
  /** Gathers the binary ground atomic formulas having the given arg1 or arg2 from all contexts.
   *
   * @param arg the first or second argument term of matching binary gafs
   * @return the binary ground atomic formulas having the given arg
   */
  Set<BinaryGAF> gatherBinaryGAFsByArgTerm(final AbstractTerm arg);
  
  /** Gathers the binary ground atomic formulas having the given arg1 and context.
   *
   * @param arg1 the first argument term of matching binary gafs
   * @param context the most specific context of those from which matching gafs are gathered
   * @return the binary ground atomic formulas having the given arg1 and context
   */
  Set<BinaryGAF> gatherBinaryGAFsByArg1TermWithinContext(
          final AbstractTerm arg1,
          final AbstractReifiedTerm context);
    
  /** Gathers the list of term ids for binary gafs having the given predicate and context.
   *
   * @param predicate the predicate of matching binary gafs
   * @param context the most specific context of those from which matching gafs are gathered
   * @return the list of term ids for binary gafs having the given predicate and context
   */
  List<Integer> gatherBinaryGAFTermIdsByPredicate(final AtomicTerm predicate, final AbstractReifiedTerm context);
  
  /** Gathers the list of info for binary gafs having the given predicate and context.  Each element is a
   * triple consisting of [term id, arg1 term id, context term id].
   *
   * @param predicate the predicate of matching binary gafs
   * @param context the most specific context of those from which matching gafs are gathered
   * @return the list of info for binary gafs having the given predicate and context
   */
  List<Integer[]> gatherBinaryGAFInfoByPredicate(final AtomicTerm predicate, final AbstractReifiedTerm context);
  
  /** Sets the entity store. 
   *
   * @param entityStore
   */
  void setEntityStore(final EntityStore entityStore);
  
  /** Initializes the primary and secondary indicies. */
  void initializeIndices();
  
}




See more files for this project here

Texai

Texai is an chatbot that intelligently seeks to acquire knowledge and friendly behaviors.

Project homepage: http://sourceforge.net/projects/texai
Programming language(s): Java,Shell Script,XML
License: other

  AssociationEditorBean.java
  AssociationEditorLocal.java
  AssociationFinderBean.java
  AssociationFinderLocal.java
  KBPartitionFacadeBean.java
  KBPartitionFacadeLocal.java
  KBShardFacadeBean.java
  TermDeleterFacadeBean.java
  TermDeleterFacadeLocal.java
  TermFinderFacadeBean.java
  TermFinderFacadeLocal.java
  TermManagerBean.java
  TermManagerLocal.java