Examples of validate()


Examples of org.apache.wss4j.stax.validate.UsernameTokenValidator.validate()

        // upper bounds org.apache.wss4j.stax.securityToken.UsernameSecurityToken,
        // org.apache.wss4j.stax.securityToken.UsernameSecurityToken,
        // org.apache.xml.security.stax.ext.securityToken.InboundSecurityToken
        //works fine on jdk 1.7
        final UsernameSecurityToken usernameSecurityToken =
                usernameTokenValidator.</*fake @see above*/UsernameSecurityTokenImpl>
                        validate(usernameTokenType, tokenContext);

        SecurityTokenProvider<InboundSecurityToken> securityTokenProvider =
                new SecurityTokenProvider<InboundSecurityToken>() {

View Full Code Here

Examples of org.apache.xerces.impl.dtd.models.ContentModelValidator.validate()

        else if (contentType == XMLElementDecl.TYPE_MIXED || 
                 contentType == XMLElementDecl.TYPE_CHILDREN) {
            // Get the content model for this element, faulting it in if needed
            ContentModelValidator cmElem = null;
            cmElem = fTempElementDecl.contentModelValidator;
            int result = cmElem.validate(children, childOffset, childCount);
            return result;
        }
        else if (contentType == -1) {
            //REVISIT
            /****
 
View Full Code Here

Examples of org.apache.xerces.impl.dv.XSSimpleType.validate()

        // get simple type
        XSSimpleType attDV = currDecl.fType;
       
        Object actualValue = null;
        try {
            actualValue = attDV.validate(attrValue, fValidationState, fValidatedInfo);
            // store the normalized value
            if (fNormalizeData)
                attributes.setValue(index, fValidatedInfo.normalizedValue);
            if (attributes instanceof XMLAttributesImpl) {
                XMLAttributesImpl attrs = (XMLAttributesImpl)attributes;
View Full Code Here

Examples of org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.validate()

        if (type1 == TYPE_UNTYPED && type2 == TYPE_DOUBLE) {
            // attribute and numeral
            String attrValue = child1.getValue(attributes).toString();
            simpleType = (XSSimpleTypeDecl) dvFactory.getBuiltInType("double");
            //cast the attribute value into double as per the XPath 2.0 general comparison rules
            obj1 = simpleType.validate(attrValue, null, null);
            obj2 = child2.getValue(attributes);
            return DataMatcher.compareActualValues(obj1, obj2, comp, simpleType);
           
        } else if (type1 == TYPE_UNTYPED && type2 == TYPE_STRING) {
            // attribute and string
View Full Code Here

Examples of org.apache.xerces.impl.validation.ContentModelValidator.validate()

        } else if (contentType == XMLElementDecl.TYPE_MIXED || 
                   contentType == XMLElementDecl.TYPE_CHILDREN) {
            // Get the content model for this element, faulting it in if needed
            ContentModelValidator cmElem = null;
            cmElem = fTempElementDecl.contentModelValidator;
            int result = cmElem.validate(children, childOffset, childCount);
            return result;
        } else if (contentType == -1) {
            //REVISIT
            /****
            reportRecoverableXMLError(XMLMessages.MSG_ELEMENT_NOT_DECLARED,
View Full Code Here

Examples of org.apache.xerces.impl.validation.DatatypeValidator.validate()

        while (listOfDatatypes.hasMoreElements()) {
            System.out.println( "Datatype[ " + (index++) + "] =" + listOfDatatypes.nextElement() );
        }
        String value = "3.444";
        try {
            tstData4.validate( value, null );
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        System.out.println("Value = " + value + " is valid " );
View Full Code Here

Examples of org.apache.xerces.validators.datatype.DatatypeValidator.validate()

            if (attType == XMLAttributeDecl.TYPE_SIMPLE && attDefaultValue != -1) {
                try {
                    if (dv != null)
                        //REVISIT
                        dv.validate(fStringPool.toString(attDefaultValue), null);
                    else
                        reportSchemaError(SchemaMessageProvider.NoValidatorFor,
                                          new Object [] { datatype });
                } catch (InvalidDatatypeValueException idve) {
                    reportSchemaError(SchemaMessageProvider.IncorrectDefaultType,
View Full Code Here

Examples of org.apache.xml.xmlbeans.x2004.x02.xmlbean.ltgfmt.TestsDocument.validate()

            XmlOptions ltgOptions = new XmlOptions();
            ltgOptions.setLoadSubstituteNamespaces(Collections.singletonMap("", "http://xml.apache.org/xmlbeans/2004/02/xmlbean/ltgfmt"));
            ltgOptions.setErrorListener(errors);
            ltgOptions.setLoadLineNumbers();
            TestsDocument doc = TestsDocument.Factory.parse(ltgFile, ltgOptions);
            if (!doc.validate(ltgOptions))
                throw new Exception("Document " + ltgFile + " not valid.");

            org.apache.xml.xmlbeans.x2004.x02.xmlbean.ltgfmt.TestCase[] testCases = doc.getTests().getTestArray();

            Collection result = new ArrayList();
View Full Code Here

Examples of org.apache.xmlbeans.XmlAnySimpleType.validate()

                    if (valueConstraint != null)
                    {
                        try
                        {
                            XmlAnySimpleType val = sAttrs[i].getDefaultValue();
                            if (!val.validate())
                                throw new Exception();
                           
                            SchemaPropertyImpl sProp = (SchemaPropertyImpl)sType.getAttributeProperty(sAttrs[i].getName());
                            if (sProp != null && sProp.getDefaultText() != null)
                            {
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.validate()

                        StscState.addError(errorListener, XmlErrorCodes.INVALID_DOCUMENT_TYPE, new Object[] {
                            configFiles[i], "xsd config"
                        }, configdoc);
                    } else {
                        StscState.addInfo(errorListener, "Loading config file " + configFiles[i]);
                        if (configdoc.validate(new XmlOptions().setErrorListener(errorListener))) {
                            ConfigDocument.Config config = ((ConfigDocument)configdoc).getConfig();
                            cdoclist.add(config);
                            config.setExtensionArray(new Extensionconfig[] {});
                        }
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.