searchindexcomponent.java

来自「一个完整的XACML工程,学习XACML技术的好例子!」· Java 代码 · 共 108 行

JAVA
108
字号
/*
 * Created on 10-Apr-2005
 *
 * TODO All
 */
package ke.core.components;

import ke.core.*;

import java.util.Map;

/**
 * @author James Cunningham
 * this interface is for searching purpose. e.g. if the given
 * id is assigned to a concept
 * TODO All
 */
public interface SearchIndexComponent {

    /**
     * Returns true if the given id is assigned to a 
     * <code>Concept<\code> within the system.
     * 
     * @param id 		value of id whose presence is being tested
     * @return 			true if the given id is already assigned
     * @throws ComponentsException
     */
    
    public boolean idExists(String id) throws ComponentsException;
    
    /**
     * Returns the class of the object assigned the given Id. 
     * To return null if idExists(id) returns false.
     * 
     * @param id		value of id whose associated object class
     * 					is being returned.
     * @return			Class of object with given id. null if
     * 					id has no associated concept
     * @throws ComponentsException
     */
    
    public Class getClassForId(String id) throws ComponentsException;
    
    /**
     * Returns the Concept object with the associated id. To
     * return null if no such Concept exists.
     * 
     * @param id
     * @return
     */
    
    public Concept getConcept(String id) throws ComponentsException;
    
    /**
     * @param concept
     * @return
     * @throws ComponentsException
     */
    
    public boolean addConcept(Concept concept) throws ComponentsException;
    
    /**
     * @param conceptInstance
     * @return
     * @throws ComponentsException
     */
    
    public boolean updateConceptInstanceProperty(String id,
                                                 String propertyName,
                                                 Object propertyValue) throws ComponentsException;
    
    /**
     * @param id
     * @throws ComponentsException
     * @return
     */
    
    public boolean removeConcept(String id) throws ComponentsException;
    
    /**
     * @param typeId
     * @return
     */
    
    public ConceptInstance[] getConceptInstancesByType(String typeId) throws ComponentsException;
    
    /**
     * @param typeId
     * @param values
     * @return
     * @throws ComponentsException
     */
    
    public ConceptInstance[] getConceptIntancesByPropertyValue(String typeId,
            												   Map values) throws ComponentsException;
    
    /**
     * @param sourceId
     * @param destId
     * @return
     */
    
    public Relationship[] getRelationshipsBySourceDestinationIds(String sourceId, 
            													 String destId) throws ComponentsException;
    
    public String getIdForType(String typeName) throws ComponentsException;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?