test_class.declarator: META_DATA_YAM = "yaml/metadata.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String META_DATA_YAM = "yaml/metadata.yaml";
test_class.type: String
test_class.var_name: META_DATA_YAM
test_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/RuleSchemaMetaDataYamlSwapperTest.java
test_class.identifier: RuleSchemaMetaDataYamlSwapperTest
test_case.body: @Test
      public void assertSwapToRuleSchemaMetaData() {
          YamlRuleSchemaMetaData yamlRuleSchemaMetaData = YamlEngine.unmarshal(readYAML(META_DATA_YAM), YamlRuleSchemaMetaData.class);
          RuleSchemaMetaData ruleSchemaMetaData = new RuleSchemaMetaDataYamlSwapper().swapToObject(yamlRuleSchemaMetaData);
          assertNotNull(ruleSchemaMetaData);
          assertNotNull(ruleSchemaMetaData.getConfiguredSchemaMetaData());
          assertNotNull(ruleSchemaMetaData.getConfiguredSchemaMetaData());
          assertThat(ruleSchemaMetaData.getConfiguredSchemaMetaData().getAllTableNames(), is(Collections.singleton("t_order")));
          assertThat(ruleSchemaMetaData.getConfiguredSchemaMetaData().get("t_order").getIndexes().keySet(), is(Collections.singleton("primary")));
          assertThat(ruleSchemaMetaData.getConfiguredSchemaMetaData().getAllColumnNames("t_order").size(), is(1));
          assertThat(ruleSchemaMetaData.getConfiguredSchemaMetaData().get("t_order").getColumns().keySet(), is(Collections.singleton("id")));
          assertThat(ruleSchemaMetaData.getUnconfiguredSchemaMetaDataMap().keySet(), is(Collections.singleton("ds_0")));
          assertThat(ruleSchemaMetaData.getUnconfiguredSchemaMetaDataMap().get("ds_0"), is(Collections.singletonList("t_user")));
      }
test_case.class_method_signature: RuleSchemaMetaDataYamlSwapperTest.assertSwapToRuleSchemaMetaData()
test_case.full_signature: @Test public void assertSwapToRuleSchemaMetaData()
test_case.identifier: assertSwapToRuleSchemaMetaData
test_case.invocations: unmarshal readYAML swapToObject assertNotNull assertNotNull getConfiguredSchemaMetaData assertNotNull getConfiguredSchemaMetaData assertThat getAllTableNames getConfiguredSchemaMetaData is singleton assertThat keySet getIndexes get getConfiguredSchemaMetaData is singleton assertThat size getAllColumnNames getConfiguredSchemaMetaData is assertThat keySet getColumns get getConfiguredSchemaMetaData is singleton assertThat keySet getUnconfiguredSchemaMetaDataMap is singleton assertThat get getUnconfiguredSchemaMetaDataMap is singletonList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToRuleSchemaMetaData()
focal_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/RuleSchemaMetaDataYamlSwapper.java
focal_class.identifier: RuleSchemaMetaDataYamlSwapper
focal_class.interfaces: implements YamlSwapper<YamlRuleSchemaMetaData, RuleSchemaMetaData>
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.swapToYamlConfiguration(final RuleSchemaMetaData metaData)
focal_class.full_signature: @Override public YamlRuleSchemaMetaData swapToYamlConfiguration(final RuleSchemaMetaData metaData)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final RuleSchemaMetaData metaData)
focal_class.return: YamlRuleSchemaMetaData
focal_class.signature: YamlRuleSchemaMetaData swapToYamlConfiguration(final RuleSchemaMetaData metaData)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.swapToObject(final YamlRuleSchemaMetaData yamlConfig)
focal_class.full_signature: @Override public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlRuleSchemaMetaData yamlConfig)
focal_class.return: RuleSchemaMetaData
focal_class.signature: RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertSchema(final YamlSchemaMetaData schema)
focal_class.full_signature: private SchemaMetaData convertSchema(final YamlSchemaMetaData schema)
focal_class.identifier: convertSchema
focal_class.modifiers: private
focal_class.parameters: (final YamlSchemaMetaData schema)
focal_class.return: SchemaMetaData
focal_class.signature: SchemaMetaData convertSchema(final YamlSchemaMetaData schema)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertTable(final YamlTableMetaData table)
focal_class.full_signature: private TableMetaData convertTable(final YamlTableMetaData table)
focal_class.identifier: convertTable
focal_class.modifiers: private
focal_class.parameters: (final YamlTableMetaData table)
focal_class.return: TableMetaData
focal_class.signature: TableMetaData convertTable(final YamlTableMetaData table)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertIndexes(final Map<String, YamlIndexMetaData> indexes)
focal_class.full_signature: private Collection<IndexMetaData> convertIndexes(final Map<String, YamlIndexMetaData> indexes)
focal_class.identifier: convertIndexes
focal_class.modifiers: private
focal_class.parameters: (final Map<String, YamlIndexMetaData> indexes)
focal_class.return: Collection<IndexMetaData>
focal_class.signature: Collection<IndexMetaData> convertIndexes(final Map<String, YamlIndexMetaData> indexes)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertIndex(final YamlIndexMetaData index)
focal_class.full_signature: private IndexMetaData convertIndex(final YamlIndexMetaData index)
focal_class.identifier: convertIndex
focal_class.modifiers: private
focal_class.parameters: (final YamlIndexMetaData index)
focal_class.return: IndexMetaData
focal_class.signature: IndexMetaData convertIndex(final YamlIndexMetaData index)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertColumns(final Map<String, YamlColumnMetaData> indexes)
focal_class.full_signature: private Collection<ColumnMetaData> convertColumns(final Map<String, YamlColumnMetaData> indexes)
focal_class.identifier: convertColumns
focal_class.modifiers: private
focal_class.parameters: (final Map<String, YamlColumnMetaData> indexes)
focal_class.return: Collection<ColumnMetaData>
focal_class.signature: Collection<ColumnMetaData> convertColumns(final Map<String, YamlColumnMetaData> indexes)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertColumn(final YamlColumnMetaData column)
focal_class.full_signature: private ColumnMetaData convertColumn(final YamlColumnMetaData column)
focal_class.identifier: convertColumn
focal_class.modifiers: private
focal_class.parameters: (final YamlColumnMetaData column)
focal_class.return: ColumnMetaData
focal_class.signature: ColumnMetaData convertColumn(final YamlColumnMetaData column)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlSchema(final SchemaMetaData schema)
focal_class.full_signature: private YamlSchemaMetaData convertYamlSchema(final SchemaMetaData schema)
focal_class.identifier: convertYamlSchema
focal_class.modifiers: private
focal_class.parameters: (final SchemaMetaData schema)
focal_class.return: YamlSchemaMetaData
focal_class.signature: YamlSchemaMetaData convertYamlSchema(final SchemaMetaData schema)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlTable(final TableMetaData table)
focal_class.full_signature: private YamlTableMetaData convertYamlTable(final TableMetaData table)
focal_class.identifier: convertYamlTable
focal_class.modifiers: private
focal_class.parameters: (final TableMetaData table)
focal_class.return: YamlTableMetaData
focal_class.signature: YamlTableMetaData convertYamlTable(final TableMetaData table)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlIndexes(final Map<String, IndexMetaData> indexes)
focal_class.full_signature: private Map<String, YamlIndexMetaData> convertYamlIndexes(final Map<String, IndexMetaData> indexes)
focal_class.identifier: convertYamlIndexes
focal_class.modifiers: private
focal_class.parameters: (final Map<String, IndexMetaData> indexes)
focal_class.return: Map<String, YamlIndexMetaData>
focal_class.signature: Map<String, YamlIndexMetaData> convertYamlIndexes(final Map<String, IndexMetaData> indexes)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlIndex(final IndexMetaData index)
focal_class.full_signature: private YamlIndexMetaData convertYamlIndex(final IndexMetaData index)
focal_class.identifier: convertYamlIndex
focal_class.modifiers: private
focal_class.parameters: (final IndexMetaData index)
focal_class.return: YamlIndexMetaData
focal_class.signature: YamlIndexMetaData convertYamlIndex(final IndexMetaData index)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlColumns(final Map<String, ColumnMetaData> columns)
focal_class.full_signature: private Map<String, YamlColumnMetaData> convertYamlColumns(final Map<String, ColumnMetaData> columns)
focal_class.identifier: convertYamlColumns
focal_class.modifiers: private
focal_class.parameters: (final Map<String, ColumnMetaData> columns)
focal_class.return: Map<String, YamlColumnMetaData>
focal_class.signature: Map<String, YamlColumnMetaData> convertYamlColumns(final Map<String, ColumnMetaData> columns)
focal_class.class_method_signature: RuleSchemaMetaDataYamlSwapper.convertYamlColumn(final ColumnMetaData column)
focal_class.full_signature: private YamlColumnMetaData convertYamlColumn(final ColumnMetaData column)
focal_class.identifier: convertYamlColumn
focal_class.modifiers: private
focal_class.parameters: (final ColumnMetaData column)
focal_class.return: YamlColumnMetaData
focal_class.signature: YamlColumnMetaData convertYamlColumn(final ColumnMetaData column)
focal_method.body: @Override
      public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig) {
          SchemaMetaData configured = Optional.ofNullable(yamlConfig.getConfiguredSchemaMetaData()).map(this::convertSchema).orElse(new SchemaMetaData());
          Map<String, Collection<String>> unconfigured = Optional.ofNullable(yamlConfig.getUnconfiguredSchemaMetaDataMap()).orElse(new HashMap<>());
          return new RuleSchemaMetaData(configured, unconfigured);
      }
focal_method.class_method_signature: RuleSchemaMetaDataYamlSwapper.swapToObject(final YamlRuleSchemaMetaData yamlConfig)
focal_method.full_signature: @Override public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: orElse map ofNullable getConfiguredSchemaMetaData orElse ofNullable getUnconfiguredSchemaMetaDataMap
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlRuleSchemaMetaData yamlConfig)
focal_method.return: RuleSchemaMetaData
focal_method.signature: RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig)