Revision 39456
Added by Claudio Atzori over 8 years ago
XsltInfoPackageAction.java | ||
---|---|---|
5 | 5 |
import javax.xml.transform.Transformer; |
6 | 6 |
import javax.xml.transform.TransformerException; |
7 | 7 |
|
8 |
import com.google.common.base.Predicate; |
|
9 |
import com.google.common.collect.Iterables; |
|
8 | 10 |
import com.google.common.collect.Lists; |
9 | 11 |
import eu.dnetlib.actionmanager.ActionManagerConstants; |
10 | 12 |
import eu.dnetlib.actionmanager.ActionManagerConstants.ACTION_TYPE; |
... | ... | |
82 | 84 |
} |
83 | 85 |
|
84 | 86 |
public List<AtomicAction> asAtomicActions() { |
85 |
return calculateAtomicActions(); |
|
87 |
return Lists.newArrayList(Iterables.filter(calculateAtomicActions(), new Predicate<AtomicAction>() { |
|
88 |
@Override |
|
89 |
public boolean apply(final AtomicAction action) { |
|
90 |
return action != null && action.isValid(); |
|
91 |
} |
|
92 |
})); |
|
86 | 93 |
} |
87 | 94 |
|
88 | 95 |
private Document applyXslt(final String xml, final Provenance provenance, final String trust, final String nsprefix) throws DocumentException, |
Also available in: Unified diff
avoid returning invalid actions