- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.YardException
类的一些代码示例,展示了YardException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YardException
类的具体详情如下:
包路径:org.apache.stanbol.entityhub.servicesapi.yard.YardException
类名称:YardException
[英]Used to indicate an error while performing an operation on a yard
[中]用于指示在场地上执行操作时出现错误
代码示例来源: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
@Override
public QueryResultList<String> findReferences(FieldQuery query) throws ManagedSiteException {
try {
return getYard().findReferences(query);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), 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 QueryResultList<Representation> find(FieldQuery query) throws ManagedSiteException {
try {
return getYard().find(query);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), 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: apache/stanbol
@Override
public void delete(String id) throws ManagedSiteException {
try {
getYard().remove(id);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), 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: apache/stanbol
@Override
public void deleteAll() throws ManagedSiteException {
try {
getYard().removeAll();
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), e);
}
}
代码示例来源: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 if(e instanceof YardException){
throw (YardException)e;
代码示例来源:origin: apache/stanbol
/**
* Stores the parsed representation to the Yard and also applies the
* configured {@link #getFieldMapper() FieldMappings}.
* @param The representation to store
*/
@Override
public void store(Representation representation) throws ManagedSiteException {
try {
Yard yard = getYard();
fieldMapper.applyMappings(representation, representation, yard.getValueFactory());
yard.store(representation);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), 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
@Override
public Entity getEntity(String id) throws ManagedSiteException {
Representation rep;
try {
rep = getYard().getRepresentation(id);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), e);
}
if(rep != null){
Entity entity = new EntityImpl(config.getId(), rep, null);
SiteUtils.initEntityMetadata(entity, siteMetadata, null);
return entity;
} else {
return null;
}
}
代码示例来源: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
throw new ManagedSiteException(e.getMessage(), e);
代码示例来源: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
@Override
public QueryResultList<Entity> findEntities(FieldQuery query) throws ManagedSiteException {
QueryResultList<Representation> results;
try {
results = getYard().findRepresentation(query);
} catch (YardException e) {
throw new ManagedSiteException(e.getMessage(), e);
}
return new QueryResultListImpl<Entity>(results.getQuery(),
new AdaptingIterator<Representation,Entity>(
results.iterator(),
new AdaptingIterator.Adapter<Representation,Entity>() {
private final String siteId = config.getId();
@Override
public Entity adapt(Representation value, Class<Entity> type) {
Entity entity = new EntityImpl(siteId,value,null);
SiteUtils.initEntityMetadata(entity, siteMetadata, null);
return entity;
}
}, Entity.class),Entity.class);
}
代码示例来源:origin: apache/stanbol
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while deleting document " + id + " 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: org.apache.stanbol/org.apache.stanbol.entityhub.yard.solr
Exception e = pae.getException();
if(e instanceof SolrServerException){
throw new YardException("Error while deleting document " + id + " 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: 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 {
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);
我正在尝试使用 Apache Stanbol 提取短语。我期望结果如下。 content="我住在巴黎,想学习使用 java 进行自然语言处理。"提取的短语应该是, 巴黎 自然语言处理 Java 但它
按照以下说明进行操作: stanbol build and run stanbol instance 我们在执行的时候总是报如下错误: % mvn clean install [错误] 无法在项目 o
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.Yard类的一些代码示例,展示了Yard类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.YardException类的一些代码示例,展示了YardException类的具体用法
我是 Maven 的新手,我不知道如何将 Apache Stanbol 嵌入到我的 Maven 应用程序中。 我已将以下依赖项添加到我的 pom,是 pom,因为存储库中没有可用的 jar。 `
本文整理了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
本文整理了Java中org.apache.stanbol.entityhub.servicesapi.yard.YardException.()方法的一些代码示例,展示了YardException.(
我是一名优秀的程序员,十分优秀!