Java Code Examples for com.sun.org.apache.xerces.internal.xs.XSConstants#STRING_DT

The following examples show how to use com.sun.org.apache.xerces.internal.xs.XSConstants#STRING_DT . 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: XSSimpleTypeDecl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 2
Source File: XMLSchemaValidator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 3
Source File: Field.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 4
Source File: XSSimpleTypeDecl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 5
Source File: XSSimpleTypeDecl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 6
Source File: XMLSchemaValidator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 7
Source File: XMLSchemaValidator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 8
Source File: XSSimpleTypeDecl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 9
Source File: XSSimpleTypeDecl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 10
Source File: Field.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 11
Source File: Field.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 12
Source File: Field.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 13
Source File: XSSimpleTypeDecl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 14
Source File: XMLSchemaValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 15
Source File: XSSimpleTypeDecl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private short convertToPrimitiveKind(short valueType) {
    /** Primitive datatypes. */
    if (valueType <= XSConstants.NOTATION_DT) {
        return valueType;
    }
    /** Types derived from string. */
    if (valueType <= XSConstants.ENTITY_DT) {
        return XSConstants.STRING_DT;
    }
    /** Types derived from decimal. */
    if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
        return XSConstants.DECIMAL_DT;
    }
    /** Other types. */
    return valueType;
}
 
Example 16
Source File: ValidatedInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns true if the two ValidatedInfo objects can be compared in the same
 * value space.
 */
public static boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}
 
Example 17
Source File: XMLSchemaValidator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
private boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}
 
Example 18
Source File: XMLSchemaValidator.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
private boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}
 
Example 19
Source File: ValidatedInfo.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns true if the two ValidatedInfo objects can be compared in the same
 * value space.
 */
public static boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}
 
Example 20
Source File: XMLSchemaValidator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
private boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}