org.eclipse.emf.common.util.URI.hasAuthority()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.eclipse.emf.common.util.URI.hasAuthority()方法的一些代码示例,展示了URI.hasAuthority()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.hasAuthority()方法的具体详情如下:
包路径:org.eclipse.emf.common.util.URI
类名称:URI
方法名:hasAuthority

URI.hasAuthority介绍

[英]Returns true if this is a hierarchical URI with an authority component; false otherwise.
[中]如果这是带有权限组件的分层URI,则返回truefalse否则。

代码示例

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

@Override
public boolean hasAuthority()
{
 return uri.hasAuthority();
}

代码示例来源:origin: atlanmod/NeoEMF

@Override
public boolean hasAuthority() {
  return base.hasAuthority();
}

代码示例来源:origin: fr.inria.atlanmod.neoemf/neoemf-core

@Override
public boolean hasAuthority() {
  return internalUri.hasAuthority();
}

代码示例来源:origin: com.b2international.snowowl/org.eclipse.emf.cdo

public static String extractRepositoryUUID(URI uri)
{
 try
 {
  if (!uri.hasAuthority())
  {
   throw new InvalidURIException(uri);
  }
  return uri.authority();
 }
 catch (InvalidURIException ex)
 {
  return null;
 }
}

代码示例来源:origin: org.eclipse.emf/cdo

public static String extractRepositoryUUID(URI uri)
{
 try
 {
  if (!uri.hasAuthority())
  {
   throw new InvalidURIException(uri);
  }
  return uri.authority();
 }
 catch (InvalidURIException ex)
 {
  return null;
 }
}

代码示例来源:origin: atlanmod/NeoEMF

@Override
public void load(ImmutableConfig config) throws IOException {
  if (isLoading || isLoaded) {
    return;
  }
  try {
    isLoading = true;
    if (uri.isFile() && new File(uri.toFileString()).exists() || uri.hasAuthority()) {
      eSetStore(createStore(config));
    }
    else {
      throw new FileNotFoundException(uri.toFileString());
    }
  }
  finally {
    isLoading = false;
    logState("loaded");
    Optional.ofNullable(setLoaded(true)).ifPresent(this::eNotify);
    setModified(false);
  }
}

相关文章