TypeSystem { public ImmutableList<String> getTypeNames() throws AtlasException { List<String> typeNames = new ArrayList<>(typeCache.getAllTypeNames()); return ImmutableList.copyOf(typeNames); } TypeSystem(); static TypeSystem getInstance(); @InterfaceAudience.Private TypeSystem reset(); void setTypeCache(TypeCache typeCache); ImmutableList<String> getCoreTypes(); ImmutableList<String> getTypeNames(); ImmutableList<String> getTypeNamesByCategory(final DataTypes.TypeCategory typeCategory); ImmutableList<String> getTypeNames(Map<TypeCache.TYPE_FILTER, String> filterMap); IdType getIdType(); boolean isRegistered(String typeName); IDataType getDataType(String name); T getDataType(Class<T> cls, String name); StructType defineStructType(String name, boolean errorIfExists, AttributeDefinition... attrDefs); StructType defineStructType(String name, String description, boolean errorIfExists, AttributeDefinition... attrDefs); StructType defineQueryResultType(String name, Map<String, IDataType> tempTypes,
            AttributeDefinition... attrDefs); TraitType defineTraitType(HierarchicalTypeDefinition<TraitType> traitDef); ClassType defineClassType(HierarchicalTypeDefinition<ClassType> classDef); Map<String, IDataType> defineTraitTypes(HierarchicalTypeDefinition<TraitType>... traitDefs); Map<String, IDataType> defineClassTypes(HierarchicalTypeDefinition<ClassType>... classDefs); Map<String, IDataType> updateTypes(TypesDef typesDef); Map<String, IDataType> defineTypes(TypesDef typesDef); Map<String, IDataType> defineTypes(ImmutableList<EnumTypeDefinition> enumDefs,
            ImmutableList<StructTypeDefinition> structDefs,
            ImmutableList<HierarchicalTypeDefinition<TraitType>> traitDefs,
            ImmutableList<HierarchicalTypeDefinition<ClassType>> classDefs); DataTypes.ArrayType defineArrayType(IDataType elemType); DataTypes.MapType defineMapType(IDataType keyType, IDataType valueType); EnumType defineEnumType(String name, EnumValue... values); EnumType defineEnumType(String name, String description, EnumValue... values); EnumType defineEnumType(EnumTypeDefinition eDef); SimpleDateFormat getDateFormat(); boolean allowNullsInCollections(); TransientTypeSystem createTransientTypeSystem(TypesDef typesDef, boolean isUpdate); void commitTypes(Map<String, IDataType> typesAdded); static final String ID_STRUCT_ID_ATTRNAME; static final String ID_STRUCT_TYP_NAME; }
@Test public void testGetTypeNames() throws Exception { getTypeSystem().defineEnumType("enum_test", new EnumValue("0", 0), new EnumValue("1", 1), new EnumValue("2", 2), new EnumValue("3", 3)); assertTrue(getTypeSystem().getTypeNames().contains("enum_test")); }