本文整理汇总了Java中org.relaxng.datatype.DatatypeBuilder类的典型用法代码示例。如果您正苦于以下问题:Java DatatypeBuilder类的具体用法?Java DatatypeBuilder怎么用?Java DatatypeBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DatatypeBuilder类属于org.relaxng.datatype包,在下文中一共展示了DatatypeBuilder类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String type)
throws DatatypeException {
if (type.equals("ID")
|| type.equals("IDREF")
|| type.equals("IDREFS")) {
if (xsdDatatypeLibrary == null) {
xsdDatatypeLibrary =
factory.createDatatypeLibrary(
WellKnownNamespaces.XML_SCHEMA_DATATYPES);
if (xsdDatatypeLibrary == null)
throw new DatatypeException();
}
return xsdDatatypeLibrary.createDatatypeBuilder(type);
}
throw new DatatypeException();
}
示例2: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String type)
throws DatatypeException {
xsdDatatypeLibrary =
factory.createDatatypeLibrary(
WellKnownNamespaces.XML_SCHEMA_DATATYPES);
if (xsdDatatypeLibrary == null)
throw new DatatypeException();
if (type.equals("string") || type.equals("token")) {
return new BuiltinDatatypeBuilder(
xsdDatatypeLibrary.createDatatype(type));
}
throw new DatatypeException();
}
示例3: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String baseTypeLocalName)
throws DatatypeException
{
SimpleType type = (SimpleType) byName.get(baseTypeLocalName);
if (type == null)
throw new DatatypeException("Unknown type name: " + baseTypeLocalName);
return new TypeBuilder(type);
}
示例4: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String type)
throws DatatypeException {
if (type.equals("token"))
return tokenDatatypeBuilder;
else if (type.equals("string"))
return stringDatatypeBuilder;
throw new DatatypeException();
}
示例5: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String type)
throws DatatypeException {
if (type.equals("ID") || type.equals("IDREF") || type.equals("IDREFS")) {
if (xsdDatatypeLibrary == null) {
xsdDatatypeLibrary = factory.createDatatypeLibrary(WellKnownNamespaces.XML_SCHEMA_DATATYPES);
if (xsdDatatypeLibrary == null)
throw new DatatypeException();
}
return xsdDatatypeLibrary.createDatatypeBuilder(type);
}
throw new DatatypeException();
}
示例6: createDatatypeBuilder
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
public DatatypeBuilder createDatatypeBuilder(String localName) throws DatatypeException {
DatatypeBase base = typeMap.get(localName);
if (base == null)
throw new DatatypeException();
if (base instanceof RegexDatatype) {
try {
((RegexDatatype)base).compile(getRegexEngine());
}
catch (RegexSyntaxException e) {
throw new DatatypeException(DatatypeBuilderImpl.localizer.message("regex_internal_error", localName));
}
}
return new DatatypeBuilderImpl(this, base);
}
示例7: DataPatternBuilderImpl
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
DataPatternBuilderImpl(DatatypeBuilder dtb) {
this.dtb = dtb;
}
示例8: DataPatternBuilderImpl
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
DataPatternBuilderImpl(DatatypeBuilder dtb, Name dtName) {
this.dtb = dtb;
this.dtName = dtName;
}
示例9: DataPatternBuilderImpl
import org.relaxng.datatype.DatatypeBuilder; //导入依赖的package包/类
DataPatternBuilderImpl(DatatypeBuilder dtb) {
this.dtb = dtb;
}