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

The following examples show how to use com.sun.org.apache.xerces.internal.impl.xs.util.StringListImpl. 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 File: IdentityConstraint.java    From openjdk-jdk8u with 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 #2
Source File: IdentityConstraint.java    From TencentKona-8 with 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 #3
Source File: ElementPSVImpl.java    From openjdk-jdk9 with 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 #4
Source File: ElementPSVImpl.java    From openjdk-jdk9 with 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 #5
Source File: AttributePSVImpl.java    From openjdk-jdk9 with 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 #6
Source File: PSVIElementNSImpl.java    From openjdk-jdk9 with 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 #7
Source File: IdentityConstraint.java    From openjdk-jdk9 with 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 #8
Source File: IdentityConstraint.java    From openjdk-8 with 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 #9
Source File: IdentityConstraint.java    From jdk1.8-source-analysis with 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 #10
Source File: IdentityConstraint.java    From hottub with 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 #11
Source File: IdentityConstraint.java    From openjdk-8-source with 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 #12
Source File: PSVIElementNSImpl.java    From openjdk-jdk9 with 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 (fErrorCodes != null) {
        return fErrorCodes;
    }
    return StringListImpl.EMPTY_LIST;
}
 
Example #13
Source File: PSVIAttrNSImpl.java    From openjdk-jdk9 with 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 #14
Source File: IdentityConstraint.java    From jdk8u60 with 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 #15
Source File: PSVIAttrNSImpl.java    From openjdk-jdk9 with 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 #16
Source File: IdentityConstraint.java    From openjdk-jdk8u-backup with 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 #17
Source File: PSVIAttrNSImpl.java    From Bytecoder with 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 #18
Source File: PSVIAttrNSImpl.java    From Bytecoder with 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 #19
Source File: PSVIElementNSImpl.java    From Bytecoder with 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 #20
Source File: PSVIElementNSImpl.java    From Bytecoder with 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 #21
Source File: IdentityConstraint.java    From JDKSourceCode1.8 with 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 #22
Source File: ElementPSVImpl.java    From Bytecoder with 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 #23
Source File: ElementPSVImpl.java    From Bytecoder with 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 #24
Source File: AttributePSVImpl.java    From Bytecoder with 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 #25
Source File: AttributePSVImpl.java    From Bytecoder with 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 #26
Source File: IdentityConstraint.java    From Bytecoder with 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 #27
Source File: XSImplementationImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public StringList getRecognizedVersions() {
    StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
    return list;
}
 
Example #28
Source File: XSModelImpl.java    From openjdk-jdk9 with 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
Source File: XSImplementationImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public StringList getRecognizedVersions() {
    StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
    return list;
}
 
Example #30
Source File: XSModelImpl.java    From openjdk-8-source with 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();
}