org.modeshape.jcr.RepositoryConfiguration.withoutExtension()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(88)

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

RepositoryConfiguration.withoutExtension介绍

暂无

代码示例

代码示例来源:origin: ModeShape/modeshape

/**
 * Resolve the supplied URL to a JSON document, read the contents, and parse into a {@link RepositoryConfiguration}.
 *
 * @param url the URL; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 */
public static RepositoryConfiguration read( URL url ) throws ParsingException {
  CheckArg.isNotNull(url, "url");
  Document doc = Json.read(url);
  return new RepositoryConfiguration(doc, withoutExtension(url.getFile()));
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Read the supplied JSON file and parse into a {@link RepositoryConfiguration}.
 *
 * @param file the file; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 * @throws FileNotFoundException if the file could not be found
 */
public static RepositoryConfiguration read( File file ) throws ParsingException, FileNotFoundException {
  CheckArg.isNotNull(file, "file");
  Document doc = Json.read(new FileInputStream(file));
  return new RepositoryConfiguration(doc, withoutExtension(file.getName()));
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Read the supplied JSON file and parse into a {@link RepositoryConfiguration}.
 *
 * @param file the file; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 * @throws FileNotFoundException if the file could not be found
 */
public static RepositoryConfiguration read( File file ) throws ParsingException, FileNotFoundException {
  CheckArg.isNotNull(file, "file");
  Document doc = Json.read(new FileInputStream(file));
  return new RepositoryConfiguration(doc, withoutExtension(file.getName()));
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Resolve the supplied URL to a JSON document, read the contents, and parse into a {@link RepositoryConfiguration}.
 *
 * @param url the URL; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 */
public static RepositoryConfiguration read( URL url ) throws ParsingException {
  CheckArg.isNotNull(url, "url");
  Document doc = Json.read(url);
  return new RepositoryConfiguration(doc, withoutExtension(url.getFile()));
}

代码示例来源:origin: ModeShape/modeshape

return new RepositoryConfiguration(doc, withoutExtension(resourcePathOrJsonContentString));

代码示例来源:origin: org.fcrepo/modeshape-jcr

return new RepositoryConfiguration(doc, withoutExtension(resourcePathOrJsonContentString));

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Read the supplied stream containing a JSON file, and parse into a {@link RepositoryConfiguration}.
 *
 * @param stream the file; may not be null
 * @param name the name of the resource; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 * @throws FileNotFoundException if the file could not be found
 */
public static RepositoryConfiguration read( InputStream stream,
                      String name ) throws ParsingException, FileNotFoundException {
  CheckArg.isNotNull(stream, "stream");
  CheckArg.isNotNull(name, "name");
  Document doc = Json.read(stream);
  return new RepositoryConfiguration(doc, withoutExtension(name));
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Read the supplied stream containing a JSON file, and parse into a {@link RepositoryConfiguration}.
 *
 * @param stream the file; may not be null
 * @param name the name of the resource; may not be null
 * @return the parsed repository configuration; never null
 * @throws ParsingException if the content could not be parsed as a valid JSON document
 * @throws FileNotFoundException if the file could not be found
 */
public static RepositoryConfiguration read( InputStream stream,
                      String name ) throws ParsingException, FileNotFoundException {
  CheckArg.isNotNull(stream, "stream");
  CheckArg.isNotNull(name, "name");
  Document doc = Json.read(stream);
  return new RepositoryConfiguration(doc, withoutExtension(name));
}

相关文章

微信公众号

最新文章

更多