if (filters != null)
{
FeatureMatcherSetI filter = Jalview2XML
- .unmarshalFilter(featureType, filters);
+ .parseFilter(featureType, filters);
if (!filter.isEmpty())
{
fr.setFeatureFilter(featureType, filter);
* @param fcol
* @return
*/
- protected static Colour marshalColour(
+ public static Colour marshalColour(
String featureType, FeatureColourI fcol)
{
Colour col = new Colour();
* @param and
* if true, conditions are and-ed, else or-ed
*/
- protected static jalview.xml.binding.jalview.FeatureMatcherSet marshalFilter(
+ public static jalview.xml.binding.jalview.FeatureMatcherSet marshalFilter(
FeatureMatcherI firstMatcher, Iterator<FeatureMatcherI> filters,
boolean and)
{
* @param matcherSetModel
* @return
*/
- protected static FeatureMatcherSetI unmarshalFilter(
+ public static FeatureMatcherSetI parseFilter(
String featureType,
jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel)
{
FeatureMatcherSetI result = new FeatureMatcherSet();
try
{
- unmarshalFilterConditions(result, matcherSetModel, true);
+ parseFilterConditions(result, matcherSetModel, true);
} catch (IllegalStateException e)
{
// mixing AND and OR conditions perhaps
* @throws IllegalStateException
* if AND and OR conditions are mixed
*/
- protected static void unmarshalFilterConditions(
+ protected static void parseFilterConditions(
FeatureMatcherSetI matcherSet,
jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel,
boolean and)
* compound condition
*/
List<jalview.xml.binding.jalview.FeatureMatcherSet> matchers = matcherSetModel
- .getCompoundMatcher()
- .getMatcherSet();
+ .getCompoundMatcher().getMatcherSet();
boolean anded = matcherSetModel.getCompoundMatcher().isAnd();
if (matchers.size() == 2)
{
- unmarshalFilterConditions(matcherSet, matchers.get(0), anded);
- unmarshalFilterConditions(matcherSet, matchers.get(1), anded);
+ parseFilterConditions(matcherSet, matchers.get(0), anded);
+ parseFilterConditions(matcherSet, matchers.get(1), anded);
}
else
{
* @param colourModel
* @return
*/
- protected static FeatureColourI unmarshalColour(Colour colourModel)
+ public static FeatureColourI parseColour(Colour colourModel)
{
FeatureColourI colour = null;