Newsgroup: it.comp.java
Titolo: errore al mio codice

Salve a tutti,
qui di seguito vi ho incollato il mio codice che sto sviluppando alle righe:
processNode( document );
processNode( children.item( i ));
mi esce questo errore:
processNode(org.w3c.dom.Node, int) in traduttore cannot be applied to
(org.w3c.dom.Document)
import java.io.*;
import org.w3c.dom.*;
import org.w3c.dom.Node;
import org.xml.sax.*;
import javax.xml.parsers.*;
import com.sun.xml.tree.XmlDocument;
import org.w3c.dom.Document;
import java.util.Enumeration;
import java.lang.*;
import javax.swing.*;
public class traduttore
{
    private Document document;
    private String Node;
    Node currentNode;
       public static final int top = 0;
        public static final int bottom = 1;
        public static final int and = 2;
        public static final int or = 3;
        public static final int impliesc = 4;
        public static final int equalc = 5;
        public static final int disjoint = 6;
        public static final int domain = 7;
        public static final int range = 8;
        public static final int inverse = 9;
        public static final int defindividual = 10;
        public static final int defconcept = 11;
        public static final int all = 12;
        public static final int instanceof_ = 14;
    /** Creates a new instance of traduttore */
    public traduttore( String file ) {
    try {
            //determina il parser di default
            DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
            factory.setValidating( true );
            DocumentBuilder builder = factory.newDocumentBuilder();
            //imposta il gestore degli errori di convalida
            builder.setErrorHandler( new MyErrorHandler() );
            //acquisisce l'oggetto document dal documento XML
            document = builder.parse( new File(file));
            processNode( document );
        }
        catch ( SAXParseException spe)
        {
            System.err.println ( "Parse error:" + spe.getMessage());
            System.exit(1);
        }
        catch ( SAXException se )
        {
            se.printStackTrace();
        }
        catch ( FileNotFoundException fne) {
            System.err.println( "file \'" + file + "\'not found." );
            System.exit(1);
        }
        catch ( Exception e ) {
            e.printStackTrace();
        }
        }
     public void valore(Node currentNode, int valore)
    {
        if(currentNode == null) return;
     valore = Integer.parseInt(currentNode.getNodeValue());
        switch (valore)
        {
            case top :
            currentNode.setNodeValue("<owl:Thing>");
            break;
            case bottom :
            currentNode.setNodeValue("<owl:Nothing>");
            break;
            case and :
            currentNode.setNodeValue("<owl:intersectionOf>");
            break;
            case all :
             {
                currentNode.setNodeValue("<owl:allValuesFrom>");
            if (currentNode.getNodeValue().equals("atleast num=" + ""));
            {
                currentNode.setNodeValue("<owl:minCardinality>");
            }
            if (currentNode.getNodeValue().equals("ratom name="+"" ));
            {
                currentNode.setNodeValue("<owl:ObjectProperty>");
            }
             if (currentNode.getNodeValue().equals("top"));
            {
                currentNode.setNodeValue("<owl:Thing>");
            }
            }
            break;
            case or :
            currentNode.setNodeValue("<owl:unionOf>");
            break;
            case impliesc :
            currentNode.setNodeValue("<rdfs:subClassOf>");
            break;
            case equalc :
            currentNode.setNodeValue("<owl:equivalentClass>");
            break;
            case disjoint :
            currentNode.setNodeValue("<owl:disjointWith>");
            break;
            case domain :
            currentNode.setNodeValue("<rdfs:domain>");
            break;
            case range :
            currentNode.setNodeValue("<rdfs:range>");
            break;
            case inverse :
            currentNode.setNodeValue("<owl:inverseOf>");
            break;
            case instanceof_ :
            currentNode.setNodeValue( currentNode.getAttributes() +
"<rdf:ID=" + currentNode.getAttributes() + ">");
            break;
            case defindividual :
            currentNode.setNodeValue("<owls:Individual>");
            break;
        }
     }
     public void processChildNodes ( NodeList children)
    {
        if (children.getLength()!=0)
            for ( int i=0; i<children.getLength(); i++ )
                processNode( children.item( i ));
    }
      public static void main( String[] args) {
        //prende il nome del file in input
         String nome = JOptionPane.showInputDialog("Digita il nome del
file");
         FileInputStream fin = new FileInputStream(nome);
        System.exit(0);
    }
}
grazie per l'attenzione
Paolo!

 grazie per l'attenzione
Prego, prego, non c'è di che...
... ma dove stiamo arrivando? :-/
M.