Java 8 SAXNotRecognizedException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SAXNotRecognizedException class.

This code example shows how to use the following methods:
	 * @throws org.xml.sax.SAXNotRecognizedException 
	 *          always 
	 */ 
	@Override 
	public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
		throw new SAXNotRecognizedException(name);
	} 
 
	/** 
	 * Throws a {@code SAXNotRecognizedException} exception. 
	 * 
	 * @throws SAXNotRecognizedException always 
	 */ 
	@Override 
	public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
		throw new SAXNotRecognizedException(name);
	} 
 
	/** 
	 * Throws a {@code SAXNotRecognizedException} exception when the given property does not signify a lexical 
6
CodeRank
This code example shows how to use the following methods:
			return this.lexicalHandler;
		} 
 
		@Override 
		public boolean getFeature(String name) throws SAXNotRecognizedException {
			throw new SAXNotRecognizedException(name);
		} 
 
		@Override 
		public void setFeature(String name, boolean value) throws SAXNotRecognizedException {
			throw new SAXNotRecognizedException(name);
		} 
 
		@Override 
		public Object getProperty(String name) throws SAXNotRecognizedException {
			if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
				return lexicalHandler;
			} 
			else { 
				throw new SAXNotRecognizedException(name);
6
CodeRank
This code example shows how to use the following methods:getClass, getMessage
            try { 
                parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                parser.setProperty(JAXP_SCHEMA_SOURCE, schemaStream);
            } catch (SAXNotRecognizedException ex) {
                Message.warn("problem while setting JAXP validating property on SAXParser... " 
                        + "XML validation will not be done (" + ex.getClass().getName() + ": "
                        + ex.getMessage() + ")");
                canUseSchemaValidation = false;
                parserFactory.setValidating(false);
                parser = parserFactory.newSAXParser();
            } 
        } 
 
        parser.getXMLReader().setFeature(XML_NAMESPACE_PREFIXES, true);
        return parser;
    } 
 
    private static boolean canDisableExternalDtds(SAXParserFactory parserFactory) {
        if (canDisableExternalDtds == null) {
            try { 
5
CodeRank
This code example shows how to use the following methods:getMessage
This code example shows how to use the following methods:getMessage
This code example shows how to use the following methods:getMessage
This code example shows how to use the following methods:getMessage
                parser.setProperty(JAXP_SCHEMA_LANGUAGE, schemaLanguage);
                parser.setProperty(JAXP_SCHEMA_SOURCE, schemaLocation);
            } 
        } catch (SAXNotRecognizedException e){
            log.info(parser.getClass().getName() + ": " 
                                        + e.getMessage() + " not supported."); 
        } 
 
    } 
 
 
    /** 
     * Configure schema validation as recommended by the Xerces spec.  
     * Both DTD and Schema validation will be enabled simultaneously. 
     * @param factory SAXParserFactory to be configured 
     */ 
    private static void configureXerces(SAXParserFactory factory)
            throws ParserConfigurationException,  
                   SAXNotRecognizedException,  
                   SAXNotSupportedException { 
5
CodeRank
This code example shows how to use the following methods:getLocalizedMessage
		} 
		catch (SAXNotSupportedException e) {
			throw new IllegalStateException(e.getLocalizedMessage());
		} 
		catch (SAXNotRecognizedException e) {
			throw new IllegalStateException(e.getLocalizedMessage());
		} 
		catch (ParserConfigurationException e) {
			throw new IllegalStateException(e.getLocalizedMessage());
		} 
		init(this.digester);			
	} 
	 
	public final T parse(String s) throws IOException {
		return parse(s.getBytes());
	} 
	 
	@SuppressWarnings("unchecked") 
	public synchronized final T parse(byte[] data) throws IOException {
		this.digester.clear();		
4
CodeRank
This code example shows how to use the following methods:
                AnyAttributeHandler sth = new AnyAttributeHandler();
 
                if (anyAttribute == null) {
                    anyAttribute = sth;
                } else { 
                    throw new SAXNotRecognizedException(LOCALNAME
                        + " may only have one child declaration."); 
                } 
 
                return sth;
            } 
        } 
 
        return null; 
    } 
 
    /** 
     * @see org.geotools.xml.XSIElementHandler#startElement(java.lang.String, 
     *      java.lang.String, org.xml.sax.Attributes) 
     */ 
4
CodeRank
This code example shows how to use the following methods:
                SelectorHandler sth = new SelectorHandler();
 
                if (selector == null) {
                    selector = sth;
                } else { 
                    throw new SAXNotRecognizedException(LOCALNAME
                        + " may only have one child."); 
                } 
 
                return sth;
            } 
        } 
 
        return null; 
    } 
 
    /** 
     * @see org.geotools.xml.XSIElementHandler#startElement(java.lang.String, 
     *      java.lang.String, org.xml.sax.Attributes) 
     */ 
4
CodeRank
See Code Examples for Java 8 SAXNotRecognizedException Methods: