Package org.eclipse.emf.common.util

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


      URL manifestURL = null;
 
      // For an archive URI, check for the path in the archive.
      //
      if (URI.isArchiveScheme(uri.scheme()))
      {
        try
        {
          // If we can open  an input stream, then the path is there, and we have a good URL.
          //
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

          _uRI=_eResource.getURI();
        }
        final URI uri = _uRI;
        boolean _matched_1 = false;
        if (!_matched_1) {
          String _scheme = uri.scheme();
          boolean _equals = Objects.equal(_scheme, "java");
          if (_equals) {
            _matched_1=true;
            String _qualifiedName_1 = ie.getQualifiedName();
            String _replaceAll = _qualifiedName_1.replaceAll("\\.", "/");
View Full Code Here

      URI uri = uriConverter.normalize(URI.createURI(name));

      // set Authority to host and port of the service
      final java.net.URI location = anIServiceInfo.getLocation();
      final String authority = location.getAuthority();
      uri = URI.createHierarchicalURI(uri.scheme(), authority,
          uri.device(), uri.segments(), location.getQuery(),
          location.getFragment());

      return uri;
    }
View Full Code Here

  public void test_PptpResourceAsFile() {
    try {
      URI uri = PptpResourceUtil.getFacter_1_6();
      assertNotNull("Facter pptp URI is null", uri);
      URL url = new URL(uri.toString());
      if("jar".equals(uri.scheme()))
        readXMLFromJarURL(url);
      else
        assertNotNull("Facter pptp file is null", get(BundleAccess.class).getResourceAsFile(url));

      uri = PuppetTarget.PUPPET27.getPlatformURI();
View Full Code Here

        assertNotNull("Facter pptp file is null", get(BundleAccess.class).getResourceAsFile(url));

      uri = PuppetTarget.PUPPET27.getPlatformURI();
      assertNotNull("Puppet pptp URI is null", uri);
      url = new URL(uri.toString());
      if("jar".equals(uri.scheme()))
        readXMLFromJarURL(url);
      else
        assertNotNull("Puppet pptp file is null", get(BundleAccess.class).getResourceAsFile(url));
    }
    catch(IOException e) {
View Full Code Here

  Font fontFromObject(Object object) {

    if (object instanceof URI) {
      URI fontURI = (URI) object;
      if (!"font".equals(fontURI.scheme()))
        throw new IllegalArgumentException("Only 'font' scheme is recognized" + fontURI);

      if (fontURI.segmentCount() != 2)
        throw new IllegalArgumentException("The URI must have an authority and two segments");
View Full Code Here

  URI toColorURI(Object object) {
    if (object instanceof URI) {
      URI colorURI = (URI) object;

      if (!"color".equals(colorURI.scheme()))
        throw new IllegalArgumentException("Only 'color' scheme is recognized " + colorURI);

      if (!"rgb".equals(colorURI.authority()))
        throw new IllegalArgumentException("Only 'rgb' authority is recognized " + colorURI);
View Full Code Here

  @Override
  public InputStream generate(DynamicFile file, Map<String, Object> data) {
    URI uri = URI.createURI(file.getExecutionURI());
   
    if( "bundleclass".equals(uri.scheme()) ) {
      Bundle b = Platform.getBundle(uri.host());
      try {
        Class<?> cl = b.loadClass(uri.segment(0));
        Generator<DynamicFile> g = (Generator<DynamicFile>) cl.newInstance();
        return g.generate(file, data);
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

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.