org.etlunit.BaseFeatureLocator Maven / Gradle / Ivy
package org.etlunit;
import org.etlunit.feature.Feature;
import org.etlunit.feature.FeatureLocator;
import org.etlunit.feature.FeatureMetaInfo;
import java.util.Iterator;
import java.util.List;
public abstract class BaseFeatureLocator implements FeatureLocator
{
@Override
public List getFeatures(feature_type type)
{
List list = getFeatures();
if (type != feature_type.all)
{
Iterator it = list.iterator();
while (it.hasNext())
{
Feature feature = it.next();
FeatureMetaInfo metaInfo = feature.getMetaInfo();
switch (type)
{
case internal:
if (!metaInfo.isInternalFeature())
{
it.remove();
}
break;
case external:
if (metaInfo.isInternalFeature())
{
it.remove();
}
break;
}
}
}
return list;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy