Artificial neural networks made easy
www.insane-network.org

insane.io
Class XMLNeuralNetworkLoader

java.lang.Object
  extended by insane.io.NeuralNetworkLoader
      extended by insane.io.XMLNeuralNetworkLoader

public final class XMLNeuralNetworkLoader
extends insane.io.NeuralNetworkLoader

Defines an XML neural network loader


Constructor Summary
XMLNeuralNetworkLoader()
           
 
Method Summary
static insane.NeuralNetwork decode(org.jdom.Element root)
          Creates a neural network based on an XML element
static boolean isValid(java.io.Reader reader, java.net.URL xmlSchema)
          Allows to validate the network XML description using an XML schema
 insane.NeuralNetwork load(java.io.BufferedReader reader)
           
 
Methods inherited from class insane.io.NeuralNetworkLoader
getActivationFunction, load, load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLNeuralNetworkLoader

public XMLNeuralNetworkLoader()
Method Detail

load

public insane.NeuralNetwork load(java.io.BufferedReader reader)
                          throws java.io.IOException,
                                 insane.io.NeuralNetworkInvalidFormatException
Specified by:
load in class insane.io.NeuralNetworkLoader
Throws:
java.io.IOException
insane.io.NeuralNetworkInvalidFormatException

decode

public static insane.NeuralNetwork decode(org.jdom.Element root)
Creates a neural network based on an XML element

Parameters:
root - The non-null element to decode the network from
Returns:
The corresponding neural network

isValid

public static boolean isValid(java.io.Reader reader,
                              java.net.URL xmlSchema)
                       throws java.io.IOException
Allows to validate the network XML description using an XML schema

Parameters:
reader - The source content to to validated
xmlSchema - The URL of the corresponding schema
Throws:
java.io.IOException - Either the source content or the XML schema could not be read from their respective sources return true only if the given content is valid against the XML schema

by Nathanaël Cottin