当前位置: 首页>>代码示例>>Java>>正文


Java RngProperty类代码示例

本文整理汇总了Java中com.thaiopensource.validate.prop.rng.RngProperty的典型用法代码示例。如果您正苦于以下问题:Java RngProperty类的具体用法?Java RngProperty怎么用?Java RngProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RngProperty类属于com.thaiopensource.validate.prop.rng包,在下文中一共展示了RngProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSchema

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public Schema createSchema(SAXSource source, PropertyMap properties)
        throws IOException, SAXException, IncorrectSchemaException {
  SchemaPatternBuilder spb = new SchemaPatternBuilder();
  SAXResolver resolver = ResolverFactory.createResolver(properties);
  ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
  DatatypeLibraryFactory dlf = properties.get(RngProperty.DATATYPE_LIBRARY_FACTORY);
  if (dlf == null)
    dlf = new DatatypeLibraryLoader();
  try {
    Pattern start = SchemaBuilderImpl.parse(createParseable(source, resolver, eh, properties), eh, dlf, spb,
                                            properties.contains(WrapProperty.ATTRIBUTE_OWNER));
    return wrapPattern(start, spb, properties);
  }
  catch (IllegalSchemaException e) {
    throw new IncorrectSchemaException();
  }
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:18,代码来源:SchemaReaderImpl.java

示例2: wrapPattern

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
static Schema wrapPattern(Pattern start, SchemaPatternBuilder spb, PropertyMap properties) throws SAXException, IncorrectSchemaException {
  if (properties.contains(RngProperty.FEASIBLE))
    start = FeasibleTransform.transform(spb, start);
  properties = new SimplifiedSchemaPropertyMap(AbstractSchema.filterProperties(properties, supportedPropertyIds),
                                               start);
  Schema schema = new PatternSchema(spb, start, properties);
  if (spb.hasIdTypes() && properties.contains(RngProperty.CHECK_ID_IDREF)) {
    ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
    IdTypeMap idTypeMap = new IdTypeMapBuilder(eh, start).getIdTypeMap();
    if (idTypeMap == null)
      throw new IncorrectSchemaException();
    Schema idSchema;
    if (properties.contains(RngProperty.FEASIBLE))
      idSchema = new FeasibleIdTypeMapSchema(idTypeMap, properties);
    else
      idSchema = new IdTypeMapSchema(idTypeMap, properties);
    schema = new CombineSchema(schema, idSchema, properties);
  }
  return schema;
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:21,代码来源:SchemaReaderImpl.java

示例3: get

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public <T> T get(PropertyId<T> pid) {
  if (pid == RngProperty.SIMPLIFIED_SCHEMA) {
    String simplifiedSchema = PatternDumper.toString(start);
    return pid.getValueClass().cast(simplifiedSchema);
  }
  else
    return base.get(pid);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:9,代码来源:SchemaReaderImpl.java

示例4: getOption

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public Option getOption(String uri) {
  return RngProperty.getOption(uri);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:SAXSchemaReceiverFactory.java

示例5: getKey

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public PropertyId<?> getKey(int i) {
  return i == base.size() ? RngProperty.SIMPLIFIED_SCHEMA : base.getKey(i);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:SchemaReaderImpl.java

示例6: contains

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public boolean contains(PropertyId<?> pid) {
  return base.contains(pid) || pid == RngProperty.SIMPLIFIED_SCHEMA;
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:SchemaReaderImpl.java

示例7: setFeasible

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public void setFeasible(boolean feasible) {
  properties.put(RngProperty.FEASIBLE, feasible ? Flag.PRESENT : null);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:SchemaFactory.java

示例8: getFeasible

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public boolean getFeasible() {
  return properties.contains(RngProperty.FEASIBLE);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:SchemaFactory.java

示例9: JingTask

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
public JingTask() {
  RngProperty.CHECK_ID_IDREF.add(properties);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:JingTask.java

示例10: setDatatypeLibraryFactory

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Specifies the <code>DatatypeLibraryFactory</code> to be used for handling datatypes in the schema.
 * This also determines how datatypes are handled during validation.  If <code>null</code> is
 * specified then only the builtin datatypes will be supported.
 *
 * @param dlf the <code>DatatypeLibraryFactory</code> to be used for handling datatypes in the schema
 * @see #getDatatypeLibraryFactory
 */
public void setDatatypeLibraryFactory(DatatypeLibraryFactory dlf) {
  properties.put(RngProperty.DATATYPE_LIBRARY_FACTORY, dlf);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:12,代码来源:SchemaFactory.java

示例11: getDatatypeLibraryFactory

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Returns the <code>DatatypeLibraryFactory</code> that will be used for handling datatypes in the
 * schema. If <code>setDatatypeLibraryFactory</code> has not been called for this <code>SchemaFactory</code>,
 * then <code>getDatatypeLibraryFactory</code> returns <code>null</code>.
 *
 * @return the <code>DatatypeLibraryFactory</code> to be used for handling datatypes in the schema;
 * may be null.
 * @see #setDatatypeLibraryFactory
 */
public DatatypeLibraryFactory getDatatypeLibraryFactory() {
  return (DatatypeLibraryFactory)properties.get(RngProperty.DATATYPE_LIBRARY_FACTORY);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:13,代码来源:SchemaFactory.java

示例12: setCheckIdIdref

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Specifies whether to perform checking of ID/IDREF/IDREFS attributes in accordance with
 * RELAX NG DTD Compatibility.
 *
 * @param checkIdIdref <code>true</code> if ID/IDREF/IDREFS checking should be performed;
 * <code>false</code> otherwise
 *
 * @see #getCheckIdIdref
 * @see <a href="http://www.oasis-open.org/committees/relax-ng/compatibility.html#id">RELAX NG DTD Compatibility</a>
 */
public void setCheckIdIdref(boolean checkIdIdref) {
  properties.put(RngProperty.CHECK_ID_IDREF, checkIdIdref ? Flag.PRESENT : null);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:14,代码来源:SchemaFactory.java

示例13: getCheckIdIdref

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Indicates whether ID/IDREF/IDREFS attributes will be checked in accordance RELAX NG DTD
 * Compatibility.  If <code>setCheckIdIdref</code> has not been called for this <code>SchemaFactory</code>,
 * then <code>getCheckIdref</code> will return <code>false</code>.
 *
 * @return <code>true</code> if ID/IDREF/IDREFS attributes will be checked;
 * <code>false</code> otherwise.
 *
 * @see #setCheckIdIdref
 * @see <a href="http://www.oasis-open.org/committees/relax-ng/compatibility.html#id">RELAX NG DTD Compatibility</a>
 */
public boolean getCheckIdIdref() {
  return properties.contains(RngProperty.CHECK_ID_IDREF);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:15,代码来源:SchemaFactory.java

示例14: setCheckid

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Handles the <code>checkid</code> attribute.
 *
 * @param checkid the attribute value converted to a boolean
 */
public void setCheckid(boolean checkid) {
  properties.put(RngProperty.CHECK_ID_IDREF,
                 checkid ? Flag.PRESENT : null);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:10,代码来源:JingTask.java

示例15: setFeasible

import com.thaiopensource.validate.prop.rng.RngProperty; //导入依赖的package包/类
/**
 * Handles the <code>feasible</code> attribute.
 *
 * @param feasible the attribute value converted to a boolean
 */
public void setFeasible(boolean feasible) {
  properties.put(RngProperty.FEASIBLE, feasible ? Flag.PRESENT : null);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:9,代码来源:JingTask.java


注:本文中的com.thaiopensource.validate.prop.rng.RngProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。