public class LinkIndexManager
extends java.lang.Object
 TreeMap
   Key: The data which is referenced by 
   Value:
     HashMap: (classMap)
       Key: Class (the class referencing the data) 
       Value: (fieldMap)
         HashMap:
           Key: String (the name of the field referencing the data)
           Value: TreeSet containing all the referencing data
 | Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
ALL_FIELD_KEY  | 
static java.lang.String | 
REVISION  | 
| Constructor and Description | 
|---|
LinkIndexManager()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
checkLinkIndex()
Check that "all" field entries are consistent with the other fields. 
 | 
java.util.TreeMap<Data,java.util.Map<java.lang.Class<?>,java.util.Map<java.lang.String,java.util.TreeSet<Data>>>> | 
getIndex()  | 
<T> java.util.TreeSet<T> | 
getIndexedDataSet(Data data,
                 java.lang.Class<T> clazz)
Returns the Set of clazz instances referring this data (whatever
 the field they used for this reference) 
 | 
<T> java.util.TreeSet<T> | 
getIndexedDataSet(Data data,
                 java.lang.Class<T> clazz,
                 java.lang.String field)
Returns the Set of clazz instances referring this data with the given field. 
 | 
int | 
getLinkCount(Data data)  | 
java.util.Map<java.lang.Class<? extends Publication>,java.util.Set<TypeFieldEntry>> | 
getTypeLinkMap(java.lang.Class<? extends Publication> clazz)
Returns the type link map for the given class. 
 | 
java.util.Set<TypeFieldEntry> | 
getTypeLinkSet(java.lang.Class<? extends Publication> attachedClass,
              java.lang.Class<? extends Publication> assignedClass)
Returns the set of TypeFieldEntry of assignedClass that can be assigned with attachedClass. 
 | 
void | 
printLinkIndex(java.io.PrintWriter pw)
Print an XML view of the index. 
 | 
public static final java.lang.String REVISION
public static final java.lang.String ALL_FIELD_KEY
public java.util.Map<java.lang.Class<? extends Publication>,java.util.Set<TypeFieldEntry>> getTypeLinkMap(java.lang.Class<? extends Publication> clazz)
clazz - the class.public java.util.Set<TypeFieldEntry> getTypeLinkSet(java.lang.Class<? extends Publication> attachedClass, java.lang.Class<? extends Publication> assignedClass)
attachedClass - the class to be attached.assignedClass - the class to be assigned.public java.util.TreeMap<Data,java.util.Map<java.lang.Class<?>,java.util.Map<java.lang.String,java.util.TreeSet<Data>>>> getIndex()
public <T> java.util.TreeSet<T> getIndexedDataSet(Data data, java.lang.Class<T> clazz)
T - any object type (usually something extending Data)data - the dataclazz - the class to search the referring instancespublic <T> java.util.TreeSet<T> getIndexedDataSet(Data data, java.lang.Class<T> clazz, java.lang.String field)
T - any object type (usually something extending Data)data - the dataclazz - the class to search the referring instancesfield - the name of the field which contains the referencepublic int getLinkCount(Data data)
data - the datapublic void checkLinkIndex()
public void printLinkIndex(java.io.PrintWriter pw)
pw - the printWriter where the XML view must be printed.Copyright © 2001-2018 Jalios SA. All Rights Reserved.