Java Code Examples for com.sun.org.apache.xerces.internal.xs.ElementPSVI#getErrorMessages()

The following examples show how to use com.sun.org.apache.xerces.internal.xs.ElementPSVI#getErrorMessages() . 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: PSVIElementNSImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param elem  the source of element PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fErrorMessages = elem.getErrorMessages();
    if (fTypeDecl instanceof XSSimpleTypeDefinition ||
            fTypeDecl instanceof XSComplexTypeDefinition &&
            ((XSComplexTypeDefinition)fTypeDecl).getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) {
        this.fValue.copyFrom(elem.getSchemaValue());
    }
    else {
        this.fValue.reset();
    }
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
Example 2
Source File: PSVIElementNSImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param elem  the source of element PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fErrorMessages = elem.getErrorMessages();
    if (fTypeDecl instanceof XSSimpleTypeDefinition ||
            fTypeDecl instanceof XSComplexTypeDefinition &&
            ((XSComplexTypeDefinition)fTypeDecl).getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) {
        this.fValue.copyFrom(elem.getSchemaValue());
    }
    else {
        this.fValue.reset();
    }
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
Example 3
Source File: ElementPSVImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public ElementPSVImpl(boolean isConstant, ElementPSVI elementPSVI) {
    fDeclaration = elementPSVI.getElementDeclaration();
    fTypeDecl = elementPSVI.getTypeDefinition();
    fNil = elementPSVI.getNil();
    fSpecified = elementPSVI.getIsSchemaSpecified();
    fValue.copyFrom(elementPSVI.getSchemaValue());
    fNotation = elementPSVI.getNotation();
    fValidationAttempted = elementPSVI.getValidationAttempted();
    fValidity = elementPSVI.getValidity();
    fValidationContext = elementPSVI.getValidationContext();
    if (elementPSVI instanceof ElementPSVImpl) {
        final ElementPSVImpl elementPSVIImpl = (ElementPSVImpl) elementPSVI;
        fErrors = (elementPSVIImpl.fErrors != null) ? elementPSVIImpl.fErrors.clone() : null;
        elementPSVIImpl.copySchemaInformationTo(this);
    }
    else {
        final StringList errorCodes = elementPSVI.getErrorCodes();
        final int length = errorCodes.getLength();
        if (length > 0) {
            final StringList errorMessages = elementPSVI.getErrorMessages();
            final String[] errors = new String[length << 1];
            for (int i = 0, j = 0; i < length; ++i) {
                errors[j++] = errorCodes.item(i);
                errors[j++] = errorMessages.item(i);
            }
            fErrors = errors;
        }
        fSchemaInformation = elementPSVI.getSchemaInformation();
    }
    fIsConstant = isConstant;
}
 
Example 4
Source File: ElementPSVImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public ElementPSVImpl(boolean isConstant, ElementPSVI elementPSVI) {
    fDeclaration = elementPSVI.getElementDeclaration();
    fTypeDecl = elementPSVI.getTypeDefinition();
    fNil = elementPSVI.getNil();
    fSpecified = elementPSVI.getIsSchemaSpecified();
    fValue.copyFrom(elementPSVI.getSchemaValue());
    fNotation = elementPSVI.getNotation();
    fValidationAttempted = elementPSVI.getValidationAttempted();
    fValidity = elementPSVI.getValidity();
    fValidationContext = elementPSVI.getValidationContext();
    if (elementPSVI instanceof ElementPSVImpl) {
        final ElementPSVImpl elementPSVIImpl = (ElementPSVImpl) elementPSVI;
        fErrors = (elementPSVIImpl.fErrors != null) ?
                (String[]) elementPSVIImpl.fErrors.clone() : null;
        elementPSVIImpl.copySchemaInformationTo(this);
    }
    else {
        final StringList errorCodes = elementPSVI.getErrorCodes();
        final int length = errorCodes.getLength();
        if (length > 0) {
            final StringList errorMessages = elementPSVI.getErrorMessages();
            final String[] errors = new String[length << 1];
            for (int i = 0, j = 0; i < length; ++i) {
                errors[j++] = errorCodes.item(i);
                errors[j++] = errorMessages.item(i);
            }
            fErrors = errors;
        }
        fSchemaInformation = elementPSVI.getSchemaInformation();
    }
    fIsConstant = isConstant;
}