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


Java StringList.getLength方法代码示例

本文整理汇总了Java中com.sun.org.apache.xerces.internal.xs.StringList.getLength方法的典型用法代码示例。如果您正苦于以下问题:Java StringList.getLength方法的具体用法?Java StringList.getLength怎么用?Java StringList.getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xerces.internal.xs.StringList的用法示例。


在下文中一共展示了StringList.getLength方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createXSLoader

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSLoader createXSLoader(StringList versions) throws XSException {
    XSLoader loader = new XSLoaderImpl();
    if (versions == null){
                    return loader;
    }
    for (int i=0; i<versions.getLength();i++){
            if (!versions.item(i).equals("1.0")){
                            String msg =
                                    DOMMessageFormatter.formatMessage(
                                            DOMMessageFormatter.DOM_DOMAIN,
                                            "FEATURE_NOT_SUPPORTED",
                                            new Object[] { versions.item(i) });
                            throw new XSException(XSException.NOT_SUPPORTED_ERR, msg);
            }
    }
    return loader;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:XSImplementationImpl.java

示例2: loadURIList

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSModel loadURIList(StringList uriList) {
    int length = uriList.getLength();
    SchemaGrammar[] gs = new SchemaGrammar[length];
    for (int i = 0; i < length; i++) {
        try {
            gs[i] =
                (SchemaGrammar) loadGrammar(new XMLInputSource(null, uriList.item(i), null));
        } catch (Exception e) {
            reportDOMFatalError(e);
            return null;
        }
    }
    return new XSModelImpl(gs);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XMLSchemaLoader.java

示例3: loadURIList

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
/**
 * Parses the content of XML Schema documents specified as the list of URI
 * references. If the URI contains a fragment identifier, the behavior
 * is not defined by this specification.
 * @param uriList The list of URI locations.
 * @return An XSModel representing the schema documents.
 */
public XSModel loadURIList(StringList uriList) {
    int length = uriList.getLength();
    try {
        fGrammarPool.clear();
        for (int i = 0; i < length; ++i) {
            fSchemaLoader.loadGrammar(new XMLInputSource(null, uriList.item(i), null));
        }
        return fGrammarPool.toXSModel();
    }
    catch (Exception e) {
        fSchemaLoader.reportDOMFatalError(e);
        return null;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:XSLoaderImpl.java

示例4: loadURIList

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSModel loadURIList(StringList uriList) {
    int length = uriList.getLength();
    SchemaGrammar[] gs = new SchemaGrammar[length];
    for (int i = 0; i < length; i++) {
        try {
            gs[i] =
                (SchemaGrammar) loadGrammar(new XMLInputSource(null, uriList.item(i), null, false));
        } catch (Exception e) {
            reportDOMFatalError(e);
            return null;
        }
    }
    return new XSModelImpl(gs);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:XMLSchemaLoader.java

示例5: loadURIList

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
/**
 * Parses the content of XML Schema documents specified as the list of URI
 * references. If the URI contains a fragment identifier, the behavior
 * is not defined by this specification.
 * @param uriList The list of URI locations.
 * @return An XSModel representing the schema documents.
 */
public XSModel loadURIList(StringList uriList) {
    int length = uriList.getLength();
    try {
        fGrammarPool.clear();
        for (int i = 0; i < length; ++i) {
            fSchemaLoader.loadGrammar(new XMLInputSource(null, uriList.item(i), null, false));
        }
        return fGrammarPool.toXSModel();
    }
    catch (Exception e) {
        fSchemaLoader.reportDOMFatalError(e);
        return null;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:XSLoaderImpl.java

示例6: ElementPSVImpl

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public ElementPSVImpl(boolean isConstant, ElementPSVI elementPSVI) {
    fDeclaration = elementPSVI.getElementDeclaration();
    fTypeDecl = elementPSVI.getTypeDefinition();
    fNil = elementPSVI.getNil();
    fSpecified = elementPSVI.getIsSchemaSpecified();
    fValue.copyFrom(elementPSVI.getSchemaValue());
    fNotation = elementPSVI.getNotation();
    fValidationAttempted = elementPSVI.getValidationAttempted();
    fValidity = elementPSVI.getValidity();
    fValidationContext = elementPSVI.getValidationContext();
    if (elementPSVI instanceof ElementPSVImpl) {
        final ElementPSVImpl elementPSVIImpl = (ElementPSVImpl) elementPSVI;
        fErrors = (elementPSVIImpl.fErrors != null) ?
                (String[]) elementPSVIImpl.fErrors.clone() : null;
        elementPSVIImpl.copySchemaInformationTo(this);
    }
    else {
        final StringList errorCodes = elementPSVI.getErrorCodes();
        final int length = errorCodes.getLength();
        if (length > 0) {
            final StringList errorMessages = elementPSVI.getErrorMessages();
            final String[] errors = new String[length << 1];
            for (int i = 0, j = 0; i < length; ++i) {
                errors[j++] = errorCodes.item(i);
                errors[j++] = errorMessages.item(i);
            }
            fErrors = errors;
        }
        fSchemaInformation = elementPSVI.getSchemaInformation();
    }
    fIsConstant = isConstant;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:ElementPSVImpl.java

示例7: AttributePSVImpl

import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public AttributePSVImpl(boolean isConstant, AttributePSVI attrPSVI) {
    fDeclaration = attrPSVI.getAttributeDeclaration();
    fTypeDecl = attrPSVI.getTypeDefinition();
    fSpecified = attrPSVI.getIsSchemaSpecified();
    fValue.copyFrom(attrPSVI.getSchemaValue());
    fValidationAttempted = attrPSVI.getValidationAttempted();
    fValidity = attrPSVI.getValidity();
    if (attrPSVI instanceof AttributePSVImpl) {
        final AttributePSVImpl attrPSVIImpl = (AttributePSVImpl) attrPSVI;
        fErrors = (attrPSVIImpl.fErrors != null) ?
                (String[]) attrPSVIImpl.fErrors.clone() : null;
    }
    else {
        final StringList errorCodes = attrPSVI.getErrorCodes();
        final int length = errorCodes.getLength();
        if (length > 0) {
            final StringList errorMessages = attrPSVI.getErrorMessages();
            final String[] errors = new String[length << 1];
            for (int i = 0, j = 0; i < length; ++i) {
                errors[j++] = errorCodes.item(i);
                errors[j++] = errorMessages.item(i);
            }
            fErrors = errors;
        }
    }
    fValidationContext = attrPSVI.getValidationContext();
    fIsConstant = isConstant;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:AttributePSVImpl.java


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