it.unipd.dei.ims.nestor.experiment.primitives
Class ArrayBasedHDSQueryOperations

java.lang.Object
  extended by it.unipd.dei.ims.nestor.experiment.primitives.ArrayBasedHDSQueryOperations

public class ArrayBasedHDSQueryOperations
extends java.lang.Object


Constructor Summary
ArrayBasedHDSQueryOperations()
           
 
Method Summary
static int[] getAncestors(int[] parents, int idSet)
          Returns the elements of the ancestors of the given set.
static java.lang.String[] getAncestorsContent(int[] parents, int[][] elements, java.lang.String[] content, int idSet)
          Returns the string content of the elements of the ancestors of the given set.
static int[] getChildren(int[][] children, java.lang.Integer setId)
          Returns the integer values of the children of the given set.
static java.lang.String[] getChildrenContent(int[][] children, int[][] elements, java.lang.String[] content, int setId)
          Returns the string content of the elements of the children of the given set.
static int[] getDescendants(int[][] children, int idSet)
          Returns the elements of the descendants of the given set.
static java.lang.String[] getDescendantsContent(int[][] children, int[][] elements, java.lang.String[] content, int idSet)
          Returns the string content of the elements of the descendants of the given set.
static int getParent(int[] parents, int setId)
          Returns the integer value of the parent of the given set.
static java.lang.String[] getParentContent(int[] parents, int[][] elements, java.lang.String[] content, int idSet)
          Returns the string content of the elements of the parent of the given set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayBasedHDSQueryOperations

public ArrayBasedHDSQueryOperations()
Method Detail

getParent

public static int getParent(int[] parents,
                            int setId)
Returns the integer value of the parent of the given set.

Parameters:
parents - the array containing the parent set id of each set.
setId - the integer value identifying the given set.
Returns:
the identifier of the parent set.

getParentContent

public static java.lang.String[] getParentContent(int[] parents,
                                                  int[][] elements,
                                                  java.lang.String[] content,
                                                  int idSet)
Returns the string content of the elements of the parent of the given set.

Parameters:
parents - the array containing the parent set id of each set.
setId - the integer value identifying the given set.
elements - the matrix with the elements contained in each set.
content - the array with the strings associated to each element.
Returns:
the string content of the elements of the parent of the given set.

getChildren

public static int[] getChildren(int[][] children,
                                java.lang.Integer setId)
Returns the integer values of the children of the given set.

Parameters:
children - the matrix containing the child set ids of each set.
setId - the integer value identifying the given set.
Returns:
the identifiers of the children set.

getChildrenContent

public static java.lang.String[] getChildrenContent(int[][] children,
                                                    int[][] elements,
                                                    java.lang.String[] content,
                                                    int setId)
Returns the string content of the elements of the children of the given set.

Parameters:
children - the array containing the children set id of each set.
setId - the integer value identifying the given set.
elements - the matrix with the elements contained in each set.
content - the array with the strings associated to each element.
Returns:
the string content of the elements of the children of the given set.

getDescendants

public static int[] getDescendants(int[][] children,
                                   int idSet)
Returns the elements of the descendants of the given set.

Parameters:
children - the array containing the children set id of each set.
setId - the integer value identifying the given set.
content - the array with the strings associated to each element.
Returns:
the string content of the elements of the descendants of the given set.

getDescendantsContent

public static java.lang.String[] getDescendantsContent(int[][] children,
                                                       int[][] elements,
                                                       java.lang.String[] content,
                                                       int idSet)
Returns the string content of the elements of the descendants of the given set.

Parameters:
children - the array containing the children set id of each set.
elements - the matrix with the elements contained in each set.
content - the array with the strings associated to each element.
setId - the integer value identifying the given set.
Returns:
the string content of the elements of the descendants of the given set.

getAncestors

public static int[] getAncestors(int[] parents,
                                 int idSet)
Returns the elements of the ancestors of the given set.

Parameters:
parents - the array containing the parent set id of each set.
setId - the integer value identifying the given set.
content - the array with the strings associated to each element.
Returns:
the string content of the elements of the ancestors of the given set.

getAncestorsContent

public static java.lang.String[] getAncestorsContent(int[] parents,
                                                     int[][] elements,
                                                     java.lang.String[] content,
                                                     int idSet)
Returns the string content of the elements of the ancestors of the given set.

Parameters:
parents - the array containing the parent set id of each set.
elements - the matrix with the elements contained in each set.
content - the array with the strings associated to each element.
setId - the integer value identifying the given set.
Returns:
the string content of the elements of the ancestors of the given set.