Code Search for Developers
 
 
  

DomainEntityLoaderLocal.java from Texai at Krugle


Show DomainEntityLoaderLocal.java syntax highlighted

/**
 * DomainEntityLoaderLocal.java
 *
 * Created on October 31, 2006, 11:28 AM
 *
 * Description: This is the business interface for DomainEntityLoader 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;

import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import javax.ejb.Local;
import org.texai.kb.ejb.session.shared.AssociationFinderLocal;
import org.texai.kb.ejb.session.shared.TermFinderFacadeLocal;
import org.texai.kb.entity.AtomicTerm;
import org.texai.kb.entity.AbstractReifiedTerm;
import org.texai.kb.persistence.DomainProperty;


/**
 * This is the business interface for DomainEntityLoader enterprise bean.
 */
@Local
public interface DomainEntityLoaderLocal {
  
  /** Loads the domain entity from propositions in the knowledge base given its term id.
   *
   * @param termId the id of the atomic term that represents the domain entity
   * @return the domain entity
   */
  Object loadDomainEntity(final UUID termId);
  
  /** Loads the domain entity from propositions in the knowledge base given its term id.
   *
   * @param termId the id of the atomic term that represents the domain entity
   * @param isLoadableFromDomainEntityCache the indicator that domain entities can be loaded from the cache
   * @return the domain entity
   */
  Object loadDomainEntity(final UUID termId, final boolean isLoadableFromDomainEntityCache);
  
  /** Loads domain entities having the given property and value.
   *
   * @param property the given property
   * @param value the value of the property
   * @param domainEntityClass the class of the desired domain entity
   * @return the domain entities having the given property and value
   */
  Set<Object> loadDomainEntitiesByPropertyValue(
          final AtomicTerm property,
          final Object value,
          final Class domainEntityClass);

  /** Loads the domain entity from propositions in the knowledge base given an identifying property and value.
   *
   * @param property the identifying property
   * @param value the value of the property which identifies the desired domain entity
   * @param classLoadFromContext the context from which the class-scoped associations are loaded
   * @param isLoadableFromDomainEntityCache the indicator that domain entities can be loaded from the cache
   * @return the domain entity having the given property and value, or null if not found
   */
  Object loadDomainEntityByIndentifyingPropertyValue(
          final AtomicTerm property,
          final Object value,
          final AbstractReifiedTerm classLoadFromContext,
          final boolean isLoadableFromDomainEntityCache);
  
  /** Loads the domain entity from propositions in the knowledge base given an identifying property and value.
   *
   * @param property the identifying property
   * @param value the value of the property which identifies the desired domain entity
   * @param classLoadFromContext the context from which the class-scoped associations are loaded
   * @return the domain entity having the given property and value, or null if not found
   */
  Object loadDomainEntityByIndentifyingPropertyValue(
          final AtomicTerm property, 
          final Object value,
          final AbstractReifiedTerm classLoadFromContext);
    
  /** Loads the domain entity from propositions in the knowledge base given an identifying property and value, or null if
   * not found.
   *
   * @param property the identifying property
   * @param value the value of the property which identifies the desired domain entity
   * @param domainEntityClass the class of the desired domain entity
   * @param isLoadableFromDomainEntityCache the indicator that domain entities can be loaded from the cache
   * @return the domain entity having the given property and value, or null if not found
   */
  Object loadDomainEntityByIndentifyingPropertyValue(
          final AtomicTerm property,
          final Object value,
          final Class domainEntityClass,
          final boolean isLoadableFromDomainEntityCache);
  
  /** Loads the domain entity from propositions in the knowledge base given an identifying property and value.
   *
   * @param property the identifying property
   * @param value the value of the property which identifies the desired domain entity
   * @param domainEntityClass the class of the desired domain entity
   * @return the domain entity having the given property and value, or null if not found
   */
  Object loadDomainEntityByIndentifyingPropertyValue(
          final AtomicTerm property, 
          final Object value,
          final Class domainEntityClass);
    
  /** Loads the domain entity shell, which is the @Id field only, from propositions in the knowledge base
   * given an identifying property and value, or null if not found.
   *
   * @param property the identifying property
   * @param value the value of the property which identifies the desired domain entity
   * @param domainEntityClass the class of the desired domain entity
   * @return the domain entity shell having the given property and value, or null if not found
   */
  Object loadDomainEntityShellByIndentifyingPropertyValue(
          final AtomicTerm property,
          final Object value,
          final Class domainEntityClass);
  
  /** Loads the domain entity from propositions in the knowledge base given its term id.
   *
   * @param instanceTerm the atomic term that represents the domain entity
   * @return the domain entity
   */
  Object loadDomainEntity(final AtomicTerm instanceTerm);
  
  /** Loads the domain entity from propositions in the knowledge base given its term id.
   *
   * @param instanceTerm the atomic term that represents the domain entity
   * @param isLoadableFromDomainEntityCache the indicator that domain entities can be loaded from the cache
   * @return the domain entity
   */
  Object loadDomainEntity(final AtomicTerm instanceTerm, final boolean isLoadableFromDomainEntityCache);
  
  /** Loads the domain entity field.
   *
   * @param domainEntity the domain entity
   * @param field the field to be loaded
   * @param domainProperty the domain property the associates field value(s) in the knowledge base
   * @param isLoadableFromDomainEntityCache the indicator that domain entities can be loaded from the cache
   * @return the value of the loaded field
   */
  Object loadDomainEntityField(
          final Object domainEntity, 
          final Field field, 
          final DomainProperty domainProperty,
          final boolean isLoadableFromDomainEntityCache);
  
  /** Returns an iterator over the set of domain entity terms that represent instances of the given domain entity class.
   *
   * @param domainEntityClass the given domain entity class
   */
  Iterator<Object> domainEntityIterator(final Class domainEntityClass);
  
  /** Sets the term finder during out-of-the-container unit testing.
   *
   * @param termFinderFacade the term finder
   */
  void setTermFinderFacade(final TermFinderFacadeLocal termFinderFacade);
  
  /** Sets the association finder during out-of-the-container unit testing.
   *
   * @param associationFinder the association finder
   */
  void setAssociationFinder(final AssociationFinderLocal associationFinder);
    
}




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

  shared/
    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
  AbstractDomainEntityAccessor.java
  DomainEntityDeleterBean.java
  DomainEntityDeleterLocal.java
  DomainEntityLoaderBean.java
  DomainEntityLoaderLocal.java
  DomainEntityManagerBean.java
  DomainEntityManagerLocal.java
  DomainEntityPersisterBean.java
  DomainEntityPersisterLocal.java
  package.html