// 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;

            extracted_content = element.select(extraction_properties.selector).attr("href");
            if (extracted_content.equals("")) {
                extracted_content = element.select(extraction_properties.selector).attr("data-tab-content");
                if (!extracted_content.equals("")) {
                    extracted_content = source + "#" + extracted_content;
                }
            }
        } else if (extraction_properties.type.equals("image")) {
            extracted_content = element.select(extraction_properties.selector).attr("src");
        } else if (extraction_properties.type.equals("html")) {
            extracted_content = element.select(extraction_properties.selector).html();
        } else if (extraction_properties.type.equals("list")) {
            extracted_content = extractList(element, extraction_properties.selector);
        } else {
            extracted_content = element.select(extraction_properties.selector).attr(extraction_properties.type);
        }

        if (extracted_content.equals("")) {
            System.out.println("WARNING: No content found in the specified element:|" + element.cssSelector() + " " + extraction_properties.selector + "| Please check the correction of the defined extraction rule or for possible changes in the source!");
        }
        if (extracted_content instanceof String && extraction_properties.replace != null) {
            extracted_content = processContent(
                    (String) extracted_content,
                    extraction_properties.replace
            );
        }

        return extracted_content;
    }


// 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;

            extracted_content = element.select(extraction_properties.selector).attr("href");
            if (extracted_content.equals("")) {
                extracted_content = element.select(extraction_properties.selector).attr("data-tab-content");
                if (!extracted_content.equals("")) {
                    extracted_content = source + "#" + extracted_content;
                }
            }
        } else if (extraction_properties.type.equals("image")) {
            extracted_content = element.select(extraction_properties.selector).attr("src");
        } else if (extraction_properties.type.equals("html")) {
            extracted_content = element.select(extraction_properties.selector).html();
        } else if (extraction_properties.type.equals("list")) {
            extracted_content = extractList(element, extraction_properties.selector);
        } else {
            extracted_content = element.select(extraction_properties.selector).attr(extraction_properties.type);
        }

        if (extracted_content.equals("")) {
            System.out.println("WARNING: No content found in the specified element:|" + element.cssSelector() + " " + extraction_properties.selector + "| Please check the correction of the defined extraction rule or for possible changes in the source!");
        }
        if (extracted_content instanceof String && extraction_properties.replace != null) {
            extracted_content = processContent(
                    (String) extracted_content,
                    extraction_properties.replace
            );
        }

        return extracted_content;
    }


    protected String processContent(String content, ReplaceField replace_properties) throws PostProcessingException {
