本文整理汇总了Java中com.sun.xml.internal.fastinfoset.util.QualifiedNameArray类的典型用法代码示例。如果您正苦于以下问题:Java QualifiedNameArray类的具体用法?Java QualifiedNameArray怎么用?Java QualifiedNameArray使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QualifiedNameArray类属于com.sun.xml.internal.fastinfoset.util包,在下文中一共展示了QualifiedNameArray类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ParserVocabulary
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的package包/类
/** Creates a new instance of ParserVocabulary */
public ParserVocabulary() {
namespaceName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
prefix = new PrefixArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
localName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
otherNCName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
otherURI = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true);
attributeValue = new StringArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true);
otherString = new CharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
characterContentChunk = new ContiguousCharArrayArray(ValueArray.DEFAULT_CAPACITY,
NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS,
ContiguousCharArrayArray.INITIAL_CHARACTER_SIZE,
NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS);
elementName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
attributeName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
tables[RESTRICTED_ALPHABET] = restrictedAlphabet;
tables[ENCODING_ALGORITHM] = encodingAlgorithm;
tables[PREFIX] = prefix;
tables[NAMESPACE_NAME] = namespaceName;
tables[LOCAL_NAME] = localName;
tables[OTHER_NCNAME] = otherNCName;
tables[OTHER_URI] = otherURI;
tables[ATTRIBUTE_VALUE] = attributeValue;
tables[OTHER_STRING] = otherString;
tables[CHARACTER_CONTENT_CHUNK] = characterContentChunk;
tables[ELEMENT_NAME] = elementName;
tables[ATTRIBUTE_NAME] = attributeName;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:ParserVocabulary.java
示例2: addToTable
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的package包/类
private void addToTable(Iterator i, QualifiedNameArray a,
boolean isAttribute,
StringIntMap prefixMap, StringIntMap namespaceNameMap,
StringIntMap localNameMap) {
while (i.hasNext()) {
addToNameTable((QName)i.next(), a, isAttribute,
prefixMap, namespaceNameMap, localNameMap);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ParserVocabulary.java
示例3: addToNameTable
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的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
示例4: decodeTableItems
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的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
示例5: printArray
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的package包/类
public static void printArray(String title, QualifiedNameArray a) {
System.out.println(title);
for (int i = 0; i < a.getSize(); i++) {
QualifiedName name = a.getArray()[i];
System.out.println("" + (name.index + 1) + ": " +
"{" + name.namespaceName + "}" +
name.prefix + ":" + name.localName);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:PrintTable.java
示例6: addToNameTable
import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray; //导入依赖的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.QualifiedNameArray类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论