本文整理汇总了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());
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}