Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.URI.scheme()


  private static URI normalize(URI uri) {
    String fragment = uri.fragment();
    String query = uri.query();
    URI trimmedURI = uri.trimFragment().trimQuery();
    URI result = trimmedURI;
    String scheme = result.scheme();
    if (scheme == null) {
      if (result.hasAbsolutePath()) {
        result = URI.createURI("file:" + result);
      } else {
        result = URI.createFileURI(new File(result.toString())
View Full Code Here


      }
      else
      {
        String opaquePart = uri.opaquePart();
        int index = opaquePart.indexOf(":");
        if (index != -1 && "urn".equalsIgnoreCase(uri.scheme()))
        {
          parsedName = parseNameStatic(opaquePart.substring(0, index), '-');
          if (parsedName.size() > 0 && DOMAINS.contains(parsedName.get(parsedName.size() - 1)))
          {
            Collections.reverse(parsedName);
View Full Code Here

      }
      else
      {
        String opaquePart = uri.opaquePart();
        int index = opaquePart.indexOf(":");
        if (index != -1 && "urn".equalsIgnoreCase(uri.scheme()))
        {
          parsedName = parseNameStatic(opaquePart.substring(0, index), '-');
          if (parsedName.size() > 0 && DOMAINS.contains(parsedName.get(parsedName.size() - 1)))
          {
            Collections.reverse(parsedName);
View Full Code Here

  private static class FileUriResolver implements IFileUriResolver {
    @Override public void resolveAndUpdateUri(Import anImport) {
      String importUri = anImport.getImportURI();
      URI uri = URI.createURI(importUri);
      if (!isEmpty(uri.scheme()))
      {
        return; // already resolved.
      }
      File file = protoFile(importUri);
      if (!file.exists()) {
View Full Code Here

      }
      else
      {
        String opaquePart = uri.opaquePart();
        int index = opaquePart.indexOf(":");
        if (index != -1 && "urn".equalsIgnoreCase(uri.scheme()))
        {
          parsedName = parseNameStatic(opaquePart.substring(0, index), '-');
          if (parsedName.size() > 0 && DOMAINS.contains(parsedName.get(parsedName.size() - 1)))
          {
            Collections.reverse(parsedName);
View Full Code Here

      }
      else
      {
        String opaquePart = uri.opaquePart();
        int index = opaquePart.indexOf(":");
        if (index != -1 && "urn".equalsIgnoreCase(uri.scheme()))
        {
          parsedName = parseNameStatic(opaquePart.substring(0, index), '-');
          if (parsedName.size() > 0 && DOMAINS.contains(parsedName.get(parsedName.size() - 1)))
          {
            Collections.reverse(parsedName);
View Full Code Here

      String filePath = converted.toFileString();
      return createFileOutputStream(filePath);
    }
    else
    {
      String scheme = converted.scheme();
      if (isArchiveScheme(scheme))
      {
        return createArchiveOutputStream(converted)
      }
      else if (converted.isPlatformResource())
View Full Code Here

      String filePath = converted.toFileString();
      return createFileInputStream(filePath);
    }
    else
    {
      String scheme = converted.scheme();
      if (isArchiveScheme(scheme))
      {
        return createArchiveInputStream(converted);
      }
      else if (converted.isPlatformResource())
View Full Code Here

    String fragment = uri.fragment();
    URI result =
      fragment == null ?
        getInternalURIMap().getURI(uri) :
        getInternalURIMap().getURI(uri.trimFragment()).appendFragment(fragment);
    String scheme = result.scheme();
    if (scheme == null)
    {
      if (workspaceRoot != null)
      {
        if (result.hasAbsolutePath())
View Full Code Here

    }

    if (ePackage == null)
    {
      URI uri = URI.createURI(uriString);
      if (uri.scheme() == null)
      {
        // This only works for old globally registered things.
        for (Map.Entry<String, Object> entry : packageRegistry.entrySet())
        {
          String nsURI = entry.getKey();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.