本文整理汇总了Java中org.apache.xerces.xni.QName.setValues方法的典型用法代码示例。如果您正苦于以下问题:Java QName.setValues方法的具体用法?Java QName.setValues怎么用?Java QName.setValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.xerces.xni.QName
的用法示例。
在下文中一共展示了QName.setValues方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillQName
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/** Fills in a QName object. */
private void fillQName(QName toFill, String uri, String localpart, String raw) {
if (!fStringsInternalized) {
uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null;
localpart = (localpart != null) ? fSymbolTable.addSymbol(localpart) : XMLSymbols.EMPTY_STRING;
raw = (raw != null) ? fSymbolTable.addSymbol(raw) : XMLSymbols.EMPTY_STRING;
}
else {
if (uri != null && uri.length() == 0) {
uri = null;
}
if (localpart == null) {
localpart = XMLSymbols.EMPTY_STRING;
}
if (raw == null) {
raw = XMLSymbols.EMPTY_STRING;
}
}
String prefix = XMLSymbols.EMPTY_STRING;
int prefixIdx = raw.indexOf(':');
if (prefixIdx != -1) {
prefix = fSymbolTable.addSymbol(raw.substring(0, prefixIdx));
}
toFill.setValues(prefix, localpart, raw, uri);
}
示例2: fillQName
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/** Fills in a QName object. */
final void fillQName(QName toFill, String uri, String localpart, String prefix) {
if (!fStringsInternalized) {
uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null;
localpart = (localpart != null) ? fSymbolTable.addSymbol(localpart) : XMLSymbols.EMPTY_STRING;
prefix = (prefix != null && prefix.length() > 0) ? fSymbolTable.addSymbol(prefix) : XMLSymbols.EMPTY_STRING;
}
else {
if (uri != null && uri.length() == 0) {
uri = null;
}
if (localpart == null) {
localpart = XMLSymbols.EMPTY_STRING;
}
if (prefix == null) {
prefix = XMLSymbols.EMPTY_STRING;
}
}
String raw = localpart;
if (prefix != XMLSymbols.EMPTY_STRING) {
fStringBuffer.clear();
fStringBuffer.append(prefix);
fStringBuffer.append(':');
fStringBuffer.append(localpart);
raw = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length);
}
toFill.setValues(prefix, localpart, raw, uri);
}
示例3: fillQName
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/** Fills in a QName object. */
final void fillQName(QName toFill, String uri, String localpart, String prefix) {
uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null;
localpart = (localpart != null) ? fSymbolTable.addSymbol(localpart) : XMLSymbols.EMPTY_STRING;
prefix = (prefix != null && prefix.length() > 0) ? fSymbolTable.addSymbol(prefix) : XMLSymbols.EMPTY_STRING;
String raw = localpart;
if (prefix != XMLSymbols.EMPTY_STRING) {
fStringBuffer.clear();
fStringBuffer.append(prefix);
fStringBuffer.append(':');
fStringBuffer.append(localpart);
raw = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length);
}
toFill.setValues(prefix, localpart, raw, uri);
}
示例4: fillQName
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
private void fillQName(QName toFill, String uri, String localpart, String rawname) {
if (!fStringsInternalized) {
uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null;
localpart = (localpart != null) ? fSymbolTable.addSymbol(localpart) : XMLSymbols.EMPTY_STRING;
rawname = (rawname != null) ? fSymbolTable.addSymbol(rawname) : XMLSymbols.EMPTY_STRING;
}
else {
if (uri != null && uri.length() == 0) {
uri = null;
}
if (localpart == null) {
localpart = XMLSymbols.EMPTY_STRING;
}
if (rawname == null) {
rawname = XMLSymbols.EMPTY_STRING;
}
}
String prefix = XMLSymbols.EMPTY_STRING;
int prefixIdx = rawname.indexOf(':');
if (prefixIdx != -1) {
prefix = fSymbolTable.addSymbol(rawname.substring(0, prefixIdx));
// local part may be an empty string if this is a namespace declaration
if (localpart == XMLSymbols.EMPTY_STRING) {
localpart = fSymbolTable.addSymbol(rawname.substring(prefixIdx + 1));
}
}
// local part may be an empty string if this is a namespace declaration
else if (localpart == XMLSymbols.EMPTY_STRING) {
localpart = rawname;
}
toFill.setValues(prefix, localpart, rawname, uri);
}
示例5: lastElement
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
public void lastElement(QName element) {
element.setValues(fElements[fSize - 1]);
}
示例6: popElement
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/**
* Pops an element off of the stack by setting the values of
* the specified QName.
* <p>
* <strong>Note:</strong> The object returned is <em>not</em>
* orphaned to the caller. Therefore, the caller should consider
* the object to be read-only.
*/
public void popElement(QName element) {
element.setValues(fElements[--fSize]);
}
示例7: getName
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/**
* Sets the fields in the given QName structure with the values
* of the attribute name at the specified index.
*
* @param attrIndex The attribute index.
* @param attrName The attribute name structure to fill in.
*/
public void getName(int attrIndex, QName attrName) {
attrName.setValues(fAttributes[attrIndex].name);
}
示例8: popElement
import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
/**
* Pops an element off of the stack by setting the values of the specified QName.
* <p>
* <strong>Note:</strong> The object returned is <em>not</em> orphaned to the caller. Therefore, the caller
* should consider the object to be read-only.
*/
public void popElement(QName element) {
element.setValues(fElements[--fSize]);
}