- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.YardException.<init>()
方法的一些代码示例,展示了YardException.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YardException.<init>()
方法的具体详情如下:
包路径:org.apache.stanbol.entityhub.servicesapi.yard.YardException
类名称:YardException
方法名:<init>
[英]Creates an exception with a message and a cause
[中]创建带有消息和原因的异常
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
/**
* This will case the SolrIndex to be optimised
* @throws YardException on any error while optimising
*/
public final void optimize() throws YardException {
if(closed){
throw new IllegalStateException("The SolrYard is already closed!");
}
try {
server.optimize();
} catch (SolrServerException e) {
throw new YardException("Unable to optimise SolrIndex!", e);
} catch (IOException e) {
throw new YardException("Unable to optimise SolrIndex!", e);
}
}
/**
代码示例来源:origin: apache/stanbol
/**
* This will case the SolrIndex to be optimised
* @throws YardException on any error while optimising
*/
public final void optimize() throws YardException {
if(closed){
throw new IllegalStateException("The SolrYard is already closed!");
}
try {
server.optimize();
} catch (SolrServerException e) {
throw new YardException("Unable to optimise SolrIndex!", e);
} catch (IOException e) {
throw new YardException("Unable to optimise SolrIndex!", e);
}
}
/**
代码示例来源:origin: apache/stanbol
@Override
public final boolean isRepresentation(String id) throws YardException {
if (id == null) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be NULL!");
}
if (id.isEmpty()) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be empty!");
}
try {
return getSolrDocument(id, Arrays.asList(fieldMapper.getDocumentIdField())) != null;
} catch (SolrServerException e) {
throw new YardException("Error while performing getDocumentByID request for id " + id, e);
} catch (IOException e) {
throw new YardException("Unable to access SolrServer", e);
}
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
@Override
public final boolean isRepresentation(String id) throws YardException {
if (id == null) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be NULL!");
}
if (id.isEmpty()) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be empty!");
}
try {
return getSolrDocument(id, Arrays.asList(fieldMapper.getDocumentIdField())) != null;
} catch (SolrServerException e) {
throw new YardException("Error while performing getDocumentByID request for id " + id, e);
} catch (IOException e) {
throw new YardException("Unable to access SolrServer", e);
}
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while deleting documents from the Solr server", e);
} else if(e instanceof IOException){
throw new YardException("Unable to access SolrServer",e);
} else if(e instanceof YardException){
throw (YardException)e;
代码示例来源:origin: apache/stanbol
/**
* @return
* @throws YardException
*/
private Lock writeLockGraph() throws YardException {
if (immutable) {
throw new YardException("Unable modify data in ClerezzaYard '"+getId()
+ "' because the backing RDF graph '"+yardGraphUri
+ "' is read-only!");
}
final Lock writeLock;
writeLock = graph.getLock().writeLock();
writeLock.lock();
return writeLock;
}
@Override
代码示例来源:origin: apache/stanbol
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while deleting documents from the Solr server", e);
} else if(e instanceof IOException){
throw new YardException("Unable to access SolrServer",e);
} else {
throw RuntimeException.class.cast(e);
代码示例来源:origin: apache/stanbol
doc = getSolrDocument(id);
} catch (SolrServerException e) {
throw new YardException("Error while getting SolrDocument for id" + id, e);
} catch (IOException e) {
throw new YardException("Unable to access SolrServer", e);
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
doc = getSolrDocument(id);
} catch (SolrServerException e) {
throw new YardException("Error while getting SolrDocument for id" + id, e);
} catch (IOException e) {
throw new YardException("Unable to access SolrServer", e);
代码示例来源:origin: apache/stanbol
/**
* Returns the SPARQL result set for a given {@link SparqlFieldQuery} that
* was executed on this yard
* @param query the SparqlFieldQuery instance
* @return the results of the SPARQL query in the yard
* @throws YardException in case the generated SPARQL query could not be parsed
* or the generated Query is not an SPARQL SELECT query.
*/
private ResultSet executeSparqlFieldQuery(final SparqlFieldQuery query) throws YardException {
int limit = QueryUtils.getLimit(query, getConfig().getDefaultQueryResultNumber(), getConfig().getMaxQueryResultNumber());
SelectQuery sparqlQuery;
String sparqlQueryString = SparqlQueryUtils.createSparqlSelectQuery(query, false,limit,EndpointTypeEnum.Standard);
try {
sparqlQuery = (SelectQuery)QueryParser.getInstance().parse(sparqlQueryString);
} catch (ParseException e) {
log.error("ParseException for SPARQL Query in findRepresentation");
log.error("FieldQuery: "+query);
log.error("SPARQL Query: "+sparqlQueryString);
throw new YardException("Unable to parse SPARQL query generated for the parse FieldQuery",e);
} catch (ClassCastException e){
log.error("ClassCastExeption because parsed SPARQL Query is not of Type "+SelectQuery.class);
log.error("FieldQuery: "+query);
log.error("SPARQL Query: "+sparqlQueryString);
throw new YardException("Unable to parse SPARQL SELECT query generated for the parse FieldQuery",e);
}
return tcManager.executeSparqlQuery(sparqlQuery, graph);
}
@Override
代码示例来源:origin: apache/stanbol
@Override
public Representation getRepresentation(String id) throws YardException{
if(id == null){
throw new IllegalArgumentException("The parsed representation id MUST NOT be NULL!");
}
if(id.isEmpty()){
throw new IllegalArgumentException("The parsed representation id MUST NOT be EMTPY!");
}
RepositoryConnection con = null;
try {
con = repository.getConnection();
con.begin();
Representation rep = getRepresentation(con, sesameFactory.createURI(id), true);
con.commit();
return rep;
} catch (RepositoryException e) {
throw new YardException("Unable to get Representation "+id, e);
} finally {
if(con != null){
try {
con.close();
} catch (RepositoryException ignore) {}
}
}
}
/**
代码示例来源:origin: apache/stanbol
@Override
public boolean isRepresentation(String id) throws YardException {
if(id == null) {
throw new IllegalArgumentException("The parsed id MUST NOT be NULL!");
}
if(id.isEmpty()){
throw new IllegalArgumentException("The parsed id MUST NOT be EMPTY!");
}
RepositoryConnection con = null;
try {
con = repository.getConnection();
con.begin();
boolean state = isRepresentation(con, sesameFactory.createURI(id));
con.commit();
return state;
} catch (RepositoryException e) {
throw new YardException("Unable to check for Representation "+id, e);
} finally {
if(con != null){
try {
con.close();
} catch (RepositoryException ignore) {}
}
}
}
/**
代码示例来源:origin: apache/stanbol
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while performing query on the SolrServer (query: "
+ query.getQuery()+")!", e);
} else if(e instanceof IOException){
throw new YardException("Unable to access SolrServer",e);
} else {
throw RuntimeException.class.cast(e);
代码示例来源:origin: apache/stanbol
log.error("FieldQuery: "+query);
log.error("SPARQL Query: "+sparqlQueryString);
throw new YardException("Unable to parse SPARQL query generated for the parse FieldQuery",e);
log.error("FieldQuery: "+query);
log.error("SPARQL Query: "+sparqlQueryString);
throw new YardException("Unable to process results of Query");
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while performing query on the SolrServer (query: "
+ query.getQuery()+")!", e);
} else if(e instanceof IOException){
throw new YardException("Unable to access SolrServer",e);
} else {
throw RuntimeException.class.cast(e);
代码示例来源:origin: apache/stanbol
return added;
} catch (RepositoryException e) {
throw new YardException("Unable to remove parsed Representations", e);
} catch (IllegalArgumentException e) {
try {
代码示例来源:origin: apache/stanbol
@Override
public void remove(String id) throws YardException, IllegalArgumentException {
if(id == null) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be NULL!");
}
RepositoryConnection con = null;
try {
con = repository.getConnection();
con.begin();
remove(con, sesameFactory.createURI(id));
con.commit();
} catch (RepositoryException e) {
throw new YardException("Unable to remove for Representation "+id, e);
} finally {
if(con != null){
try {
con.close();
} catch (RepositoryException ignore) {}
}
}
}
/**
代码示例来源:origin: apache/stanbol
@Override
public final void remove(Iterable<String> ids) throws IllegalArgumentException, YardException {
if(ids == null){
throw new IllegalArgumentException("The parsed Iterable over the IDs to remove MUST NOT be NULL!");
}
RepositoryConnection con = null;
try {
con = repository.getConnection();
con.begin();
for(String id : ids){
if(id != null){
remove(con, sesameFactory.createURI(id));
}
}
con.commit();
} catch (RepositoryException e) {
throw new YardException("Unable to remove parsed Representations", e);
} finally {
if(con != null){
try {
con.close();
} catch (RepositoryException ignore) {}
}
}
}
@Override
代码示例来源:origin: apache/stanbol
@Override
public final void removeAll() throws YardException {
RepositoryConnection con = null;
try {
con = repository.getConnection();
con.begin();
con.clear(contexts); //removes everything
con.commit();
} catch (RepositoryException e) {
throw new YardException("Unable to remove parsed Representations", e);
} finally {
if(con != null){
try {
con.close();
} catch (RepositoryException ignore) {}
}
}
}
@Override
代码示例来源:origin: apache/stanbol
return added;
} catch (RepositoryException e) {
throw new YardException("Unable to remove parsed Representations", e);
} catch (IllegalArgumentException e) {
try {
我正在运行“yard server -g”,但它只为 axlsx 生成目录。 当我点击一个类(class)时,我得到: undefined method `new' for nil:NilClass.
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.remove()方法的一些代码示例,展示了Yard.remove()的具体用法
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.getName()方法的一些代码示例,展示了Yard.getName()的具体
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.update()方法的一些代码示例,展示了Yard.update()的具体用法
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.getQueryFactory()方法的一些代码示例,展示了Yard.getQ
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.find()方法的一些代码示例,展示了Yard.find()的具体用法。这些代
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.findRepresentation()方法的一些代码示例,展示了Yard.f
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.create()方法的一些代码示例,展示了Yard.create()的具体用法
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.getId()方法的一些代码示例,展示了Yard.getId()的具体用法。这
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.findReferences()方法的一些代码示例,展示了Yard.findR
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.isRepresentation()方法的一些代码示例,展示了Yard.isR
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.removeAll()方法的一些代码示例,展示了Yard.removeAll(
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.getRepresentation()方法的一些代码示例,展示了Yard.ge
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard.getValueFactory()方法的一些代码示例,展示了Yard.getV
我正在开发一个 Ruby 编程教程,我想用 Yard 记录它。 .默认情况下,Yard 将模块/类中的所有方法按字母顺序排列。但是,由于教程中每个模块中的方法都是相互构建的,因此我希望按照我编写它们的
我想使用 Yard 从我的自述文件链接到另一个额外的文件。 例如,我有以下几行: ...关于如何贡献的详细说明 [此处](contributing.md) 我希望这个链接到我的文件 contribut
我使用 YARD 为 ruby 项目生成文档。该项目包含一个 README.md 文件,如下所示: # MyTool Welcome to your new gem! ... ##
是否有约定表明 YARD 样式文档中的参数仅用于其“真实性”状态,即您只想知道它是 false 还是 nil 还是真实的? 下面通常用什么代替 Truthy? # @param [String] na
我有一个看起来像这样的方法: def get_endpoint(params: {}) end 我希望这个方法的调用者能够传入一些可选参数。 我想编写 YARD 文档来支持这一点,如果我不使用关键字参
我想在 yard-genereted 文档中包含图像,但无法在任何地方找到如何执行此操作...有人知道如何执行此操作吗? 最佳答案 您可以只添加 标记到您的文档: # Blah-blah # #
我是一名优秀的程序员,十分优秀!