From: Matias M. R. <mre...@te...> - 2011-11-15 15:47:03
|
Hello everybody, I need some help with the reader (or writer) of a graph. I'm modelling different types of edges with inheritance and when I persist the graph generete some like this: <graphml xmlns="http://graphml.graphdrawing.org/xmlns/graphml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns/graphml"> <key id="name" for="node" /> <key id="name" for="edge" /> <key id="type" for="edge" /> <graph edgedefault="directed"> <node id="1"> <data key="name">s2</data> </node> <node id="2"> <data key="name">s6</data> </node> <node id="3"> <data key="name">s1</data> </node> <node id="4"> <data key="name">p2</data> </node> <edge source="1" target="2"> <data key="name">e1</data> <data key="type">S</data> </edge> <edge source="3" target="2"> <data key="name"></data> <data key="type">P</data> </edge> <edge source="1" target="3"> <data key="name">e2</data> <data key="type">S</data> </edge> <edge source="2" target="4"> <data key="name"></data> <data key="type">J</data> </edge> </graph> </graphml> Where the data key "type" identify the concrete class of the edge (SimpleEdge, PartitionEdge, JoinEdge) and each one may have different attributes . Now, when I read the XML I dont have that information for the FactoryEdge. So, how can I do that? I need a Factory that create some type of edge and latter override the instance? Or I have to write it in a different way? Best regards -- *Matías Miguel Reparaz * Desarrollador Java Technisys I www.technisys.net Perú 143 Piso 12 I Buenos Aires, C1067AAB Tel.: +54 11 5352 9500 I mre...@te... <lba...@te...> *Acerca de Technisys *Technisys es líder en provisión de aplicaciones de software multicanal basados en SOA para la industria de servicios financieros. Con más de 15 años de experiencia, Technisys está comprometida a proveer soluciones competitivas, agiles y con visión de futuro a sus clientes, incluyendo desde bancos medianos a grupos financieros multinacionales. A través de su excepcional plataforma Cyberbank, basada en Arquitectura Orientada a Servicios (SOA), Technisys provee soluciones de internet, telefonía móvil, terminales de autoservicio, sucursales y centros de atención telefónicos, que garantizan una experiencia uniforme por parte del cliente, reduce el tiempo de implementación de nuevos módulos y servicios, y prolonga el tiempo de vida del sistema a largo plazo. Para más información, por favor ingrese a www.technisys.net |