Пример #1
0
from Utility.RDFGraphGenerator import *
from Utility.SubscriptionPerformanceTest import *
from Utility.ProtectionPerformanceTest import *
from Utility.Utility import SmartSpaceData
from Utility.StringPerformanceTest import *
from time import sleep
import os

if __name__ == "__main__":
    
	# connessione automatica
	smartSpace=SmartSpaceData()
	smartSpace.setSmartSpaceName("X")
	smartSpace.setIPADDR("localhost")
	smartSpace.setPort(10023)

	if not smartSpace.joinSpace():
		sys.exit('Could not join to Smart Space')

	node=smartSpace.getNode()
	ss_handle = smartSpace.getSmartSpace()

	# creazione grafo
	pieces=[]
	pieces.append(PieceOfRDFGraph("ClasseA","IstanzaA","AttributoA"))
	pieces.append(PieceOfRDFGraph("ClasseB","IstanzaB","AttributoB"))
	pieces.append(PieceOfRDFGraph("ClasseC","IstanzaC","AttributoC"))
	pieces.append(PieceOfRDFGraph("ClasseD","IstanzaD","AttributoD"))
	pieces.append(PieceOfRDFGraph("ClasseE","IstanzaE","AttributoE"))
	pieces.append(PieceOfRDFGraph("ClasseF","IstanzaF","AttributoF"))
	pieces.append(PieceOfRDFGraph("ClasseG","IstanzaG","AttributoG"))
Пример #2
0
from Utility.RDFGraphGenerator import *
from Utility.SubscriptionPerformanceTest import *
from Utility.ProtectionPerformanceTest import *
from Utility.Utility import SmartSpaceData
from Utility.StringPerformanceTest import *
from time import sleep
from M3.m3_kp import *
import os

if __name__ == "__main__":
    while 1:
      
	# connessione automatica
	smartSpace=SmartSpaceData()
	smartSpace.setSmartSpaceName("X")
	smartSpace.setIPADDR("127.0.0.1")
	smartSpace.setPort(10010)

	if not smartSpace.joinSpace():
		sys.exit('Could not join to Smart Space')

	node=smartSpace.getNode()
	ss_handle = smartSpace.getSmartSpace()

	triple=(URI("sib:any"),URI("sib:any"),URI("sib:any"))
	qs=node.CreateRemoveTransaction(ss_handle)
	qs.remove(triple, confirm = True)
	node.CloseRemoveTransaction(qs)
	sleep(5)

	# creazione grafo
Пример #3
0
from Utility.RDFGraphGenerator import *
from Utility.SubscriptionPerformanceTest import *
from Utility.ProtectionPerformanceTest import *
from Utility.Utility import SmartSpaceData
from Utility.StringPerformanceTest import *
from time import sleep
from M3.m3_kp import *
import os

if __name__ == "__main__":
    while 1:
      
	# connessione automatica
	smartSpace=SmartSpaceData()
	smartSpace.setSmartSpaceName("X")
	smartSpace.setIPADDR("mml.arces.unibo.it")
	smartSpace.setPort(10025)

	if not smartSpace.joinSpace():
		sys.exit('Could not join to Smart Space')

	node=smartSpace.getNode()
	ss_handle = smartSpace.getSmartSpace()

	triple=(URI("sib:any"),URI("sib:any"),URI("sib:any"))
	qs=node.CreateRemoveTransaction(ss_handle)
	qs.remove(triple, confirm = True)
	node.CloseRemoveTransaction(qs)
    sleep(5)

	# creazione grafo