List of usage examples for org.apache.commons.collections PredicateUtils andPredicate
public static Predicate andPredicate(Predicate predicate1, Predicate predicate2)
From source file:com.architexa.diagrams.jdt.model.CodeUnit.java
public List<Artifact> getMethods(ReloRdfRepository repo) { return getArt().queryChildrenArtifacts(repo, PredicateUtils.andPredicate(Filters.getTypeFilter(repo, RJCore.methodType), Filters.getAccessFilter(repo, RJCore.publicAccess))); }
From source file:com.architexa.diagrams.jdt.model.CodeUnit.java
public List<Artifact> getMethods(ReloRdfRepository repo, Resource access) { return getArt().queryChildrenArtifacts(repo, PredicateUtils.andPredicate( Filters.getTypeFilter(repo, RJCore.methodType), Filters.getAccessFilter(repo, access))); }
From source file:com.architexa.diagrams.jdt.model.CodeUnit.java
public List<Artifact> getFields(ReloRdfRepository repo) { return getArt().queryChildrenArtifacts(repo, PredicateUtils.andPredicate( Filters.getTypeFilter(repo, RJCore.fieldType), Filters.getAccessFilter(repo, RJCore.publicAccess))); }
From source file:com.architexa.diagrams.jdt.model.CodeUnit.java
public List<Artifact> getFields(ReloRdfRepository repo, Resource access) { return getArt().queryChildrenArtifacts(repo, PredicateUtils.andPredicate( Filters.getTypeFilter(repo, RJCore.fieldType), Filters.getAccessFilter(repo, access))); }
From source file:org.lockss.servlet.ServeContent.java
void displayIndexPage(Collection<ArchivalUnit> auList, int result, Element headerElement, String headerText) throws IOException { Predicate pred;/* ww w . java 2 s . c o m*/ boolean offerUnfilteredList = false; if (enabledPluginsOnly) { pred = PredicateUtils.andPredicate(enabledAusPred, allAusPred); offerUnfilteredList = areAnyExcluded(auList, enabledAusPred); } else { pred = allAusPred; } Page page = newPage(); if (headerElement != null) { page.add(headerElement); } Block centeredBlock = new Block(Block.Center); if (areAllExcluded(auList, pred) && !offerUnfilteredList) { ServletUtil.layoutExplanationBlock(centeredBlock, "No matching content has been preserved on this LOCKSS box"); } else { // Layout manifest index w/ URLs pointing to this servlet Element ele = ServletUtil.manifestIndex(pluginMgr, auList, pred, headerText, new ServletUtil.ManifestUrlTransform() { public Object transformUrl(String url, ArchivalUnit au) { Properties query = PropUtil.fromArgs("url", url); if (au != null) { query.put("auid", au.getAuId()); } return srvLink(myServletDescr(), url, query); } }, true); centeredBlock.add(ele); if (offerUnfilteredList) { centeredBlock.add("<br>"); centeredBlock.add("Other possibly relevant content has not yet been " + "certified for use with ServeContent and may not " + "display correctly. Click "); Properties args = getParamsAsProps(); args.put("filterPlugins", "no"); centeredBlock.add(srvLink(myServletDescr(), "here", args)); centeredBlock.add(" to see the complete list."); } } page.add(centeredBlock); if (result > 0) { resp.setStatus(result); } endPage(page); }