test_class.declarator: configurationBasedNamespaceManager
test_class.modifier: private
test_class.original_string: private ConfigurationBasedNamespaceManager configurationBasedNamespaceManager;
test_class.type: ConfigurationBasedNamespaceManager
test_class.var_name: configurationBasedNamespaceManager
test_class.file: org.eclipse.winery.repository/src/test/java/org/eclipse/winery/repository/backend/filebased/ConfigurationBasedNamespaceManagerTest.java
test_class.identifier: ConfigurationBasedNamespaceManagerTest
test_case.body: @Test
      public void openToscaNodeTypesCorrectAtSimilarNamespacesWithUniqueness() {
          assertEquals("otntyIexample", this.configurationBasedNamespaceManager.getPrefix("http://opentosca.org/nodetypes/example"));
          assertEquals("otntyIexample1", this.configurationBasedNamespaceManager.getPrefix("http://opentosca.org/nodetypes/example/example"));
  
          // try again -> same prefixes have to be returned
          assertEquals("otntyIexample", this.configurationBasedNamespaceManager.getPrefix("http://opentosca.org/nodetypes/example"));
          assertEquals("otntyIexample1", this.configurationBasedNamespaceManager.getPrefix("http://opentosca.org/nodetypes/example/example"));
      }
test_case.class_method_signature: ConfigurationBasedNamespaceManagerTest.openToscaNodeTypesCorrectAtSimilarNamespacesWithUniqueness()
test_case.full_signature: @Test public void openToscaNodeTypesCorrectAtSimilarNamespacesWithUniqueness()
test_case.identifier: openToscaNodeTypesCorrectAtSimilarNamespacesWithUniqueness
test_case.invocations: assertEquals getPrefix assertEquals getPrefix assertEquals getPrefix assertEquals getPrefix
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void openToscaNodeTypesCorrectAtSimilarNamespacesWithUniqueness()
focal_class.declarator: configuration
focal_class.modifier: private
focal_class.original_string: private Configuration configuration;
focal_class.type: Configuration
focal_class.var_name: configuration
focal_class.declarator: namespaceToPrefixMap = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, String> namespaceToPrefixMap = new HashMap<>();
focal_class.type: Map<String, String>
focal_class.var_name: namespaceToPrefixMap
focal_class.file: org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/backend/filebased/ConfigurationBasedNamespaceManager.java
focal_class.identifier: ConfigurationBasedNamespaceManager
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.ConfigurationBasedNamespaceManager(Configuration configuration)
focal_class.full_signature: public  ConfigurationBasedNamespaceManager(Configuration configuration)
focal_class.identifier: ConfigurationBasedNamespaceManager
focal_class.modifiers: public
focal_class.parameters: (Configuration configuration)
focal_class.signature:  ConfigurationBasedNamespaceManager(Configuration configuration)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.getPrefix(String namespace)
focal_class.full_signature: @Override public String getPrefix(String namespace)
focal_class.identifier: getPrefix
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: String
focal_class.signature: String getPrefix(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.hasPermanentProperties(String namespace)
focal_class.full_signature: @Override public boolean hasPermanentProperties(String namespace)
focal_class.identifier: hasPermanentProperties
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: boolean
focal_class.signature: boolean hasPermanentProperties(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.removeNamespaceProperties(String namespace)
focal_class.full_signature: @Override public void removeNamespaceProperties(String namespace)
focal_class.identifier: removeNamespaceProperties
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: void
focal_class.signature: void removeNamespaceProperties(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.setNamespaceProperties(String namespace, NamespaceProperties properties)
focal_class.full_signature: @Override public void setNamespaceProperties(String namespace, NamespaceProperties properties)
focal_class.identifier: setNamespaceProperties
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace, NamespaceProperties properties)
focal_class.return: void
focal_class.signature: void setNamespaceProperties(String namespace, NamespaceProperties properties)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.getAllPermanentPrefixes()
focal_class.full_signature: private Collection<String> getAllPermanentPrefixes()
focal_class.identifier: getAllPermanentPrefixes
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getAllPermanentPrefixes()
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.getAllNamespaces()
focal_class.full_signature: @Override public Map<String, NamespaceProperties> getAllNamespaces()
focal_class.identifier: getAllNamespaces
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, NamespaceProperties>
focal_class.signature: Map<String, NamespaceProperties> getAllNamespaces()
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.getAllPrefixes(String namespace)
focal_class.full_signature: @Override protected Set<String> getAllPrefixes(String namespace)
focal_class.identifier: getAllPrefixes
focal_class.modifiers: @Override protected
focal_class.parameters: (String namespace)
focal_class.return: Set<String>
focal_class.signature: Set<String> getAllPrefixes(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.addAllPermanent(Collection<NamespaceProperties> properties)
focal_class.full_signature: @Override public void addAllPermanent(Collection<NamespaceProperties> properties)
focal_class.identifier: addAllPermanent
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<NamespaceProperties> properties)
focal_class.return: void
focal_class.signature: void addAllPermanent(Collection<NamespaceProperties> properties)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.replaceAll(Map<String, NamespaceProperties> map)
focal_class.full_signature: @Override public void replaceAll(Map<String, NamespaceProperties> map)
focal_class.identifier: replaceAll
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, NamespaceProperties> map)
focal_class.return: void
focal_class.signature: void replaceAll(Map<String, NamespaceProperties> map)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.getNamespaceProperties(String namespace)
focal_class.full_signature: @Override public NamespaceProperties getNamespaceProperties(String namespace)
focal_class.identifier: getNamespaceProperties
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: NamespaceProperties
focal_class.signature: NamespaceProperties getNamespaceProperties(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.isPatternNamespace(String namespace)
focal_class.full_signature: @Override public boolean isPatternNamespace(String namespace)
focal_class.identifier: isPatternNamespace
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: boolean
focal_class.signature: boolean isPatternNamespace(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.isSecureCollection(String namespace)
focal_class.full_signature: @Override public boolean isSecureCollection(String namespace)
focal_class.identifier: isSecureCollection
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: boolean
focal_class.signature: boolean isSecureCollection(String namespace)
focal_class.class_method_signature: ConfigurationBasedNamespaceManager.isGeneratedNamespace(String namespace)
focal_class.full_signature: @Override public boolean isGeneratedNamespace(String namespace)
focal_class.identifier: isGeneratedNamespace
focal_class.modifiers: @Override public
focal_class.parameters: (String namespace)
focal_class.return: boolean
focal_class.signature: boolean isGeneratedNamespace(String namespace)
focal_class.superclass: extends AbstractNamespaceManager
focal_method.body: @Override
      public String getPrefix(String namespace) {
          if (namespace == null) {
              namespace = "";
          }
  
          // configuration stores the permanent mapping
          // this has precedence
          String prefix = configuration.getString(namespace);
          if (prefix == null || prefix.isEmpty()) {
              // in case no permanent mapping is found - or the prefix is invalid, check the in-memory ones
              prefix = this.namespaceToPrefixMap.get(namespace);
              if (prefix == null) {
                  prefix = this.generatePrefix(namespace);
                  this.namespaceToPrefixMap.put(namespace, prefix);
              }
          }
          return prefix;
      }
focal_method.class_method_signature: ConfigurationBasedNamespaceManager.getPrefix(String namespace)
focal_method.full_signature: @Override public String getPrefix(String namespace)
focal_method.identifier: getPrefix
focal_method.invocations: getString isEmpty get generatePrefix put
focal_method.modifiers: @Override public
focal_method.parameters: (String namespace)
focal_method.return: String
focal_method.signature: String getPrefix(String namespace)