public List<MAnnotation> search(IDomeo domeo, String accessFilter, String textSearch) { // System.out.println("3**|textSearch:" + textSearch); List<MAnnotation> found = new ArrayList<MAnnotation>(); for (MAnnotation annotation : domeo.getAnnotationPersistenceManager().getAllAnnotations()) { ISearchComponent sc = domeo .getAnnotationSearchManager() .getAnnotationSearchComponent(domeo, annotation.getClass().getName()); if (sc.filterByAccess(annotation, accessFilter)) { if (sc.filterByText(annotation, textSearch)) found.add(annotation); } } return found; }
public List<MAnnotation> search( IDomeo domeo, String accessFilter, Long setLocalId, String typeFilter, String textSearch) { // System.out.println("1**|textSearch:" + textSearch); List<MAnnotation> found = new ArrayList<MAnnotation>(); for (MAnnotation annotation : domeo.getAnnotationPersistenceManager().getAllAnnotations()) { ISearchComponent sc = domeo .getAnnotationSearchManager() .getAnnotationSearchComponent(domeo, annotation.getClass().getName()); // System.out.println("0 |annotation name:" + annotation.getClass().getName()); if (sc.filterBySet(annotation, setLocalId)) { // System.out.println("0 | 1"); if (sc.filterByType(annotation, typeFilter)) { // System.out.println("0 | 2"); if (sc.filterByAccess(annotation, accessFilter)) { // System.out.println("0 | 3"); if (sc.filterByText(annotation, textSearch)) found.add(annotation); } } } } return found; }