001/* 002 * Copyright 2018 Leibniz-Institut für Analytische Wissenschaften – ISAS – e.V.. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package de.isas.mztab2.validation; 017 018import de.isas.mztab2.model.Parameter; 019import java.util.List; 020import org.apache.commons.jxpath.Pointer; 021import org.apache.commons.lang3.tuple.Pair; 022 023/** 024 * Interface for JxPath subtree selection handling. The argument is the valid 025 * JxPath selection consisting of pairs of pointers into the object hierarchy 026 * and the corresponding Parameter. Implementations of this interface can act as 027 * filters, removing pairs from the collection before returning it. 028 * 029 * @author nilshoffmann 030 */ 031public interface CvTermSelectionHandler { 032 033 /** 034 * Handle the provided selection, e.g. by filtering it or by modifying 035 * elements therein. 036 * 037 * @param selection the selection to handle. 038 * @return the selection or any processed variant of it. Should never be 039 * null. 040 */ 041 List<Pair<Pointer, Parameter>> handleSelection( 042 List<Pair<Pointer, Parameter>> selection); 043}