com.jurismarches.vradi.ui.helpers
Class ThesaurusDataHelper

java.lang.Object
  extended by com.jurismarches.vradi.ui.helpers.ThesaurusDataHelper

public class ThesaurusDataHelper
extends Object


Constructor Summary
ThesaurusDataHelper()
           
 
Method Summary
static boolean checkNameExist(RootThesaurus rootThesaurus, String name)
          Check if name of thesaurus is existing
static boolean checkNameExist(RootThesaurus rootThesaurus, Thesaurus thesaurusConcerned)
          Check if name of thesaurus is existing
protected static boolean checkNameExist(Thesaurus thesaurus, String name)
           
protected static boolean checkNameExist(Thesaurus thesaurus, String name, String id)
           
static boolean checkRootNameExist(RootThesaurus rootThesaurusConcerned)
          Check if name of thesaurus is existing
static boolean checkRootNameExist(String name)
          Check if name of thesaurus is existing
static String concateOrderName(Thesaurus thesaurus)
          Concatenate order and name of thesaurus in param (order - name}
static List<RootThesaurus> getAllRootThesaurus()
          Return all root thesaurus
static List<Thesaurus> getAllThesaurus()
           
static List<Thesaurus> getChildrenOfRootThesaurus(String rootThesaurusId)
          Return the children root thesaurus of one pass in param
static List<Thesaurus> getChildrenOfThesaurus(String thesaurusId)
          Return the children thesaurus of one pass in param
static List<String> getChildrenRecursif(RootThesaurus thesaurus)
          Get all children of root thesaurus recursively
static List<String> getChildrenRecursif(Thesaurus thesaurus)
          Get all children of thesaurus recursively Note : thesaurus in param will be added to children list
protected static List<String> getChildrenRecursif(Thesaurus thesaurus, boolean putFirst)
           
static int getDepth(Thesaurus thesaurus)
           
static String getNamePath(Thesaurus thesaurus, String pathSeparator)
          Get the path with name of thesaurus (root/thesaurus...)
static int getNbFormsForThesaurus(Thesaurus thesaurus)
          Return number of form associated to thesaurus pass in param
static String getParentPath(Thesaurus thesaurus, String pathSeparator)
           
static org.nuiton.wikitty.WikittyProxy getProxy()
          Get the wikitty proxy
static String getRecursifName(Thesaurus thesaurus)
           
protected static String getRecursifName(Thesaurus thesaurus, String name)
           
static String getRequestName(Thesaurus thesaurus)
           
protected static List<String> getStringAsList(String s)
           
static String getTagsAsString(Thesaurus thesaurus)
          Get tags as string (tag1, tag2, ...)
static boolean isFirstChild(Thesaurus thesaurus)
           
static List<RootThesaurus> restoreRootThesaurus(List<String> rootThesaurusIds)
          Get corresponding list root thesaurus
static RootThesaurus restoreRootThesaurus(String rootThesaurusId)
          Get corresponding root thesaurus
static List<Thesaurus> restoreThesaurus(List<String> thesaurusIds)
          Get corresponding list of thesaurus
static List<Thesaurus> restoreThesaurus(Set<String> thesaurusIds)
           
static Thesaurus restoreThesaurus(String thesaurusId)
          Get corresponding thesaurus
static void setTagsAsString(Thesaurus thesaurus, String tagsAsString)
          Set tags as string (tag1, tag2, ...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThesaurusDataHelper

public ThesaurusDataHelper()
Method Detail

getProxy

public static org.nuiton.wikitty.WikittyProxy getProxy()
Get the wikitty proxy

Returns:
WikittyProxy

restoreThesaurus

public static Thesaurus restoreThesaurus(String thesaurusId)
Get corresponding thesaurus

Parameters:
thesaurusId - thesaurus id
Returns:
Thesaurus from base

restoreThesaurus

public static List<Thesaurus> restoreThesaurus(List<String> thesaurusIds)
Get corresponding list of thesaurus

Parameters:
thesaurusIds - thesaurus ids
Returns:
List of thesaurus from base

restoreThesaurus

public static List<Thesaurus> restoreThesaurus(Set<String> thesaurusIds)

restoreRootThesaurus

public static RootThesaurus restoreRootThesaurus(String rootThesaurusId)
Get corresponding root thesaurus

Parameters:
rootThesaurusId - root thesaurus id
Returns:
Thesaurus from base

restoreRootThesaurus

public static List<RootThesaurus> restoreRootThesaurus(List<String> rootThesaurusIds)
Get corresponding list root thesaurus

Parameters:
rootThesaurusIds - root thesaurus ids
Returns:
List root thesaurus from base

getNamePath

public static String getNamePath(Thesaurus thesaurus,
                                 String pathSeparator)
Get the path with name of thesaurus (root/thesaurus...)

Parameters:
thesaurus - thesaurus concerned
pathSeparator - separator
Returns:
path with name

concateOrderName

public static String concateOrderName(Thesaurus thesaurus)
Concatenate order and name of thesaurus in param (order - name}

Parameters:
thesaurus - thesaurus concerned
Returns:
concatenate order and name

getTagsAsString

public static String getTagsAsString(Thesaurus thesaurus)
Get tags as string (tag1, tag2, ...)

Parameters:
thesaurus - thesaurus concerned
Returns:
tags as string

setTagsAsString

public static void setTagsAsString(Thesaurus thesaurus,
                                   String tagsAsString)
Set tags as string (tag1, tag2, ...)

Parameters:
thesaurus - thesaurus concerned
tagsAsString - tags as string

getNbFormsForThesaurus

public static int getNbFormsForThesaurus(Thesaurus thesaurus)
Return number of form associated to thesaurus pass in param

Parameters:
thesaurus - thesaurus concerned
Returns:
number of form associated

getStringAsList

protected static List<String> getStringAsList(String s)

getChildrenOfThesaurus

public static List<Thesaurus> getChildrenOfThesaurus(String thesaurusId)
Return the children thesaurus of one pass in param

Parameters:
thesaurusId - id of thesaurus
Returns:
list of children

getChildrenOfRootThesaurus

public static List<Thesaurus> getChildrenOfRootThesaurus(String rootThesaurusId)
Return the children root thesaurus of one pass in param

Parameters:
rootThesaurusId - id of root thesaurus
Returns:
list of children

getAllThesaurus

public static List<Thesaurus> getAllThesaurus()

getAllRootThesaurus

public static List<RootThesaurus> getAllRootThesaurus()
Return all root thesaurus

Returns:
list of root thesaurus

checkRootNameExist

public static boolean checkRootNameExist(String name)
Check if name of thesaurus is existing

Returns:
thesaurus with name if found, else return null

checkRootNameExist

public static boolean checkRootNameExist(RootThesaurus rootThesaurusConcerned)
Check if name of thesaurus is existing

Parameters:
rootThesaurusConcerned - to check
Returns:
thesaurus with name if found, else return null

checkNameExist

protected static boolean checkNameExist(Thesaurus thesaurus,
                                        String name)

checkNameExist

public static boolean checkNameExist(RootThesaurus rootThesaurus,
                                     String name)
Check if name of thesaurus is existing

Parameters:
rootThesaurus - to check
Returns:
thesaurusConcerned with name if found, else return null

checkNameExist

public static boolean checkNameExist(RootThesaurus rootThesaurus,
                                     Thesaurus thesaurusConcerned)
Check if name of thesaurus is existing

Parameters:
rootThesaurus - to check
Returns:
thesaurusConcerned with name if found, else return null

checkNameExist

protected static boolean checkNameExist(Thesaurus thesaurus,
                                        String name,
                                        String id)

getRecursifName

public static String getRecursifName(Thesaurus thesaurus)

getRecursifName

protected static String getRecursifName(Thesaurus thesaurus,
                                        String name)

getParentPath

public static String getParentPath(Thesaurus thesaurus,
                                   String pathSeparator)

getDepth

public static int getDepth(Thesaurus thesaurus)

getChildrenRecursif

public static List<String> getChildrenRecursif(Thesaurus thesaurus)
Get all children of thesaurus recursively Note : thesaurus in param will be added to children list

Parameters:
thesaurus - thesaurus to start
Returns:
list of all children

getChildrenRecursif

protected static List<String> getChildrenRecursif(Thesaurus thesaurus,
                                                  boolean putFirst)

getChildrenRecursif

public static List<String> getChildrenRecursif(RootThesaurus thesaurus)
Get all children of root thesaurus recursively

Parameters:
thesaurus - thesaurus to start
Returns:
list of all children

isFirstChild

public static boolean isFirstChild(Thesaurus thesaurus)

getRequestName

public static String getRequestName(Thesaurus thesaurus)


Copyright © 2009-2010 JurisMarches. All Rights Reserved.