- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.yadda.common.YaddaException.<init>()
方法的一些代码示例,展示了YaddaException.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YaddaException.<init>()
方法的具体详情如下:
包路径:pl.edu.icm.yadda.common.YaddaException
类名称:YaddaException
方法名:<init>
暂无
代码示例来源:origin: pl.edu.icm.yadda/yadda-common
/**
* Utility method which returns an array containing name/value pair created from single string.
* @param value
* @return
*/
public static String[] parseValue(String value) throws YaddaException {
int i = value.indexOf(SEPARATOR);
if (i<0) {
throw new YaddaException("Invalid stored name/value ["+value+"]");
} else {
String[] ret = new String[2];
// name
ret[0] = value.substring(0, i);
// value
ret[1] = value.substring(i+SEPARATOR_LENGTH);
return ret;
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-common
protected void writeProperties() throws YaddaException {
FileOutputStream out = null;
try {
out = new FileOutputStream(file);
properties.store(out, null);
out.close();
out = null;
} catch (Exception e) {
throw new YaddaException("Could not write properties file ["+file.getAbsolutePath()+"]", e);
} finally {
if (out!=null) {
try { out.close(); } catch (Exception e) {/*do nothing*/}
}
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-common
public void setPropertiesFile(File file) throws YaddaException {
this.file = file;
if (! file.exists()) {
File dir = file.getParentFile();
if (!dir.exists() && !dir.mkdirs()) {
throw new YaddaException("Could not create directory "+dir.getAbsolutePath());
}
}
readProperties();
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
@Override
protected T doProcess(T data, Map<String, Serializable> context, IProcessListener listener, ProcessingStats stats)
throws Exception {
//initializer.drop();
String indexName = (String)context.get(Constants.PARAM_INDEX_NAME);
if (indexName == null)
throw new YaddaException("Index name not provided to the process");
indexManagerFacade.optimize(indexName);
return data;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-tools
public RegexpReferenceParser(String resource) throws YaddaException {
try {
parser = new RegexpParser(resource, "citation");
} catch (AnalysisException e) {
throw new YaddaException(e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
public RegexpReferenceParser2(String resource) throws YaddaException {
try {
parser = new RegexpParser(resource, "citation");
} catch (AnalysisException e) {
throw new YaddaException(e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-common
protected void readProperties() throws YaddaException {
properties = new Properties();
if (! file.exists()) {
log.info("Properties file ["+file.getAbsolutePath()+"] does not exist");
} else {
InputStream in = null;
try {
in = new FileInputStream(file);
properties.load(in);
in.close();
in = null;
} catch (Exception e) {
throw new YaddaException("Could not load properties file ["+file.getAbsolutePath()+"]", e);
} finally {
if (in!=null) {
try { in.close(); } catch (Exception e) {/*do nothing*/}
}
}
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-services2
/**
* Encodes a cookie into string
* @param cookie cookie to encode
* @return encoded cookie
* @throws YaddaException when encoding failed (e.g. cookie is not
* serializable - shouldn't happen)
*/
public static String encode(Cookie cookie) throws YaddaException {
try {
ByteArrayOutputStream os = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(cookie);
oos.close();
return (new BASE64Encoder().encode(os.toByteArray()));
} catch (Exception e) {
throw new YaddaException("Error during cookie serialization", e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-services2
/**
* Decodes a cookie from the string
* @param stringCookie string with serialized cookie
* @return decoded cookie
* @throws YaddaException when serialized form is invalid
*/
public static Cookie decode(String stringCookie) throws YaddaException {
try {
InputStream is = new ByteArrayInputStream(new BASE64Decoder().decodeBuffer(stringCookie));
ObjectInputStream ois = new ObjectInputStream(is);
return (Cookie)ois.readObject();
} catch (Exception e) {
throw new YaddaException("Invalid cookie", e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-tools
public RegexpAuthorParser(String configurationResource) throws YaddaException {
try {
parser = new RegexpParser(configurationResource, "author");
surnameParser = new RegexpParser(configurationResource, "surname");
} catch (AnalysisException e) {
throw new YaddaException(e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
protected CountingIterator<CatalogObjectMeta> createPartstampIterator(
Date from, Date to, String[] types, String[] tags, String collection) throws YaddaException {
String[] myTags = tags;
if (collection != null) {
if (myTags == null) {
myTags = new String[] {CatalogParamConstants.TAG_COLLECTION_PREFIX+collection};
} else {
myTags=Utils.arrayMerge(tags,new String[] {TAG_COLLECTION_PREFIX+collection});
}
}
try {
return catalogFacade.iterateByPartStamps(types, from, to, tags);
} catch (CatalogException e) {
log2.error("Could not initialize DateRangeSourceIterator!",e);
throw new YaddaException("Error initializing DateRangeSourceIterator!",e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
protected CountingIterator<CatalogObjectMeta> createCatalogIterator(
Date from, Date to, String[] tags, String collection) throws YaddaException {
String[] myTags = tags;
if (collection != null) {
if (myTags == null) {
myTags = new String[] {CatalogParamConstants.TAG_COLLECTION_PREFIX+collection};
} else {
myTags=Utils.arrayMerge(tags,new String[] {TAG_COLLECTION_PREFIX+collection});
}
}
//String[] types=new String[] {TYPE_BWMETA1};
try {
return catalogFacade.iterateObjects(null, from, to, myTags, false);
} catch (CatalogException e) {
log2.error("Could not initialize DateRangeSourceIterator!",e);
throw new YaddaException("Error initializing DateRangeSourceIterator!",e);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
/**
* This method is left here becouse it signature was first
* @throws YaddaException
*/public void transfer() throws YaddaException{
logInit();
CountingIterator<CatalogObjectMeta> iterator = null;
try {
iterator = catalogFacade.iterateObjects(new String[]{}, null, null, null, false);
} catch (CatalogException e) {
throw new YaddaException("Cannot iterate objects", e);
}
log.debug("Iterator acquired");
Iterator<String> iter=new CatalogStringIterator(iterator, this, catalogFacade);
transfer(iter);
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
@Override
public void store(MixRecord data, ProcessContext ctx)
throws Exception {
String normalId = data.getDotId();
String extId = data.get10DigitId();
CatalogObject normalCO = catalogFacade.getObject(new YaddaObjectID("urn:zbl:"+normalId));
CatalogObject extCO = catalogFacade.getObject(new YaddaObjectID());
CountingIterator<CatalogObjectMeta> iterator = null;
try {
iterator = catalogFacade.iterateObjects(new String[]{}, null, null, null, false);
} catch (CatalogException e) {
throw new YaddaException("Cannot iterate objects", e);
}
System.out.println("Iterator acquired");
// Iterator<String> iter=new CatalogStringIterator(iterator, catalogFacade);
// transfer(iter);
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
@Override
public void store(MixRecord data, ProcessContext ctx)
throws Exception {
String normalId = data.getDotId();
String extId = data.get10DigitId();
fw.write("Przyjalem zbl: "+ data.getDotId()+" , ktore tlumaczy sie na zbl-ext: "+data.get10DigitId()+"\n");
CatalogObject normalCO = catalogFacade.getObject(new YaddaObjectID("urn:zbl:"+normalId));
CatalogObject extCO = catalogFacade.getObject(new YaddaObjectID());
CountingIterator<CatalogObjectMeta> iterator = null;
try {
iterator = catalogFacade.iterateObjects(new String[]{}, null, null, null, false);
} catch (CatalogException e) {
throw new YaddaException("Cannot iterate objects", e);
}
System.out.println("Iterator acquired");
// Iterator<String> iter=new CatalogStringIterator(iterator, catalogFacade);
// transfer(iter);
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
protected Ancestors get(final String key, final Map<String, Ancestors> ancestorsToWrite) throws YaddaException {
Ancestors result = ancestorsToWrite.get(key);
if (result != null) {
return result;
}
try {
result = (Ancestors) cache.getFromCache(key);
} catch (final NeedsRefreshException e) {
result = null;
try {
final CatalogObjectPart<String> part = catalogFacade.getPart(new YaddaObjectID(key),
CatalogParamConstants.TYPE_ELEMENT_ANCESTORS3, null);
if (part != null) {
result = (Ancestors) serializers.get(CatalogParamConstants.TYPE_ELEMENT_ANCESTORS3).toObject(key,
part.getData());
}
if (result == null) {
cache.cancelUpdate(key);
return null;
} else {
cache.putInCache(key, result);
return result;
}
} catch (final Exception ex) {
cache.cancelUpdate(key);
throw new YaddaException(ex);
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
doc = converter.convert(ce);
if (doc == null) {
throw new YaddaException("Catalog element " + ce.getExtId()
+ " could not be converted to CDocument");
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
protected Object[] readElement(final String extId) throws YaddaException {
try {
final CatalogObjectPart<String> part = catalogFacade.getPart(new YaddaObjectID(extId),
CatalogParamConstants.TYPE_BWMETA1, null);
final CatalogObjectPart<String> childrenPart = catalogFacade.getPart(new YaddaObjectID(extId),
CatalogParamConstants.TYPE_ELEMENT_CHILDREN3, null);
// final ElementTreeNode part = (ElementTreeNode) getPart();
// if (part != null && part instanceof ElementTreeNode) {
// for (final Set<ElementTreeNode> childrenOfHierarchy :
// part.getChildren().values()) {
// children.addAll(childrenOfHierarchy);
// }
// }
boolean hasChildren = false;
if (childrenPart != null && childrenPart.getData() != null) {
final ElementTreeNode childrenPartData = (ElementTreeNode) serializers.get(
CatalogParamConstants.TYPE_ELEMENT_CHILDREN3).toObject(extId, childrenPart.getData());
hasChildren = hasChildren(childrenPartData);
}
if (part != null) {
return new Object[] {
(Element) serializers.get(CatalogParamConstants.TYPE_BWMETA1).toObject(extId, part.getData()),
part.getTimestamp(), hasChildren };
} else {
return null;
}
} catch (final Exception ex) {
throw new YaddaException(ex);
}
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-process
throw new YaddaException("Element contents not found");
throw new YaddaException("Element contents not found");
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
if (conn != null)
try { conn.close(); } catch (RepositoryException ee) { }
throw new YaddaException("Cannot store items", e);
} catch (Exception e) {
if (conn != null)
try { conn.close(); } catch (RepositoryException ee) { }
e.printStackTrace();
throw new YaddaException("Cannot store items", e);
所以这个函数非常简单(对我来说不是那么简单!),它采用 HTML 表单,选择下拉选项后,它将选项值发送到 index.php 并根据响应获取响应它改变了页面的内容!但它不断返回“未定义”...我正在使
我正在使用 Yadda BDD JavaScript 库 ( https://github.com/acuminous/yadda)。 我想编写一个返回值的步骤定义。我怎样才能将值传递到下一步? li
我试图找到一些使用 Yadda 的案例(使用 Jasmine 或其他软件)和 Protractor但没有运气。有人有这方面的经验吗? 最佳答案 好吧,我正在回答我自己的问题。 第 1 步 - 定义 P
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError类的一些代码示例,展示了YaddaError类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中pl.edu.icm.yadda.common.YaddaException类的一些代码示例,展示了YaddaException类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中pl.edu.icm.yadda.export.output.ZipOutput类的一些代码示例,展示了ZipOutput类的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中pl.edu.icm.yadda.aas.utils.YaddaAASConfigurator类的一些代码示例,展示了YaddaAASConfigurator类的具体用法。这些代码
本文整理了Java中pl.edu.icm.yadda.model.source.YModelSource类的一些代码示例,展示了YModelSource类的具体用法。这些代码示例主要来源于Github
我是 JavaScript 新手,最近开始使用 Protractor 和 Yadda 编写自动化测试,以便可以使用 Gherkin。但是我刚刚发现步骤定义似乎不可重用,即如果我运行该功能 testMy
本文整理了Java中pl.edu.icm.yadda.service2.YaddaObjectID.equals()方法的一些代码示例,展示了YaddaObjectID.equals()的具体用法。这
本文整理了Java中pl.edu.icm.yadda.service2.YaddaObjectID.getId()方法的一些代码示例,展示了YaddaObjectID.getId()的具体用法。这些代
本文整理了Java中pl.edu.icm.yadda.service2.YaddaObjectID.()方法的一些代码示例,展示了YaddaObjectID.()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError.getMssg()方法的一些代码示例,展示了YaddaError.getMssg()的具体用法。这些代码示
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError.getException()方法的一些代码示例,展示了YaddaError.getException()的
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError.getCode()方法的一些代码示例,展示了YaddaError.getCode()的具体用法。这些代码示
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError.()方法的一些代码示例,展示了YaddaError.()的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中pl.edu.icm.yadda.common.YaddaException.()方法的一些代码示例,展示了YaddaException.()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中pl.edu.icm.yadda.common.YaddaException.toString()方法的一些代码示例,展示了YaddaException.toString()的具体
本文整理了Java中pl.edu.icm.yadda.export.output.ZipOutput.()方法的一些代码示例,展示了ZipOutput.()的具体用法。这些代码示例主要来源于Githu
本文整理了Java中pl.edu.icm.yadda.model.source.YModelSource.getElementById()方法的一些代码示例,展示了YModelSource.getEl
我是一名优秀的程序员,十分优秀!