/** * Build the structure hierarchy for the given jCas, using only the structural classes provided. * * <p>The structure is built by first using the offset of the Structure annotation and then using * the depth. * * @param jCas the jCas * @param types the structural classes * @return the Structure base AnnotationHierachy */ public static StructureHierarchy build(JCas jCas, Set<Class<? extends Structure>> types) { final List<Structure> structures = filterAnnotations(JCasUtil.select(jCas, Structure.class), types); return new StructureHierarchy(AnnotationHierarchyBuilder.build(structures)); } }
/** * Build the structure hierarchy for the given jCas, using only the structural classes provided. * * <p>The structure is built by first using the offset of the Structure annotation and then using * the depth. * * @param jCas the jCas * @param types the structural classes * @return the Structure base AnnotationHierachy */ public static StructureHierarchy build(JCas jCas, Set<Class<? extends Structure>> types) { final List<Structure> structures = filterAnnotations(JCasUtil.select(jCas, Structure.class), types); return new StructureHierarchy(AnnotationHierarchyBuilder.build(structures)); } }