当前位置: 首页>>代码示例>>Java>>正文


Java RiotException.getMessage方法代码示例

本文整理汇总了Java中org.apache.jena.riot.RiotException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java RiotException.getMessage方法的具体用法?Java RiotException.getMessage怎么用?Java RiotException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jena.riot.RiotException的用法示例。


在下文中一共展示了RiotException.getMessage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeTo

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
@Override
	public void writeTo(OutputStream out, Syntax syntax) throws IOException,
			ModelRuntimeException, SyntaxNotSupportedException {
		
		if (syntax == null) {
			throw new NullPointerException("syntax may not be null");
		}
		
		Lang jenaLang = getJenaLang(syntax);

//		if (RDFLanguages.isTriples(jenaLang)) {
//			/*
//			 * NB: Writing a ModelSet to a triple serialization loses the
//			 * context of any quads if present.
//			 */
//			Iterator<Model> it = this.getModels();
//			while (it.hasNext()) {
//				Model model = it.next();
//				model.writeTo(out, syntax);
//			}
//			this.getDefaultModel().writeTo(out, syntax);
//		}
// FIXME stuehmer: write unit test to see if this can be removed
//		else {
		try {
			RDFDataMgr.write(out, this.dataset, jenaLang);
		}
		catch (RiotException e) {
			throw new SyntaxNotSupportedException(
					"error writing syntax " + syntax + ": " + e.getMessage());
		}
	}
 
开发者ID:semweb4j,项目名称:semweb4j,代码行数:33,代码来源:ModelSetImplJena.java

示例2: parseInputString

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
private Model parseInputString(final String message) throws InvalidRequestException {
  Model requestModel; 
  try{
    requestModel = MessageUtil.parseSerializedModel(message, IMessageBus.SERIALIZATION_TURTLE);
  } catch(RiotException e){
    throw new InvalidRequestException("Input must be a turtle-serialized RDF model: "+e.getMessage());
  }
  return requestModel;
}
 
开发者ID:FITeagle,项目名称:adapters,代码行数:10,代码来源:AbstractAdapterWebsocket.java

示例3: getConfigurationModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the framework configuration file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getConfigurationModel() throws IOException {
  // Read configuration
  try {
    if (configurationModel == null) {
      configurationModel = ModelFactory.createDefaultModel();
      configurationModel.read(configurationFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + configurationFile + " file: " + e.getMessage());
  }
  return configurationModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:20,代码来源:FrameworkConfiguration.java

示例4: getDatasourceModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the dataset file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getDatasourceModel() throws IOException {
  try {
    if (datasourceModel == null) {
      datasourceModel = ModelFactory.createDefaultModel();
      datasourceModel.read(datasourcesFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + datasourcesFile + " file: " + e.getMessage());
  }
  return datasourceModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:19,代码来源:FrameworkConfiguration.java

示例5: getComponentsModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the components configuration file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getComponentsModel() throws IOException {

  try {
    if (componentsModel == null) {
      componentsModel = ModelFactory.createDefaultModel();
      componentsModel.read(componentsFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + componentsFile + " file: " + e.getMessage());
  }

  return componentsModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:21,代码来源:FrameworkConfiguration.java

示例6: getUsersModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the users configuration file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getUsersModel() throws IOException {
  try {
    if (usersModel == null) {
      usersModel = ModelFactory.createDefaultModel();
      usersModel.read(usersFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + usersFile + " file: " + e.getMessage());
  }
  return usersModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:19,代码来源:FrameworkConfiguration.java

示例7: getSystemGraphsModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the system graphs configuration file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getSystemGraphsModel() throws IOException {
  try {
    if (sysgraphsModel == null) {
      sysgraphsModel = ModelFactory.createDefaultModel();
      sysgraphsModel.read(sysgraphsFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + sysgraphsFile + " file: " + e.getMessage());
  }
  return sysgraphsModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:19,代码来源:FrameworkConfiguration.java

示例8: getRolesModel

import org.apache.jena.riot.RiotException; //导入方法依赖的package包/类
/**
 * Returns a Jena Model with the system graphs configuration file loaded
 * 
 * @return Model
 * @throws IOException in case the file cannot be loaded or a parsing error is presented
 */
public static Model getRolesModel() throws IOException {
  try {
    if (rolesModel == null) {
      rolesModel = ModelFactory.createDefaultModel();
      rolesModel.read(rolesFile);
    }
  } catch (RiotException e) {
    e.printStackTrace();
    throw new IOException("Couldn't read " + rolesFile + " file: " + e.getMessage());
  }
  return rolesModel;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:19,代码来源:FrameworkConfiguration.java


注:本文中的org.apache.jena.riot.RiotException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。