ispyb.server.biosaxs.vos.utils.serializer.SpecimenExclusionStrategy.java Source code

Java tutorial

Introduction

Here is the source code for ispyb.server.biosaxs.vos.utils.serializer.SpecimenExclusionStrategy.java

Source

/*******************************************************************************
 * This file is part of ISPyB.
 * 
 * ISPyB is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ISPyB is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with ISPyB.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Contributors : S. Delageniere, R. Leal, L. Launer, K. Levik, S. Veyrier, P. Brenchereau, M. Bodin, A. De Maria Antolinos
 ******************************************************************************************************************************/

package ispyb.server.biosaxs.vos.utils.serializer;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;

public class SpecimenExclusionStrategy implements ExclusionStrategy {

    public SpecimenExclusionStrategy() {
    }

    public boolean shouldSkipClass(Class<?> clazz) {
        return false;// (clazz == typeToSkip);
    }

    public boolean shouldSkipField(FieldAttributes f) {
        if ((f.getName().equals("merge3VOs"))) {
            return true;
        }
        return false;
    }
}