Java Code Examples for com.sun.org.apache.xerces.internal.xs.StringList#contains()

The following examples show how to use com.sun.org.apache.xerces.internal.xs.StringList#contains() . 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: XMLSchemaValidator.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 2
Source File: XMLSchemaValidator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 3
Source File: XMLSchemaValidator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 4
Source File: XMLSchemaValidator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 5
Source File: XMLSchemaValidator.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 6
Source File: XMLSchemaValidator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 7
Source File: XMLSchemaValidator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 8
Source File: XMLSchemaValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 9
Source File: XMLSchemaValidator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        try {
            String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
            if (!docLocations.contains(id)) {
                hints[counter++] = locations[i];
            }
        }
        catch (MalformedURIException e) {
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 10
Source File: XMLSchemaValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
    int length = locations.length;
    String[] hints = new String[length];
    int counter = 0;

    for (int i=0; i<length; i++) {
        if (!docLocations.contains(locations[i])) {
            hints[counter++] = locations[i];
        }
    }

    if (counter > 0) {
        if (counter == length) {
            fXSDDescription.fLocationHints = hints;
        }
        else {
            fXSDDescription.fLocationHints = new String[counter];
            System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
        }
    }
}
 
Example 11
Source File: XSDHandler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 12
Source File: XSDHandler.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 13
Source File: XSDHandler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 14
Source File: XSDHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 15
Source File: XSDHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 16
Source File: XSDHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 17
Source File: XSDHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 18
Source File: XSDHandler.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 19
Source File: XSDHandler.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}
 
Example 20
Source File: XSDHandler.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
    final StringList locations = srcGrammar.getDocumentLocations();
    final int locSize = locations.size();
    final StringList locations2 = dstGrammar.getDocumentLocations();

    for (int i=0; i<locSize; i++) {
        String loc = locations.item(i);
        if (!locations2.contains(loc)) {
            dstGrammar.addDocument(null, loc);
        }
    }
}