本文整理汇总了Java中com.sun.xml.internal.rngom.parse.Context类的典型用法代码示例。如果您正苦于以下问题:Java Context类的具体用法?Java Context怎么用?Java Context使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Context类属于com.sun.xml.internal.rngom.parse包,在下文中一共展示了Context类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addParam
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
throws BuildException {
try {
dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
} catch (DatatypeException e) {
String detail = e.getMessage();
int pos = e.getIndex();
String displayedParam;
if (pos == DatatypeException.UNKNOWN) {
displayedParam = null;
} else {
displayedParam = displayParam(value, pos);
}
if (displayedParam != null) {
if (detail != null) {
error("invalid_param_detail_display", detail, displayedParam, (Locator) loc);
} else {
error("invalid_param_display", displayedParam, (Locator) loc);
}
} else if (detail != null) {
error("invalid_param_detail", detail, (Locator) loc);
} else {
error("invalid_param", (Locator) loc);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:SchemaBuilderImpl.java
示例2: addParam
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
throws BuildException {
try {
dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
}
catch (DatatypeException e) {
String detail = e.getMessage();
int pos = e.getIndex();
String displayedParam;
if (pos == DatatypeException.UNKNOWN)
displayedParam = null;
else
displayedParam = displayParam(value, pos);
if (displayedParam != null) {
if (detail != null)
error("invalid_param_detail_display", detail, displayedParam, (Locator)loc);
else
error("invalid_param_display", displayedParam, (Locator)loc);
}
else if (detail != null)
error("invalid_param_detail", detail, (Locator)loc);
else
error("invalid_param", (Locator)loc);
}
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:26,代码来源:SchemaBuilderImpl.java
示例3: makeElementAnnotationBuilder
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, LocatorImpl loc, CommentListImpl comments, Context context) {
String qname;
if(prefix==null)
qname = localName;
else
qname = prefix+':'+localName;
return new ElementAnnotationBuilderImpl(dom.createElementNS(ns,qname));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:DSchemaBuilderImpl.java
示例4: Param
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public Param(String name, String value, Context context, String ns, Location loc, Annotation anno) {
this.name = name;
this.value = value;
this.context = context;
this.ns = ns;
this.loc = loc;
this.anno = anno;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:DDataPattern.java
示例5: DValuePattern
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public DValuePattern(String datatypeLibrary, String type, String value, Context context, String ns) {
this.datatypeLibrary = datatypeLibrary;
this.type = type;
this.value = value;
this.context = context;
this.ns = ns;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DValuePattern.java
示例6: addParam
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public void addParam(String name, String value, Context context, String ns, Location _loc, Annotations _anno) throws BuildException {
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
lhs.addParam( name, value, context, ns, loc.lhs, anno.lhs );
rhs.addParam( name, value, context, ns, loc.rhs, anno.rhs );
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DataPatternBuilderHost.java
示例7: makeAnnotations
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public Annotations makeAnnotations(CommentList _comments, Context context) {
CommentListHost comments = (CommentListHost) _comments;
Annotations l = lhs.makeAnnotations((comments!=null)?comments.lhs:null, context);
Annotations r = rhs.makeAnnotations((comments!=null)?comments.rhs:null, context);
if(l==null || r==null)
throw new IllegalArgumentException("annotations cannot be null");
return new AnnotationsHost(l,r);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:SchemaBuilderHost.java
示例8: makeElementAnnotationBuilder
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns,
String localName, String prefix, Location _loc, CommentList _comments,
Context context) {
LocationHost loc = cast(_loc);
CommentListHost comments = (CommentListHost) _comments;
return new ElementAnnotationBuilderHost(
lhs.makeElementAnnotationBuilder(ns, localName, prefix, loc.lhs, comments==null?null:comments.lhs, context),
rhs.makeElementAnnotationBuilder(ns, localName, prefix, loc.rhs, comments==null?null:comments.rhs, context) );
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SchemaBuilderHost.java
示例9: makeValue
import com.sun.xml.internal.rngom.parse.Context; //导入依赖的package包/类
public ParsedPattern makeValue(String datatypeLibrary, String type,
String value, Context c, String ns, Location _loc, Annotations _anno)
throws BuildException {
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeValue(datatypeLibrary,type,value,c,ns,loc.lhs,anno.lhs),
rhs.makeValue(datatypeLibrary,type,value,c,ns,loc.rhs,anno.rhs));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SchemaBuilderHost.java
注:本文中的com.sun.xml.internal.rngom.parse.Context类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论