public static void updateSubnet(Subnet sub){
		
		SubnetData data = sub.getSubnet();
		
		//Recover the subnet object (from the Rest Interface) attributes
		String name = data.getName();
		String n = data.getId();
		String network = data.getNetwork_id();
		String tenant = data.getTenant_id();
		AllocationPools alPools = data.getAllocation_pools();
		String gateway = data.getGateway_ip();
		String ipversion = data.getIp_version();
		
		//query- update a subnet instance
		String queryString = 
				"PREFIX base: <http://www.semanticweb.org/spalazzi/ontologies/2014/1/FedCoT#> "+
				"PREFIX owl: <http://www.w3.org/2002/07/owl#/> "+
				"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#/> "+
				"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#/> "+
				"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#/> "+
				"PREFIX dul: <http://www.loa-cnr.it/ontologies/DUL.owl#> "+
				"DELETE WHERE { base:"+n+" ?p ?o. }; ";
		for (int i=0; i<alPools.size(); i++)
		{
			Pool pool = alPools.get(i);

			queryString += 
					"INSERT DATA " +
					"{" +
					"      base:"+pool.getStart()+" rdf:type base:IPaddress;" +
					"      }; "+ 
					"INSERT DATA " +
					"{" +
					"      base:"+pool.getEnd()+" rdf:type base:IPaddress;" +
					"      }; ";
		}
		queryString +=
				"INSERT DATA " +
				"{" +
				"      base:"+gateway+" rdf:type base:IPaddress;" +
				"      }; "+ 
				"INSERT DATA " +
				"{" +
				"      base:"+n+" rdf:type base:SubNet;" +
				"      base:hasName '"+name+"';" +
				"      base:hasOwner base:"+tenant+";" +
				"      dul:isPartOf base:"+network+";";
		for (int i=0; i<alPools.size(); i++)
		{
			Pool pool = alPools.get(i);

			queryString += 
					"      base:hasStartIPAddress base:"+pool.getStart()+";" +
					"      base:hasEndIPAddress base:"+pool.getEnd()+";";
		}
		queryString +=
				"      base:hasGatewayIP base:"+gateway+";" +				
				"      base:hasVersion '"+ipversion+"';" +
				"      }";

		ParliamentModel.updateQuery(queryString);
		
	}