// Path: src/main/java/certh/iti/mklab/easie/FIELD_TYPE.java
// public enum FIELD_TYPE {
//     METRIC,
//     COMPANY_INFO
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ExtractionProperties {
// 
//     public String selector;
// 
//     public String type;
// 
//     public Object citeyear;
// 
//     public ReplaceField replace;
// 
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ReplaceField {
// 
//     public List<String> regex;
// 
//     public List<String> with;
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ScrapableField {
// 
//     public Object label;
// 
//     public Object value;
// 
//     public Object citeyear;
// 
//     public void setLabel(ExtractionProperties ep) {
//         label = ep;
//     }
// 
//     public void setValue(ExtractionProperties ep) {
//         value = ep;
//     }
// 
//     public void setCiteyear(ExtractionProperties ep) {
//         citeyear = ep;
//     }
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/exception/HTMLElementNotFoundException.java
// public class HTMLElementNotFoundException extends Exception {
// 
//     public HTMLElementNotFoundException() {
//     }
// 
//     public HTMLElementNotFoundException(String message) {
//         super(message);
//     }
// 
//     public HTMLElementNotFoundException(Throwable cause) {
//         super(cause);
//     }
// 
//     public HTMLElementNotFoundException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/exception/PostProcessingException.java
// public class PostProcessingException extends Exception {
//    public PostProcessingException(){
//       
//    }
//    
//    public PostProcessingException(String message){
//       super(message);
//    }
//    
//    public PostProcessingException(Throwable cause){
//       super(cause);
//    }
//    
//    public PostProcessingException(String message, Throwable cause){
//       super(message, cause);
//    }
// }


import certh.iti.mklab.easie.FIELD_TYPE;
import certh.iti.mklab.easie.configuration.Configuration.ExtractionProperties;
import certh.iti.mklab.easie.configuration.Configuration.ReplaceField;
import certh.iti.mklab.easie.configuration.Configuration.ScrapableField;
import certh.iti.mklab.easie.exception.HTMLElementNotFoundException;
import certh.iti.mklab.easie.exception.PostProcessingException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.bson.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

            } else {
                try {
                    field_citeyear = (Integer) Integer.parseInt((String) extractContent((ExtractionProperties) field.citeyear, element));
                } catch (NumberFormatException ex) {
                    field_citeyear = null;
                }
                if (field_citeyear == null) {
                    field_citeyear = Calendar.getInstance().get(Calendar.YEAR);
                }
            }
        } catch (NullPointerException ex) {
            field_citeyear = Calendar.getInstance().get(Calendar.YEAR);

        }

        Document extracted_content = new Document();
        extracted_content
                .append("name", field_name)
                .append("citeyear", field_citeyear);
        if (field.value instanceof String) {
            field_value = (String) field.value;

            if (field_value.toString().trim().equals("0") || field_value.toString().trim().toLowerCase().equals("false") || field_value.toString().trim().toLowerCase().equals("no")) {
                extracted_content.append("value", false);
                extracted_content.append("type", "boolean");
            } else if (field_value.toString().trim().equals("1") || field_value.toString().trim().toLowerCase().equals("true") || field_value.toString().trim().toLowerCase().equals("yes")) {
                extracted_content.append("value", true);
                extracted_content.append("type", "boolean");
            } else if (field_value.toString().replaceAll("[0-9\\.,]", "").trim().equals("")) {
                try {

// Path: src/main/java/certh/iti/mklab/easie/FIELD_TYPE.java
// public enum FIELD_TYPE {
//     METRIC,
//     COMPANY_INFO
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ExtractionProperties {
// 
//     public String selector;
// 
//     public String type;
// 
//     public Object citeyear;
// 
//     public ReplaceField replace;
// 
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ReplaceField {
// 
//     public List<String> regex;
// 
//     public List<String> with;
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/configuration/Configuration.java
// public static class ScrapableField {
// 
//     public Object label;
// 
//     public Object value;
// 
//     public Object citeyear;
// 
//     public void setLabel(ExtractionProperties ep) {
//         label = ep;
//     }
// 
//     public void setValue(ExtractionProperties ep) {
//         value = ep;
//     }
// 
//     public void setCiteyear(ExtractionProperties ep) {
//         citeyear = ep;
//     }
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/exception/HTMLElementNotFoundException.java
// public class HTMLElementNotFoundException extends Exception {
// 
//     public HTMLElementNotFoundException() {
//     }
// 
//     public HTMLElementNotFoundException(String message) {
//         super(message);
//     }
// 
//     public HTMLElementNotFoundException(Throwable cause) {
//         super(cause);
//     }
// 
//     public HTMLElementNotFoundException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/certh/iti/mklab/easie/exception/PostProcessingException.java
// public class PostProcessingException extends Exception {
//    public PostProcessingException(){
//       
//    }
//    
//    public PostProcessingException(String message){
//       super(message);
//    }
//    
//    public PostProcessingException(Throwable cause){
//       super(cause);
//    }
//    
//    public PostProcessingException(String message, Throwable cause){
//       super(message, cause);
//    }
// }


// Path: src/main/java/certh/iti/mklab/easie/extractors/AbstractContentExtractor.java
import certh.iti.mklab.easie.FIELD_TYPE;
import certh.iti.mklab.easie.configuration.Configuration.ExtractionProperties;
import certh.iti.mklab.easie.configuration.Configuration.ReplaceField;
import certh.iti.mklab.easie.configuration.Configuration.ScrapableField;
import certh.iti.mklab.easie.exception.HTMLElementNotFoundException;
import certh.iti.mklab.easie.exception.PostProcessingException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.bson.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

            } else {
                try {
                    field_citeyear = (Integer) Integer.parseInt((String) extractContent((ExtractionProperties) field.citeyear, element));
                } catch (NumberFormatException ex) {
                    field_citeyear = null;
                }
                if (field_citeyear == null) {
                    field_citeyear = Calendar.getInstance().get(Calendar.YEAR);
                }
            }
        } catch (NullPointerException ex) {
            field_citeyear = Calendar.getInstance().get(Calendar.YEAR);

        }

        Document extracted_content = new Document();
        extracted_content
                .append("name", field_name)
                .append("citeyear", field_citeyear);
        if (field.value instanceof String) {
            field_value = (String) field.value;

            if (field_value.toString().trim().equals("0") || field_value.toString().trim().toLowerCase().equals("false") || field_value.toString().trim().toLowerCase().equals("no")) {
                extracted_content.append("value", false);
                extracted_content.append("type", "boolean");
            } else if (field_value.toString().trim().equals("1") || field_value.toString().trim().toLowerCase().equals("true") || field_value.toString().trim().toLowerCase().equals("yes")) {
                extracted_content.append("value", true);
                extracted_content.append("type", "boolean");
            } else if (field_value.toString().replaceAll("[0-9\\.,]", "").trim().equals("")) {
                try {

                    field_value = Double.parseDouble(field_value.toString().replaceAll("[^0-9\\.]", "").trim());
