- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.<init>()
方法的一些代码示例,展示了XTMTopicMapReader.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XTMTopicMapReader.<init>()
方法的具体详情如下:
包路径:net.ontopia.topicmaps.xml.XTMTopicMapReader
类名称:XTMTopicMapReader
方法名:<init>
[英]PUBLIC: Creates a topic map reader bound to the file given in the arguments.
[中]PUBLIC:创建绑定到参数中给定文件的主题图读取器。
代码示例来源:origin: ontopia/ontopia
@Override
protected TopicMapReaderIF getFragmentReader(InputStream stream, LocatorIF base_address) {
return new XTMTopicMapReader(stream, base_address);
}
代码示例来源:origin: ontopia/ontopia
private void loadXTM(String request, String params, boolean compress,
TopicMapIF topicmap)
throws IOException {
InputSource src = getInputSource(request, params, compress);
String baseuri = viewBaseuri == null ? editBaseuri : viewBaseuri;
LocatorIF base = new URILocator(baseuri + request);
XTMTopicMapReader reader = new XTMTopicMapReader(src, base);
reader.setExternalReferenceHandler(new NullResolvingExternalReferenceHandler());
reader.setValidation(false); // means we don't need Jing
reader.importInto(topicmap);
}
代码示例来源:origin: ontopia/ontopia
@Override
protected void setUp() {
if (tm == null) {
try {
TopicMapReaderIF reader =
new XTMTopicMapReader(TestFileUtils.getTestInputURL(testdataDirectory, "package-test.xtm"));
tm = reader.read();
base = tm.getStore().getBaseAddress();
}
catch (java.io.IOException e) {
throw new RuntimeException("IMPOSSIBLE ERROR! " + e.getMessage());
}
}
}
代码示例来源:origin: ontopia/ontopia
protected TopicMapIF readTopicMap(String dir, String filename)
throws IOException {
filename = TestFileUtils.getTestInputFile(dir, filename);
return new XTMTopicMapReader(TestFileUtils.getTestInputURL(filename)).read();
}
代码示例来源:origin: ontopia/ontopia
private void reload(boolean validate) throws IOException {
export();
XTMTopicMapReader reader = new XTMTopicMapReader(tmfile);
reader.setValidation(validate);
topicmap = reader.read();
}
代码示例来源:origin: net.ontopia/ontopia-tmrap
private void loadXTM(String request, String params, boolean compress,
TopicMapIF topicmap)
throws IOException {
InputSource src = getInputSource(request, params, compress);
String baseuri = viewBaseuri == null ? editBaseuri : viewBaseuri;
LocatorIF base = new URILocator(baseuri + request);
XTMTopicMapReader reader = new XTMTopicMapReader(src, base);
reader.setExternalReferenceHandler(new NullResolvingExternalReferenceHandler());
reader.setXMLReaderFactory(xmlReaderFactory);
reader.setValidation(false); // means we don't need Jing
reader.importInto(topicmap);
}
代码示例来源:origin: ontopia/ontopia
protected TopicMapIF readTopicMap(String dir, String subdir, String filename)
throws IOException {
filename = TestFileUtils.getTestInputFile(dir, subdir, filename);
return new XTMTopicMapReader(TestFileUtils.getTestInputURL(filename)).read();
}
代码示例来源:origin: ontopia/ontopia
private TopicMapIF load(String dir, String file) throws IOException {
return new XTMTopicMapReader(TestFileUtils.getTestInputURL(TestFileUtils.getTestInputFile(dir, file))).read();
}
}
代码示例来源:origin: ontopia/ontopia
@Override
protected void setUp() {
XTMTopicMapReader reader = null;
try {
reader = new XTMTopicMapReader(TestFileUtils.getTestInputURL("various", "stats.xtm"));
tm = reader.read();
} catch (IOException e) {
fail("Error reading file\n" + e);
}
}
代码示例来源:origin: ontopia/ontopia
@Test
public void testReadFromInputSource() throws IOException {
TestFileUtils.transferTestInputDirectory("various");
File file = TestFileUtils.getTransferredTestInputFile("various", "jill.xtm");
TopicMapIF tm = new XTMTopicMapReader(new InputSource(new FileReader(file)), new URILocator(file)).read();
Assert.assertNotNull(tm);
Assert.assertEquals(39, tm.getTopics().size());
}
代码示例来源:origin: ontopia/ontopia
@Test
public void testReadFromReader() throws IOException {
TestFileUtils.transferTestInputDirectory("various");
File file = TestFileUtils.getTransferredTestInputFile("various", "jill.xtm");
TopicMapIF tm = new XTMTopicMapReader(new FileReader(file), new URILocator(file)).read();
Assert.assertNotNull(tm);
Assert.assertEquals(39, tm.getTopics().size());
}
代码示例来源:origin: ontopia/ontopia
protected Collection readTopicMaps(String filename) throws IOException {
filename = TestFileUtils.getTestInputFile(testdataDirectory, "in", filename);
XTMTopicMapReader reader = new XTMTopicMapReader(TestFileUtils.getTestInputURL(filename));
reader.setValidation(false);
return reader.readAll();
}
代码示例来源:origin: ontopia/ontopia
@Test
public void testReadFromInputStream() throws IOException {
TestFileUtils.transferTestInputDirectory("various");
File file = TestFileUtils.getTransferredTestInputFile("various", "jill.xtm");
TopicMapIF tm = new XTMTopicMapReader(new FileInputStream(file), new URILocator(file)).read();
Assert.assertNotNull(tm);
Assert.assertEquals(39, tm.getTopics().size());
}
代码示例来源:origin: ontopia/ontopia
@Test
public void testReadFromURL() throws IOException {
TopicMapIF tm = new XTMTopicMapReader(TestFileUtils.getTestInputURL("various", "jill.xtm")).read();
Assert.assertNotNull(tm);
Assert.assertEquals(39, tm.getTopics().size());
}
代码示例来源:origin: ontopia/ontopia
@Test
public void testReadFromFile() throws IOException {
TestFileUtils.transferTestInputDirectory("various");
TopicMapIF tm = new XTMTopicMapReader(TestFileUtils.getTransferredTestInputFile("various", "jill.xtm")).read();
Assert.assertNotNull(tm);
Assert.assertEquals(39, tm.getTopics().size());
}
代码示例来源:origin: ontopia/ontopia
protected CountingRefHandler readTestFile(String fileName) {
CountingRefHandler extRefHandler = new CountingRefHandler();
try {
String testfile = TestFileUtils.getTestInputFile(testdataDirectory, fileName);
XTMTopicMapReader reader = new XTMTopicMapReader(TestFileUtils.getTestInputURL(testfile));
reader.setExternalReferenceHandler(extRefHandler);
reader.read();
} catch (MalformedURLException ex) {
Assert.fail("MalformedURLException initialising base address of test file.");
} catch (IOException ex) {
Assert.fail("IOException parsing test file." + ex.toString());
}
return extRefHandler;
}
代码示例来源:origin: ontopia/ontopia
protected TopicMapIF readTopicMap(String filename) throws IOException {
filename = TestFileUtils.getTestInputFile(testdataDirectory, "in", filename);
XTMTopicMapReader reader = new XTMTopicMapReader(TestFileUtils.getTestInputURL(filename));
reader.setValidation(false);
TopicMapIF tm = reader.read();
Assert.assertTrue(
"attempting to read second (non-existent) topic map did not give null",
reader.read() == null);
return tm;
}
代码示例来源:origin: ontopia/ontopia
@Override
protected void canonicalize(URL infile, File outfile)
throws IOException {
TopicMapStoreFactoryIF sfactory = getStoreFactory();
XTMTopicMapReader reader = new XTMTopicMapReader(infile);
reader.setValidation(false);
// FIXME: should we do a setXTM2Required(true) or something?
reader.setStoreFactory(sfactory);
TopicMapIF source = reader.read();
CanonicalXTMWriter cwriter = new CanonicalXTMWriter(outfile);
cwriter.write(source);
source.getStore().close();
}
代码示例来源:origin: ontopia/ontopia
@Override
protected void canonicalize(URL infile, File outfile)
throws IOException {
TopicMapStoreFactoryIF sfactory = getStoreFactory();
XTMTopicMapReader reader = new XTMTopicMapReader(infile);
reader.setValidation(false);
// FIXME: should we do a setXTM2Required(true) or something?
reader.setStoreFactory(sfactory);
TopicMapIF source = reader.read();
CanonicalXTMWriter cwriter = new CanonicalXTMWriter(outfile);
cwriter.write(source);
source.getStore().close();
}
代码示例来源:origin: ontopia/ontopia
@Override
protected void canonicalize(URL infile, File outfile) throws IOException {
TopicMapStoreFactoryIF sfactory = getStoreFactory();
XTMTopicMapReader reader = new XTMTopicMapReader(infile);
reader.setValidation(false);
reader.setStoreFactory(sfactory);
TopicMapIF source = reader.read();
CanonicalTopicMapWriter cwriter = new CanonicalTopicMapWriter(outfile);
cwriter.setBaseLocator(new URILocator(infile));
cwriter.write(source);
source.getStore().close();
}
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader类的一些代码示例,展示了XTMTopicMapReader类的具体用法。这些代码示例主要来源于
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter类的一些代码示例,展示了XTMTopicMapWriter类的具体用法。这些代码示例主要来源于
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.setFollowTopicRefs()方法的一些代码示例,展示了XTMTopicMapRe
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.read()方法的一些代码示例,展示了XTMTopicMapReader.read()的具体
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.()方法的一些代码示例,展示了XTMTopicMapReader.()的具体用法。这些代码示
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.importInto()方法的一些代码示例,展示了XTMTopicMapReader.imp
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.readAll()方法的一些代码示例,展示了XTMTopicMapReader.readAl
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapReader.setExternalReferenceHandler()方法的一些代码示例,展示了XTMT
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.setFilter()方法的一些代码示例,展示了XTMTopicMapWriter.setF
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.()方法的一些代码示例,展示了XTMTopicMapWriter.()的具体用法。这些代码示
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.write()方法的一些代码示例,展示了XTMTopicMapWriter.write()的
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.setAddIds()方法的一些代码示例,展示了XTMTopicMapWriter.setA
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.setVersion()方法的一些代码示例,展示了XTMTopicMapWriter.set
本文整理了Java中net.ontopia.topicmaps.xml.XTMTopicMapWriter.setExportSourceLocators()方法的一些代码示例,展示了XTMTopic
我是一名优秀的程序员,十分优秀!