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


Java QName.setValues方法代码示例

本文整理汇总了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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:26,代码来源:ValidatorHandlerImpl.java

示例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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:29,代码来源:StAXValidatorHelper.java

示例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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:16,代码来源:StAXSchemaParser.java

示例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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:33,代码来源:SchemaContentHandler.java

示例5: lastElement

import org.apache.xerces.xni.QName; //导入方法依赖的package包/类
public void lastElement(QName element) {
	element.setValues(fElements[fSize - 1]);
}
 
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:4,代码来源:ElementStack.java

示例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]);
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:12,代码来源:XMLDocumentFragmentScannerMMImpl.java

示例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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:11,代码来源:XMLAttributesImpl.java

示例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]);
}
 
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:10,代码来源:TmxScanner.java


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