org.LexGrid.LexBIG.Impl.testUtility
Class DataTestUtils

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.testUtility.DataTestUtils

public class DataTestUtils
extends java.lang.Object

The Class DataTestUtils.

Author:
Kevin Peterson

Constructor Summary
DataTestUtils()
           
 
Method Summary
static Association getAssociation(Association[] assocs, java.lang.String associationName)
          Gets the association.
static
<T extends ConceptReference>
T
getConceptReference(T[] concepts, java.lang.String code)
          Gets the associated concept.
static java.util.List<Property> getPropertiesFromEntity(Entity entity, java.lang.String propertyName)
          Gets the properties from entity.
static java.util.List<PropertyQualifier> getPropertyQualifiersFromProperty(Property prop, java.lang.String qualifierName)
          Gets the property qualifiers from property.
static Property getPropertyWithId(Property[] properties, java.lang.String id)
           
static Property getPropertyWithValue(Entity entity, java.lang.String value)
           
static Property getPropertyWithValue(Property[] properties, java.lang.String value)
           
static boolean isAssociatedConceptPresent(AssociatedConcept[] assocConcepts, java.lang.String code)
           
static boolean isConceptReferencePresent(java.util.List<? extends ConceptReference> refs, java.lang.String code)
           
static boolean isConceptReferencePresent(ResolvedConceptReferenceList refs, java.lang.String code)
           
static boolean isPropertyWithValuePresent(Entity entity, java.lang.String propertyName, java.lang.String propertyValue)
           
static boolean isQualifierNameAndValuePresent(java.lang.String qualifierName, java.lang.String qualifierValue, NameAndValueList list)
          Checks if is qualifier name and value present.
static boolean isQualifierNameAndValuePresentInProperty(java.lang.String qualifierName, java.lang.String qualifierValue, Property property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTestUtils

public DataTestUtils()
Method Detail

getPropertiesFromEntity

public static java.util.List<Property> getPropertiesFromEntity(Entity entity,
                                                               java.lang.String propertyName)
Gets the properties from entity.

Parameters:
entity - the entity
propertyName - the property name
Returns:
the properties from entity

getPropertyWithValue

public static Property getPropertyWithValue(Property[] properties,
                                            java.lang.String value)

getPropertyWithId

public static Property getPropertyWithId(Property[] properties,
                                         java.lang.String id)

getPropertyWithValue

public static Property getPropertyWithValue(Entity entity,
                                            java.lang.String value)

getPropertyQualifiersFromProperty

public static java.util.List<PropertyQualifier> getPropertyQualifiersFromProperty(Property prop,
                                                                                  java.lang.String qualifierName)
Gets the property qualifiers from property.

Parameters:
prop - the prop
qualifierName - the qualifier name
Returns:
the property qualifiers from property

getAssociation

public static Association getAssociation(Association[] assocs,
                                         java.lang.String associationName)
Gets the association.

Parameters:
assocs - the assocs
associationName - the association name
Returns:
the association

getConceptReference

public static <T extends ConceptReference> T getConceptReference(T[] concepts,
                                                                 java.lang.String code)
Gets the associated concept.

Parameters:
assocConcepts - the assoc concepts
code - the code
Returns:
the associated concept

isPropertyWithValuePresent

public static boolean isPropertyWithValuePresent(Entity entity,
                                                 java.lang.String propertyName,
                                                 java.lang.String propertyValue)

isAssociatedConceptPresent

public static boolean isAssociatedConceptPresent(AssociatedConcept[] assocConcepts,
                                                 java.lang.String code)

isConceptReferencePresent

public static boolean isConceptReferencePresent(java.util.List<? extends ConceptReference> refs,
                                                java.lang.String code)

isConceptReferencePresent

public static boolean isConceptReferencePresent(ResolvedConceptReferenceList refs,
                                                java.lang.String code)

isQualifierNameAndValuePresent

public static boolean isQualifierNameAndValuePresent(java.lang.String qualifierName,
                                                     java.lang.String qualifierValue,
                                                     NameAndValueList list)
Checks if is qualifier name and value present.

Parameters:
qualifierName - the qualifier name
qualifierValue - the qualifier value
list - the list
Returns:
true, if is qualifier name and value present

isQualifierNameAndValuePresentInProperty

public static boolean isQualifierNameAndValuePresentInProperty(java.lang.String qualifierName,
                                                               java.lang.String qualifierValue,
                                                               Property property)

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.