本文整理汇总了Java中org.relaxng.datatype.DatatypeLibrary.createDatatypeBuilder方法的典型用法代码示例。如果您正苦于以下问题:Java DatatypeLibrary.createDatatypeBuilder方法的具体用法?Java DatatypeLibrary.createDatatypeBuilder怎么用?Java DatatypeLibrary.createDatatypeBuilder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.relaxng.datatype.DatatypeLibrary
的用法示例。
在下文中一共展示了DatatypeLibrary.createDatatypeBuilder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeDataPatternBuilder
import org.relaxng.datatype.DatatypeLibrary; //导入方法依赖的package包/类
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
throws BuildException {
DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
if (dl == null) {
error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
} else {
try {
return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
} catch (DatatypeException e) {
String detail = e.getMessage();
if (detail != null) {
error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
} else {
error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
}
}
}
return new DummyDataPatternBuilder();
}
示例2: makeDataPatternBuilder
import org.relaxng.datatype.DatatypeLibrary; //导入方法依赖的package包/类
public DataPatternBuilder<Pattern, Locator, VoidValue, CommentListImpl, AnnotationsImpl> makeDataPatternBuilder(String datatypeLibrary, String type, Locator loc)
throws BuildException {
DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
if (dl == null)
error("unrecognized_datatype_library", datatypeLibrary, loc);
else {
try {
return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type), new Name(datatypeLibrary, type));
}
catch (DatatypeException e) {
String detail = e.getMessage();
if (detail != null)
error("unsupported_datatype_detail", datatypeLibrary, type, detail, loc);
else
error("unrecognized_datatype", datatypeLibrary, type, loc);
}
}
return new DummyDataPatternBuilder();
}
示例3: DataPatternBuilderImpl
import org.relaxng.datatype.DatatypeLibrary; //导入方法依赖的package包/类
DataPatternBuilderImpl(DataPattern p) throws BuildException {
this.p = p;
DatatypeLibrary dl = dlf.createDatatypeLibrary(p.getDatatypeLibrary());
if (dl != null) {
try {
dtb = dl.createDatatypeBuilder(p.getType());
}
catch (DatatypeException e) {
String datatypeLibrary = p.getDatatypeLibrary();
String type = p.getType();
SourceLocation loc = p.getSourceLocation();
String detail = e.getMessage();
if (detail != null)
error("unsupported_datatype_detail", datatypeLibrary, type, detail, loc);
else
error("unknown_datatype", datatypeLibrary, type, loc);
}
}
}
示例4: makeDataPatternBuilder
import org.relaxng.datatype.DatatypeLibrary; //导入方法依赖的package包/类
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
throws BuildException {
DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
if (dl == null)
error("unrecognized_datatype_library", datatypeLibrary, (Locator)loc);
else {
try {
return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
}
catch (DatatypeException e) {
String detail = e.getMessage();
if (detail != null)
error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator)loc);
else
error("unrecognized_datatype", datatypeLibrary, type, (Locator)loc);
}
}
return new DummyDataPatternBuilder();
}