@Test public void testSanitiseSemanticTypes() { assertEquals(sanitiseSemanticTypes(null), of()); assertEquals(sanitiseSemanticTypes(ImmutableList.<String>of()), of()); assertEquals(sanitiseSemanticTypes(of("foobar")), of()); assertEquals(sanitiseSemanticTypes(of("dsyn")), of("dsyn")); assertEquals(sanitiseSemanticTypes(of("dsyn", "foobar")),of("dsyn")); assertEquals(sanitiseSemanticTypes(of("dsyn", "foobar", "fish")), of("dsyn", "fish")); }
public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) { if (semanticTypes == null) return ImmutableList.of(); final Set<String> s = new LinkedHashSet<>(semanticTypes); return s.retainAll(SEMANTIC_TYPES_CODE_TO_DESCRIPTION.keySet()) ? s : semanticTypes; }
SemanticTypes { public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) { if (semanticTypes == null) return ImmutableList.of(); final Set<String> s = new LinkedHashSet<>(semanticTypes); return s.retainAll(SEMANTIC_TYPES_CODE_TO_DESCRIPTION.keySet()) ? s : semanticTypes; } }
SemanticTypes { public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) { if (semanticTypes == null) return ImmutableList.of(); final Set<String> s = new LinkedHashSet<>(semanticTypes); return s.retainAll(SEMANTIC_TYPES_CODE_TO_DESCRIPTION.keySet()) ? s : semanticTypes; } private  SemanticTypes(); }
SemanticTypes { public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) { if (semanticTypes == null) return ImmutableList.of(); final Set<String> s = new LinkedHashSet<>(semanticTypes); return s.retainAll(SEMANTIC_TYPES_CODE_TO_DESCRIPTION.keySet()) ? s : semanticTypes; } private  SemanticTypes(); static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes); }
SemanticTypes { public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) { if (semanticTypes == null) return ImmutableList.of(); final Set<String> s = new LinkedHashSet<>(semanticTypes); return s.retainAll(SEMANTIC_TYPES_CODE_TO_DESCRIPTION.keySet()) ? s : semanticTypes; } private  SemanticTypes(); static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes); @SuppressWarnings("PublicStaticCollectionField")
    static final ImmutableList<String> DEFAULT_MM_SEMANTIC_TYPES; @SuppressWarnings("PublicStaticCollectionField")
    static final ImmutableMap<String, String> SEMANTIC_TYPES_CODE_TO_DESCRIPTION; }