test_class.file: org.eclipse.winery.common/src/test/java/org/eclipse/winery/common/TestUtil.java
test_class.identifier: TestUtil
test_case.body: @Test
      public void testNamespaceToJavaPackageURLWithHostOnly() {
          assertEquals("org.example.www", Util.namespaceToJavaPackage("http://www.example.org/"));
      }
test_case.class_method_signature: TestUtil.testNamespaceToJavaPackageURLWithHostOnly()
test_case.full_signature: @Test public void testNamespaceToJavaPackageURLWithHostOnly()
test_case.identifier: testNamespaceToJavaPackageURLWithHostOnly
test_case.invocations: assertEquals namespaceToJavaPackage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNamespaceToJavaPackageURLWithHostOnly()
focal_class.declarator: FORBIDDEN_CHARACTER_REPLACEMENT = "_"
focal_class.modifier: public static final
focal_class.original_string: public static final String FORBIDDEN_CHARACTER_REPLACEMENT = "_";
focal_class.type: String
focal_class.var_name: FORBIDDEN_CHARACTER_REPLACEMENT
focal_class.declarator: slashEncoded = Util.URLencode("/")
focal_class.modifier: public static final
focal_class.original_string: public static final String slashEncoded = Util.URLencode("/");
focal_class.type: String
focal_class.var_name: slashEncoded
focal_class.declarator: LOGGER = LoggerFactory.getLogger(Util.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(Util.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: NCNameStartChar_RegExp = "[A-Z_a-z\u00c0-\u00d6\u00d8\u00f6\u00f8\u02ff\u0370\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]"
focal_class.modifier: private static final
focal_class.original_string: private static final String NCNameStartChar_RegExp = "[A-Z_a-z\u00c0-\u00d6\u00d8\u00f6\u00f8\u02ff\u0370\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]";
focal_class.type: String
focal_class.var_name: NCNameStartChar_RegExp
focal_class.declarator: NCNameChar_RegExp = Util.NCNameStartChar_RegExp + "|[-\\.0-9\u00B7\u0300-\u036F\u203F-\u2040]"
focal_class.modifier: private static final
focal_class.original_string: private static final String NCNameChar_RegExp = Util.NCNameStartChar_RegExp + "|[-\\.0-9\u00B7\u0300-\u036F\u203F-\u2040]";
focal_class.type: String
focal_class.var_name: NCNameChar_RegExp
focal_class.declarator: NCNameStartChar_Pattern = Pattern.compile(Util.NCNameStartChar_RegExp)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern NCNameStartChar_Pattern = Pattern.compile(Util.NCNameStartChar_RegExp);
focal_class.type: Pattern
focal_class.var_name: NCNameStartChar_Pattern
focal_class.declarator: NCNameChar_RegExp_Pattern = Pattern.compile(Util.NCNameChar_RegExp)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern NCNameChar_RegExp_Pattern = Pattern.compile(Util.NCNameChar_RegExp);
focal_class.type: Pattern
focal_class.var_name: NCNameChar_RegExp_Pattern
focal_class.file: org.eclipse.winery.common/src/main/java/org/eclipse/winery/common/Util.java
focal_class.identifier: Util
focal_class.class_method_signature: Util.URLdecode(String s)
focal_class.full_signature: public static String URLdecode(String s)
focal_class.identifier: URLdecode
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String URLdecode(String s)
focal_class.class_method_signature: Util.URLencode(String s)
focal_class.full_signature: public static String URLencode(String s)
focal_class.identifier: URLencode
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String URLencode(String s)
focal_class.class_method_signature: Util.URLencode(QName qname)
focal_class.full_signature: public static String URLencode(QName qname)
focal_class.identifier: URLencode
focal_class.modifiers: public static
focal_class.parameters: (QName qname)
focal_class.return: String
focal_class.signature: String URLencode(QName qname)
focal_class.class_method_signature: Util.DoubleURLencode(String s)
focal_class.full_signature: public static String DoubleURLencode(String s)
focal_class.identifier: DoubleURLencode
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String DoubleURLencode(String s)
focal_class.class_method_signature: Util.DoubleURLencode(QName qname)
focal_class.full_signature: public static String DoubleURLencode(QName qname)
focal_class.identifier: DoubleURLencode
focal_class.modifiers: public static
focal_class.parameters: (QName qname)
focal_class.return: String
focal_class.signature: String DoubleURLencode(QName qname)
focal_class.class_method_signature: Util.isRelativeURI(String uri)
focal_class.full_signature: public static boolean isRelativeURI(String uri)
focal_class.identifier: isRelativeURI
focal_class.modifiers: public static
focal_class.parameters: (String uri)
focal_class.return: boolean
focal_class.signature: boolean isRelativeURI(String uri)
focal_class.class_method_signature: Util.getPathInsideRepo(GenericId id)
focal_class.full_signature: public static String getPathInsideRepo(GenericId id)
focal_class.identifier: getPathInsideRepo
focal_class.modifiers: public static
focal_class.parameters: (GenericId id)
focal_class.return: String
focal_class.signature: String getPathInsideRepo(GenericId id)
focal_class.class_method_signature: Util.getComponentIdClassForTExtensibleElements(Class<? extends TExtensibleElements> clazz)
focal_class.full_signature: public static Class<? extends DefinitionsChildId> getComponentIdClassForTExtensibleElements(Class<? extends TExtensibleElements> clazz)
focal_class.identifier: getComponentIdClassForTExtensibleElements
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends TExtensibleElements> clazz)
focal_class.return: Class<? extends DefinitionsChildId>
focal_class.signature: Class<? extends DefinitionsChildId> getComponentIdClassForTExtensibleElements(Class<? extends TExtensibleElements> clazz)
focal_class.class_method_signature: Util.getComponentIdClass(String idClassName)
focal_class.full_signature: @SuppressWarnings("unchecked") public static Class<? extends DefinitionsChildId> getComponentIdClass(String idClassName)
focal_class.identifier: getComponentIdClass
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (String idClassName)
focal_class.return: Class<? extends DefinitionsChildId>
focal_class.signature: Class<? extends DefinitionsChildId> getComponentIdClass(String idClassName)
focal_class.class_method_signature: Util.getGenericIdClassForType(String typeIdType)
focal_class.full_signature: @SuppressWarnings("unchecked") public static Class<? extends GenericId> getGenericIdClassForType(String typeIdType)
focal_class.identifier: getGenericIdClassForType
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (String typeIdType)
focal_class.return: Class<? extends GenericId>
focal_class.signature: Class<? extends GenericId> getGenericIdClassForType(String typeIdType)
focal_class.class_method_signature: Util.getUrlPath(GenericId id)
focal_class.full_signature: public static String getUrlPath(GenericId id)
focal_class.identifier: getUrlPath
focal_class.modifiers: public static
focal_class.parameters: (GenericId id)
focal_class.return: String
focal_class.signature: String getUrlPath(GenericId id)
focal_class.class_method_signature: Util.getUrlPath(String pathInsideRepo)
focal_class.full_signature: public static String getUrlPath(String pathInsideRepo)
focal_class.identifier: getUrlPath
focal_class.modifiers: public static
focal_class.parameters: (String pathInsideRepo)
focal_class.return: String
focal_class.signature: String getUrlPath(String pathInsideRepo)
focal_class.class_method_signature: Util.getUrlPath(RepositoryFileReference ref)
focal_class.full_signature: public static String getUrlPath(RepositoryFileReference ref)
focal_class.identifier: getUrlPath
focal_class.modifiers: public static
focal_class.parameters: (RepositoryFileReference ref)
focal_class.return: String
focal_class.signature: String getUrlPath(RepositoryFileReference ref)
focal_class.class_method_signature: Util.getURLpathFragmentForCollection(Class<? extends TExtensibleElements> c)
focal_class.full_signature: public static String getURLpathFragmentForCollection(Class<? extends TExtensibleElements> c)
focal_class.identifier: getURLpathFragmentForCollection
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends TExtensibleElements> c)
focal_class.return: String
focal_class.signature: String getURLpathFragmentForCollection(Class<? extends TExtensibleElements> c)
focal_class.class_method_signature: Util.getEverythingBetweenTheLastDotAndBeforeId(Class<? extends GenericId> cls)
focal_class.full_signature: public static String getEverythingBetweenTheLastDotAndBeforeId(Class<? extends GenericId> cls)
focal_class.identifier: getEverythingBetweenTheLastDotAndBeforeId
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends GenericId> cls)
focal_class.return: String
focal_class.signature: String getEverythingBetweenTheLastDotAndBeforeId(Class<? extends GenericId> cls)
focal_class.class_method_signature: Util.getTypeForElementId(Class<? extends ToscaElementId> idClass)
focal_class.full_signature: public static String getTypeForElementId(Class<? extends ToscaElementId> idClass)
focal_class.identifier: getTypeForElementId
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends ToscaElementId> idClass)
focal_class.return: String
focal_class.signature: String getTypeForElementId(Class<? extends ToscaElementId> idClass)
focal_class.class_method_signature: Util.getTypeForComponentId(Class<? extends DefinitionsChildId> idClass)
focal_class.full_signature: public static String getTypeForComponentId(Class<? extends DefinitionsChildId> idClass)
focal_class.identifier: getTypeForComponentId
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends DefinitionsChildId> idClass)
focal_class.return: String
focal_class.signature: String getTypeForComponentId(Class<? extends DefinitionsChildId> idClass)
focal_class.class_method_signature: Util.getRootPathFragment(Class<? extends DefinitionsChildId> idClass)
focal_class.full_signature: public static String getRootPathFragment(Class<? extends DefinitionsChildId> idClass)
focal_class.identifier: getRootPathFragment
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends DefinitionsChildId> idClass)
focal_class.return: String
focal_class.signature: String getRootPathFragment(Class<? extends DefinitionsChildId> idClass)
focal_class.class_method_signature: Util.getFolderName(Class<? extends DefinitionsChildId> idClass)
focal_class.full_signature: public static String getFolderName(Class<? extends DefinitionsChildId> idClass)
focal_class.identifier: getFolderName
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends DefinitionsChildId> idClass)
focal_class.return: String
focal_class.signature: String getFolderName(Class<? extends DefinitionsChildId> idClass)
focal_class.class_method_signature: Util.qname2hrefWithName(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname, String name)
focal_class.full_signature: public static String qname2hrefWithName(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname, String name)
focal_class.identifier: qname2hrefWithName
focal_class.modifiers: public static
focal_class.parameters: (String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname, String name)
focal_class.return: String
focal_class.signature: String qname2hrefWithName(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname, String name)
focal_class.class_method_signature: Util.qname2href(@NonNull String repositoryUiUrl, @NonNull Class<? extends TExtensibleElements> element, @Nullable QName qname, @Nullable String name)
focal_class.full_signature: public static String qname2href(@NonNull String repositoryUiUrl, @NonNull Class<? extends TExtensibleElements> element, @Nullable QName qname, @Nullable String name)
focal_class.identifier: qname2href
focal_class.modifiers: public static
focal_class.parameters: (@NonNull String repositoryUiUrl, @NonNull Class<? extends TExtensibleElements> element, @Nullable QName qname, @Nullable String name)
focal_class.return: String
focal_class.signature: String qname2href(@NonNull String repositoryUiUrl, @NonNull Class<? extends TExtensibleElements> element, @Nullable QName qname, @Nullable String name)
focal_class.class_method_signature: Util.qname2href(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname)
focal_class.full_signature: public static String qname2href(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname)
focal_class.identifier: qname2href
focal_class.modifiers: public static
focal_class.parameters: (String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname)
focal_class.return: String
focal_class.signature: String qname2href(String repositoryUiUrl, Class<? extends TExtensibleElements> element, QName qname)
focal_class.class_method_signature: Util.renderMinInstances(Integer minInstances)
focal_class.full_signature: public static String renderMinInstances(Integer minInstances)
focal_class.identifier: renderMinInstances
focal_class.modifiers: public static
focal_class.parameters: (Integer minInstances)
focal_class.return: String
focal_class.signature: String renderMinInstances(Integer minInstances)
focal_class.class_method_signature: Util.renderMaxInstances(String maxInstances)
focal_class.full_signature: public static String renderMaxInstances(String maxInstances)
focal_class.identifier: renderMaxInstances
focal_class.modifiers: public static
focal_class.parameters: (String maxInstances)
focal_class.return: String
focal_class.signature: String renderMaxInstances(String maxInstances)
focal_class.class_method_signature: Util.getLocalName(@SuppressWarnings("rawtypes") Class clazz)
focal_class.full_signature: private static String getLocalName(@SuppressWarnings("rawtypes") Class clazz)
focal_class.identifier: getLocalName
focal_class.modifiers: private static
focal_class.parameters: (@SuppressWarnings("rawtypes") Class clazz)
focal_class.return: String
focal_class.signature: String getLocalName(@SuppressWarnings("rawtypes") Class clazz)
focal_class.class_method_signature: Util.getJAXBElement(Class<T> clazz, T obj)
focal_class.full_signature: public static JAXBElement<T> getJAXBElement(Class<T> clazz, T obj)
focal_class.identifier: getJAXBElement
focal_class.modifiers: public static
focal_class.parameters: (Class<T> clazz, T obj)
focal_class.return: JAXBElement<T>
focal_class.signature: JAXBElement<T> getJAXBElement(Class<T> clazz, T obj)
focal_class.class_method_signature: Util.getXMLAsString(Class<T> clazz, T obj)
focal_class.full_signature: public static String getXMLAsString(Class<T> clazz, T obj)
focal_class.identifier: getXMLAsString
focal_class.modifiers: public static
focal_class.parameters: (Class<T> clazz, T obj)
focal_class.return: String
focal_class.signature: String getXMLAsString(Class<T> clazz, T obj)
focal_class.class_method_signature: Util.getXMLAsString(Element el)
focal_class.full_signature: public static String getXMLAsString(Element el)
focal_class.identifier: getXMLAsString
focal_class.modifiers: public static
focal_class.parameters: (Element el)
focal_class.return: String
focal_class.signature: String getXMLAsString(Element el)
focal_class.class_method_signature: Util.instanceSupportsNameAttribute(Class<? extends DefinitionsChildId> idClass)
focal_class.full_signature: public static boolean instanceSupportsNameAttribute(Class<? extends DefinitionsChildId> idClass)
focal_class.identifier: instanceSupportsNameAttribute
focal_class.modifiers: public static
focal_class.parameters: (Class<? extends DefinitionsChildId> idClass)
focal_class.return: boolean
focal_class.signature: boolean instanceSupportsNameAttribute(Class<? extends DefinitionsChildId> idClass)
focal_class.class_method_signature: Util.getLastURIPart(String loc)
focal_class.full_signature: public static String getLastURIPart(String loc)
focal_class.identifier: getLastURIPart
focal_class.modifiers: public static
focal_class.parameters: (String loc)
focal_class.return: String
focal_class.signature: String getLastURIPart(String loc)
focal_class.class_method_signature: Util.makeCSSName(String namespace, String localName)
focal_class.full_signature: public static String makeCSSName(String namespace, String localName)
focal_class.identifier: makeCSSName
focal_class.modifiers: public static
focal_class.parameters: (String namespace, String localName)
focal_class.return: String
focal_class.signature: String makeCSSName(String namespace, String localName)
focal_class.class_method_signature: Util.makeCSSName(QName qname)
focal_class.full_signature: public static String makeCSSName(QName qname)
focal_class.identifier: makeCSSName
focal_class.modifiers: public static
focal_class.parameters: (QName qname)
focal_class.return: String
focal_class.signature: String makeCSSName(QName qname)
focal_class.class_method_signature: Util.convertQNameListToNamespaceToLocalNameList(List<QName> list)
focal_class.full_signature: public static SortedMap<String, SortedSet<String>> convertQNameListToNamespaceToLocalNameList(List<QName> list)
focal_class.identifier: convertQNameListToNamespaceToLocalNameList
focal_class.modifiers: public static
focal_class.parameters: (List<QName> list)
focal_class.return: SortedMap<String, SortedSet<String>>
focal_class.signature: SortedMap<String, SortedSet<String>> convertQNameListToNamespaceToLocalNameList(List<QName> list)
focal_class.class_method_signature: Util.namespaceToJavaPackage(String namespace)
focal_class.full_signature: public static String namespaceToJavaPackage(String namespace)
focal_class.identifier: namespaceToJavaPackage
focal_class.modifiers: public static
focal_class.parameters: (String namespace)
focal_class.return: String
focal_class.signature: String namespaceToJavaPackage(String namespace)
focal_class.class_method_signature: Util.cleanName(String s)
focal_class.full_signature: private static String cleanName(String s)
focal_class.identifier: cleanName
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String cleanName(String s)
focal_class.class_method_signature: Util.makeNCName(String text)
focal_class.full_signature: public static String makeNCName(String text)
focal_class.identifier: makeNCName
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: String
focal_class.signature: String makeNCName(String text)
focal_class.class_method_signature: Util.addAsIs(StringBuilder sb, String s, String separator)
focal_class.full_signature: private static void addAsIs(StringBuilder sb, String s, String separator)
focal_class.identifier: addAsIs
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder sb, String s, String separator)
focal_class.return: void
focal_class.signature: void addAsIs(StringBuilder sb, String s, String separator)
focal_class.class_method_signature: Util.addReversed(StringBuilder sb, String s, String separator)
focal_class.full_signature: private static void addReversed(StringBuilder sb, String s, String separator)
focal_class.identifier: addReversed
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder sb, String s, String separator)
focal_class.return: void
focal_class.signature: void addReversed(StringBuilder sb, String s, String separator)
focal_class.class_method_signature: Util.determineAndCreateRepositoryPath()
focal_class.full_signature: public static Path determineAndCreateRepositoryPath()
focal_class.identifier: determineAndCreateRepositoryPath
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path determineAndCreateRepositoryPath()
focal_class.class_method_signature: Util.createDefaultRepositoryPath()
focal_class.full_signature: private static Path createDefaultRepositoryPath()
focal_class.identifier: createDefaultRepositoryPath
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path createDefaultRepositoryPath()
focal_class.class_method_signature: Util.createCsarOutputPath(String csarOutputPath)
focal_class.full_signature: public static void createCsarOutputPath(String csarOutputPath)
focal_class.identifier: createCsarOutputPath
focal_class.modifiers: public static
focal_class.parameters: (String csarOutputPath)
focal_class.return: void
focal_class.signature: void createCsarOutputPath(String csarOutputPath)
focal_method.body: public static String namespaceToJavaPackage(String namespace) {
          URI uri;
          try {
              uri = new URI(namespace);
          } catch (URISyntaxException e) {
              Util.LOGGER.debug(e.getMessage(), e);
              return "uri.invalid";
          }
          StringBuilder sb = new StringBuilder();
  
          String host = uri.getHost();
          if (host != null) {
              Util.addReversed(sb, host, "\\.");
          }
  
          String path = uri.getPath();
          if (!path.equals("")) {
              if (path.startsWith("/")) {
                  // remove first slash
                  path = path.substring(1);
              }
  
              // and then handle the string
              Util.addAsIs(sb, path, "/");
          }
  
          // remove the final dot
          sb.replace(sb.length() - 1, sb.length(), "");
  
          return Util.cleanName(sb.toString());
      }
focal_method.class_method_signature: Util.namespaceToJavaPackage(String namespace)
focal_method.full_signature: public static String namespaceToJavaPackage(String namespace)
focal_method.identifier: namespaceToJavaPackage
focal_method.invocations: debug getMessage getHost addReversed getPath equals startsWith substring addAsIs replace length length cleanName toString
focal_method.modifiers: public static
focal_method.parameters: (String namespace)
focal_method.return: String
focal_method.signature: String namespaceToJavaPackage(String namespace)