Java Code Examples for com.sun.org.apache.xerces.internal.impl.xs.util.StringListImpl

The following examples show how to use com.sun.org.apache.xerces.internal.impl.xs.util.StringListImpl. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk1.8-source-analysis   Source File: IdentityConstraint.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 2
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 3
Source Project: jdk8u60   Source File: IdentityConstraint.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 4
Source Project: JDKSourceCode1.8   Source File: IdentityConstraint.java    License: MIT License 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 5
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 6
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 7
Source Project: Bytecoder   Source File: PSVIAttrNSImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return list of error codes
 */
public StringList getErrorCodes() {
    if (fErrorCodes != null) {
        return fErrorCodes;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 8
Source Project: Bytecoder   Source File: PSVIAttrNSImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrorMessages != null) {
        return fErrorMessages;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 9
Source Project: Bytecoder   Source File: PSVIElementNSImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return Array of error codes
 */
public StringList getErrorCodes() {
    if (fErrorCodes != null) {
        return fErrorCodes;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 10
Source Project: Bytecoder   Source File: PSVIElementNSImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrorMessages != null) {
        return fErrorMessages;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 11
Source Project: Bytecoder   Source File: ElementPSVImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return Array of error codes
 */
public StringList getErrorCodes() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, true);
}
 
Example 12
Source Project: Bytecoder   Source File: ElementPSVImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, false);
}
 
Example 13
Source Project: Bytecoder   Source File: AttributePSVImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return list of error codes
 */
public StringList getErrorCodes() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, true);
}
 
Example 14
Source Project: Bytecoder   Source File: AttributePSVImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, false);
}
 
Example 15
Source Project: Bytecoder   Source File: IdentityConstraint.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 16
Source Project: openjdk-jdk9   Source File: PSVIAttrNSImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return list of error codes
 */
public StringList getErrorCodes() {
    if (fErrorCodes != null) {
        return fErrorCodes;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 17
Source Project: openjdk-jdk9   Source File: PSVIAttrNSImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrorMessages != null) {
        return fErrorMessages;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 18
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return Array of error codes
 */
public StringList getErrorCodes() {
    if (fErrorCodes != null) {
        return fErrorCodes;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 19
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrorMessages != null) {
        return fErrorMessages;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example 20
Source Project: openjdk-jdk9   Source File: ElementPSVImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * A list of error codes generated from validation attempts.
 * Need to find all the possible subclause reports that need reporting
 *
 * @return Array of error codes
 */
public StringList getErrorCodes() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, true);
}
 
Example 21
Source Project: openjdk-jdk9   Source File: ElementPSVImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, false);
}
 
Example 22
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 23
/**
 * A list of error messages generated from the validation attempt or
 * an empty <code>StringList</code> if no errors occurred during the
 * validation attempt. The indices of error messages in this list are
 * aligned with those in the <code>[schema error code]</code> list.
 */
public StringList getErrorMessages() {
    if (fErrors == null || fErrors.length == 0) {
        return StringListImpl.EMPTY_LIST;
    }
    return new PSVIErrorList(fErrors, false);
}
 
Example 24
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 25
Source Project: openjdk-8   Source File: IdentityConstraint.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 26
Source Project: hottub   Source File: IdentityConstraint.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * {fields} A non-empty list of restricted XPath ([XPath]) expressions.
 */
public StringList getFieldStrs() {
    String[] strs = new String[fFieldCount];
    for (int i = 0; i < fFieldCount; i++)
        strs[i] = fFields[i].toString();
    return new StringListImpl(strs, fFieldCount);
}
 
Example 27
public StringList getRecognizedVersions() {
    StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
    return list;
}
 
Example 28
Source Project: openjdk-8   Source File: XSModelImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public XSModelImpl(SchemaGrammar[] grammars, short s4sVersion) {
    // copy namespaces/grammars from the array to our arrays
    int len = grammars.length;
    final int initialSize = Math.max(len+1, 5);
    String[] namespaces = new String[initialSize];
    SchemaGrammar[] grammarList = new SchemaGrammar[initialSize];
    boolean hasS4S = false;
    for (int i = 0; i < len; i++) {
        final SchemaGrammar sg = grammars[i];
        final String tns = sg.getTargetNamespace();
        namespaces[i] = tns;
        grammarList[i] = sg;
        if (tns == SchemaSymbols.URI_SCHEMAFORSCHEMA) {
            hasS4S = true;
        }
    }
    // If a schema for the schema namespace isn't included, include it here.
    if (!hasS4S) {
        namespaces[len] = SchemaSymbols.URI_SCHEMAFORSCHEMA;
        grammarList[len++] = SchemaGrammar.getS4SGrammar(s4sVersion);
    }

    SchemaGrammar sg1, sg2;
    Vector gs;
    int i, j, k;
    // and recursively get all imported grammars, add them to our arrays
    for (i = 0; i < len; i++) {
        // get the grammar
        sg1 = grammarList[i];
        gs = sg1.getImportedGrammars();
        // for each imported grammar
        for (j = gs == null ? -1 : gs.size() - 1; j >= 0; j--) {
            sg2 = (SchemaGrammar)gs.elementAt(j);
            // check whether this grammar is already in the list
            for (k = 0; k < len; k++) {
                if (sg2 == grammarList[k]) {
                    break;
                }
            }
            // if it's not, add it to the list
            if (k == len) {
                // ensure the capacity of the arrays
                if (len == grammarList.length) {
                    String[] newSA = new String[len*2];
                    System.arraycopy(namespaces, 0, newSA, 0, len);
                    namespaces = newSA;
                    SchemaGrammar[] newGA = new SchemaGrammar[len*2];
                    System.arraycopy(grammarList, 0, newGA, 0, len);
                    grammarList = newGA;
                }
                namespaces[len] = sg2.getTargetNamespace();
                grammarList[len] = sg2;
                len++;
            }
        }
    }

    fNamespaces = namespaces;
    fGrammarList = grammarList;

    boolean hasIDC = false;
    // establish the mapping from namespace to grammars
    fGrammarMap = new SymbolHash(len*2);
    for (i = 0; i < len; i++) {
        fGrammarMap.put(null2EmptyString(fNamespaces[i]), fGrammarList[i]);
        // update the idc field
        if (fGrammarList[i].hasIDConstraints()) {
            hasIDC = true;
        }
    }

    fHasIDC = hasIDC;
    fGrammarCount = len;
    fGlobalComponents = new XSNamedMap[MAX_COMP_IDX+1];
    fNSComponents = new XSNamedMap[len][MAX_COMP_IDX+1];
    fNamespacesList = new StringListImpl(fNamespaces, fGrammarCount);

    // build substitution groups
    fSubGroupMap = buildSubGroups();
}
 
Example 29
public StringList getRecognizedVersions() {
    StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
    return list;
}
 
Example 30
Source Project: TencentKona-8   Source File: XSModelImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public XSModelImpl(SchemaGrammar[] grammars, short s4sVersion) {
    // copy namespaces/grammars from the array to our arrays
    int len = grammars.length;
    final int initialSize = Math.max(len+1, 5);
    String[] namespaces = new String[initialSize];
    SchemaGrammar[] grammarList = new SchemaGrammar[initialSize];
    boolean hasS4S = false;
    for (int i = 0; i < len; i++) {
        final SchemaGrammar sg = grammars[i];
        final String tns = sg.getTargetNamespace();
        namespaces[i] = tns;
        grammarList[i] = sg;
        if (tns == SchemaSymbols.URI_SCHEMAFORSCHEMA) {
            hasS4S = true;
        }
    }
    // If a schema for the schema namespace isn't included, include it here.
    if (!hasS4S) {
        namespaces[len] = SchemaSymbols.URI_SCHEMAFORSCHEMA;
        grammarList[len++] = SchemaGrammar.getS4SGrammar(s4sVersion);
    }

    SchemaGrammar sg1, sg2;
    Vector gs;
    int i, j, k;
    // and recursively get all imported grammars, add them to our arrays
    for (i = 0; i < len; i++) {
        // get the grammar
        sg1 = grammarList[i];
        gs = sg1.getImportedGrammars();
        // for each imported grammar
        for (j = gs == null ? -1 : gs.size() - 1; j >= 0; j--) {
            sg2 = (SchemaGrammar)gs.elementAt(j);
            // check whether this grammar is already in the list
            for (k = 0; k < len; k++) {
                if (sg2 == grammarList[k]) {
                    break;
                }
            }
            // if it's not, add it to the list
            if (k == len) {
                // ensure the capacity of the arrays
                if (len == grammarList.length) {
                    String[] newSA = new String[len*2];
                    System.arraycopy(namespaces, 0, newSA, 0, len);
                    namespaces = newSA;
                    SchemaGrammar[] newGA = new SchemaGrammar[len*2];
                    System.arraycopy(grammarList, 0, newGA, 0, len);
                    grammarList = newGA;
                }
                namespaces[len] = sg2.getTargetNamespace();
                grammarList[len] = sg2;
                len++;
            }
        }
    }

    fNamespaces = namespaces;
    fGrammarList = grammarList;

    boolean hasIDC = false;
    // establish the mapping from namespace to grammars
    fGrammarMap = new SymbolHash(len*2);
    for (i = 0; i < len; i++) {
        fGrammarMap.put(null2EmptyString(fNamespaces[i]), fGrammarList[i]);
        // update the idc field
        if (fGrammarList[i].hasIDConstraints()) {
            hasIDC = true;
        }
    }

    fHasIDC = hasIDC;
    fGrammarCount = len;
    fGlobalComponents = new XSNamedMap[MAX_COMP_IDX+1];
    fNSComponents = new XSNamedMap[len][MAX_COMP_IDX+1];
    fNamespacesList = new StringListImpl(fNamespaces, fGrammarCount);

    // build substitution groups
    fSubGroupMap = buildSubGroups();
}