// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String FRED_NS = "http://www.ontologydesignpatterns.org/ont/fred/domain.owl#";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final int PREFIX_NUM = 12;
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String TOP = "top";


import static amr2fred.Glossary.FRED_NS;
import static amr2fred.Glossary.PREFIX_NUM;
import static amr2fred.Glossary.TOP;
import java.io.ByteArrayOutputStream;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.jena.rdf.model.*;
import org.apache.log4j.BasicConfigurator;
        model.write(b, mode);
        String rdf = b.toString();
        return rdf;
    }

    /*
    Effettua la traduzione aggiungendo al modello Jena i nodi, a partire da quello radice,
    con una visita per livello. 
     */
    private void toRdf(Node root, boolean objectAsResource) {

        try {
            this.list.put(root);
        } catch (InterruptedException ex) {
            Logger.getLogger(RdfWriter.class.getName()).log(Level.SEVERE, null, ex);
        }

        while (!list.isEmpty()) {
            Node n = list.poll();
            for (Node n1 : n.list) {
                try {
                    list.put(n1);
                } catch (InterruptedException ex) {
                    Logger.getLogger(RdfWriter.class.getName()).log(Level.SEVERE, null, ex);
                }
            }

            for (Node n1 : n.list) {

                Resource r = model.createResource(this.getUri(n.var));
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String FRED_NS = "http://www.ontologydesignpatterns.org/ont/fred/domain.owl#";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final int PREFIX_NUM = 12;
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String TOP = "top";


// Path: amr2Fred/src/amr2fred/RdfWriter.java
import static amr2fred.Glossary.FRED_NS;
import static amr2fred.Glossary.PREFIX_NUM;
import static amr2fred.Glossary.TOP;
import java.io.ByteArrayOutputStream;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.jena.rdf.model.*;
import org.apache.log4j.BasicConfigurator;

        model.write(b, mode);
        String rdf = b.toString();
        return rdf;
    }

    /*
    Effettua la traduzione aggiungendo al modello Jena i nodi, a partire da quello radice,
    con una visita per livello. 
     */
    private void toRdf(Node root, boolean objectAsResource) {

        try {
            this.list.put(root);
        } catch (InterruptedException ex) {
            Logger.getLogger(RdfWriter.class.getName()).log(Level.SEVERE, null, ex);
        }

        while (!list.isEmpty()) {
            Node n = list.poll();
            for (Node n1 : n.list) {
                try {
                    list.put(n1);
                } catch (InterruptedException ex) {
                    Logger.getLogger(RdfWriter.class.getName()).log(Level.SEVERE, null, ex);
                }
            }

            for (Node n1 : n.list) {

                Resource r = model.createResource(this.getUri(n.var));
                if (!n1.relation.equalsIgnoreCase(TOP)) {