Java Code Examples for com.sun.xml.internal.xsom.XSSchemaSet#getSimpleType()

The following examples show how to use com.sun.xml.internal.xsom.XSSchemaSet#getSimpleType() . 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: BIGlobalBinding.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 2
Source File: BIGlobalBinding.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 3
Source File: BIGlobalBinding.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 4
Source File: BIGlobalBinding.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 5
Source File: BIGlobalBinding.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 6
Source File: BIGlobalBinding.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 7
Source File: BIGlobalBinding.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 8
Source File: BIGlobalBinding.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 9
Source File: BIGlobalBinding.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 10
Source File: BIGlobalBinding.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 11
Source File: BIGlobalBinding.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 12
Source File: BIGlobalBinding.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 13
Source File: BIGlobalBinding.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 14
Source File: BIGlobalBinding.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}
 
Example 15
Source File: BIGlobalBinding.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Performs error check
 */
public void errorCheck() {
    ErrorReceiver er = Ring.get(ErrorReceiver.class);
    for (QName n : enumBaseTypes) {
        XSSchemaSet xs = Ring.get(XSSchemaSet.class);
        XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
        if(st==null) {
            er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
            continue;
        }

        if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
            er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
            continue;
        }
    }
}
 
Example 16
Source File: BIGlobalBinding.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Moves global BIConversion to the right object.
 */
public void dispatchGlobalConversions( XSSchemaSet schema ) {
    // also set parent to the global conversions
    for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {

        QName name = e.getKey();
        BIConversion conv = e.getValue();

        XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
        if(st==null) {
            Ring.get(ErrorReceiver.class).error(
                getLocation(),
                Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
            );
            continue; // abort
        }

        getBuilder().getOrCreateBindInfo(st).addDecl(conv);
    }
}