/** * Build the hierarchy for the given jCas, using the types provided. * * <p>The structure is built by first using the offset of all annotations and then the depth of * the Structure annotations, non structure annotations have maximum depth. * * @param jCas the jCas * @param annotationClasses the annotations classes to use * @return the Structure base AnnotationHierachy */ public static <T extends Annotation> ItemHierarchy<T> build( JCas jCas, Set<Class<? extends T>> annotationClasses) { return new ItemHierarchy<>(buildRoot(jCas, annotationClasses)); }
/** * Build the hierarchy for the given jCas, using the types provided. * * <p>The structure is built by first using the offset of all annotations and then the depth of * the Structure annotations, non structure annotations have maximum depth. * * @param jCas the jCas * @param annotationClasses the annotations classes to use * @return the Structure base AnnotationHierachy */ public static <T extends Annotation> ItemHierarchy<T> build( JCas jCas, Set<Class<? extends T>> annotationClasses) { return new ItemHierarchy<>(buildRoot(jCas, annotationClasses)); }