org.eclipse.persistence.jaxb.ValidationXMLReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.eclipse.persistence.moxy
Show all versions of org.eclipse.persistence.moxy
EclipseLink build based upon Git transaction fe64cd39c3
/*******************************************************************************
* Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Marcel Valovy - initial API and implementation
* Dmitry Kornilov - BeanValidationHelper refactoring
******************************************************************************/
package org.eclipse.persistence.jaxb;
import org.eclipse.persistence.exceptions.BeanValidationException;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Parses validation.xml, scanning for constraints file reference. If found,
* it will parse the constraints file and put all classes declared under into
* {@link org.eclipse.persistence.jaxb.BeanValidationHelper#constraintsOnClasses} with value
* {@link Boolean#TRUE}.
*/
public class ValidationXMLReader implements Callable