public static void insertExtendedPort(ExtendedPort ePrt, ExtendedPortData d){ 		
  		
		ExtendedPortData extData;
		
		if (ePrt!=null) //call from the Rest Interface
			extData = ePrt.getPort();
		else  //call from createMultiple
			extData=d;
		
		//Recover the port object (from the Rest Interface) attributes (extended attributes only if they are present)
						
		String name = extData.getName();
		String n = extData.getId();
		FixedIps fixed = extData.getFixed_ips();
		String mac = extData.getMac_address();
		String network = extData.getNetwork_id();
		SecurityGroups security = extData.getSecurity_groups();
		String status = extData.getStatus();
		String tenant = extData.getTenant_id();
		String host = extData.getHost_id();
  		
		//query- insert a port instance with the Extended attributes
  		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#/> ";
		for (int i=0; i<fixed.size(); i++)
		{
			Ip ip = fixed.get(i);

				queryString += 
					"INSERT DATA " +
					"{" +
					"      base:"+ip.getIp_address()+" rdf:type base:FixedIP;" +
					"      }; ";
		}
		for (int j=0; j<security.size(); j++)
		{
			queryString += 
				"INSERT DATA " +
				"{" +
				"      base:"+security.get(j)+" rdf:type base:SecurityGroup;" +
				"      }; ";
		}
		queryString += 
				"INSERT DATA " +
				"{" +
				"      base:"+tenant+" rdf:type base:Tenant;" +
				"      }; ";
		if (host!=null){
			queryString += 
				"INSERT DATA " +
				"{" +
				"      base:"+host+" rdf:type base:HNode;" +
				"      }; ";
		}
		queryString += 
				"INSERT DATA " +
				"{" +
				"      base:"+n+" rdf:type base:Port;" +
				"      base:hasName '"+name+"';";
		for (int i=0; i<fixed.size(); i++)
		{
			Ip ip = fixed.get(i);

			queryString += 
			"      base:hasFixedIP base:"+ip.getIp_address()+";";
		}
		for (int j=0; j<security.size(); j++)
		{
			queryString += 
			"      base:hasSecurityGroup base:"+security.get(j)+";";
		}
		queryString += 				
				"      base:hasMACAddress '"+mac+"';" +
				"      base:isPartOfNetwork base:"+network+";" +
				"      base:hasStatus '"+status+"';" +
				"      base:hasOwner base:"+tenant+";";
		if (host!=null){
			queryString += 	
				"      base:hasHNode base:"+host+";";
		}
		queryString += 	
				"      }";

		ParliamentModel.updateQuery(queryString);

		
	}