Revision 423M

org.bridgedb
Interface AttributeMapper

All Known Implementing Classes:
IDMapperStack

public interface AttributeMapper

AttributeMapper knows about attributes for Xrefs.


Field Summary
static java.lang.String MATCH_ID
          use this magic constant as the attrType parameter to also search for identifiers.
 
Method Summary
 java.util.Map<Xref,java.lang.String> freeAttributeSearch(java.lang.String query, java.lang.String attrType, int limit)
          free text search for matching symbols.
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAttributes(Xref ref)
          Get all attributes for an entity.
 java.util.Set<java.lang.String> getAttributes(Xref ref, java.lang.String attrType)
          Get attributes for an entity, such as gene Symbol.
 java.util.Set<java.lang.String> getAttributeSet()
          Set of attributes provided by this AttributeMapper.
 boolean isFreeAttributeSearchSupported()
           
 

Field Detail

MATCH_ID

static final java.lang.String MATCH_ID
use this magic constant as the attrType parameter to also search for identifiers.

See Also:
Constant Field Values
Method Detail

getAttributes

java.util.Set<java.lang.String> getAttributes(Xref ref,
                                              java.lang.String attrType)
                                              throws IDMapperException
Get attributes for an entity, such as gene Symbol.

Parameters:
ref - the entity to get the attribute for
attrType - the attribute to look for, e.g. 'Symbol' or 'Description'.
Returns:
the attribute, or null if nothing was found
Throws:
IDMapperException - if the mapping service is (temporarily) unavailable

getAttributes

java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAttributes(Xref ref)
                                                                              throws IDMapperException
Get all attributes for an entity. Usually this method is more efficient if you want to query several attributes in a sequence.

Parameters:
ref - the entity to get the attributes for
Returns:
a Map where attribute names are the keys and attribute values are the values.
Throws:
IDMapperException - if the mapping service is (temporarily) unavailable

isFreeAttributeSearchSupported

boolean isFreeAttributeSearchSupported()
Returns:
true if free attribute search is supported, false otherwise.

freeAttributeSearch

java.util.Map<Xref,java.lang.String> freeAttributeSearch(java.lang.String query,
                                                         java.lang.String attrType,
                                                         int limit)
                                                         throws IDMapperException
free text search for matching symbols.

Parameters:
query - The text to search for
attrType - the attribute to look for, e.g. 'Symbol' or 'Description'. If you use the special MATCH_ID constant, it will query the identifier instead.
limit - The number of results to limit the search to
Returns:
map references and attribute values that match the query
Throws:
IDMapperException - if the mapping service is (temporarily) unavailable

getAttributeSet

java.util.Set<java.lang.String> getAttributeSet()
                                                throws IDMapperException
Set of attributes provided by this AttributeMapper. There is no guarantee that a specific Xref has these attributes.

Returns:
set of available attributes in this AttributeMapper. If there are none available, returns an empty set.
Throws:
IDMapperException - if the mapping service is (temporarily) unavailable

Generated July 29 2010