本文整理汇总了Java中com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier类的典型用法代码示例。如果您正苦于以下问题:Java DuplicateAttributeVerifier类的具体用法?Java DuplicateAttributeVerifier怎么用?Java DuplicateAttributeVerifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DuplicateAttributeVerifier类属于com.sun.xml.internal.fastinfoset.util包,在下文中一共展示了DuplicateAttributeVerifier类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addToNameTable
import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier; //导入依赖的package包/类
private void addToNameTable(QName n, QualifiedNameArray a,
boolean isAttribute,
StringIntMap prefixMap, StringIntMap namespaceNameMap,
StringIntMap localNameMap) {
int namespaceURIIndex = -1;
int prefixIndex = -1;
if (n.getNamespaceURI().length() > 0) {
namespaceURIIndex = namespaceNameMap.obtainIndex(n.getNamespaceURI());
if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
namespaceURIIndex = namespaceName.getSize();
namespaceName.add(n.getNamespaceURI());
}
if (n.getPrefix().length() > 0) {
prefixIndex = prefixMap.obtainIndex(n.getPrefix());
if (prefixIndex == KeyIntMap.NOT_PRESENT) {
prefixIndex = prefix.getSize();
prefix.add(n.getPrefix());
}
}
}
int localNameIndex = localNameMap.obtainIndex(n.getLocalPart());
if (localNameIndex == KeyIntMap.NOT_PRESENT) {
localNameIndex = localName.getSize();
localName.add(n.getLocalPart());
}
QualifiedName name = new QualifiedName(n.getPrefix(), n.getNamespaceURI(), n.getLocalPart(),
a.getSize(),
prefixIndex, namespaceURIIndex, localNameIndex);
if (isAttribute) {
name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
}
a.add(name);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:ParserVocabulary.java
示例2: decodeTableItems
import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier; //导入依赖的package包/类
private void decodeTableItems(QualifiedNameArray array, boolean isAttribute) throws FastInfosetException, IOException {
final int noOfItems = decodeNumberOfItemsOfSequence();
for (int i = 0; i < noOfItems; i++) {
final int b = read();
String prefix = "";
int prefixIndex = -1;
if ((b & EncodingConstants.NAME_SURROGATE_PREFIX_FLAG) > 0) {
prefixIndex = decodeIntegerIndexOnSecondBit();
prefix = _v.prefix.get(prefixIndex);
}
String namespaceName = "";
int namespaceNameIndex = -1;
if ((b & EncodingConstants.NAME_SURROGATE_NAME_FLAG) > 0) {
namespaceNameIndex = decodeIntegerIndexOnSecondBit();
namespaceName = _v.namespaceName.get(namespaceNameIndex);
}
if (namespaceName == "" && prefix != "") {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.missingNamespace"));
}
final int localNameIndex = decodeIntegerIndexOnSecondBit();
final String localName = _v.localName.get(localNameIndex);
QualifiedName qualifiedName = new QualifiedName(prefix, namespaceName, localName,
prefixIndex, namespaceNameIndex, localNameIndex,
_charBuffer);
if (isAttribute) {
qualifiedName.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
}
array.add(qualifiedName);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:Decoder.java
示例3: addToNameTable
import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier; //导入依赖的package包/类
public void addToNameTable(String namespaceURI, String qName, String localName,
Set v, LocalNameQualifiedNamesMap m, QualifiedNameArray a,
boolean isAttribute) throws SAXException {
LocalNameQualifiedNamesMap.Entry entry = m.obtainEntry(qName);
if (entry._valueIndex > 0) {
QualifiedName[] names = entry._value;
for (int i = 0; i < entry._valueIndex; i++) {
if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
return;
}
}
}
String prefix = getPrefixFromQualifiedName(qName);
int namespaceURIIndex = -1;
int prefixIndex = -1;
int localNameIndex = -1;
if (namespaceURI.length() > 0) {
namespaceURIIndex = _serializerVocabulary.namespaceName.get(namespaceURI);
if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
throw new SAXException(CommonResourceBundle.getInstance().
getString("message.namespaceURINotIndexed", new Object[]{Integer.valueOf(namespaceURIIndex)}));
}
if (prefix.length() > 0) {
prefixIndex = _serializerVocabulary.prefix.get(prefix);
if (prefixIndex == KeyIntMap.NOT_PRESENT) {
throw new SAXException(CommonResourceBundle.getInstance().
getString("message.prefixNotIndexed", new Object[]{Integer.valueOf(prefixIndex)}));
}
}
}
localNameIndex = _serializerVocabulary.localName.obtainIndex(localName);
if (localNameIndex == KeyIntMap.NOT_PRESENT) {
_parserVocabulary.localName.add(localName);
localNameIndex = _parserVocabulary.localName.getSize() - 1;
}
QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, m.getNextIndex(),
prefixIndex, namespaceURIIndex, localNameIndex);
if (isAttribute) {
name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
}
entry.addQualifiedName(name);
a.add(name);
v.add(name.getQName());
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:50,代码来源:VocabularyGenerator.java
注:本文中的com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论