<commit_before>package eas.com;

import eas.com.entity.Author;
import eas.com.handleerror.ErrorHandleGea;
import org.xml.sax.SAXException;

import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.util.JAXBSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
import java.io.File;
import java.io.IOException;

/**
 * Created by eduardo on 11/22/2016.
 * <p>
 * Validating using XSD
 */
public class MainApp4 {


    public static void main(String[] args) throws SAXException, JAXBException {

        /**
         * Error will be throw because the numberBooks is > 100
         */
        Author author = new Author("Nelson", "Eduardo", "Alfonso", "Martinez", 150, 2000.36f, "Adventure");


        /**
         *  ok
         */
        Author author1 = new Author("Martha", "Paula", "Martinez", "Pozo", 50, 547.26f, "Horror");


        /**
         * Error will be throw cause the genre is wrong
         */
        Author author2 = new Author("Leydis", "Esther", "Garzon", "Giro", 80, 9666.36f, "Drama");


        /**
         * Schema is created
         */
        SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
        Schema schema = schemaFactory.newSchema(new File("author.xsd"));


        /**
         * context is created and used to create sources for each country
         */
        JAXBContext jaxbContext = JAXBContext.newInstance(Author.class);
        JAXBSource jaxbSourceAuthor = new JAXBSource(jaxbContext, author);
        JAXBSource jaxbSourceAuthor1 = new JAXBSource(jaxbContext, author1);
        JAXBSource jaxbSourceAuthor2 = new JAXBSource(jaxbContext, author2);
<commit_msg>JavaGea Project<commit_after>package eas.com;

import eas.com.entity.Author;
import eas.com.handleerror.ErrorHandleGea;
import org.xml.sax.SAXException;

import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.util.JAXBSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
import java.io.File;
import java.io.IOException;

/**
 * Created by eduardo on 11/22/2016.
 * <p>
 * Validating using XSD
 */
public class MainApp4 {


    public static void main(String[] args) throws SAXException, JAXBException {

        /**
         * Error will be throw because the numberBooks is > 100
         */
        Author author = new Author("James ", "Clerk", "Maxwell", "Physical", 150, 2000.36f, "Adventure");


        /**
         *  ok
         */
        Author author1 = new Author("John", "Henry", "Poynting", "Energy", 50, 547.26f, "Horror");


        /**
         * Error will be throw cause the genre is wrong
         */
        Author author2 = new Author("Augusta", "Ada", "King", "Noel", 80, 9666.36f, "Drama");


        /**
         * Schema is created
         */
        SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
        Schema schema = schemaFactory.newSchema(new File("author.xsd"));


        /**
         * context is created and used to create sources for each country
         */
        JAXBContext jaxbContext = JAXBContext.newInstance(Author.class);
        JAXBSource jaxbSourceAuthor = new JAXBSource(jaxbContext, author);
        JAXBSource jaxbSourceAuthor1 = new JAXBSource(jaxbContext, author1);
        JAXBSource jaxbSourceAuthor2 = new JAXBSource(jaxbContext, author2);

{'fraction_non_alphanumeric': 0.11284916201117319, 'fraction_numerical': 0.024022346368715083, 'mean_word_length': 2.9656699889258027, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4928331', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1088, 'n_words': 269}