本文整理了Java中net.sf.saxon.Query.badUsage
方法的一些代码示例,展示了Query.badUsage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.badUsage
方法的具体详情如下:
包路径:net.sf.saxon.Query
类名称:Query
方法名:badUsage
[英]Report incorrect usage of the command line, with a list of the options and arguments that are available
[中]报告命令行的错误使用,并列出可用的选项和参数
代码示例来源:origin: net.sourceforge.saxon/saxon
badUsage(command, "-backup option must be -backup:on or -backup:off");
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No resolver after -cr");
} else if (option.equals("dtd")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-dtd option must be -dtd:on or -dtd:off");
} else if (option.equals("expand")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-expand option must be 'on' or 'off'");
} else if (option.equals("ext")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-ext option must be -ext:on or -ext:off");
} else if (option.equals("l")) {
if (!(value == null || "on".equals(value) || "off".equals(value))) {
badUsage(command, "-l option must be -l:on or -l:off");
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No resolver after -cr");
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No output file name after -o");
代码示例来源:origin: org.opengis.cite.saxon/saxon9
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No resolver after -cr");
} else if (option.equals("dtd")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-dtd option must be -dtd:on or -dtd:off");
} else if (option.equals("expand")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-expand option must be 'on' or 'off'");
} else if (option.equals("ext")) {
if (!("on".equals(value) || "off".equals(value))) {
badUsage(command, "-ext option must be -ext:on or -ext:off");
} else if (option.equals("l")) {
if (!(value == null || "on".equals(value) || "off".equals(value))) {
badUsage(command, "-l option must be -l:on or -l:off");
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No resolver after -cr");
if (value == null) {
if (args.length < i + 2) {
badUsage(command, "No output file name after -o");
if (schemaAware) {
代码示例来源:origin: net.sf.saxon/Saxon-HE
private void makeXQueryTraceListener(CommandLineOptions options) {
XQueryTraceListener listener = new XQueryTraceListener();
String value = options.getOptionValue("Tout");
if (value != null) {
try {
listener.setOutputDestination(new StandardLogger(new PrintStream(value)));
} catch (FileNotFoundException e) {
badUsage("Cannot write to " + value);
}
}
value = options.getOptionValue("Tlevel");
if (value != null) {
switch (value) {
case "none":
listener.setLevelOfDetail(0);
break;
case "low":
listener.setLevelOfDetail(1);
break;
case "normal":
listener.setLevelOfDetail(2);
break;
case "high":
listener.setLevelOfDetail(3);
break;
}
}
config.setTraceListener(listener);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
private void makeXQueryTraceListener(CommandLineOptions options) {
XQueryTraceListener listener = new XQueryTraceListener();
String value = options.getOptionValue("Tout");
if (value != null) {
try {
listener.setOutputDestination(new StandardLogger(new PrintStream(value)));
} catch (FileNotFoundException e) {
badUsage("Cannot write to " + value);
}
}
value = options.getOptionValue("Tlevel");
if (value != null) {
switch (value) {
case "none":
listener.setLevelOfDetail(0);
break;
case "low":
listener.setLevelOfDetail(1);
break;
case "normal":
listener.setLevelOfDetail(2);
break;
case "high":
listener.setLevelOfDetail(3);
break;
}
}
config.setTraceListener(listener);
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
closeTraceDestination = true;
} catch (FileNotFoundException e) {
badUsage("Trace output file " + value + " cannot be created");
new StandardLogger(new File(value)));
} catch (FileNotFoundException e) {
badUsage("Trace output file " + value + " cannot be created");
badUsage("");
badUsage("No query file name");
badUsage("Unrecognized option: " + positional.get(currentPositionalOption));
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
closeTraceDestination = true;
} catch (FileNotFoundException e) {
badUsage("Trace output file " + value + " cannot be created");
new StandardLogger(new File(value)));
} catch (FileNotFoundException e) {
badUsage("Trace output file " + value + " cannot be created");
badUsage("");
badUsage("No query file name");
badUsage("Unrecognized option: " + positional.get(currentPositionalOption));
代码示例来源:origin: org.opengis.cite.saxon/saxon9
Object mr = config.getInstance(moduleURIResolverClass, null);
if (!(mr instanceof ModuleURIResolver)) {
badUsage(command, moduleURIResolverClass + " is not a ModuleURIResolver");
代码示例来源:origin: net.sourceforge.saxon/saxon
Object mr = config.getInstance(moduleURIResolverClass, null);
if (!(mr instanceof ModuleURIResolver)) {
badUsage(command, moduleURIResolverClass + " is not a ModuleURIResolver");
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
Object mr = config.getInstance(moduleURIResolverClass, null);
if (!(mr instanceof ModuleURIResolver)) {
badUsage(moduleURIResolverClass + " is not a ModuleURIResolver");
代码示例来源:origin: net.sf.saxon/Saxon-HE
Object mr = config.getInstance(moduleURIResolverClass, null);
if (!(mr instanceof ModuleURIResolver)) {
badUsage(moduleURIResolverClass + " is not a ModuleURIResolver");
内容来源于网络,如有侵权,请联系作者删除!