// Path: src/main/java/eu/delving/x3ml/engine/X3ML.java
// public static class GeneratedValue {
// 
//     public final GeneratedType type;
//     public final String text;
//     public final String language;
// 
//     public GeneratedValue(GeneratedType type, String text, String language) {
//         this.type = type;
//         this.text = text;
//         this.language = language;
//     }
// 
//     public GeneratedValue(GeneratedType type, String text) {
//         this(type, text, null);
//     }
// 
//     public String toString() {
//         return type + ":" + text;
//     }
// }


import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import javax.xml.namespace.NamespaceContext;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static eu.delving.x3ml.engine.X3ML.GeneratedValue;


    public ModelOutput getModelOutput() {
        return modelOutput;
    }

    public List<Domain> createDomainContexts(X3ML.DomainElement domain) {
        List<Node> domainNodes = xpathInput.nodeList(rootNode, domain.source_node);
        List<Domain> domains = new ArrayList<Domain>();
        int index = 1;
        for (Node domainNode : domainNodes) {
            Domain domainContext = new Domain(context, domain, domainNode, index++);
            if (domainContext.resolve()) {
                domains.add(domainContext);
            } else {
                System.out.println("Unresolved: " + domainContext);
            }
        }
        return domains;
    }

    public interface Context {

        XPathInput input();

        ModelOutput output();

        Generator policy();

        GeneratedValue getGeneratedValue(String xpath);


// Path: src/main/java/eu/delving/x3ml/engine/X3ML.java
// public static class GeneratedValue {
// 
//     public final GeneratedType type;
//     public final String text;
//     public final String language;
// 
//     public GeneratedValue(GeneratedType type, String text, String language) {
//         this.type = type;
//         this.text = text;
//         this.language = language;
//     }
// 
//     public GeneratedValue(GeneratedType type, String text) {
//         this(type, text, null);
//     }
// 
//     public String toString() {
//         return type + ":" + text;
//     }
// }


// Path: src/main/java/eu/delving/x3ml/engine/Root.java
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import javax.xml.namespace.NamespaceContext;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static eu.delving.x3ml.engine.X3ML.GeneratedValue;


    public ModelOutput getModelOutput() {
        return modelOutput;
    }

    public List<Domain> createDomainContexts(X3ML.DomainElement domain) {
        List<Node> domainNodes = xpathInput.nodeList(rootNode, domain.source_node);
        List<Domain> domains = new ArrayList<Domain>();
        int index = 1;
        for (Node domainNode : domainNodes) {
            Domain domainContext = new Domain(context, domain, domainNode, index++);
            if (domainContext.resolve()) {
                domains.add(domainContext);
            } else {
                System.out.println("Unresolved: " + domainContext);
            }
        }
        return domains;
    }

    public interface Context {

        XPathInput input();

        ModelOutput output();

        Generator policy();

        GeneratedValue getGeneratedValue(String xpath);


        void putGeneratedValue(String xpath, GeneratedValue generatedValue);
