fr.etai.xat2v2.util
Class ClassificationListUtil

java.lang.Object
  extended by fr.etai.xat2v2.util.ClassificationListUtil

public final class ClassificationListUtil
extends Object

Utility class used to extract classifications from a classifications list.

Author:
rlecomte

Method Summary
static List<Classification> getClassificationListByDictionary(List<Classification> classificationList, String dictionnary)
           
static List<Classification> getClassificationListByDictionaryReference(List<Classification> classificationList, String dictionnary, String reference)
           
static List<Classification> getClassificationListBySource(List<Classification> classificationList, String source)
          Retourne la liste des "Classification" dont les caractéristiques vérifient les paramètres.
static List<Classification> getClassificationListBySourceDictionaryReference(List<Classification> classificationList, String source, String dictionnary, String reference)
           
static String getFirstDictionaryRef(List<Classification> classificationList, String dictionary)
          Return the first ref of a dictionary in a list of classifications.
static String getFirstSourceDictionaryRef(List<Classification> classificationList, String source, String dictionary)
          Return the first ref of a dictionary with a source in a list of classifications.
static String getFirstSourceRef(List<Classification> classificationList, String source)
          Return the first ref of a source in a list of classifications.
static List<String> getListOfClassificationReferenceBySourceDictionary(List<Classification> classificationList, String source, String dictionnary)
           
static String getValueDictionaryRef(List<Classification> classificationList, String dictionary, String ref)
          Return the first value of first ref of a dictionary in a list of classifications.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFirstDictionaryRef

public static String getFirstDictionaryRef(List<Classification> classificationList,
                                           String dictionary)
Return the first ref of a dictionary in a list of classifications.
Useful when you know there's a single reference to a dictionary in a list.

Parameters:
classificationList - : the list of classifications where to look for the ref
dictionary - : case not sensitive
Returns:
first ref found in classifications for this dictionary
null if not found

getFirstSourceRef

public static String getFirstSourceRef(List<Classification> classificationList,
                                       String source)
Return the first ref of a source in a list of classifications.
Useful when you know there's a single source with a reference in a list.
Be carefull: dictionary is assumed to be null

Parameters:
classificationList - : the list of classifications where to look for the ref
source - : String mandatory, case not sensitive
Returns:
first ref found in classifications for this source and a null dictionary

getFirstSourceDictionaryRef

public static String getFirstSourceDictionaryRef(List<Classification> classificationList,
                                                 String source,
                                                 String dictionary)
Return the first ref of a dictionary with a source in a list of classifications.
Useful when you know there's a single dictionary/source with a reference in a list.

Parameters:
classificationList - : the list of classifications where to look for the ref
source - : String mandatory, case not sensitive
dictionary - : String, case not sensitive
Returns:
first ref found in classifications for this source and a this dictionary

getValueDictionaryRef

public static String getValueDictionaryRef(List<Classification> classificationList,
                                           String dictionary,
                                           String ref)
Return the first value of first ref of a dictionary in a list of classifications.
Useful when you know there's a single reference to a dictionary in a list.

Parameters:
classificationList - : the list of classifications where to look for the ref
dictionary - : case not sensitive
ref - : case not sensitive
Returns:
first ref found in classifications for this dictionary
null if not found

getClassificationListBySource

public static List<Classification> getClassificationListBySource(List<Classification> classificationList,
                                                                 String source)
Retourne la liste des "Classification" dont les caractéristiques vérifient les paramètres.

Parameters:
classificationList - conteneur d'objet classification
source - source de la classification
dictionnary - dictionnaire associé à la classification
reference - référence associée à la classification
Returns:
Liste d'objet "Classification"

getClassificationListByDictionary

public static List<Classification> getClassificationListByDictionary(List<Classification> classificationList,
                                                                     String dictionnary)

getClassificationListByDictionaryReference

public static List<Classification> getClassificationListByDictionaryReference(List<Classification> classificationList,
                                                                              String dictionnary,
                                                                              String reference)

getClassificationListBySourceDictionaryReference

public static List<Classification> getClassificationListBySourceDictionaryReference(List<Classification> classificationList,
                                                                                    String source,
                                                                                    String dictionnary,
                                                                                    String reference)

getListOfClassificationReferenceBySourceDictionary

public static List<String> getListOfClassificationReferenceBySourceDictionary(List<Classification> classificationList,
                                                                              String source,
                                                                              String dictionnary)


Copyright © 2012. All Rights Reserved.