Comparar commits
705 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 4eb53b9f6a | |||
| 7bec4105c0 | |||
| f8c032d38b | |||
| d873229ed8 | |||
| 17798a0f81 | |||
| 586e72d4fb | |||
| ec2916565f | |||
| b5c0de406d | |||
| 5777cab4a8 | |||
| 8d05d3958e | |||
| 38e540d8b3 | |||
| 2ce8a3378c | |||
| 23b47bfe12 | |||
| 4b93a004f6 | |||
| 5b36a9f4b6 | |||
| b6ac01fcf4 | |||
| b92f7dd857 | |||
| 52819685e9 | |||
| c2ee37971f | |||
| 96951871fd | |||
| 1b99cc7fe2 | |||
| d873611a2b | |||
| 36d88adae9 | |||
| 7998f14102 | |||
| 2b8ebcbf18 | |||
| 7a2dcf9bbb | |||
| 046c8efcfb | |||
| 325f60dcab | |||
| 5d7ce7249d | |||
| 535b3ebf99 | |||
| 182b7da555 | |||
| a56db00d36 | |||
| 440b0bdf7e | |||
| f27bbaf7c7 | |||
| d7f321a4bb | |||
| 7409c4fdf6 | |||
| ca72bf6e58 | |||
| 16547aeb93 | |||
| 761701b37e | |||
| 84d050fc48 | |||
| d4bd6896b6 | |||
| 076e9dde7f | |||
| 3af6a89dcd | |||
| 30a10531f6 | |||
| 70d8a4b766 | |||
| 93e8d2f1cc | |||
| d99e990ef2 | |||
| 0f392cfb57 | |||
| 9a99053130 | |||
| 4608208d8e | |||
| 4df863a221 | |||
| db61bb4ac0 | |||
| 23cb8c875f | |||
| 2b9df0f666 | |||
| 9ead548b8e | |||
| a516fac1c3 | |||
| 3ecaa139a6 | |||
| 8743d446d2 | |||
| 0299ef4031 | |||
| 77ec95b76d | |||
| 2d49376813 | |||
| 9b4ffe4ad3 | |||
| 1841a0dde6 | |||
| f79e56880d | |||
| e343581ea4 | |||
| 36327abc0b | |||
| 133d787f12 | |||
| d419d857b4 | |||
| b247f7e310 | |||
| ef1695fe59 | |||
| 8a168364ff | |||
| 8b3e6c75fd | |||
| f2d01585c7 | |||
| 795eb453ce | |||
| 1bc40b4dfc | |||
| e4fb5b4fcf | |||
| 851507afeb | |||
| 6e1f812846 | |||
| 4afd75b332 | |||
| 9bef9d46d7 | |||
| b4ade84641 | |||
| 54b6662663 | |||
| c7f95f1bf9 | |||
| 2b2721f795 | |||
| 509d6baf8f | |||
| 84e721aa6b | |||
| dd1ed43235 | |||
| 56b65b1d9f | |||
| 3955dfbf42 | |||
| c9e397ba43 | |||
| 27e9ae02ac | |||
| 5c89726fc3 | |||
| f217730682 | |||
| 83452510e1 | |||
| 4ffa88d58c | |||
| 10aeb80029 | |||
| d1f6cd6b40 | |||
| 297fe912af | |||
| af722fae5e | |||
| 5086cce845 | |||
| c071086d9b | |||
| 68e7822ea5 | |||
| 69ccc43101 | |||
| acbe4bcaf9 | |||
| 017f801f88 | |||
| f4888f5d46 | |||
| 9852ec5bda | |||
| acb1ceba7f | |||
| f61e469c9a | |||
| 683c30ce39 | |||
| b66ff8cae2 | |||
| 9bb97e2454 | |||
| d9c9522e1e | |||
| db459ff9f9 | |||
| 2aa35be755 | |||
| 5b00186710 | |||
| 0ad61139c5 | |||
| 39a99e5856 | |||
| cbdce1c18f | |||
| f28957b9b8 | |||
| 68d0488623 | |||
| 9b5f8f0b58 | |||
| c6af330b52 | |||
| 07d67961b8 | |||
| ae6074f3af | |||
| 5afef61125 | |||
| b5948fc750 | |||
| e6f79529a9 | |||
| c9e0742720 | |||
| b3d11ae86b | |||
| 21bea2bea7 | |||
| 46ee327fc6 | |||
| 5eda676d97 | |||
| 143635f90b | |||
| cc37a02844 | |||
| c30f743f85 | |||
| 8fb939bfed | |||
| 14d32a80c2 | |||
| 8e350df215 | |||
| 3d12ba9b88 | |||
| 3fa18e67d4 | |||
| bc05917012 | |||
| d2af0fbca1 | |||
| 431fc592f2 | |||
| 9f5857a96f | |||
| 0f0da1be77 | |||
| 1b4080c7af | |||
| e59b7ccf01 | |||
| 7b36dbfe02 | |||
| baec9199a9 | |||
| 1c2f686d48 | |||
| 24098f8bdc | |||
| 5398cd1dda | |||
| 7a3e579f7a | |||
| be4c42e229 | |||
| 0e3facf787 | |||
| 865db80e51 | |||
| 396a5f8666 | |||
| c34d0ea9c3 | |||
| 9057c563e2 | |||
| 0c962cf783 | |||
| 4104a2e7b8 | |||
| f031ff6b63 | |||
| b9d67a895d | |||
| 223da54ac5 | |||
| 1fb3fd0726 | |||
| 310efb3522 | |||
| 3a48a5c87e | |||
| 3ebffd4807 | |||
| 5e7eb963aa | |||
| 5b70b184b1 | |||
| 240f4a5ccf | |||
| 70c4f5fee2 | |||
| e4ac375e15 | |||
| ab62a6bede | |||
| 1ab13abd05 | |||
| 09decb6804 | |||
| 0fa6e99a3f | |||
| dd10de286c | |||
| 930a4d3364 | |||
| b4ed125b9f | |||
| 4ad80ff76e | |||
| ee3bff1ec9 | |||
| 80fcd3fd23 | |||
| abc058d404 | |||
| 24a797be13 | |||
| f946cb3289 | |||
| 1b0ca6dc39 | |||
| 97199a3e43 | |||
| 635b6f4284 | |||
| 0bca238f9c | |||
| c72846a35e | |||
| 9194c27d62 | |||
| c6a2e7d31c | |||
| 85a4e3325d | |||
| 810602a62d | |||
| b8bd3bb214 | |||
| 7669105933 | |||
| 16611286ec | |||
| 3f219e903c | |||
| 41062bd4ab | |||
| 62ad2c6eb5 | |||
| ac91e04884 | |||
| 42b0f6f9b5 | |||
| 92727e6469 | |||
| 1758293a0c | |||
| ecc7fe12dc | |||
| 1eeb8b6a4f | |||
| 542cfa4c7a | |||
| 26c437105d | |||
| a37ff1aed0 | |||
| 1e6b9849ac | |||
| 418f0a7fee | |||
| a5136f4083 | |||
| ff65a9edaa | |||
| 3cef860299 | |||
| ab02babbd8 | |||
| 8f23ee564b | |||
| 8e6e2ce55e | |||
| c376f88ca8 | |||
| a5a4310644 | |||
| 460ddd7407 | |||
| 1daa71b0d3 | |||
| 77b973c1a9 | |||
| 2691a96bf6 | |||
| 0df20c3d6e | |||
| 893f599078 | |||
| 8e0cf5eb27 | |||
| d818ed3c43 | |||
| c13ff9e39a | |||
| ae2c66f737 | |||
| a5ac72e43d | |||
| 569eaf8af0 | |||
| e9b20ac529 | |||
| ee9e693bb7 | |||
| a24452bfd8 | |||
| 408b47f3f8 | |||
| 357672ff4d | |||
| 3dad51bc9d | |||
| 3102fc9be5 | |||
| a7480870ac | |||
| 3ff58b88e0 | |||
| 96c33c0aad | |||
| 8406d5ac6f | |||
| 4b6d6a175c | |||
| 6dd61b1fb0 | |||
| df73f31cb3 | |||
| a020fff6be | |||
| a946ef1d9c | |||
| ad28029706 | |||
| 4634e7217e | |||
| 759e056375 | |||
| ccc765d34f | |||
| f61a8e9793 | |||
| d1f76ded6e | |||
| e0a446bc46 | |||
| aeaa23d7e9 | |||
| 22c58489a7 | |||
| 8ee85137a0 | |||
| 7e43adaf80 | |||
| a8d9686f95 | |||
| 76387e918b | |||
| cbc252297f | |||
| faa835ed32 | |||
| 00f23677b6 | |||
| dc091c5849 | |||
| ce0e9a69a9 | |||
| 64463f8e6c | |||
| 48cc183263 | |||
| 7cf6000e18 | |||
| 98b31c955f | |||
| b5db9996ab | |||
| 5c635bb6ca | |||
| 1754417b85 | |||
| 306adefd0f | |||
| 5983869d7f | |||
| 625495f5dc | |||
| 098a260c64 | |||
| 5778417458 | |||
| 86ce44ba55 | |||
| 99fdd776e0 | |||
| e5d13c0203 | |||
| 298aca0d5b | |||
| c51a160ab2 | |||
| 373c35bc79 | |||
| 6bfc371fdc | |||
| cd0ea5221f | |||
| c881cd267f | |||
| 9d3541085a | |||
| 61ce299b06 | |||
| 0aad688d16 | |||
| befb397071 | |||
| 949c78e4c0 | |||
| 2a7bd148ae | |||
| 3e512a8fee | |||
| da7b035d36 | |||
| bffc9b648c | |||
| 566ac791c9 | |||
| 4934ac0fd6 | |||
| f727bc1642 | |||
| 78f6f3105e | |||
| f9136081a4 | |||
| bdf6b20b2a | |||
| b65651d29b | |||
| 5b6dd5648a | |||
| 1ee73a5aaf | |||
| abfa850163 | |||
| 8d41db01d8 | |||
| 245434de18 | |||
| 1ee91ec0d3 | |||
| f030b6f9ce | |||
| b69395c3a9 | |||
| bd7b85aa7b | |||
| 4434ff4487 | |||
| c5701d8c5f | |||
| 409302299b | |||
| e302638077 | |||
| 564acfb4fa | |||
| 73b4730c4a | |||
| 0bbe484b0c | |||
| 1d5ec0803f | |||
| 69facc3b20 | |||
| 1cae117a23 | |||
| 016648903e | |||
| 372e79c738 | |||
| 75237b89f4 | |||
| fb7f2621df | |||
| 1dab2cb3b6 | |||
| 15442be80d | |||
| 0fb90a528a | |||
| ee9f42be38 | |||
| 5883056b47 | |||
| 4b67c38e5f | |||
| 83d315cf0c | |||
| 0d7a683417 | |||
| b42417a3f0 | |||
| 41f82f6484 | |||
| e401428610 | |||
| 4ee4857c0e | |||
| 4377d04fb5 | |||
| e1762d9aee | |||
| dc93a09e93 | |||
| aa251f940a | |||
| da0fd339f2 | |||
| 9b2079668f | |||
| ff1ae68c1c | |||
| de8c087fd0 | |||
| 1ab845fe12 | |||
| f5161a55ac | |||
| 3ede3af94a | |||
| bdc1f92bd8 | |||
| 9f813b5500 | |||
| 4935d58946 | |||
| b88b7e2a03 | |||
| c7b4fa002c | |||
| 3c13058c33 | |||
| 84bba149f4 | |||
| b18bd02d3d | |||
| 8d1c63c22c | |||
| 69e7a7b1cd | |||
| 8b07bc8d97 | |||
| e9ba8cde2a | |||
| 90a3538bca | |||
| 67a820003d | |||
| 64b97a17b9 | |||
| f4fdf2c4b7 | |||
| eb4a1adc18 | |||
| f2934accc0 | |||
| 8920576b40 | |||
| 1b0cda8968 | |||
| 80fb7706ef | |||
| c8bf74ce2c | |||
| 7e32c533f6 | |||
| 52cfb8e3f9 | |||
| aeb002b8b1 | |||
| 58d05835fc | |||
| 580200fdda | |||
| b70fb380b1 | |||
| dc1965eb4a | |||
| b27ea25b76 | |||
| e687a642cd | |||
| 1f9844320b | |||
| be324d9c21 | |||
| 4ae16e7faa | |||
| ce190c2c62 | |||
| 1d6410c6e3 | |||
| f687271321 | |||
| 8a7fed5fbe | |||
| d8c7ae54e0 | |||
| 00d43181b8 | |||
| 16c7da760a | |||
| 77a0699901 | |||
| 1096938acf | |||
| 56369d16b8 | |||
| 7c9ea7ea0f | |||
| fd1a43990a | |||
| 083a44d10b | |||
| a5cbb5b7a5 | |||
| 8492565763 | |||
| 999ceeed4a | |||
| 97db7d8fc3 | |||
| edbabec190 | |||
| 710a6a4831 | |||
| 6062042038 | |||
| 3b58262d71 | |||
| f7ca0aca74 | |||
| ee0dd41b1d | |||
| 1c93d7d7e2 | |||
| 50616f3573 | |||
| 0e05cfd1db | |||
| 74c8dcb387 | |||
| 7c57caa598 | |||
| 4ab45b9814 | |||
| 42226f1956 | |||
| 11e09aa7ca | |||
| f9c4a628ac | |||
| 8af3d3e6b2 | |||
| 67f0517dd1 | |||
| 79348c7847 | |||
| 9dcf00c62c | |||
| 2a1cd83f35 | |||
| 71b02f2a6e | |||
| ce9fd80281 | |||
| 0b61a9f580 | |||
| ad3821d2e9 | |||
| d912d8ba0c | |||
| 31b110e88c | |||
| ce88947219 | |||
| 6943181359 | |||
| cdbb2ea158 | |||
| 270335c597 | |||
| f249c97ae4 | |||
| f54a7ec9f5 | |||
| 93a793ab38 | |||
| 07d691d56b | |||
| 905e2ba9fa | |||
| 97a8a287d9 | |||
| 2cab498576 | |||
| b654884015 | |||
| b1399e7608 | |||
| c12a784dfa | |||
| abc5ac819f | |||
| 599473a9a8 | |||
| a2f24ea971 | |||
| 68baa13678 | |||
| a302493d58 | |||
| ab45cc12ff | |||
| 475ec77971 | |||
| af2107ba99 | |||
| 6bbea86d8b | |||
| 976eec441b | |||
| 0536d5eb91 | |||
| 3ee7346a0c | |||
| 8015c2a38c | |||
| 17b57a924f | |||
| ab3c0f375a | |||
| eaddf57c08 | |||
| 3be071034b | |||
| 685206a255 | |||
| 0948b5116f | |||
| 44ac507fcf | |||
| a0500acd32 | |||
| f20ac1380e | |||
| 0219a1927c | |||
| 5f85abe7ba | |||
| db66abe08a | |||
| c8aa2c436d | |||
| 148e0587e7 | |||
| 46a242e333 | |||
| 09b17c8769 | |||
| f4f7d9dea8 | |||
| 53c0f2e93a | |||
| 3bc13f012e | |||
| 3e3e737717 | |||
| 8185651d73 | |||
| 90663dbfff | |||
| 06c34ba4d4 | |||
| 965dd2e432 | |||
| 0790f92094 | |||
| 3105791898 | |||
| ab5c9d8e06 | |||
| c52cdc13e6 | |||
| e89606c1a5 | |||
| 7599b8768b | |||
| cce734e502 | |||
| f09b53adc3 | |||
| a4e545b530 | |||
| 600bdedad9 | |||
| 0cebb07e85 | |||
| cd0c5c5c37 | |||
| 5fe93b9798 | |||
| 293976377c | |||
| 0ab7e698bf | |||
| b746326376 | |||
| 7df38f3680 | |||
| ac5fac107a | |||
| 0f8706d74f | |||
| 8239456d51 | |||
| ff75e3a3a4 | |||
| eaf8f0fc9a | |||
| f65808467b | |||
| 3f671ad061 | |||
| 7b44406b7e | |||
| 9d882c437c | |||
| 3e8608d9f8 | |||
| 35bed0b71f | |||
| 905564d7c5 | |||
| 7335bb3415 | |||
| acc58f243c | |||
| 77813b12fb | |||
| 9181b4ffc4 | |||
| 682d8496b6 | |||
| 15229f8fd4 | |||
| 31868cef2b | |||
| f53d25930b | |||
| 0a55a94250 | |||
| 15faee1b26 | |||
| ca6b9992ce | |||
| 5671f26886 | |||
| 604387a9e5 | |||
| 638423ba05 | |||
| 8d93d454f5 | |||
| 449c2c4277 | |||
| 5d814fb018 | |||
| 8bb61a2242 | |||
| bed3aa35f5 | |||
| dda3515e09 | |||
| 694ead7beb | |||
| 2d3450027e | |||
| f81a2e30bb | |||
| a70665f614 | |||
| 70286501ca | |||
| 9f7b7890a9 | |||
| b51520828b | |||
| 4a9bbf827a | |||
| ee87517397 | |||
| 0e0e42c86b | |||
| 35a28295cc | |||
| 91f0084b5e | |||
| ef17efd0bc | |||
| 028b1256fc | |||
| 28817f34ee | |||
| 2b2eebd4a1 | |||
| e1ae3c8cff | |||
| 6cf756b325 | |||
| 3348cc65fe | |||
| 76a6b30dea | |||
| ca022e329f | |||
| 34ab3923fc | |||
| 6061cc1154 | |||
| 95f91ab7c1 | |||
| 579d67c9ee | |||
| ee5cc538ff | |||
| 4110ab2d6d | |||
| 5bb1fcffac | |||
| f20d9adc0c | |||
| 094112158d | |||
| 680ae57e61 | |||
| 80f419e3bd | |||
| 3fe6a3963e | |||
| 20c86002ec | |||
| c7a3440f50 | |||
| 1f299bf902 | |||
| 5d0f3c27a0 | |||
| 9416d273ff | |||
| 3413fb1dad | |||
| cc6e888053 | |||
| 1008f7ec05 | |||
| 90f2fa8cb7 | |||
| f837ced162 | |||
| bc11a9459b | |||
| daf029e7db | |||
| a5f01b42fe | |||
| 5d528fe9a5 | |||
| 619c709982 | |||
| e4a70d7469 | |||
| 6cd73c4524 | |||
| 34eb0ce143 | |||
| 334ac2e008 | |||
| c0446e61db | |||
| 7f05739890 | |||
| be9010ca3d | |||
| 341848cea9 | |||
| 81c0b660d7 | |||
| 5b708188ed | |||
| b1faceb1cd | |||
| 67dff6008a | |||
| 2368e1bb2f | |||
| 4bc04852b0 | |||
| 6ad949bd2d | |||
| 9d2c14ad69 | |||
| 7783ecdc90 | |||
| 6ab2d0c447 | |||
| 442929f0c6 | |||
| 2d473143d7 | |||
| 39a1875c96 | |||
| d385fc30a7 | |||
| 1004c34db2 | |||
| a84bf21e5a | |||
| b6eb3fd5f9 | |||
| 9138e0fe60 | |||
| 3bd336a283 | |||
| e8a3e2bad6 | |||
| 53a56f5e89 | |||
| d4cf253127 | |||
| 052a1e0826 | |||
| 79677eacb9 | |||
| 800b446ca4 | |||
| d52b4ce2df | |||
| 29e5f3129e | |||
| c0725d26d5 | |||
| d414d09ceb | |||
| b08ca20c20 | |||
| d375e50684 | |||
| d49577ee67 | |||
| 19ec908556 | |||
| 7495efa89b | |||
| ede18ba817 | |||
| b3e10a84d0 | |||
| 942d02a0ef | |||
| 7b6c813efa | |||
| aea5ec8a68 | |||
| 5e0f23fc25 | |||
| 4496355115 | |||
| dbb655c4de | |||
| 4ce8ee9bd7 | |||
| 2f8b1bec01 | |||
| 5c95e7ab79 | |||
| be9cbc23cb | |||
| c078bce675 | |||
| bfd7c2fb18 | |||
| a661576bf1 | |||
| 0069b55824 | |||
| 63f08ec6b6 | |||
| 347d0122d7 | |||
| 6561d56730 | |||
| 42ac9f67d1 | |||
| ac07f8c143 | |||
| 9ab0ab1dc8 | |||
| 6a3ccd6294 | |||
| b391c9ebb8 | |||
| 1bc0fb0c24 | |||
| a6a98905dc | |||
| 841e53e928 | |||
| 3e021ca517 | |||
| 1c0facc9c4 | |||
| 76334ed05b | |||
| b899737194 | |||
| ccd3b933c2 | |||
| 1734c786ac | |||
| ae80e7a78f | |||
| 76d671bdfd | |||
| 2b571fd0a8 | |||
| e09ca89d8c | |||
| cc5dd90fb1 | |||
| fecad63ca8 | |||
| addbe7427e | |||
| c06cdc9cb8 | |||
| d2a4616e4b | |||
| 6cf099f073 | |||
| fcb4bb2d38 | |||
| 112353d183 | |||
| 381401b6da | |||
| 3f1386b8b2 | |||
| 9c9b757032 | |||
| 6e539063f6 | |||
| 8f7ac0a3d4 | |||
| a0608782d9 | |||
| c7556ec237 | |||
| b48984429c | |||
| b8be2a18ef | |||
| e376b7be0a | |||
| 318cd1aff0 | |||
| d4045a248b | |||
| 7ec0ea26c9 | |||
| da3d6becda | |||
| f60b8f5b79 | |||
| 21aaab6564 | |||
| 84a0a0bd70 | |||
| 03742a79ad | |||
| 227cf71d65 | |||
| 8f9dfd51f3 | |||
| 2cc12551e1 | |||
| 76bf5497b6 | |||
| 7609d750a5 | |||
| f1f0b77d08 | |||
| ae34e5c7b1 | |||
| f416287b3a | |||
| e8617c4a51 | |||
| 7a6ef95042 | |||
| 5b73b09ea8 | |||
| 97fc92ddc5 | |||
| 8f21254e8f | |||
| b6a4df6daf | |||
| 27325d0eef | |||
| 9c437b23d8 | |||
| bd33968a3a | |||
| ad9c1ceebc | |||
| e36049ea57 | |||
| 0411c6d073 | |||
| 4fc58b8720 | |||
| 3d1d17fa90 | |||
| d9942ae1ae | |||
| 00a4e71545 | |||
| bfb9e211bf |
@@ -1,10 +0,0 @@
|
||||
**/build
|
||||
**/nbproject/private
|
||||
**/nbproject/platform.properties
|
||||
nbproject/project.properties
|
||||
**/dist
|
||||
nbproject/private/platform-private.properties
|
||||
nbproject/private/profiler/
|
||||
.DS_Store
|
||||
toolkit
|
||||
keystore.ks
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
**/target
|
||||
.DS_Store
|
||||
keystore.ks
|
||||
/target/
|
||||
/modules/AlgorithmsPlugin/target/
|
||||
/modules/AttributeColumnPropertyEditor/target/
|
||||
/modules/AttributesAPI/target/
|
||||
/modules/AttributesImpl/target/
|
||||
/modules/ClusteringAPI/target/
|
||||
/modules/ClusteringPlugin/target/
|
||||
/modules/CollectionUtils/target/
|
||||
/modules/DataLaboratoryAPI/target/
|
||||
/modules/DataLaboratoryPlugin/target/
|
||||
/modules/DesktopClustering/target/
|
||||
/modules/DBDrivers/target/
|
||||
/modules/DesktopContext/target/
|
||||
/modules/DesktopBranding/target/
|
||||
/modules/DesktopDataLaboratory/target/
|
||||
/modules/DesktopFilters/target/
|
||||
/modules/DesktopProgress/target/
|
||||
/modules/DesktopExport/target/
|
||||
/modules/DesktopGenerate/target/
|
||||
/modules/DesktopHierarchy/target/
|
||||
/modules/DesktopImport/target/
|
||||
/modules/DesktopLayout/target/
|
||||
/modules/DesktopPartition/target/
|
||||
/modules/DesktopPerspective/target/
|
||||
/modules/DesktopPreview/target/
|
||||
/modules/DesktopProject/target/
|
||||
/modules/DesktopRanking/target/
|
||||
/modules/DesktopRecentFiles/target/
|
||||
/modules/DesktopSpigot/target/
|
||||
/modules/DesktopStatistics/target/
|
||||
/modules/DesktopTimeline/target/
|
||||
/modules/DesktopTools/target/
|
||||
/modules/DHNSGraph/target/
|
||||
/modules/DirectoryChooser/target/
|
||||
/modules/DynamicAPI/target/
|
||||
/modules/DynamicImpl/target/
|
||||
/modules/ExportAPI/target/
|
||||
/modules/ExportPlugin/target/
|
||||
/modules/ExportPluginUI/target/
|
||||
/modules/FiltersAPI/target/
|
||||
/modules/FiltersImpl/target/
|
||||
/modules/FiltersPlugin/target/
|
||||
/modules/FiltersPluginUI/target/
|
||||
/modules/GeneratorAPI/target/
|
||||
/modules/GeneratorPlugin/target/
|
||||
/modules/GeneratorPluginUI/target/
|
||||
/modules/application/target/
|
||||
/modules/branding/target/
|
||||
/modules/Gleem/target/
|
||||
/modules/GraphAPI/target/
|
||||
/modules/ImportAPI/target/
|
||||
/modules/ImportPlugin/target/
|
||||
/modules/ImportPluginUI/target/
|
||||
/modules/LayoutAPI/target/
|
||||
/modules/LayoutPlugin/target/
|
||||
/modules/LongTaskAPI/target/
|
||||
/modules/MostRecentFilesAPI/target/
|
||||
/modules/PartitionAPI/target/
|
||||
/modules/PartitionPlugin/target/
|
||||
/modules/PartitionPluginUI/target/
|
||||
/modules/PerspectiveAPI/target/
|
||||
/modules/PreviewAPI/target/
|
||||
/modules/PreviewExport/target/
|
||||
/modules/PreviewExportUI/target/
|
||||
/modules/PreviewPlugin/target/
|
||||
/modules/ProcessorPlugin/target/
|
||||
/modules/ProcessorPluginUI/target/
|
||||
/modules/ProjectAPI/target/
|
||||
/modules/ProjectUI/target/
|
||||
/modules/RankingAPI/target/
|
||||
/modules/RankingPlugin/target/
|
||||
/modules/RankingPluginUI/target/
|
||||
/modules/SettingsUpgrader/target/
|
||||
/modules/SpigotPlugin/target/
|
||||
/modules/SpigotPluginUI/target/
|
||||
/modules/SplineEditor/target/
|
||||
/modules/StatisticsAPI/target/
|
||||
/modules/StatisticsPlugin/target/
|
||||
/modules/StatisticsPluginUI/target/
|
||||
/modules/TimelineAPI/target/
|
||||
/modules/ToolsAPI/target/
|
||||
/modules/ToolsPlugin/target/
|
||||
/modules/UIComponents/target/
|
||||
/modules/UIUtils/target/
|
||||
/modules/Utils/target/
|
||||
/modules/ValidationAPI/target/
|
||||
/modules/VisualizationAPI/target/
|
||||
/modules/VisualizationImpl/target/
|
||||
/modules/WelcomeScreen/target/
|
||||
/modules/WorkspaceUI/target/
|
||||
/modules/JFreeChartWrapper/target/
|
||||
/modules/CommonsWrapper/target/
|
||||
/modules/CoreLibraryWrapper/target/
|
||||
/modules/UILibraryWrapper/target/
|
||||
/modules/AppearanceAPI/target/
|
||||
/modules/AppearancePlugin/target/
|
||||
/modules/AppearancePluginUI/target/
|
||||
/modules/DesktopAppearance/target/
|
||||
+873
-770
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.gephi.algorithms" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.gephi.algorithms.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
||||
@@ -1,5 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
AutoUpdate-Essential-Module: true
|
||||
OpenIDE-Module: org.gephi.algorithms
|
||||
OpenIDE-Module-Localizing-Bundle: org/gephi/algorithms/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 0.8
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.gephi.algorithms-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=7a62de64
|
||||
build.xml.script.CRC32=cf335b84
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.42.2
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=7a62de64
|
||||
nbproject/build-impl.xml.script.CRC32=7f9d9135
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.42.2
|
||||
@@ -1,6 +0,0 @@
|
||||
javac.source=1.5
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
keystore=nbproject/private/keystore.ks
|
||||
license.file=../gpl-3.0.txt
|
||||
nbm.module.author=Gephi.org
|
||||
nbm_alias=gephi
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.gephi.algorithms</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.data.attributes.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7.1.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.dynamic.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.graph.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.project.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.3.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages>
|
||||
<package>org.gephi.algorithms.shortestpath</package>
|
||||
</public-packages>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
suite.dir=${basedir}/..
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Spanish (Castilian) (http\://www.transifex.net/projects/p/gephi/team/es/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: es\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Algoritmos b\u00e1sicos de la teor\u00eda de grafos
|
||||
|
||||
OpenIDE-Module-Short-Description=Algoritmos b\u00e1sicos de la teor\u00eda de grafos
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: French (http\://www.transifex.net/projects/p/gephi/team/fr/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fr\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Algorithmes de base en th\u00e9orie des graphes
|
||||
|
||||
OpenIDE-Module-Short-Description=Algorithmes de base en th\u00e9orie des graphes
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-11 00\:30+0000\nLast-Translator\: sarang <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/team/ja/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ja\nPlural-Forms\: nplurals\=1; plural\=0\n
|
||||
|
||||
OpenIDE-Module-Long-Description=\u57fa\u790e\u30b0\u30e9\u30d5\u7406\u8ad6\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0
|
||||
|
||||
OpenIDE-Module-Short-Description=\u57fa\u790e\u30b0\u30e9\u30d5\u7406\u8ad6\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# C\u00e9lio CJr <celiofariajr@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 23\:22+0000\nLast-Translator\: celiofariajr <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazilian) (http\://www.transifex.net/projects/p/gephi/team/pt_BR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: pt_BR\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Algoritmos b\u00e1sicos de teoria de grafos
|
||||
|
||||
OpenIDE-Module-Short-Description=Algoritmos b\u00e1sicos de teoria de grafos
|
||||
@@ -1,10 +0,0 @@
|
||||
# Russian translation for gephi
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the gephi package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
!=Project-Id-Version\: gephi\nReport-Msgid-Bugs-To\: FULL NAME <EMAIL@ADDRESS>\nPOT-Creation-Date\: 2010-04-07 13\:16+0200\nPO-Revision-Date\: 2010-11-30 21\:40+0000\nLast-Translator\: Altsoph <Unknown>\nLanguage-Team\: Russian <ru@li.org>\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nX-Launchpad-Export-Date\: 2011-03-13 04\:46+0000\nX-Generator\: Launchpad (build 12559)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0442\u0435\u043e\u0440\u0438\u0438 \u0433\u0440\u0430\u0444\u043e\u0432
|
||||
|
||||
OpenIDE-Module-Short-Description=\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0442\u0435\u043e\u0440\u0438\u0438 \u0433\u0440\u0430\u0444\u043e\u0432
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/gephi/team/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "Algoritmos básicos de la teoría de grafos"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Algoritmos básicos de la teoría de grafos"
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.net/projects/p/gephi/team/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "Algorithmes de base en théorie des graphes"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Algorithmes de base en théorie des graphes"
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-11 00:30+0000\n"
|
||||
"Last-Translator: sarang <kida.siro@gmail.com>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/team/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ja\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "基礎グラフ理論アルゴリズム"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "基礎グラフ理論アルゴリズム"
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Célio CJr <celiofariajr@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 23:22+0000\n"
|
||||
"Last-Translator: celiofariajr <celiofariajr@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/gephi/team/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_BR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "Algoritmos básicos de teoria de grafos "
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Algoritmos básicos de teoria de grafos "
|
||||
|
||||
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.algorithms.shortestpath;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.HashMap;
|
||||
import org.gephi.graph.api.Edge;
|
||||
import org.gephi.graph.api.Node;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public abstract class AbstractShortestPathAlgorithm {
|
||||
|
||||
protected final HashMap<Node, Color> colors;
|
||||
protected final HashMap<Node, Double> distances;
|
||||
protected final Node sourceNode;
|
||||
protected double maxDistance = 0;
|
||||
|
||||
public AbstractShortestPathAlgorithm(Node sourceNode) {
|
||||
this.sourceNode = sourceNode;
|
||||
colors = new HashMap<Node, Color>();
|
||||
distances = new HashMap<Node, Double>();
|
||||
}
|
||||
|
||||
protected boolean relax(Edge edge) {
|
||||
Node source = edge.getSource();
|
||||
Node target = edge.getTarget();
|
||||
double distSource = distances.get(source);
|
||||
double distTarget = distances.get(target);
|
||||
double weight = edgeWeight(edge);
|
||||
|
||||
double sourceWeight = distSource + weight;
|
||||
if (sourceWeight < distTarget) {
|
||||
distances.put(target, sourceWeight);
|
||||
maxDistance = Math.max(maxDistance, sourceWeight);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected double edgeWeight(Edge edge) {
|
||||
return edge.getWeight();
|
||||
}
|
||||
|
||||
public abstract void compute();
|
||||
|
||||
public abstract Node getPredecessor(Node node);
|
||||
|
||||
public abstract Edge getPredecessorIncoming(Node node);
|
||||
|
||||
public HashMap<Node, Double> getDistances() {
|
||||
return distances;
|
||||
}
|
||||
|
||||
public double getMaxDistance() {
|
||||
return maxDistance;
|
||||
}
|
||||
}
|
||||
-137
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.algorithms.shortestpath;
|
||||
|
||||
import java.util.HashMap;
|
||||
import org.gephi.data.attributes.type.TimeInterval;
|
||||
import org.gephi.dynamic.DynamicUtilities;
|
||||
import org.gephi.dynamic.api.DynamicController;
|
||||
import org.gephi.graph.api.DirectedGraph;
|
||||
import org.gephi.graph.api.Edge;
|
||||
import org.gephi.graph.api.Node;
|
||||
import org.openide.util.Lookup;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public class BellmanFordShortestPathAlgorithm extends AbstractShortestPathAlgorithm {
|
||||
|
||||
protected final DirectedGraph graph;
|
||||
protected final HashMap<Node, Edge> predecessors;
|
||||
protected TimeInterval timeInterval;
|
||||
|
||||
public BellmanFordShortestPathAlgorithm(DirectedGraph graph, Node sourceNode) {
|
||||
super(sourceNode);
|
||||
this.graph = graph;
|
||||
predecessors = new HashMap<Node, Edge>();
|
||||
DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
|
||||
if (dynamicController != null) {
|
||||
timeInterval = DynamicUtilities.getVisibleInterval(dynamicController.getModel(graph.getGraphModel().getWorkspace()));
|
||||
}
|
||||
}
|
||||
|
||||
public void compute() {
|
||||
|
||||
graph.readLock();
|
||||
|
||||
//Initialize
|
||||
int nodeCount = 0;
|
||||
for (Node node : graph.getNodes()) {
|
||||
distances.put(node, Double.POSITIVE_INFINITY);
|
||||
nodeCount++;
|
||||
}
|
||||
distances.put(sourceNode, 0d);
|
||||
|
||||
|
||||
//Relax edges repeatedly
|
||||
for (int i = 0; i < nodeCount; i++) {
|
||||
|
||||
boolean relaxed = false;
|
||||
for (Edge edge : graph.getEdges()) {
|
||||
Node target = edge.getTarget();
|
||||
if (relax(edge)) {
|
||||
relaxed = true;
|
||||
predecessors.put(target, edge);
|
||||
}
|
||||
}
|
||||
if (!relaxed) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Check for negative-weight cycles
|
||||
for (Edge edge : graph.getEdges()) {
|
||||
|
||||
if (distances.get(edge.getSource()) + edgeWeight(edge) < distances.get(edge.getTarget())) {
|
||||
graph.readUnlock();
|
||||
throw new RuntimeException("The Graph contains a negative-weighted cycle");
|
||||
}
|
||||
}
|
||||
|
||||
graph.readUnlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double edgeWeight(Edge edge) {
|
||||
if (timeInterval != null) {
|
||||
return edge.getWeight(timeInterval.getLow(), timeInterval.getHigh());
|
||||
}
|
||||
return edge.getWeight();
|
||||
}
|
||||
|
||||
public Node getPredecessor(Node node) {
|
||||
Edge edge = predecessors.get(node);
|
||||
if (edge != null) {
|
||||
if (edge.getSource() != node) {
|
||||
return edge.getSource();
|
||||
} else {
|
||||
return edge.getTarget();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Edge getPredecessorIncoming(Node node) {
|
||||
return predecessors.get(node);
|
||||
}
|
||||
}
|
||||
-147
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.algorithms.shortestpath;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.gephi.data.attributes.type.TimeInterval;
|
||||
import org.gephi.dynamic.DynamicUtilities;
|
||||
import org.gephi.dynamic.api.DynamicController;
|
||||
import org.gephi.graph.api.Edge;
|
||||
import org.gephi.graph.api.Graph;
|
||||
import org.gephi.graph.api.Node;
|
||||
import org.openide.util.Lookup;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public class DijkstraShortestPathAlgorithm extends AbstractShortestPathAlgorithm {
|
||||
|
||||
protected final Graph graph;
|
||||
protected final HashMap<Node, Edge> predecessors;
|
||||
protected TimeInterval timeInterval;
|
||||
|
||||
public DijkstraShortestPathAlgorithm(Graph graph, Node sourceNode) {
|
||||
super(sourceNode);
|
||||
this.graph = graph;
|
||||
predecessors = new HashMap<Node, Edge>();
|
||||
DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
|
||||
if (dynamicController != null) {
|
||||
timeInterval = DynamicUtilities.getVisibleInterval(dynamicController.getModel(graph.getGraphModel().getWorkspace()));
|
||||
}
|
||||
}
|
||||
|
||||
public void compute() {
|
||||
|
||||
graph.readLock();
|
||||
Set<Node> nodes = new HashSet<Node>();
|
||||
|
||||
//Initialize
|
||||
int nodeCount = 0;
|
||||
for (Node node : graph.getNodes()) {
|
||||
distances.put(node, Double.POSITIVE_INFINITY);
|
||||
nodes.add(node);
|
||||
nodeCount++;
|
||||
}
|
||||
distances.put(sourceNode, 0d);
|
||||
|
||||
while (!nodes.isEmpty()) {
|
||||
|
||||
// find node with smallest distance value
|
||||
Double minDistance = Double.POSITIVE_INFINITY;
|
||||
Node minDistanceNode = null;
|
||||
for (Node k : nodes) {
|
||||
Double dist = distances.get(k);
|
||||
if (dist.compareTo(minDistance) < 0) {
|
||||
minDistance = dist;
|
||||
minDistanceNode = k;
|
||||
}
|
||||
}
|
||||
Node currentNode = minDistanceNode;
|
||||
nodes.remove(currentNode);
|
||||
|
||||
for (Edge edge : graph.getEdges(currentNode)) {
|
||||
Node neighbor = graph.getOpposite(currentNode, edge);
|
||||
double dist = edgeWeight(edge) + distances.get(currentNode);
|
||||
if (distances.get(neighbor).equals(Double.POSITIVE_INFINITY)) {
|
||||
distances.put(neighbor, dist);
|
||||
maxDistance = Math.max(maxDistance, dist);
|
||||
predecessors.put(neighbor, edge);
|
||||
} else {
|
||||
if (dist < distances.get(neighbor)) {
|
||||
distances.put(neighbor, dist);
|
||||
maxDistance = Math.max(maxDistance, dist);
|
||||
predecessors.put(neighbor, edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph.readUnlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double edgeWeight(Edge edge) {
|
||||
if (timeInterval != null) {
|
||||
return edge.getWeight(timeInterval.getLow(), timeInterval.getHigh());
|
||||
}
|
||||
return edge.getWeight();
|
||||
}
|
||||
|
||||
public Node getPredecessor(Node node) {
|
||||
Edge edge = predecessors.get(node);
|
||||
if (edge != null) {
|
||||
if (edge.getSource() != node) {
|
||||
return edge.getSource();
|
||||
} else {
|
||||
return edge.getTarget();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Edge getPredecessorIncoming(Node node) {
|
||||
return predecessors.get(node);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.gephi.ui.propertyeditor" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.gephi.ui.propertyeditor.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
AutoUpdate-Essential-Module: true
|
||||
OpenIDE-Module: org.gephi.ui.propertyeditor
|
||||
OpenIDE-Module-Localizing-Bundle: org/gephi/ui/propertyeditor/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 0.8
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.gephi.ui.propertyeditor-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=b90a9a84
|
||||
build.xml.script.CRC32=fee76ed2
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.42.1
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=b90a9a84
|
||||
nbproject/build-impl.xml.script.CRC32=3fb6a735
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.42.1
|
||||
@@ -1,6 +0,0 @@
|
||||
javac.source=1.5
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
keystore=nbproject/private/keystore.ks
|
||||
license.file=../gpl-3.0.txt
|
||||
nbm.module.author=Gephi.org
|
||||
nbm_alias=gephi
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.gephi.ui.propertyeditor</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.data.attributes.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.6.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.3.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages>
|
||||
<package>org.gephi.ui.propertyeditor</package>
|
||||
</public-packages>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
suite.dir=${basedir}/..
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Spanish (Castilian) (http\://www.transifex.net/projects/p/gephi/team/es/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: es\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Estos editores de propiedades pueden ser utilizados para mostrar un combobox con las columnas actuales en un PropertySheet.
|
||||
|
||||
OpenIDE-Module-Short-Description=Proporcionar la clase PropertyEditor para las propiedades de AttributeColumn
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: French (http\://www.transifex.net/projects/p/gephi/team/fr/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fr\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Ces \u00e9diteurs de propri\u00e9t\u00e9 sont utilisables pour afficher une combobox avec les colonnes courantes dans un PropertySheet.
|
||||
|
||||
OpenIDE-Module-Short-Description=Fournit la classe PropertyEditor pour les propri\u00e9t\u00e9s de AttributeColumn
|
||||
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-18 10\:40+0000\nLast-Translator\: sarang <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/team/ja/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ja\nPlural-Forms\: nplurals\=1; plural\=0\n
|
||||
|
||||
OpenIDE-Module-Long-Description=\u3053\u308c\u3089\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30a8\u30c7\u30a3\u30bf\u306f\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u30b7\u30fc\u30c8\u3067\u3001\u73fe\u5728\u306e\u5217\u3092\u6301\u3064\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
|
||||
|
||||
OpenIDE-Module-Short-Description=AttributeColumn\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306ePropertyEditor\u30af\u30e9\u30b9\u3092\u63d0\u4f9b\u3059\u308b
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# C\u00e9lio CJr <celiofariajr@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 23\:31+0000\nLast-Translator\: celiofariajr <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazilian) (http\://www.transifex.net/projects/p/gephi/team/pt_BR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: pt_BR\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Estes editores de propriedades pode ser usados para exibir um combobox com as colunas atuais em uma PropertySheet.
|
||||
|
||||
OpenIDE-Module-Short-Description=Fornece classe PropertyEditor para propriedades do tipo AttributeColumn
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/gephi/team/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"Estos editores de propiedades pueden ser utilizados para mostrar un combobox"
|
||||
" con las columnas actuales en un PropertySheet."
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr ""
|
||||
"Proporcionar la clase PropertyEditor para las propiedades de AttributeColumn"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.net/projects/p/gephi/team/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"Ces éditeurs de propriété sont utilisables pour afficher une combobox avec "
|
||||
"les colonnes courantes dans un PropertySheet."
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr ""
|
||||
"Fournit la classe PropertyEditor pour les propriétés de AttributeColumn"
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-18 10:40+0000\n"
|
||||
"Last-Translator: sarang <kida.siro@gmail.com>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/team/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ja\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "これらのプロパティエディタは、プロパティシートで、現在の列を持つコンボボックスを表示するために使用することができます。"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "AttributeColumnのプロパティのPropertyEditorクラスを提供する"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Célio CJr <celiofariajr@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 23:31+0000\n"
|
||||
"Last-Translator: celiofariajr <celiofariajr@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/gephi/team/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_BR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"Estes editores de propriedades pode ser usados para exibir um combobox com "
|
||||
"as colunas atuais em uma PropertySheet."
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr ""
|
||||
"Fornece classe PropertyEditor para propriedades do tipo AttributeColumn "
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.gephi.data.attributes.api" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.gephi.data.attributes.api.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
||||
@@ -1,5 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.gephi.data.attributes.api
|
||||
OpenIDE-Module-Localizing-Bundle: org/gephi/data/attributes/api/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 0.8.0.2
|
||||
AutoUpdate-Essential-Module: true
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.gephi.data.attributes.api-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
build.xml.data.CRC32=1965fabe
|
||||
build.xml.script.CRC32=3725a65f
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.42.2
|
||||
nbproject/build-impl.xml.data.CRC32=1965fabe
|
||||
nbproject/build-impl.xml.script.CRC32=24a2766f
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.42.2
|
||||
@@ -1,6 +0,0 @@
|
||||
javac.source=1.5
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
keystore=nbproject/private/keystore.ks
|
||||
license.file=../gpl-3.0.txt
|
||||
nbm.module.author=Gephi.org
|
||||
nbm_alias=gephi
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.gephi.data.attributes.api</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.graph.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.project.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7.0.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.31.2.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.3.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<test-dependencies>
|
||||
<test-type>
|
||||
<name>unit</name>
|
||||
<test-dependency>
|
||||
<code-name-base>org.netbeans.libs.junit4</code-name-base>
|
||||
<compile-dependency/>
|
||||
</test-dependency>
|
||||
</test-type>
|
||||
</test-dependencies>
|
||||
<public-packages>
|
||||
<package>org.gephi.data.attributes.api</package>
|
||||
<package>org.gephi.data.attributes.spi</package>
|
||||
<package>org.gephi.data.attributes.type</package>
|
||||
<package>org.gephi.data.properties</package>
|
||||
</public-packages>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
suite.dir=${basedir}/..
|
||||
@@ -1,595 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>, Martin Škurla, Cezary Bartosiak
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes.api;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import org.gephi.data.attributes.type.DynamicByte;
|
||||
import org.gephi.data.attributes.type.DynamicShort;
|
||||
import org.gephi.data.attributes.type.DynamicInteger;
|
||||
import org.gephi.data.attributes.type.DynamicLong;
|
||||
import org.gephi.data.attributes.type.DynamicFloat;
|
||||
import org.gephi.data.attributes.type.DynamicDouble;
|
||||
import org.gephi.data.attributes.type.DynamicBoolean;
|
||||
import org.gephi.data.attributes.type.DynamicCharacter;
|
||||
import org.gephi.data.attributes.type.DynamicString;
|
||||
import org.gephi.data.attributes.type.DynamicBigInteger;
|
||||
import org.gephi.data.attributes.type.DynamicBigDecimal;
|
||||
import org.gephi.data.attributes.type.TimeInterval;
|
||||
import org.gephi.data.attributes.type.ByteList;
|
||||
import org.gephi.data.attributes.type.ShortList;
|
||||
import org.gephi.data.attributes.type.IntegerList;
|
||||
import org.gephi.data.attributes.type.LongList;
|
||||
import org.gephi.data.attributes.type.FloatList;
|
||||
import org.gephi.data.attributes.type.DoubleList;
|
||||
import org.gephi.data.attributes.type.BooleanList;
|
||||
import org.gephi.data.attributes.type.CharacterList;
|
||||
import org.gephi.data.attributes.type.StringList;
|
||||
import org.gephi.data.attributes.type.BigIntegerList;
|
||||
import org.gephi.data.attributes.type.BigDecimalList;
|
||||
import org.gephi.data.attributes.type.DynamicType;
|
||||
import org.gephi.data.attributes.type.Interval;
|
||||
|
||||
/**
|
||||
* The different type an {@link AttributeColumn} can have.
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
* @author Martin Škurla
|
||||
* @author Cezary Bartosiak
|
||||
*/
|
||||
public enum AttributeType {
|
||||
|
||||
BYTE(Byte.class),
|
||||
SHORT(Short.class),
|
||||
INT(Integer.class),
|
||||
LONG(Long.class),
|
||||
FLOAT(Float.class),
|
||||
DOUBLE(Double.class),
|
||||
BOOLEAN(Boolean.class),
|
||||
CHAR(Character.class),
|
||||
STRING(String.class),
|
||||
BIGINTEGER(BigInteger.class),
|
||||
BIGDECIMAL(BigDecimal.class),
|
||||
DYNAMIC_BYTE(DynamicByte.class),
|
||||
DYNAMIC_SHORT(DynamicShort.class),
|
||||
DYNAMIC_INT(DynamicInteger.class),
|
||||
DYNAMIC_LONG(DynamicLong.class),
|
||||
DYNAMIC_FLOAT(DynamicFloat.class),
|
||||
DYNAMIC_DOUBLE(DynamicDouble.class),
|
||||
DYNAMIC_BOOLEAN(DynamicBoolean.class),
|
||||
DYNAMIC_CHAR(DynamicCharacter.class),
|
||||
DYNAMIC_STRING(DynamicString.class),
|
||||
DYNAMIC_BIGINTEGER(DynamicBigInteger.class),
|
||||
DYNAMIC_BIGDECIMAL(DynamicBigDecimal.class),
|
||||
TIME_INTERVAL(TimeInterval.class),
|
||||
LIST_BYTE(ByteList.class),
|
||||
LIST_SHORT(ShortList.class),
|
||||
LIST_INTEGER(IntegerList.class),
|
||||
LIST_LONG(LongList.class),
|
||||
LIST_FLOAT(FloatList.class),
|
||||
LIST_DOUBLE(DoubleList.class),
|
||||
LIST_BOOLEAN(BooleanList.class),
|
||||
LIST_CHARACTER(CharacterList.class),
|
||||
LIST_STRING(StringList.class),
|
||||
LIST_BIGINTEGER(BigIntegerList.class),
|
||||
LIST_BIGDECIMAL(BigDecimalList.class);
|
||||
private final Class type;
|
||||
|
||||
AttributeType(Class type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return type.getSimpleName();
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the enum constant.
|
||||
*
|
||||
* @return the name of the enum constant
|
||||
*/
|
||||
public String getTypeString() {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the <code>Class</code> the type is associated with.
|
||||
*
|
||||
* @return the <code>class</code> the type is associated with
|
||||
*/
|
||||
public Class getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to parse the given <code>str</code> snippet in an object of the type
|
||||
* associated to this <code>AttributeType</code>. For instance if the type
|
||||
* is <b>Boolean</b>, and <code>str</code> equals <code>true</code>, this
|
||||
* method will succeed to return a <code>Boolean</code> instance. May
|
||||
* throw <code>NumberFormatException</code>.
|
||||
*
|
||||
* <code>DYNAMIC</code> types and <code>TIME_INTERVAL</code> cannot be parsed with this method (see <code>isDynamicType</code> method) and a UnsupportedOperationException will be thrown if it is tried.
|
||||
*
|
||||
* @param str the string that is to be parsed
|
||||
* @return an instance of the type of this <code>AttributeType</code>.
|
||||
*/
|
||||
public Object parse(String str) {
|
||||
switch (this) {
|
||||
case BYTE:
|
||||
return new Byte(removeDecimalDigitsFromString(str));
|
||||
case SHORT:
|
||||
return new Short(removeDecimalDigitsFromString(str));
|
||||
case INT:
|
||||
return new Integer(removeDecimalDigitsFromString(str));
|
||||
case LONG:
|
||||
return new Long(removeDecimalDigitsFromString(str));
|
||||
case FLOAT:
|
||||
return new Float(str);
|
||||
case DOUBLE:
|
||||
return new Double(str);
|
||||
case BOOLEAN:
|
||||
return new Boolean(str);
|
||||
case CHAR:
|
||||
return new Character(str.charAt(0));
|
||||
case BIGINTEGER:
|
||||
return new BigInteger(removeDecimalDigitsFromString(str));
|
||||
case BIGDECIMAL:
|
||||
return new BigDecimal(str);
|
||||
case DYNAMIC_BYTE:
|
||||
case DYNAMIC_SHORT:
|
||||
case DYNAMIC_INT:
|
||||
case DYNAMIC_LONG:
|
||||
case DYNAMIC_FLOAT:
|
||||
case DYNAMIC_DOUBLE:
|
||||
case DYNAMIC_BOOLEAN:
|
||||
case DYNAMIC_CHAR:
|
||||
case DYNAMIC_STRING:
|
||||
case DYNAMIC_BIGINTEGER:
|
||||
case DYNAMIC_BIGDECIMAL:
|
||||
case TIME_INTERVAL:
|
||||
return parseDynamic(str);
|
||||
case LIST_BYTE:
|
||||
return new ByteList(removeDecimalDigitsFromString(str));
|
||||
case LIST_SHORT:
|
||||
return new ShortList(removeDecimalDigitsFromString(str));
|
||||
case LIST_INTEGER:
|
||||
return new IntegerList(removeDecimalDigitsFromString(str));
|
||||
case LIST_LONG:
|
||||
return new LongList(removeDecimalDigitsFromString(str));
|
||||
case LIST_FLOAT:
|
||||
return new FloatList(str);
|
||||
case LIST_DOUBLE:
|
||||
return new DoubleList(str);
|
||||
case LIST_BOOLEAN:
|
||||
return new BooleanList(str);
|
||||
case LIST_CHARACTER:
|
||||
return new CharacterList(str);
|
||||
case LIST_STRING:
|
||||
return new StringList(str);
|
||||
case LIST_BIGINTEGER:
|
||||
return new BigIntegerList(removeDecimalDigitsFromString(str));
|
||||
case LIST_BIGDECIMAL:
|
||||
return new BigDecimalList(str);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private Object parseDynamic(String str) {
|
||||
if (str.equals("<empty>")) {
|
||||
return createDynamicObject(null);
|
||||
}
|
||||
|
||||
if (str.startsWith("<")) {
|
||||
str = str.substring(1);
|
||||
}
|
||||
if (str.endsWith(">")) {
|
||||
str = str.substring(0, str.length() - 1);
|
||||
}
|
||||
String[] intervals = str.split("; *");
|
||||
|
||||
List<Interval> in = new ArrayList<Interval>();
|
||||
|
||||
for (String interval : intervals) {
|
||||
boolean lopen = interval.startsWith("(");
|
||||
boolean ropen = interval.endsWith(")");
|
||||
|
||||
interval = interval.substring(1, interval.length() - 1);
|
||||
String[] parts = interval.split(", *", 3);
|
||||
double low, high;
|
||||
try {
|
||||
//Try first to parse as a date:
|
||||
low =parseDateToDouble(parts[0]);
|
||||
} catch (ParseException ex) {
|
||||
low = Double.parseDouble(parts[0]);
|
||||
}
|
||||
try {
|
||||
//Try first to parse as a date:
|
||||
high =parseDateToDouble(parts[1]);
|
||||
} catch (ParseException ex) {
|
||||
high = Double.parseDouble(parts[1]);
|
||||
}
|
||||
Object value = null;
|
||||
switch (this) {
|
||||
case DYNAMIC_BYTE:
|
||||
value = new Byte(removeDecimalDigitsFromString(parts[2]));
|
||||
break;
|
||||
case DYNAMIC_SHORT:
|
||||
value = new Short(removeDecimalDigitsFromString(parts[2]));
|
||||
break;
|
||||
case DYNAMIC_INT:
|
||||
value = new Integer(removeDecimalDigitsFromString(parts[2]));
|
||||
break;
|
||||
case DYNAMIC_LONG:
|
||||
value = new Long(removeDecimalDigitsFromString(parts[2]));
|
||||
break;
|
||||
case DYNAMIC_FLOAT:
|
||||
value = new Float(parts[2]);
|
||||
break;
|
||||
case DYNAMIC_DOUBLE:
|
||||
value = new Double(parts[2]);
|
||||
break;
|
||||
case DYNAMIC_BOOLEAN:
|
||||
value = new Boolean(parts[2]);
|
||||
break;
|
||||
case DYNAMIC_CHAR:
|
||||
value = new Character(parts[2].charAt(0));
|
||||
break;
|
||||
case DYNAMIC_STRING:
|
||||
value = parts[2];
|
||||
break;
|
||||
case DYNAMIC_BIGINTEGER:
|
||||
value = new BigInteger(removeDecimalDigitsFromString(parts[2]));
|
||||
break;
|
||||
case DYNAMIC_BIGDECIMAL:
|
||||
value = new BigDecimal(parts[2]);
|
||||
break;
|
||||
case TIME_INTERVAL:
|
||||
default:
|
||||
value = null;
|
||||
break;
|
||||
}
|
||||
|
||||
in.add(new Interval(low, high, lopen, ropen, value));
|
||||
}
|
||||
|
||||
return createDynamicObject(in);
|
||||
}
|
||||
|
||||
private DynamicType createDynamicObject(List<Interval> in) {
|
||||
if (!this.isDynamicType()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (this) {
|
||||
case DYNAMIC_BYTE: {
|
||||
ArrayList<Interval<Byte>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Byte>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Byte>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Byte) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicByte(lin);
|
||||
}
|
||||
case DYNAMIC_SHORT: {
|
||||
ArrayList<Interval<Short>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Short>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Short>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Short) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicShort(lin);
|
||||
}
|
||||
case DYNAMIC_INT: {
|
||||
ArrayList<Interval<Integer>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Integer>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Integer>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Integer) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicInteger(lin);
|
||||
}
|
||||
case DYNAMIC_LONG: {
|
||||
ArrayList<Interval<Long>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Long>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Long>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Long) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicLong(lin);
|
||||
}
|
||||
case DYNAMIC_FLOAT: {
|
||||
ArrayList<Interval<Float>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Float>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Float>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Float) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicFloat(lin);
|
||||
}
|
||||
case DYNAMIC_DOUBLE: {
|
||||
ArrayList<Interval<Double>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Double>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Double>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Double) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicDouble(lin);
|
||||
}
|
||||
case DYNAMIC_BOOLEAN: {
|
||||
ArrayList<Interval<Boolean>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Boolean>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Boolean>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Boolean) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicBoolean(lin);
|
||||
}
|
||||
case DYNAMIC_CHAR: {
|
||||
ArrayList<Interval<Character>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<Character>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<Character>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (Character) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicCharacter(lin);
|
||||
}
|
||||
case DYNAMIC_STRING: {
|
||||
ArrayList<Interval<String>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<String>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<String>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (String) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicString(lin);
|
||||
}
|
||||
case DYNAMIC_BIGINTEGER: {
|
||||
ArrayList<Interval<BigInteger>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<BigInteger>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<BigInteger>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (BigInteger) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicBigInteger(lin);
|
||||
}
|
||||
case DYNAMIC_BIGDECIMAL: {
|
||||
ArrayList<Interval<BigDecimal>> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval<BigDecimal>>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval<BigDecimal>(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded(), (BigDecimal) interval.getValue()));
|
||||
}
|
||||
}
|
||||
return new DynamicBigDecimal(lin);
|
||||
}
|
||||
case TIME_INTERVAL: {
|
||||
ArrayList<Interval> lin = null;
|
||||
if (in != null) {
|
||||
lin = new ArrayList<Interval>();
|
||||
for (Interval interval : in) {
|
||||
lin.add(new Interval(interval.getLow(), interval.getHigh(),
|
||||
interval.isLowExcluded(), interval.isHighExcluded()));
|
||||
}
|
||||
}
|
||||
return new TimeInterval(lin);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an <code>AttributeType</code> from the given <code>obj</code> type.
|
||||
* If the given <code>obj</code> class match with an
|
||||
* <code>AttributeType</code> type, returns this type. Returns <code>null</code>
|
||||
* otherwise.
|
||||
* <p>
|
||||
* For instance if
|
||||
* <b>obj instanceof Float</b> equals <b>true</b>, returns
|
||||
* <code>AttributeType.FLOAT</code>.
|
||||
*
|
||||
* @param obj the object that is to be parsed
|
||||
* @return the compatible <code>AttributeType</code>, or <code>null</code> if no type is found or the input object is null
|
||||
*/
|
||||
public static AttributeType parse(Object obj) {
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
Class<?> c = obj.getClass();
|
||||
|
||||
for (AttributeType attributeType : AttributeType.values()) {
|
||||
if (c.equals(attributeType.getType())) {
|
||||
return attributeType;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an dynamic <code>AttributeType</code> from the given <code>obj</code> type.
|
||||
* If the given <code>obj</code> class match with an
|
||||
* <code>AttributeType</code> type, returns this type. Returns <code>null</code>
|
||||
* otherwise.
|
||||
* <p>
|
||||
* For instance if
|
||||
* <b>obj instanceof Float</b> equals <b>true</b>, returns
|
||||
* <code>AttributeType.DYNAMIC_FLOAT</code>.
|
||||
*
|
||||
* @param obj the object that is to be parsed
|
||||
* @return the compatible <code>AttributeType</code>, or <code>null</code>
|
||||
*/
|
||||
public static AttributeType parseDynamic(Object obj) {
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Class<?> c = obj.getClass();
|
||||
|
||||
if (c.equals(Byte.class)) {
|
||||
return DYNAMIC_BYTE;
|
||||
}
|
||||
if (c.equals(Short.class)) {
|
||||
return DYNAMIC_SHORT;
|
||||
}
|
||||
if (c.equals(Integer.class)) {
|
||||
return DYNAMIC_INT;
|
||||
}
|
||||
if (c.equals(Long.class)) {
|
||||
return DYNAMIC_LONG;
|
||||
}
|
||||
if (c.equals(Float.class)) {
|
||||
return DYNAMIC_FLOAT;
|
||||
}
|
||||
if (c.equals(Double.class)) {
|
||||
return DYNAMIC_DOUBLE;
|
||||
}
|
||||
if (c.equals(Boolean.class)) {
|
||||
return DYNAMIC_BOOLEAN;
|
||||
}
|
||||
if (c.equals(Character.class)) {
|
||||
return DYNAMIC_CHAR;
|
||||
}
|
||||
if (c.equals(String.class)) {
|
||||
return DYNAMIC_STRING;
|
||||
}
|
||||
if (c.equals(BigInteger.class)) {
|
||||
return DYNAMIC_BIGINTEGER;
|
||||
}
|
||||
if (c.equals(BigDecimal.class)) {
|
||||
return DYNAMIC_BIGDECIMAL;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this type is a {@code DynamicType}.
|
||||
*
|
||||
* @return {@code true} if this is a {@code DynamicType}, {@code false}
|
||||
* otherwise
|
||||
*/
|
||||
public boolean isDynamicType() {
|
||||
switch (this) {
|
||||
case DYNAMIC_BYTE:
|
||||
case DYNAMIC_SHORT:
|
||||
case DYNAMIC_INT:
|
||||
case DYNAMIC_LONG:
|
||||
case DYNAMIC_FLOAT:
|
||||
case DYNAMIC_DOUBLE:
|
||||
case DYNAMIC_BOOLEAN:
|
||||
case DYNAMIC_CHAR:
|
||||
case DYNAMIC_STRING:
|
||||
case DYNAMIC_BIGINTEGER:
|
||||
case DYNAMIC_BIGDECIMAL:
|
||||
case TIME_INTERVAL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isListType() {
|
||||
if (this.equals(LIST_BIGDECIMAL)
|
||||
|| this.equals(LIST_BIGINTEGER)
|
||||
|| this.equals(LIST_BOOLEAN)
|
||||
|| this.equals(LIST_BYTE)
|
||||
|| this.equals(LIST_CHARACTER)
|
||||
|| this.equals(LIST_DOUBLE)
|
||||
|| this.equals(LIST_FLOAT)
|
||||
|| this.equals(LIST_INTEGER)
|
||||
|| this.equals(LIST_LONG)
|
||||
|| this.equals(LIST_SHORT)
|
||||
|| this.equals(LIST_STRING)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the decimal digits and point of the numbers of string when necessary.
|
||||
* Used for trying to parse decimal numbers as not decimal.
|
||||
* For example BigDecimal to BigInteger.
|
||||
* @param s String to remove decimal digits
|
||||
* @return String without dot and decimal digits.
|
||||
*/
|
||||
private String removeDecimalDigitsFromString(String s) {
|
||||
return removeDecimalDigitsFromStringPattern.matcher(s).replaceAll("");
|
||||
}
|
||||
private static final Pattern removeDecimalDigitsFromStringPattern = Pattern.compile("\\.[0-9]*");
|
||||
|
||||
private static double parseDateToDouble(String date) throws ParseException {
|
||||
Date d = dateFormat.parse(date);
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(d);
|
||||
return cal.getTimeInMillis();
|
||||
}
|
||||
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>, Martin Škurla
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes.api;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import javax.xml.datatype.DatatypeConfigurationException;
|
||||
import javax.xml.datatype.DatatypeFactory;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.Lookup;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public abstract class AttributeUtils {
|
||||
|
||||
public abstract boolean isNodeColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean isEdgeColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean isColumnOfType(AttributeColumn column, AttributeType type);
|
||||
|
||||
public abstract boolean areAllColumnsOfType(AttributeColumn[] columns, AttributeType type);
|
||||
|
||||
public abstract boolean areAllColumnsOfSameType(AttributeColumn[] columns);
|
||||
|
||||
public abstract boolean isStringColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean areAllStringColumns(AttributeColumn[] columns);
|
||||
|
||||
public abstract boolean isNumberColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean areAllNumberColumns(AttributeColumn[] columns);
|
||||
|
||||
public abstract boolean isNumberListColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean areAllNumberListColumns(AttributeColumn[] columns);
|
||||
|
||||
public abstract boolean isNumberOrNumberListColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean areAllNumberOrNumberListColumns(AttributeColumn[] columns);
|
||||
|
||||
public abstract boolean isDynamicNumberColumn(AttributeColumn column);
|
||||
|
||||
public abstract boolean areAllDynamicNumberColumns(AttributeColumn[] columns);
|
||||
|
||||
public abstract AttributeColumn[] getNumberColumns(AttributeTable table);
|
||||
|
||||
public abstract AttributeColumn[] getStringColumns(AttributeTable table);
|
||||
|
||||
public abstract AttributeColumn[] getAllCollums(AttributeModel model);
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public abstract Comparable getMin(AttributeColumn column, Comparable[] values);
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public abstract Comparable getMax(AttributeColumn column, Comparable[] values);
|
||||
|
||||
public static synchronized AttributeUtils getDefault() {
|
||||
return Lookup.getDefault().lookup(AttributeUtils.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for export (writes XML date strings).
|
||||
*
|
||||
* @param d a double to convert from
|
||||
*
|
||||
* @return an XML date string.
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code d} is infinite.
|
||||
*/
|
||||
public static String getXMLDateStringFromDouble(double d) {
|
||||
try {
|
||||
DatatypeFactory dateFactory = DatatypeFactory.newInstance();
|
||||
if (d == Double.NEGATIVE_INFINITY) {
|
||||
return "-Infinity";
|
||||
} else if (d == Double.POSITIVE_INFINITY) {
|
||||
return "Infinity";
|
||||
}
|
||||
GregorianCalendar gc = new GregorianCalendar();
|
||||
gc.setTimeInMillis((long) d);
|
||||
return dateFactory.newXMLGregorianCalendar(gc).toXMLFormat().substring(0, 23);
|
||||
} catch (DatatypeConfigurationException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-04 19\:12+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Spanish (Castilian) (http\://www.transifex.net/projects/p/gephi/team/es/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: es\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Attributes API proporciona acceso a valores de atributos mediante un sistema eficiente de filas/columnas.
|
||||
|
||||
AttributeOrigin_property=Propiedad
|
||||
|
||||
AttributeOrigin_data=Dato
|
||||
|
||||
AttributeOrigin_computed_name=Calculado
|
||||
|
||||
OpenIDE-Module-Short-Description=API para almacenar y recuperar atributos
|
||||
@@ -1,17 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-04 19\:12+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: French (http\://www.transifex.net/projects/p/gephi/team/fr/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fr\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=Attributes API donne acc\u00e8s aux valeurs d'attribut \u00e0 travers un syst\u00e8me efficace de lignes/colonnes.
|
||||
|
||||
AttributeOrigin_property=Propri\u00e9t\u00e9
|
||||
|
||||
AttributeOrigin_data=Donn\u00e9e
|
||||
|
||||
AttributeOrigin_computed_name=Calcul\u00e9
|
||||
|
||||
OpenIDE-Module-Short-Description=API de stockage et de r\u00e9cup\u00e9ration d'attributs
|
||||
@@ -1,17 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-29 18\:30+0000\nLast-Translator\: sarang <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/team/ja/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ja\nPlural-Forms\: nplurals\=1; plural\=0\n
|
||||
|
||||
OpenIDE-Module-Long-Description=\u5c5e\u6027API\u306f\u3001\u52b9\u7387\u7684\u306a\u5217/\u884c\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3057\u3066\u5c5e\u6027\u5024\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002
|
||||
|
||||
AttributeOrigin_property=\u30d7\u30ed\u30d1\u30c6\u30a3
|
||||
|
||||
AttributeOrigin_data=\u30c7\u30fc\u30bf
|
||||
|
||||
AttributeOrigin_computed_name=\u8a08\u7b97\u3055\u308c\u305f
|
||||
|
||||
OpenIDE-Module-Short-Description=\u5c5e\u6027\u3092\u683c\u7d0d\u304a\u3088\u3073\u53d6\u5f97\u3059\u308b\u305f\u3081\u306eAPI
|
||||
@@ -1,17 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# C\u00e9lio CJr <celiofariajr@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-05 16\:43+0000\nLast-Translator\: celiofariajr <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazilian) (http\://www.transifex.net/projects/p/gephi/team/pt_BR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: pt_BR\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=A API de atributos fornece acesso aos valores de atributos por meio de um sistema eficiente de colunas e linhas.
|
||||
|
||||
AttributeOrigin_property=Propriedade
|
||||
|
||||
AttributeOrigin_data=Dado
|
||||
|
||||
AttributeOrigin_computed_name=Calculado
|
||||
|
||||
OpenIDE-Module-Short-Description=API de armazenamento e recupera\u00e7\u00e3o de dados
|
||||
@@ -1,16 +0,0 @@
|
||||
# Russian translation for gephi
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the gephi package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
!=Project-Id-Version\: gephi\nReport-Msgid-Bugs-To\: FULL NAME <EMAIL@ADDRESS>\nPOT-Creation-Date\: 2010-04-07 13\:16+0200\nPO-Revision-Date\: 2010-12-01 08\:22+0000\nLast-Translator\: Altsoph <Unknown>\nLanguage-Team\: Russian <ru@li.org>\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nX-Launchpad-Export-Date\: 2011-03-13 04\:46+0000\nX-Generator\: Launchpad (build 12559)\n
|
||||
|
||||
OpenIDE-Module-Long-Description=API \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a.
|
||||
|
||||
AttributeOrigin_property=\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e
|
||||
|
||||
AttributeOrigin_data=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435
|
||||
|
||||
AttributeOrigin_computed_name=\u0420\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u043e
|
||||
|
||||
OpenIDE-Module-Short-Description=API \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c
|
||||
@@ -1,38 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-04 19:12+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/gephi/team/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"Attributes API proporciona acceso a valores de atributos mediante un sistema"
|
||||
" eficiente de filas/columnas."
|
||||
|
||||
msgid "AttributeOrigin_property"
|
||||
msgstr "Propiedad"
|
||||
|
||||
msgid "AttributeOrigin_data"
|
||||
msgstr "Dato"
|
||||
|
||||
msgid "AttributeOrigin_computed_name"
|
||||
msgstr "Calculado"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "API para almacenar y recuperar atributos"
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-04 19:12+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.net/projects/p/gephi/team/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"Attributes API donne accès aux valeurs d'attribut à travers un système "
|
||||
"efficace de lignes/colonnes."
|
||||
|
||||
msgid "AttributeOrigin_property"
|
||||
msgstr "Propriété"
|
||||
|
||||
msgid "AttributeOrigin_data"
|
||||
msgstr "Donnée"
|
||||
|
||||
msgid "AttributeOrigin_computed_name"
|
||||
msgstr "Calculé"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "API de stockage et de récupération d'attributs"
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-29 18:30+0000\n"
|
||||
"Last-Translator: sarang <kida.siro@gmail.com>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/team/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ja\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr "属性APIは、効率的な列/行のシステムを使用して属性値へのアクセスを提供します。"
|
||||
|
||||
msgid "AttributeOrigin_property"
|
||||
msgstr "プロパティ"
|
||||
|
||||
msgid "AttributeOrigin_data"
|
||||
msgstr "データ"
|
||||
|
||||
msgid "AttributeOrigin_computed_name"
|
||||
msgstr "計算された"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "属性を格納および取得するためのAPI"
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Célio CJr <celiofariajr@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-05 16:43+0000\n"
|
||||
"Last-Translator: celiofariajr <celiofariajr@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/gephi/team/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_BR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "OpenIDE-Module-Long-Description"
|
||||
msgstr ""
|
||||
"A API de atributos fornece acesso aos valores de atributos por meio de um "
|
||||
"sistema eficiente de colunas e linhas."
|
||||
|
||||
msgid "AttributeOrigin_property"
|
||||
msgstr "Propriedade"
|
||||
|
||||
msgid "AttributeOrigin_data"
|
||||
msgstr "Dado"
|
||||
|
||||
msgid "AttributeOrigin_computed_name"
|
||||
msgstr "Calculado"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "API de armazenamento e recuperação de dados"
|
||||
|
||||
|
||||
@@ -1,321 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Cezary Bartosiak
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes.type;
|
||||
|
||||
import org.gephi.data.attributes.api.AttributeUtils;
|
||||
|
||||
/**
|
||||
* This class represents an interval with some value.
|
||||
*
|
||||
* @author Cezary Bartosiak
|
||||
*
|
||||
* @param <T> type of data
|
||||
*/
|
||||
public final class Interval<T> implements Comparable<Interval> {
|
||||
|
||||
private double low; // the left endpoint
|
||||
private double high; // the right endpoint
|
||||
private boolean lopen; // indicates if the left endpoint is excluded
|
||||
private boolean ropen; // indicates if the right endpoint is excluded
|
||||
private T value; // the value stored in this interval
|
||||
|
||||
/**
|
||||
* Constructs a new interval instance
|
||||
*
|
||||
* <p>Note that {@code value} cannot be null if you want use this
|
||||
* {@code interval} as a value storage. If it is null some estimators
|
||||
* could not work and generate exceptions.
|
||||
*
|
||||
* @param interval the interval to copy the values from
|
||||
* @param value the value stored in this interval
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code low} > {@code high}.
|
||||
*/
|
||||
public Interval(Interval interval, T value) {
|
||||
this.low = interval.low;
|
||||
this.high = interval.high;
|
||||
this.lopen = interval.lopen;
|
||||
this.ropen = interval.ropen;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new interval instance.
|
||||
*
|
||||
* <p>Note that {@code value} cannot be null if you want use this
|
||||
* {@code interval} as a value storage. If it is null some estimators
|
||||
* could not work and generate exceptions.
|
||||
*
|
||||
* @param low the left endpoint
|
||||
* @param high the right endpoint
|
||||
* @param lopen indicates if the left endpoint is excluded (true in this case)
|
||||
* @param ropen indicates if the right endpoint is excluded (true in this case)
|
||||
* @param value the value stored in this interval
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code low} > {@code high}.
|
||||
*/
|
||||
public Interval(double low, double high, boolean lopen, boolean ropen, T value) {
|
||||
if (low > high) {
|
||||
throw new IllegalArgumentException(
|
||||
"The left endpoint of the interval must be less than "
|
||||
+ "the right endpoint.");
|
||||
}
|
||||
|
||||
this.low = low;
|
||||
this.high = high;
|
||||
this.lopen = lopen;
|
||||
this.ropen = ropen;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new interval instance with no value.
|
||||
*
|
||||
* @param low the left endpoint
|
||||
* @param high the right endpoint
|
||||
* @param lopen indicates if the left endpoint is excluded (true in this case)
|
||||
* @param ropen indicates if the right endpoint is excluded (true in this case)
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code low} > {@code high}.
|
||||
*/
|
||||
public Interval(double low, double high, boolean lopen, boolean ropen) {
|
||||
this(low, high, lopen, ropen, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new interval instance with left and right endpoints included
|
||||
* by default.
|
||||
*
|
||||
* <p>Note that {@code value} cannot be null if you want use this
|
||||
* {@code interval} as a value storage. If it is null some estimators
|
||||
* could not work and generate exceptions.
|
||||
*
|
||||
* @param low the left endpoint
|
||||
* @param high the right endpoint
|
||||
* @param value the value stored in this interval
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code low} > {@code high}.
|
||||
*/
|
||||
public Interval(double low, double high, T value) {
|
||||
this(low, high, false, false, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new interval instance with no value and left and right
|
||||
* endpoints included by default.
|
||||
*
|
||||
* @param low the left endpoint
|
||||
* @param high the right endpoint
|
||||
*
|
||||
* @throws IllegalArgumentException if {@code low} > {@code high}.
|
||||
*/
|
||||
public Interval(double low, double high) {
|
||||
this(low, high, false, false, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this interval with the specified interval for order.
|
||||
*
|
||||
* <p>Any two intervals <i>i</i> and <i>i'</i> satisfy the {@code interval
|
||||
* trichotomy}; that is, exactly one of the following three properties
|
||||
* holds:
|
||||
* <ol>
|
||||
* <li>
|
||||
* <i>i</i> and <i>i'</i> overlap;
|
||||
*
|
||||
* <li>
|
||||
* <i>i</i> is to the left of <i>i'</i> (<i>i.high < i'.low</i>);
|
||||
*
|
||||
* <li>
|
||||
* <i>i</i> is to the right of <i>i'</i> (<i>i'.high < i.low</i>).
|
||||
* </ol>
|
||||
*
|
||||
* <p>Note that if two intervals are equal ({@code i.low = i'.low} and
|
||||
* {@code i.high = i'.high}), they overlap as well. But if they simply
|
||||
* overlap (for instance {@code i.low < i'.low} and {@code i.high >
|
||||
* i'.high}) they aren't equal. Remember that if two intervals are equal,
|
||||
* they have got the same bounds excluded or included.
|
||||
*
|
||||
* @param interval the interval to be compared
|
||||
*
|
||||
* @return a negative integer, zero, or a positive integer as this interval
|
||||
* is to the left of, overlaps with, or is to the right of the
|
||||
* specified interval.
|
||||
*
|
||||
* @throws NullPointerException if {@code interval} is null.
|
||||
*/
|
||||
public int compareTo(Interval interval) {
|
||||
if (interval == null) {
|
||||
throw new NullPointerException("Interval cannot be null.");
|
||||
}
|
||||
|
||||
if (high < interval.low || high <= interval.low && (ropen || interval.lopen)) {
|
||||
return -1;
|
||||
}
|
||||
if (interval.high < low || interval.high <= low && (interval.ropen || lopen)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left endpoint.
|
||||
*
|
||||
* @return the left endpoint.
|
||||
*/
|
||||
public double getLow() {
|
||||
return low;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the right endpoint.
|
||||
*
|
||||
* @return the right endpoint.
|
||||
*/
|
||||
public double getHigh() {
|
||||
return high;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the left endpoint is excluded.
|
||||
*
|
||||
* @return {@code true} if the left endpoint is excluded,
|
||||
* {@code false} otherwise.
|
||||
*/
|
||||
public boolean isLowExcluded() {
|
||||
return lopen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the right endpoint is excluded.
|
||||
*
|
||||
* @return {@code true} if the right endpoint is excluded,
|
||||
* {@code false} otherwise.
|
||||
*/
|
||||
public boolean isHighExcluded() {
|
||||
return ropen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value stored in this interval.
|
||||
*
|
||||
* @return the value stored in this interval.
|
||||
*/
|
||||
public T getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this interval with the specified object for equality.
|
||||
*
|
||||
* <p>Note that two intervals are equal if {@code i.low = i'.low} and
|
||||
* {@code i.high = i'.high} and they have got the bounds excluded/included.
|
||||
*
|
||||
* @param obj object to which this interval is to be compared
|
||||
*
|
||||
* @return {@code true} if and only if the specified {@code Object} is a
|
||||
* {@code Interval} whose low and high are equal to this
|
||||
* {@code Interval's}.
|
||||
*
|
||||
* @see #compareTo(org.gephi.data.attributes.type.Interval)
|
||||
* @see #hashCode
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj.getClass().equals(this.getClass())) {
|
||||
Interval<T> interval = (Interval<T>) obj;
|
||||
if (low == interval.low && high == interval.high
|
||||
&& lopen == interval.lopen && ropen == interval.ropen) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 97 * hash + (int) (Double.doubleToLongBits(this.low) ^ (Double.doubleToLongBits(this.low) >>> 32));
|
||||
hash = 97 * hash + (int) (Double.doubleToLongBits(this.high) ^ (Double.doubleToLongBits(this.high) >>> 32));
|
||||
hash = 97 * hash + (this.lopen ? 1 : 0);
|
||||
hash = 97 * hash + (this.ropen ? 1 : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string representation of the interval with its value.
|
||||
*
|
||||
* @param timesAsDoubles indicates if times should be shown as doubles or dates
|
||||
*
|
||||
* @return a string representation with times as doubles or dates.
|
||||
*/
|
||||
public String toString(boolean timesAsDoubles) {
|
||||
if (timesAsDoubles) {
|
||||
return (lopen ? "(" : "[") + low + ", " + high + ", " + value + (ropen ? ")" : "]");
|
||||
} else {
|
||||
return (lopen ? "(" : "[") + AttributeUtils.getXMLDateStringFromDouble(low) + ", "
|
||||
+ AttributeUtils.getXMLDateStringFromDouble(high) + ", " + value + (ropen ? ")" : "]");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this interval in one of the formats:
|
||||
* <ol>
|
||||
* <li>
|
||||
* {@code [low, high, value]}
|
||||
* <li>
|
||||
* {@code (low, high, value]}
|
||||
* <li>
|
||||
* {@code [low, high, value)}
|
||||
* <li>
|
||||
* {@code (low, high, value)}
|
||||
* </ol>
|
||||
*
|
||||
* <p>Times are always shown as doubles</p>
|
||||
*
|
||||
* @return a string representation of this interval.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return toString(true);
|
||||
}
|
||||
}
|
||||
@@ -1,612 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Cezary Bartosiak
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes.type;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.api.Estimator;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Unit test for DynamicType class.
|
||||
*
|
||||
* @author Cezary Bartosiak
|
||||
*/
|
||||
public class DynamicTypeTest {
|
||||
public DynamicTypeTest() { }
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpClass() throws Exception { }
|
||||
|
||||
@AfterClass
|
||||
public static void tearDownClass() throws Exception { }
|
||||
|
||||
@Before
|
||||
public void setUp() { }
|
||||
|
||||
@After
|
||||
public void tearDown() { }
|
||||
|
||||
@Test
|
||||
public void testCopyConstructors() {
|
||||
System.out.println("copyConstructors");
|
||||
DynamicDouble expected1 = makeTree1();
|
||||
DynamicDouble instance1 = makeTree1();
|
||||
DynamicDouble expected2 = makeTree1_in();
|
||||
DynamicDouble instance2 = new DynamicDouble(makeTree1(),
|
||||
new Interval<Double>(-2.0, -1.0, 10.0));
|
||||
DynamicDouble expected3 = makeTree1_out();
|
||||
DynamicDouble instance3 = new DynamicDouble(makeTree1(),
|
||||
null,
|
||||
new Interval<Double>(0.0, 30.0));
|
||||
DynamicDouble expected4 = makeTree1_in_out();
|
||||
DynamicDouble instance4 = new DynamicDouble(makeTree1(),
|
||||
new Interval<Double>(-2.0, -1.0, 10.0),
|
||||
new Interval<Double>(0.0, 30.0));
|
||||
assertEquals(expected1, instance1);
|
||||
assertEquals(expected2, instance2);
|
||||
assertEquals(expected3, instance3);
|
||||
assertEquals(expected4, instance4);
|
||||
System.out.println("instance1: " + instance1);
|
||||
System.out.println("instance2: " + instance2);
|
||||
System.out.println("instance3: " + instance3);
|
||||
System.out.println("instance4: " + instance4);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetLow() {
|
||||
System.out.println("getLow()");
|
||||
DynamicDouble instance1 = makeTree1();
|
||||
DynamicDouble instance2 = new DynamicDouble();
|
||||
Double expResult1 = 0.0;
|
||||
Double result1 = instance1.getLow();
|
||||
Double expResult2 = Double.NEGATIVE_INFINITY;
|
||||
Double result2 = instance2.getLow();
|
||||
assertEquals(expResult1, result1);
|
||||
assertEquals(expResult2, result2);
|
||||
System.out.println("expResult1: " + expResult1);
|
||||
System.out.println("result1: " + result1);
|
||||
System.out.println("expResult2: " + expResult2);
|
||||
System.out.println("result2: " + result2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetHigh() {
|
||||
System.out.println("getHigh()");
|
||||
DynamicDouble instance1 = makeTree1();
|
||||
DynamicDouble instance2 = new DynamicDouble();
|
||||
Double expResult1 = 30.0;
|
||||
Double result1 = instance1.getHigh();
|
||||
Double expResult2 = Double.POSITIVE_INFINITY;
|
||||
Double result2 = instance2.getHigh();
|
||||
assertEquals(expResult1, result1);
|
||||
assertEquals(expResult2, result2);
|
||||
System.out.println("expResult1: " + expResult1);
|
||||
System.out.println("result1: " + result1);
|
||||
System.out.println("expResult2: " + expResult2);
|
||||
System.out.println("result2: " + result2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsInRange() {
|
||||
System.out.println("isInRange()");
|
||||
DynamicDouble instance = makeTree1();
|
||||
Boolean expResult1 = false;
|
||||
Boolean result1 = instance.isInRange(11.0, 14.0);
|
||||
Boolean expResult2 = true;
|
||||
Boolean result2 = instance.isInRange(9.0, 12.0);
|
||||
assertEquals(expResult1, result1);
|
||||
assertEquals(expResult2, result2);
|
||||
System.out.println("expResult1: " + expResult1);
|
||||
System.out.println("result1: " + result1);
|
||||
System.out.println("expResult2: " + expResult2);
|
||||
System.out.println("result2: " + result2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValue_0args() {
|
||||
System.out.println("getValue()");
|
||||
DynamicDouble instance = makeTree1();
|
||||
Double value1 = instance.getValue();
|
||||
Double value2 = 0.0;
|
||||
assertEquals(value1, value2);
|
||||
System.out.println("value1: " + value1);
|
||||
System.out.println("value2: " + value2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValue_double_double() {
|
||||
System.out.println("getValue(double, double)");
|
||||
DynamicDouble instance = makeTree1();
|
||||
Double value1 = instance.getValue(14, 16);
|
||||
Double value2 = 4.0;
|
||||
assertEquals(value1, value2);
|
||||
System.out.println("value1: " + value1);
|
||||
System.out.println("value2: " + value2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValue_Estimator() {
|
||||
System.out.println("getValue(Estimator)");
|
||||
DynamicDouble dInstance = makeTree1();
|
||||
DynamicInteger nInstance = makeTreeInteger();
|
||||
DynamicBoolean bInstance = makeTreeBoolean();
|
||||
DynamicCharacter cInstance = makeTreeCharacter();
|
||||
DynamicString sInstance = makeTreeString();
|
||||
Double valueRealAverage1 = dInstance.getValue(Estimator.AVERAGE);
|
||||
Double valueRealAverage2 = 4.5;
|
||||
Double valueRealMedian1 = dInstance.getValue(Estimator.MEDIAN);
|
||||
Double valueRealMedian2 = 4.5;
|
||||
Integer valueIntegerAverage1 = nInstance.getValue(Estimator.AVERAGE);
|
||||
Integer valueIntegerAverage2 = 4;
|
||||
Integer valueIntegerMedian1 = nInstance.getValue(Estimator.MEDIAN);
|
||||
Integer valueIntegerMedian2 = 4;
|
||||
Integer valueIntegerSum1 = nInstance.getValue(Estimator.SUM);
|
||||
Integer valueIntegerSum2 = 45;
|
||||
Integer valueIntegerMin1 = nInstance.getValue(Estimator.MIN);
|
||||
Integer valueIntegerMin2 = 0;
|
||||
Integer valueIntegerMax1 = nInstance.getValue(Estimator.MAX);
|
||||
Integer valueIntegerMax2 = 9;
|
||||
Boolean valueBooleanMin1 = bInstance.getValue(Estimator.MIN);
|
||||
Boolean valueBooleanMin2 = false;
|
||||
Boolean valueBooleanMax1 = bInstance.getValue(Estimator.MAX);
|
||||
Boolean valueBooleanMax2 = true;
|
||||
Character valueCharacterMin1 = cInstance.getValue(Estimator.MIN);
|
||||
Character valueCharacterMin2 = '0';
|
||||
Character valueCharacterMax1 = cInstance.getValue(Estimator.MAX);
|
||||
Character valueCharacterMax2 = '9';
|
||||
String valueStringMedian1 = sInstance.getValue(Estimator.MEDIAN);
|
||||
String valueStringMedian2 = "5";
|
||||
String valueStringMode1 = sInstance.getValue(Estimator.MODE);
|
||||
String valueStringMode2 = "0_repeat";
|
||||
String valueStringMin1 = sInstance.getValue(Estimator.MIN);
|
||||
String valueStringMin2 = "0";
|
||||
String valueStringMax1 = sInstance.getValue(Estimator.MAX);
|
||||
String valueStringMax2 = "9";
|
||||
String valueStringFirst1 = sInstance.getValue(Estimator.FIRST);
|
||||
String valueStringFirst2 = "0";
|
||||
String valueStringLast1 = sInstance.getValue(Estimator.LAST);
|
||||
String valueStringLast2 = "0_repeat";
|
||||
assertEquals(valueRealAverage1, valueRealAverage2);
|
||||
assertEquals(valueRealMedian1, valueRealMedian2);
|
||||
assertEquals(valueIntegerAverage1, valueIntegerAverage2);
|
||||
assertEquals(valueIntegerMedian1, valueIntegerMedian2);
|
||||
assertEquals(valueIntegerSum1, valueIntegerSum2);
|
||||
assertEquals(valueIntegerMin1, valueIntegerMin2);
|
||||
assertEquals(valueIntegerMax1, valueIntegerMax2);
|
||||
assertEquals(valueBooleanMin1, valueBooleanMin2);
|
||||
assertEquals(valueBooleanMax1, valueBooleanMax2);
|
||||
assertEquals(valueCharacterMin1, valueCharacterMin2);
|
||||
assertEquals(valueCharacterMax1, valueCharacterMax2);
|
||||
assertEquals(valueStringMedian1, valueStringMedian2);
|
||||
assertEquals(valueStringMode1, valueStringMode2);
|
||||
assertEquals(valueStringMin1, valueStringMin2);
|
||||
assertEquals(valueStringMax1, valueStringMax2);
|
||||
assertEquals(valueStringFirst1, valueStringFirst2);
|
||||
assertEquals(valueStringLast1, valueStringLast2);
|
||||
System.out.println("valueRealAverage1: " + valueRealAverage1);
|
||||
System.out.println("valueRealAverage2: " + valueRealAverage2);
|
||||
System.out.println("valueRealMedian1: " + valueRealMedian1);
|
||||
System.out.println("valueRealMedian2: " + valueRealMedian2);
|
||||
System.out.println("valueIntegerAverage1: " + valueIntegerAverage1);
|
||||
System.out.println("valueIntegerAverage2: " + valueIntegerAverage2);
|
||||
System.out.println("valueIntegerMedian1: " + valueIntegerMedian1);
|
||||
System.out.println("valueIntegerMedian2: " + valueIntegerMedian2);
|
||||
System.out.println("valueIntegerSum1: " + valueIntegerSum1);
|
||||
System.out.println("valueIntegerSum2: " + valueIntegerSum2);
|
||||
System.out.println("valueIntegerMin1: " + valueIntegerMin1);
|
||||
System.out.println("valueIntegerMin2: " + valueIntegerMin2);
|
||||
System.out.println("valueIntegerMax1: " + valueIntegerMax1);
|
||||
System.out.println("valueIntegerMax2: " + valueIntegerMax2);
|
||||
System.out.println("valueBooleanMin1: " + valueBooleanMin1);
|
||||
System.out.println("valueBooleanMin2: " + valueBooleanMin2);
|
||||
System.out.println("valueBooleanMax1: " + valueBooleanMax1);
|
||||
System.out.println("valueBooleanMax2: " + valueBooleanMax2);
|
||||
System.out.println("valueCharacterMin1: " + valueCharacterMin1);
|
||||
System.out.println("valueCharacterMin2: " + valueCharacterMin2);
|
||||
System.out.println("valueCharacterMax1: " + valueCharacterMax1);
|
||||
System.out.println("valueCharacterMax2: " + valueCharacterMax2);
|
||||
System.out.println("valueStringMedian1: " + valueStringMedian1);
|
||||
System.out.println("valueStringMedian2: " + valueStringMedian2);
|
||||
System.out.println("valueStringMode1: " + valueStringMode1);
|
||||
System.out.println("valueStringMode2: " + valueStringMode2);
|
||||
System.out.println("valueStringMin1: " + valueStringMin1);
|
||||
System.out.println("valueStringMin2: " + valueStringMin2);
|
||||
System.out.println("valueStringMax1: " + valueStringMax1);
|
||||
System.out.println("valueStringMax2: " + valueStringMax2);
|
||||
System.out.println("valueStringFirst1: " + valueStringFirst1);
|
||||
System.out.println("valueStringFirst2: " + valueStringFirst2);
|
||||
System.out.println("valueStringLast1: " + valueStringLast1);
|
||||
System.out.println("valueStringLast2: " + valueStringLast2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValue_3args() {
|
||||
System.out.println("getValue(double, double, Estimator)");
|
||||
DynamicDouble instance = makeTree1();
|
||||
Double valueRealAverage1 = instance.getValue(1, 9, Estimator.AVERAGE);
|
||||
Double valueRealAverage2 = 1.5;
|
||||
Double valueRealSum1 = instance.getValue(1, 9, Estimator.SUM);
|
||||
Double valueRealSum2 = 6.0;
|
||||
assertEquals(valueRealAverage1, valueRealAverage2);
|
||||
assertEquals(valueRealSum1, valueRealSum2);
|
||||
System.out.println("valueRealAverage1: " + valueRealAverage1);
|
||||
System.out.println("valueRealAverage2: " + valueRealAverage2);
|
||||
System.out.println("valueRealSum1: " + valueRealSum1);
|
||||
System.out.println("valueRealSum2: " + valueRealSum2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValues_0args() {
|
||||
System.out.println("getValues()");
|
||||
DynamicDouble instance = makeTree3();
|
||||
List<Double> values1 = instance.getValues();
|
||||
List<Double> values2 = new ArrayList<Double>();
|
||||
for (int i = 0; i < 4; ++i)
|
||||
values2.add((double)i);
|
||||
assertEquals(values1, values2);
|
||||
System.out.println("values1: " + values1);
|
||||
System.out.println("values2: " + values2);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetValues_double_double() {
|
||||
System.out.println("getValues(double, double)");
|
||||
DynamicDouble instance = makeTree1();
|
||||
List<Double> values11 = instance.getValues(
|
||||
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
List<Double> values12 = new ArrayList<Double>();
|
||||
for (int i = 0; i < 10; ++i)
|
||||
values12.add((double)i);
|
||||
List<Double> values21 = instance.getValues(0, 9);
|
||||
List<Double> values22 = new ArrayList<Double>();
|
||||
for (int i = 0; i < 4; ++i)
|
||||
values22.add((double)i);
|
||||
List<Double> values31 = instance.getValues(14, 19);
|
||||
List<Double> values32 = new ArrayList<Double>();
|
||||
for (int i = 4; i < 8; ++i)
|
||||
values32.add((double)i);
|
||||
List<Double> values41 = instance.getValues(24, 31);
|
||||
List<Double> values42 = new ArrayList<Double>();
|
||||
for (int i = 8; i < 10; ++i)
|
||||
values42.add((double)i);
|
||||
assertEquals(values11, values12);
|
||||
assertEquals(values21, values22);
|
||||
assertEquals(values31, values32);
|
||||
assertEquals(values41, values42);
|
||||
System.out.println("values11: " + values11);
|
||||
System.out.println("values12: " + values12);
|
||||
System.out.println("values21: " + values21);
|
||||
System.out.println("values22: " + values22);
|
||||
System.out.println("values31: " + values31);
|
||||
System.out.println("values32: " + values32);
|
||||
System.out.println("values41: " + values41);
|
||||
System.out.println("values42: " + values42);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetIntervals() {
|
||||
System.out.println("getIntervals(double, double)");
|
||||
DynamicDouble instance = makeTree1();
|
||||
List<Interval<Double>> list = instance.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
String result = "<empty>";
|
||||
if (!list.isEmpty()) {
|
||||
StringBuilder sb = new StringBuilder("<");
|
||||
sb.append(list.get(0).toString());
|
||||
for (int i = 1; i < list.size(); ++i)
|
||||
sb.append("; ").append(list.get(i).toString());
|
||||
sb.append(">");
|
||||
result = sb.toString();
|
||||
}
|
||||
String expResult = instance.toString();
|
||||
assertEquals(result, expResult);
|
||||
System.out.println("result: " + result);
|
||||
System.out.println("expResult: " + expResult);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetUnderlyingType() {
|
||||
System.out.println("getUnderlyingType");
|
||||
DynamicType dInstance = makeTree1();
|
||||
DynamicType nInstance = makeTreeInteger();
|
||||
DynamicType bInstance = makeTreeBoolean();
|
||||
DynamicType cInstance = makeTreeCharacter();
|
||||
DynamicType sInstance = makeTreeString();
|
||||
assertEquals(dInstance.getUnderlyingType(), Double.class);
|
||||
assertEquals(nInstance.getUnderlyingType(), Integer.class);
|
||||
assertEquals(bInstance.getUnderlyingType(), Boolean.class);
|
||||
assertEquals(cInstance.getUnderlyingType(), Character.class);
|
||||
assertEquals(sInstance.getUnderlyingType(), String.class);
|
||||
System.out.println("dInstance: " + dInstance.getUnderlyingType());
|
||||
System.out.println("nInstance: " + nInstance.getUnderlyingType());
|
||||
System.out.println("bInstance: " + bInstance.getUnderlyingType());
|
||||
System.out.println("cInstance: " + cInstance.getUnderlyingType());
|
||||
System.out.println("sInstance: " + sInstance.getUnderlyingType());
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
System.out.println("equals(Object)");
|
||||
DynamicDouble instance1 = makeTree1();
|
||||
DynamicDouble instance2 = makeTree1();
|
||||
DynamicDouble instance3 = makeTree2();
|
||||
DynamicDouble instance4 = makeTree3();
|
||||
boolean expResult1 = true;
|
||||
boolean result1 = instance1.equals(instance1);
|
||||
boolean expResult2 = true;
|
||||
boolean result2 = instance1.equals(instance2);
|
||||
boolean expResult3 = false;
|
||||
boolean result3 = instance2.equals(instance3);
|
||||
boolean expResult4 = false;
|
||||
boolean result4 = instance3.equals(instance4);
|
||||
assertEquals(expResult1, result1);
|
||||
assertEquals(expResult2, result2);
|
||||
assertEquals(expResult3, result3);
|
||||
assertEquals(expResult4, result4);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHashCode() {
|
||||
System.out.println("hashCode()");
|
||||
DynamicDouble instance1 = makeTree1();
|
||||
DynamicDouble instance2 = makeTree1();
|
||||
assertEquals(instance1.hashCode(), instance1.hashCode());
|
||||
assertEquals(instance1.hashCode(), instance2.hashCode());
|
||||
System.out.println("instance1.hashcode(): " + instance1.hashCode());
|
||||
System.out.println("instance2.hashcode(): " + instance2.hashCode());
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToString() {
|
||||
System.out.println("toString()");
|
||||
DynamicDouble instance = makeELboundsTree();
|
||||
StringBuilder expResult = new StringBuilder("<");
|
||||
expResult.append("[0.1, 0.2, 1.0); ");
|
||||
expResult.append("[0.2, 0.3, 2.0); ");
|
||||
expResult.append("(0.3, 0.4, 3.0)");
|
||||
expResult.append(">");
|
||||
String result = instance.toString();
|
||||
assertEquals(expResult.toString(), result);
|
||||
System.out.println("expResult: " + expResult);
|
||||
System.out.println("result: " + result);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeserialization() {
|
||||
System.out.println("deserialization");
|
||||
DynamicDouble instance1 = makeELboundsTree();
|
||||
DynamicDouble instance2 = (DynamicDouble)AttributeType.DYNAMIC_DOUBLE.parse(instance1.toString());
|
||||
DynamicDouble instance3 = new DynamicDouble();
|
||||
DynamicDouble instance4 = (DynamicDouble)AttributeType.DYNAMIC_DOUBLE.parse(instance3.toString());
|
||||
TimeInterval instance5 = makeTimeInterval();
|
||||
TimeInterval instance6 = (TimeInterval)AttributeType.TIME_INTERVAL.parse(instance5.toString());
|
||||
assertEquals(instance1, instance2);
|
||||
assertEquals(instance3, instance4);
|
||||
assertEquals(instance5, instance6);
|
||||
System.out.println("instance1: " + instance1);
|
||||
System.out.println("instance2: " + instance2);
|
||||
System.out.println("instance3: " + instance3);
|
||||
System.out.println("instance4: " + instance4);
|
||||
System.out.println("instance5: " + instance5);
|
||||
System.out.println("instance6: " + instance6);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOrder() {
|
||||
DynamicInteger instance = new DynamicInteger();
|
||||
instance = new DynamicInteger(instance, new Interval<Integer>(2009, 2010, 1));
|
||||
instance = new DynamicInteger(instance, new Interval<Integer>(2006, 2007, 2));
|
||||
instance = new DynamicInteger(instance, new Interval<Integer>(2001, 2002, 3));
|
||||
|
||||
List<Interval<Integer>> intervals = instance.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
assertEquals(new Interval<Integer>(2001, 2002, 3), intervals.get(0));
|
||||
assertEquals(new Interval<Integer>(2006, 2007, 2), intervals.get(1));
|
||||
assertEquals(new Interval<Integer>(2009, 2010, 1), intervals.get(2));
|
||||
}
|
||||
|
||||
private TimeInterval makeTimeInterval() {
|
||||
List<Interval> intervals = new ArrayList<Interval>();
|
||||
intervals.add(new Interval<Double>(0.1, 0.2, false, true));
|
||||
intervals.add(new Interval<Double>(0.2, 0.3, false, true));
|
||||
intervals.add(new Interval<Double>(0.3, 0.4, true, true));
|
||||
return new TimeInterval(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeELboundsTree() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>(0.1, 0.2, false, true, 1.0));
|
||||
intervals.add(new Interval<Double>(0.2, 0.3, false, true, 2.0));
|
||||
intervals.add(new Interval<Double>(0.3, 0.4, true, true, 3.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree1() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>(26.0, 26.0, 9.0));
|
||||
intervals.add(new Interval<Double>(0.0, 3.0, 0.0));
|
||||
intervals.add(new Interval<Double>(6.0, 10.0, 2.0));
|
||||
intervals.add(new Interval<Double>(5.0, 8.0, 1.0));
|
||||
intervals.add(new Interval<Double>(8.0, 9.0, 3.0));
|
||||
intervals.add(new Interval<Double>(17.0, 19.0, 6.0));
|
||||
intervals.add(new Interval<Double>(16.0, 21.0, 5.0));
|
||||
intervals.add(new Interval<Double>(15.0, 23.0, 4.0));
|
||||
intervals.add(new Interval<Double>(25.0, 30.0, 8.0));
|
||||
intervals.add(new Interval<Double>(19.0, 20.0, 7.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree1_in() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>( 26.0, 26.0, 9.0));
|
||||
intervals.add(new Interval<Double>( 0.0, 3.0, 0.0));
|
||||
intervals.add(new Interval<Double>( 6.0, 10.0, 2.0));
|
||||
intervals.add(new Interval<Double>( 5.0, 8.0, 1.0));
|
||||
intervals.add(new Interval<Double>( 8.0, 9.0, 3.0));
|
||||
intervals.add(new Interval<Double>( 17.0, 19.0, 6.0));
|
||||
intervals.add(new Interval<Double>( 16.0, 21.0, 5.0));
|
||||
intervals.add(new Interval<Double>( 15.0, 23.0, 4.0));
|
||||
intervals.add(new Interval<Double>( 25.0, 30.0, 8.0));
|
||||
intervals.add(new Interval<Double>( 19.0, 20.0, 7.0));
|
||||
intervals.add(new Interval<Double>(-2.0, -1.0, 10.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree1_out() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree1_in_out() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>(-2.0, -1.0, 10.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree2() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>(3.0, 7.0, 0.0));
|
||||
intervals.add(new Interval<Double>(4.0, 5.0, 1.0));
|
||||
intervals.add(new Interval<Double>(6.0, 6.0, 2.0));
|
||||
intervals.add(new Interval<Double>(9.0, 10.0, 3.0));
|
||||
intervals.add(new Interval<Double>(11.0, 12.0, 4.0));
|
||||
intervals.add(new Interval<Double>(15.0, 20.0, 5.0));
|
||||
intervals.add(new Interval<Double>(16.0, 20.0, 6.0));
|
||||
intervals.add(new Interval<Double>(18.0, 21.0, 7.0));
|
||||
intervals.add(new Interval<Double>(24.0, 29.0, 8.0));
|
||||
intervals.add(new Interval<Double>(30.0, 31.0, 9.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicDouble makeTree3() {
|
||||
List<Interval<Double>> intervals = new ArrayList<Interval<Double>>();
|
||||
intervals.add(new Interval<Double>(0.0, 3.0, 0.0));
|
||||
intervals.add(new Interval<Double>(5.0, 8.0, 1.0));
|
||||
intervals.add(new Interval<Double>(6.0, 10.0, 2.0));
|
||||
intervals.add(new Interval<Double>(8.0, 9.0, 3.0));
|
||||
return new DynamicDouble(intervals);
|
||||
}
|
||||
|
||||
private DynamicInteger makeTreeInteger() {
|
||||
List<Interval<Integer>> intervals = new ArrayList<Interval<Integer>>();
|
||||
intervals.add(new Interval<Integer>(0.0, 3.0, 0));
|
||||
intervals.add(new Interval<Integer>(5.0, 8.0, 1));
|
||||
intervals.add(new Interval<Integer>(6.0, 10.0, 2));
|
||||
intervals.add(new Interval<Integer>(8.0, 9.0, 3));
|
||||
intervals.add(new Interval<Integer>(15.0, 23.0, 4));
|
||||
intervals.add(new Interval<Integer>(16.0, 21.0, 5));
|
||||
intervals.add(new Interval<Integer>(17.0, 19.0, 6));
|
||||
intervals.add(new Interval<Integer>(19.0, 20.0, 7));
|
||||
intervals.add(new Interval<Integer>(25.0, 30.0, 8));
|
||||
intervals.add(new Interval<Integer>(26.0, 26.0, 9));
|
||||
return new DynamicInteger(intervals);
|
||||
}
|
||||
|
||||
private DynamicBoolean makeTreeBoolean() {
|
||||
List<Interval<Boolean>> intervals = new ArrayList<Interval<Boolean>>();
|
||||
intervals.add(new Interval<Boolean>(0.0, 3.0, false));
|
||||
intervals.add(new Interval<Boolean>(5.0, 8.0, false));
|
||||
intervals.add(new Interval<Boolean>(6.0, 10.0, false));
|
||||
intervals.add(new Interval<Boolean>(8.0, 9.0, false));
|
||||
intervals.add(new Interval<Boolean>(15.0, 23.0, false));
|
||||
intervals.add(new Interval<Boolean>(16.0, 21.0, false));
|
||||
intervals.add(new Interval<Boolean>(17.0, 19.0, true));
|
||||
intervals.add(new Interval<Boolean>(19.0, 20.0, true));
|
||||
intervals.add(new Interval<Boolean>(25.0, 30.0, true));
|
||||
intervals.add(new Interval<Boolean>(26.0, 26.0, true));
|
||||
return new DynamicBoolean(intervals);
|
||||
}
|
||||
|
||||
private DynamicCharacter makeTreeCharacter() {
|
||||
List<Interval<Character>> intervals =
|
||||
new ArrayList<Interval<Character>>();
|
||||
intervals.add(new Interval<Character>(0.0, 3.0, '0'));
|
||||
intervals.add(new Interval<Character>(5.0, 8.0, '1'));
|
||||
intervals.add(new Interval<Character>(6.0, 10.0, '2'));
|
||||
intervals.add(new Interval<Character>(8.0, 9.0, '3'));
|
||||
intervals.add(new Interval<Character>(15.0, 23.0, '4'));
|
||||
intervals.add(new Interval<Character>(16.0, 21.0, '5'));
|
||||
intervals.add(new Interval<Character>(17.0, 19.0, '6'));
|
||||
intervals.add(new Interval<Character>(19.0, 20.0, '7'));
|
||||
intervals.add(new Interval<Character>(25.0, 30.0, '8'));
|
||||
intervals.add(new Interval<Character>(26.0, 26.0, '9'));
|
||||
return new DynamicCharacter(intervals);
|
||||
}
|
||||
|
||||
private DynamicString makeTreeString() {
|
||||
List<Interval<String>> intervals = new ArrayList<Interval<String>>();
|
||||
intervals.add(new Interval<String>(0.0, 3.0, "0"));
|
||||
intervals.add(new Interval<String>(5.0, 8.0, "1"));
|
||||
intervals.add(new Interval<String>(6.0, 10.0, "2"));
|
||||
intervals.add(new Interval<String>(8.0, 9.0, "3"));
|
||||
intervals.add(new Interval<String>(15.0, 23.0, "4"));
|
||||
intervals.add(new Interval<String>(16.0, 21.0, "5"));
|
||||
intervals.add(new Interval<String>(17.0, 19.0, "6"));
|
||||
intervals.add(new Interval<String>(19.0, 20.0, "7"));
|
||||
intervals.add(new Interval<String>(25.0, 30.0, "8"));
|
||||
intervals.add(new Interval<String>(26.0, 26.0, "9"));
|
||||
intervals.add(new Interval<String>(26.0, 26.0, "0_repeat"));
|
||||
intervals.add(new Interval<String>(27.0, 27.0, "0_repeat"));
|
||||
return new DynamicString(intervals);
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Martin Škurla
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
|
||||
package org.gephi.data.attributes.type;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public class IntegerListTest {
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromStringWithDefaultSeparator() {
|
||||
IntegerList list = new IntegerList("11,22;33");
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromStringWithGivenSeparator() {
|
||||
IntegerList list = new IntegerList("11/22/33", "/");
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromPrimitiveArray() {
|
||||
IntegerList list = new IntegerList(new int[] {11, 22, 33});
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromWrapperArray() {
|
||||
IntegerList list = new IntegerList(new Integer[] {11, 22, 33});
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromEmptyPrimitiveArray() {
|
||||
IntegerList list = new IntegerList(new int [0]);
|
||||
assertEquals(list.size(), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromEmptyWrapperArray() {
|
||||
IntegerList list = new IntegerList(new Integer [0]);
|
||||
assertEquals(list.size(), 0);
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Martin Škurla
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
|
||||
package org.gephi.data.attributes.type;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public class StringListTest {
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromStringWithDefaultSeparator() {
|
||||
StringList list = new StringList("aa,bb;cc");
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromStringWithGivenSeparator() {
|
||||
StringList list = new StringList("aa/bb/cc", "/");
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromStringArray() {
|
||||
StringList list = new StringList(new String[] {"aa", "bb", "cc"});
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromCharArray() {
|
||||
StringList list = new StringList(new char[] {'a', 'b', 'c'});
|
||||
assertEquals(list.size(), 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromEmptyStringArray() {
|
||||
StringList list = new StringList(new String[0]);
|
||||
assertEquals(list.size(), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingListFromEmptyCharArray() {
|
||||
StringList list = new StringList(new char[0]);
|
||||
assertEquals(list.size(), 0);
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Martin Škurla
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
|
||||
package org.gephi.data.attributes.type;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public class TypeConvertorTest {
|
||||
|
||||
@Test
|
||||
public void testCreatingInstanceFromStringUsingConversionMethod() {
|
||||
int result = TypeConvertor.createInstanceFromString("123", Integer.class);
|
||||
assertEquals(result, 123);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingInstanceFromStringUsingConstructor() {
|
||||
BigInteger result = TypeConvertor.createInstanceFromString("123", BigInteger.class);
|
||||
assertEquals(result, new BigInteger("123"));
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testCreatingInstanceFromStringThroughInappropriateObject() {
|
||||
TypeConvertor.createInstanceFromString("some text", Object.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreatingArrayFromString() {
|
||||
Integer[] result = TypeConvertor.createArrayFromString("1;2;3;4;5", ";", Integer.class);
|
||||
assertArrayEquals(result, new Integer[] {1, 2, 3, 4, 5});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGettingWrapperFromPrimitive() {
|
||||
Class<?>[] primitiveTypes = {byte.class, short.class, int.class, long.class,
|
||||
float.class, double.class, boolean.class, char.class};
|
||||
Class<?>[] wrapperTypes = {Byte.class, Short.class, Integer.class, Long.class,
|
||||
Float.class, Double.class, Boolean.class, Character.class};
|
||||
|
||||
for (int index = 0; index < primitiveTypes.length; index++) {
|
||||
Class<?> primitiveType = primitiveTypes[index];
|
||||
Class<?> wrapperType = TypeConvertor.getWrapperFromPrimitive(primitiveType);
|
||||
|
||||
assertEquals(wrapperType, wrapperTypes[index]);
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testGettingWrapperFromPrimitiveIllegalArgument() {
|
||||
TypeConvertor.getWrapperFromPrimitive(String.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertingPrimitiveToWrapperArray() {
|
||||
Integer[] result = TypeConvertor.<Integer>convertPrimitiveToWrapperArray(new int[] {1, 2, 3, 4, 5, 6});
|
||||
|
||||
assertArrayEquals(result, new Integer[] {1, 2, 3, 4, 5, 6});
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testConvertingPrimitiveToWrapperArrayArgumentNotArray() {
|
||||
TypeConvertor.convertPrimitiveToWrapperArray(new Object());
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testConvertingPrimitiveToWrapperArrayArgumentNotPrimitiveArray() {
|
||||
TypeConvertor.convertPrimitiveToWrapperArray(new Object[0]);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.gephi.data.attributes" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.gephi.data.attributes.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
AutoUpdate-Essential-Module: true
|
||||
OpenIDE-Module: org.gephi.data.attributes
|
||||
OpenIDE-Module-Localizing-Bundle: org/gephi/data/attributes/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 0.8.0.1
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.gephi.data.attributes-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
build.xml.data.CRC32=6cb52fcf
|
||||
build.xml.script.CRC32=6ef893f6
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.45.1
|
||||
nbproject/build-impl.xml.data.CRC32=6cb52fcf
|
||||
nbproject/build-impl.xml.script.CRC32=311b5299
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
|
||||
@@ -1,6 +0,0 @@
|
||||
javac.source=1.5
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
keystore=nbproject/private/keystore.ks
|
||||
license.file=../gpl-3.0.txt
|
||||
nbm.module.author=Gephi.org
|
||||
nbm_alias=gephi
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.gephi.data.attributes</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.data.attributes.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.graph.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.gephi.project.api</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>0.7</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.libs.junit4</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>1.6.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.6.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.3.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<test-dependencies>
|
||||
<test-type>
|
||||
<name>unit</name>
|
||||
</test-type>
|
||||
</test-dependencies>
|
||||
<public-packages>
|
||||
<package>org.gephi.data.attributes.spi</package>
|
||||
</public-packages>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
suite.dir=${basedir}/..
|
||||
@@ -1,125 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import org.gephi.data.attributes.api.AttributeController;
|
||||
import org.gephi.data.attributes.api.AttributeModel;
|
||||
import org.gephi.data.attributes.model.IndexedAttributeModel;
|
||||
import org.gephi.data.attributes.model.TemporaryAttributeModel;
|
||||
import org.gephi.project.api.ProjectController;
|
||||
import org.gephi.project.api.WorkspaceProvider;
|
||||
import org.gephi.project.api.Workspace;
|
||||
import org.gephi.project.api.WorkspaceListener;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
@ServiceProvider(service = AttributeController.class)
|
||||
public class AttributeContollerImpl implements AttributeController {
|
||||
|
||||
private ProjectController projectController;
|
||||
|
||||
public AttributeContollerImpl() {
|
||||
projectController = Lookup.getDefault().lookup(ProjectController.class);
|
||||
projectController.addWorkspaceListener(new WorkspaceListener() {
|
||||
|
||||
public void initialize(Workspace workspace) {
|
||||
AttributeModel m = workspace.getLookup().lookup(AttributeModel.class);
|
||||
if (m == null) {
|
||||
workspace.add(new IndexedAttributeModel());
|
||||
}
|
||||
}
|
||||
|
||||
public void select(Workspace workspace) {
|
||||
}
|
||||
|
||||
public void unselect(Workspace workspace) {
|
||||
}
|
||||
|
||||
public void close(Workspace workspace) {
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
}
|
||||
});
|
||||
if (projectController.getCurrentProject() != null) {
|
||||
for (Workspace workspace : projectController.getCurrentProject().getLookup().lookup(WorkspaceProvider.class).getWorkspaces()) {
|
||||
AttributeModel m = workspace.getLookup().lookup(AttributeModel.class);
|
||||
if (m == null) {
|
||||
workspace.add(new IndexedAttributeModel());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AttributeModel getModel() {
|
||||
Workspace workspace = projectController.getCurrentWorkspace();
|
||||
if (workspace != null) {
|
||||
AttributeModel model = workspace.getLookup().lookup(AttributeModel.class);
|
||||
if (model != null) {
|
||||
return model;
|
||||
}
|
||||
model = new IndexedAttributeModel();
|
||||
workspace.add(model);
|
||||
return model;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public AttributeModel getModel(Workspace workspace) {
|
||||
AttributeModel model = workspace.getLookup().lookup(AttributeModel.class);
|
||||
if (model != null) {
|
||||
return model;
|
||||
}
|
||||
model = new IndexedAttributeModel();
|
||||
workspace.add(model);
|
||||
return model;
|
||||
}
|
||||
|
||||
public AttributeModel newModel() {
|
||||
TemporaryAttributeModel model = new TemporaryAttributeModel();
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>, Cezary Bartosiak
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import org.gephi.data.attributes.api.AttributeColumn;
|
||||
import org.gephi.data.attributes.api.AttributeEvent.EventType;
|
||||
import org.gephi.data.attributes.api.AttributeOrigin;
|
||||
import org.gephi.data.attributes.api.AttributeRow;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.api.AttributeValue;
|
||||
import org.gephi.data.attributes.event.ValueEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
* @author Cezary Bartosiak
|
||||
*/
|
||||
public class AttributeRowImpl implements AttributeRow {
|
||||
|
||||
protected final Object object;
|
||||
protected final AttributeTableImpl attributeTable;
|
||||
protected AttributeValueImpl[] values;
|
||||
protected int rowVersion = -1;
|
||||
|
||||
public AttributeRowImpl(AttributeTableImpl attributeTable, Object object) {
|
||||
this.attributeTable = attributeTable;
|
||||
this.object = object;
|
||||
reset();
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
rowVersion = attributeTable.getVersion();
|
||||
int attSize = attributeTable.countColumns();
|
||||
AttributeValueImpl[] newValues = new AttributeValueImpl[attSize];
|
||||
for (int i = 0; i < attSize; i++) {
|
||||
newValues[i] = attributeTable.getColumn(i).defaultValue;
|
||||
}
|
||||
this.values = newValues;
|
||||
}
|
||||
|
||||
public void setValues(AttributeRow attributeRow) {
|
||||
if (attributeRow == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
AttributeValue[] attValues = attributeRow.getValues();
|
||||
for (int i = 0; i < attValues.length; i++) {
|
||||
setValue(attValues[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void setValue(int index, Object value) {
|
||||
AttributeColumn column = attributeTable.getColumn(index);
|
||||
if (column != null) {
|
||||
setValue(column, value);
|
||||
} else {
|
||||
throw new IllegalArgumentException("The column doesn't exist");
|
||||
}
|
||||
}
|
||||
|
||||
public void setValue(String column, Object value) {
|
||||
if (column == null) {
|
||||
throw new NullPointerException("Column is null");
|
||||
}
|
||||
AttributeColumn attributeColumn = attributeTable.getColumn(column);
|
||||
if (attributeColumn != null) {
|
||||
setValue(attributeColumn, value);
|
||||
} else {
|
||||
//add column
|
||||
AttributeType type = AttributeType.parse(value);
|
||||
//System.out.println("parsed value type: " + value.getClass());
|
||||
if (type != null) {
|
||||
attributeColumn = attributeTable.addColumn(column, type);
|
||||
setValue(attributeColumn, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setValue(AttributeColumn column, Object value) {
|
||||
if (column == null) {
|
||||
throw new NullPointerException("Column is null");
|
||||
}
|
||||
|
||||
AttributeValue attValue = attributeTable.getFactory().newValue(column, value);
|
||||
setValue(attValue);
|
||||
}
|
||||
|
||||
public void setValue(AttributeValue value) {
|
||||
AttributeColumn column = value.getColumn();
|
||||
if (attributeTable.getColumn(column.getIndex()) != column) {
|
||||
column = attributeTable.getColumn(column);
|
||||
if (column == null) {
|
||||
throw new IllegalArgumentException("The "+attributeTable.getName()+" value column "+value.getColumn().getId()+" with index "+value.getColumn().getIndex()+" doesn't exist");
|
||||
}
|
||||
value = attributeTable.getFactory().newValue(column, value.getValue());
|
||||
}
|
||||
|
||||
setValue(column.getIndex(), (AttributeValueImpl) value);
|
||||
}
|
||||
|
||||
private void setValue(int index, AttributeValueImpl value) {
|
||||
updateColumns();
|
||||
|
||||
AttributeValueImpl oldValue = this.values[index];
|
||||
|
||||
this.values[index] = value;
|
||||
|
||||
if (!((oldValue == null && value == null) || (oldValue != null && oldValue.equals(value)))
|
||||
&& index > 0 && !value.getColumn().getOrigin().equals(AttributeOrigin.COMPUTED)) { //0 is the index of node id and edge id cols, not useful to send these events
|
||||
attributeTable.model.fireAttributeEvent(new ValueEvent(EventType.SET_VALUE, attributeTable, object, value));
|
||||
}
|
||||
}
|
||||
|
||||
public Object getValue(AttributeColumn column) {
|
||||
if (column == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
updateColumns();
|
||||
int index = column.getIndex();
|
||||
if (checkIndexRange(index)) {
|
||||
AttributeValue val = values[index];
|
||||
if (val.getColumn() == column) {
|
||||
return val.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getValue(int index) {
|
||||
updateColumns();
|
||||
if (checkIndexRange(index)) {
|
||||
AttributeColumn attributeColumn = attributeTable.getColumn(index);
|
||||
return getValue(attributeColumn);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getValue(String column) {
|
||||
updateColumns();
|
||||
AttributeColumn attributeColumn = attributeTable.getColumn(column);
|
||||
if (attributeColumn != null) {
|
||||
return getValue(attributeColumn);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public AttributeValue[] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public AttributeValue getAttributeValueAt(int index) {
|
||||
if (checkIndexRange(index)) {
|
||||
return values[index];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int countValues() {
|
||||
updateColumns();
|
||||
return values.length;
|
||||
}
|
||||
|
||||
public AttributeColumn getColumnAt(int index) {
|
||||
updateColumns();
|
||||
return attributeTable.getColumn(index);
|
||||
}
|
||||
|
||||
public Object getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
private void updateColumns() {
|
||||
|
||||
int tableVersion = attributeTable.getVersion();
|
||||
if (rowVersion < tableVersion) {
|
||||
|
||||
//Need to update
|
||||
AttributeColumnImpl[] columns = attributeTable.getColumns();
|
||||
AttributeValueImpl[] newValues = new AttributeValueImpl[columns.length];
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
AttributeColumnImpl tableCol = columns[i];
|
||||
newValues[i] = tableCol.defaultValue;
|
||||
while (j < values.length) {
|
||||
AttributeValueImpl val = values[j++];
|
||||
if (val.getColumn() == tableCol) {
|
||||
newValues[i] = val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
values = newValues;
|
||||
|
||||
//Upd version
|
||||
rowVersion = tableVersion;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkIndexRange(int index) {
|
||||
return index < values.length && index >= 0;
|
||||
}
|
||||
|
||||
public int getRowVersion() {
|
||||
return rowVersion;
|
||||
}
|
||||
|
||||
public void setRowVersion(int rowVersion) {
|
||||
this.rowVersion = rowVersion;
|
||||
}
|
||||
|
||||
public void setValues(AttributeValueImpl[] values) {
|
||||
this.values = values;
|
||||
}
|
||||
}
|
||||
@@ -1,284 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>, Martin Škurla <bujacik@gmail.com>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.gephi.data.attributes.api.AttributeTable;
|
||||
import org.gephi.data.attributes.api.AttributeColumn;
|
||||
import org.gephi.data.attributes.api.AttributeEvent;
|
||||
import org.gephi.data.attributes.api.AttributeOrigin;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.event.ColumnEvent;
|
||||
import org.gephi.data.attributes.spi.AttributeValueDelegateProvider;
|
||||
import org.gephi.data.attributes.type.TypeConvertor;
|
||||
import org.gephi.data.properties.PropertiesColumn;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public class AttributeTableImpl implements AttributeTable {
|
||||
|
||||
protected String name;
|
||||
protected final AbstractAttributeModel model;
|
||||
//Listeners
|
||||
//Columns
|
||||
protected final List<AttributeColumnImpl> columns = new ArrayList<AttributeColumnImpl>();
|
||||
protected final Map<AttributeColumn, AttributeColumn> columnsSet = new HashMap<AttributeColumn, AttributeColumn>();
|
||||
protected final Map<String, AttributeColumnImpl> columnsMap = new HashMap<String, AttributeColumnImpl>();
|
||||
//Version
|
||||
protected int version = 0;
|
||||
|
||||
public AttributeTableImpl(AbstractAttributeModel model, String name) {
|
||||
this.name = name;
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumnImpl[] getColumns() {
|
||||
return columns.toArray(new AttributeColumnImpl[]{});
|
||||
}
|
||||
|
||||
public synchronized int countColumns() {
|
||||
return columns.size();
|
||||
}
|
||||
|
||||
public AttributeColumn addPropertiesColumn(PropertiesColumn propertiesColumn) {
|
||||
return addColumn(propertiesColumn.getId(),
|
||||
propertiesColumn.getTitle(),
|
||||
propertiesColumn.getType(),
|
||||
propertiesColumn.getOrigin(),
|
||||
propertiesColumn.getDefaultValue());
|
||||
}
|
||||
|
||||
public AttributeColumnImpl addColumn(String id, AttributeType type) {
|
||||
return addColumn(id, id, type, AttributeOrigin.DATA, null, null);
|
||||
}
|
||||
|
||||
public AttributeColumnImpl addColumn(String id, AttributeType type, AttributeOrigin origin) {
|
||||
return addColumn(id, id, type, origin, null, null);
|
||||
}
|
||||
|
||||
public AttributeColumnImpl addColumn(String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue) {
|
||||
return addColumn(id, title, type, origin, defaultValue, null);
|
||||
}
|
||||
|
||||
public AttributeColumn addColumn(String id, String title, AttributeType type, AttributeValueDelegateProvider attributeValueDelegateProvider, Object defaultValue) {
|
||||
return addColumn(id, title, type, AttributeOrigin.DELEGATE, defaultValue, attributeValueDelegateProvider);
|
||||
}
|
||||
|
||||
private synchronized AttributeColumnImpl addColumn(String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue, AttributeValueDelegateProvider attributeValueDelegateProvider) {
|
||||
if (title == null || title.isEmpty() || hasColumn(title)) {
|
||||
throw new IllegalArgumentException("The title can't be null, empty or already existing in the table");
|
||||
}
|
||||
|
||||
if (defaultValue != null) {
|
||||
if (defaultValue.getClass() != type.getType()) {
|
||||
if (defaultValue.getClass() == String.class) {
|
||||
defaultValue = type.parse((String) defaultValue);
|
||||
} else {
|
||||
throw new IllegalArgumentException("The default value type cannot be cast to the type");
|
||||
}
|
||||
}
|
||||
defaultValue = model.getManagedValue(defaultValue, type);
|
||||
}
|
||||
AttributeColumnImpl column = new AttributeColumnImpl(this, columns.size(), id, title, type, origin, defaultValue, attributeValueDelegateProvider);
|
||||
columns.add(column);
|
||||
columnsMap.put(id, column);
|
||||
if (title != null && !title.equals(id)) {
|
||||
columnsMap.put(title, column);
|
||||
}
|
||||
columnsSet.put(column, column);
|
||||
|
||||
//Version
|
||||
version++;
|
||||
|
||||
model.fireAttributeEvent(
|
||||
new ColumnEvent(AttributeEvent.EventType.ADD_COLUMN, column));
|
||||
|
||||
return column;
|
||||
}
|
||||
|
||||
public synchronized void removeColumn(AttributeColumn column) {
|
||||
int index = columns.indexOf(column);
|
||||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
//update indexes of the next columns of the one to delete:
|
||||
AttributeColumnImpl c;
|
||||
for (index = index + 1; index < columns.size(); index++) {
|
||||
c = columns.get(index);
|
||||
c.index--;
|
||||
}
|
||||
//Remove from collections
|
||||
columns.remove((AttributeColumnImpl) column);
|
||||
columnsMap.remove(column.getId());
|
||||
if (column.getTitle() != null && !column.getTitle().equals(column.getId())) {
|
||||
columnsMap.remove(column.getTitle());
|
||||
}
|
||||
columnsSet.remove(column);
|
||||
|
||||
model.fireAttributeEvent(
|
||||
new ColumnEvent(AttributeEvent.EventType.REMOVE_COLUMN, (AttributeColumnImpl) column));
|
||||
|
||||
//Version
|
||||
version++;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumn replaceColumn(AttributeColumn source, AttributeColumnImpl targetImpl) {
|
||||
int index = columns.indexOf(source);
|
||||
if (index == -1) {
|
||||
return null;
|
||||
}
|
||||
//Remove from collections
|
||||
columnsMap.remove(source.getId());
|
||||
if (source.getTitle() != null && !source.getTitle().equals(source.getId())) {
|
||||
columnsMap.remove(source.getTitle());
|
||||
}
|
||||
columnsSet.remove(source);
|
||||
|
||||
//Add
|
||||
targetImpl.index = index;
|
||||
columns.set(index, targetImpl);
|
||||
columnsMap.put(targetImpl.id, targetImpl);
|
||||
if (targetImpl.title != null && !targetImpl.title.equals(targetImpl.id)) {
|
||||
columnsMap.put(targetImpl.title.toLowerCase(), targetImpl);
|
||||
}
|
||||
columnsSet.put(targetImpl, targetImpl);
|
||||
|
||||
//Version
|
||||
version++;
|
||||
return targetImpl;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumn replaceColumn(AttributeColumn source, String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue) {
|
||||
if (defaultValue != null) {
|
||||
if (defaultValue.getClass() != type.getType()) {
|
||||
if (defaultValue.getClass() == String.class) {
|
||||
defaultValue = type.parse((String) defaultValue);
|
||||
} else {
|
||||
throw new IllegalArgumentException("The default value type cannot be cast to the type");
|
||||
}
|
||||
}
|
||||
defaultValue = model.getManagedValue(defaultValue, type);
|
||||
}
|
||||
AttributeColumnImpl targetImpl = new AttributeColumnImpl(this, columns.size(), id, title, type, origin, defaultValue, null);
|
||||
return replaceColumn(source, targetImpl);
|
||||
}
|
||||
|
||||
public synchronized AttributeColumnImpl getColumn(int index) {
|
||||
if (index >= 0 && index < columns.size()) {
|
||||
return columns.get(index);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumnImpl getColumn(String id) {
|
||||
AttributeColumnImpl col = columnsMap.get(id);
|
||||
if (col == null) {
|
||||
return columnsMap.get(id.toLowerCase());
|
||||
}
|
||||
return col;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumnImpl getColumn(String title, AttributeType type) {
|
||||
AttributeColumnImpl c = columnsMap.get(title.toLowerCase());
|
||||
if (c != null && c.getType().equals(type)) {
|
||||
return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public synchronized AttributeColumn getColumn(AttributeColumn column) {
|
||||
return columnsSet.get(column);
|
||||
}
|
||||
|
||||
public synchronized boolean hasColumn(String title) {
|
||||
return columnsMap.containsKey(title) || columnsMap.containsKey(title.toLowerCase());
|
||||
}
|
||||
|
||||
public synchronized int getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(int version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public AttributeFactoryImpl getFactory() {
|
||||
return model.getFactory();
|
||||
}
|
||||
|
||||
public AbstractAttributeModel getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public synchronized void mergeTable(AttributeTable table) {
|
||||
for (AttributeColumn column : table.getColumns()) {
|
||||
AttributeColumn existingCol = getColumn(column);
|
||||
if (existingCol == null) {
|
||||
existingCol = getColumn(column.getTitle());
|
||||
}
|
||||
if (existingCol == null) {
|
||||
addColumn(column.getId(), column.getTitle(), column.getType(), column.getOrigin(), column.getDefaultValue());
|
||||
} else if (column.getType().isDynamicType() && TypeConvertor.getStaticType(column.getType()).equals(existingCol.getType())) {
|
||||
//The column exists but has the underlying static type
|
||||
//Change type
|
||||
AttributeColumnImpl newCol = new AttributeColumnImpl(this, existingCol.getIndex(), existingCol.getId(), existingCol.getTitle(), column.getType(), existingCol.getOrigin(), column.getDefaultValue(), null);
|
||||
replaceColumn(existingCol, newCol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>, Martin Škurla <bujacik@gmail.com>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import org.gephi.data.attributes.api.AttributeOrigin;
|
||||
import org.gephi.data.attributes.api.AttributeValue;
|
||||
import org.gephi.data.attributes.spi.AttributeValueDelegateProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
* @author Martin Škurla
|
||||
*/
|
||||
public final class AttributeValueImpl implements AttributeValue {
|
||||
|
||||
private final AttributeColumnImpl column;
|
||||
private final Object value;
|
||||
|
||||
public AttributeValueImpl(AttributeColumnImpl column, Object value) {
|
||||
this.column = column;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public AttributeColumnImpl getColumn() {
|
||||
return column;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
if (column.getOrigin() != AttributeOrigin.DELEGATE) {
|
||||
return value;
|
||||
}
|
||||
else {
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
AttributeValueDelegateProvider attributeValueDelegateProvider = column.getProvider();
|
||||
|
||||
Object result;
|
||||
if (AttributeUtilsImpl.getDefault().isEdgeColumn(column))
|
||||
result = attributeValueDelegateProvider.getEdgeAttributeValue(value, column);
|
||||
else if (AttributeUtilsImpl.getDefault().isNodeColumn(column))
|
||||
result = attributeValueDelegateProvider.getNodeAttributeValue(value, column);
|
||||
else
|
||||
throw new AssertionError();
|
||||
|
||||
// important for Neo4j and in future also for other storing engines
|
||||
// the conversion can be necessary because of types mismatch
|
||||
// for Neo4j return type can be array of primitive type which must be
|
||||
// converted into List type
|
||||
if (result.getClass().isArray())
|
||||
result = ListFactory.fromArray(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj instanceof AttributeValue) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
Object thisVal = this.getValue();
|
||||
Object objVal = ((AttributeValue) obj).getValue();
|
||||
if (thisVal == null && objVal == null) {
|
||||
return true;
|
||||
}
|
||||
if (thisVal != null && objVal != null && thisVal.equals(objVal)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
OpenIDE-Module-Display-Category=Gephi Core
|
||||
OpenIDE-Module-Name=Attributes Impl
|
||||
NodeAttributeTable.name = Nodes
|
||||
EdgeAttributeTable.name = Edges
|
||||
OpenIDE-Module-Short-Description=Attributes API default implementation.
|
||||
@@ -1,13 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Spanish (Castilian) (http\://www.transifex.net/projects/p/gephi/team/es/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: es\nPlural-Forms\: nplurals\=2; plural\=(n \!\= 1)\n
|
||||
|
||||
NodeAttributeTable.name=Nodos
|
||||
|
||||
EdgeAttributeTable.name=Aristas
|
||||
|
||||
OpenIDE-Module-Short-Description=Implementaci\u00f3n por defecto del m\u00f3dulo Attributes API
|
||||
@@ -1,13 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 14\:30+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: French (http\://www.transifex.net/projects/p/gephi/team/fr/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: fr\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
NodeAttributeTable.name=Noeuds
|
||||
|
||||
EdgeAttributeTable.name=Liens
|
||||
|
||||
OpenIDE-Module-Short-Description=Impl\u00e9mentation standard du module Attributes API
|
||||
@@ -1,13 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-09-03 10\:59+0000\nLast-Translator\: sarang <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/team/ja/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ja\nPlural-Forms\: nplurals\=1; plural\=0\n
|
||||
|
||||
NodeAttributeTable.name=\u30ce\u30fc\u30c9
|
||||
|
||||
EdgeAttributeTable.name=\u8fba
|
||||
|
||||
OpenIDE-Module-Short-Description=\u5c5e\u6027API\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5b9f\u88c5
|
||||
@@ -1,13 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# C\u00e9lio CJr <celiofariajr@gmail.com>, 2011.
|
||||
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://bugs.launchpad.net/gephi\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 23\:31+0000\nLast-Translator\: celiofariajr <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazilian) (http\://www.transifex.net/projects/p/gephi/team/pt_BR/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: pt_BR\nPlural-Forms\: nplurals\=2; plural\=(n > 1)\n
|
||||
|
||||
NodeAttributeTable.name=N\u00f3s
|
||||
|
||||
EdgeAttributeTable.name=Arestas
|
||||
|
||||
OpenIDE-Module-Short-Description=Implementa\u00e7\u00e3o padr\u00e3o da API Attributes.
|
||||
@@ -1,12 +0,0 @@
|
||||
# Russian translation for gephi
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the gephi package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
!=Project-Id-Version\: gephi\nReport-Msgid-Bugs-To\: FULL NAME <EMAIL@ADDRESS>\nPOT-Creation-Date\: 2010-04-07 13\:16+0200\nPO-Revision-Date\: 2010-12-01 08\:17+0000\nLast-Translator\: Altsoph <Unknown>\nLanguage-Team\: Russian <ru@li.org>\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nX-Launchpad-Export-Date\: 2011-03-13 04\:46+0000\nX-Generator\: Launchpad (build 12559)\n
|
||||
|
||||
NodeAttributeTable.name=\u0412\u0435\u0440\u0448\u0438\u043d\u044b
|
||||
|
||||
EdgeAttributeTable.name=\u0420\u0451\u0431\u0440\u0430
|
||||
|
||||
OpenIDE-Module-Short-Description=\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/gephi/team/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
msgid "NodeAttributeTable.name"
|
||||
msgstr "Nodos"
|
||||
|
||||
msgid "EdgeAttributeTable.name"
|
||||
msgstr "Aristas"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Implementación por defecto del módulo Attributes API"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 14:30+0000\n"
|
||||
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.net/projects/p/gephi/team/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "NodeAttributeTable.name"
|
||||
msgstr "Noeuds"
|
||||
|
||||
msgid "EdgeAttributeTable.name"
|
||||
msgstr "Liens"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Implémentation standard du module Attributes API"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Siro Kida <kida.siro@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-09-03 10:59+0000\n"
|
||||
"Last-Translator: sarang <kida.siro@gmail.com>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/team/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ja\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
|
||||
msgid "NodeAttributeTable.name"
|
||||
msgstr "ノード"
|
||||
|
||||
msgid "EdgeAttributeTable.name"
|
||||
msgstr "辺"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "属性APIのデフォルトの実装"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Translation file for Gephi.
|
||||
# Copyright (C) 2011 Gephi contributors.
|
||||
# This file is distributed under the same license as the Gephi package.
|
||||
#
|
||||
# Translators:
|
||||
# Célio CJr <celiofariajr@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Gephi\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/gephi\n"
|
||||
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
|
||||
"PO-Revision-Date: 2011-08-06 23:31+0000\n"
|
||||
"Last-Translator: celiofariajr <celiofariajr@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/gephi/team/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_BR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
|
||||
msgid "NodeAttributeTable.name"
|
||||
msgstr "Nós"
|
||||
|
||||
msgid "EdgeAttributeTable.name"
|
||||
msgstr "Arestas"
|
||||
|
||||
msgid "OpenIDE-Module-Short-Description"
|
||||
msgstr "Implementação padrão da API Attributes."
|
||||
|
||||
|
||||
-189
@@ -1,189 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes.serialization;
|
||||
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import javax.xml.stream.XMLStreamWriter;
|
||||
import org.gephi.data.attributes.AbstractAttributeModel;
|
||||
import org.gephi.data.attributes.AttributeColumnImpl;
|
||||
import org.gephi.data.attributes.AttributeRowImpl;
|
||||
import org.gephi.data.attributes.AttributeTableImpl;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.api.AttributeValue;
|
||||
import org.gephi.graph.api.Edge;
|
||||
import org.gephi.graph.api.GraphModel;
|
||||
import org.gephi.graph.api.HierarchicalGraph;
|
||||
import org.gephi.graph.api.Node;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public class AttributeRowSerializer {
|
||||
|
||||
private static final String ELEMENT_ROWS = "attributerows";
|
||||
private static final String ELEMENT_NODE_ROW = "noderow";
|
||||
private static final String ELEMENT_EDGE_ROW = "edgerow";
|
||||
private static final String ELEMENT_VALUE = "attvalue";
|
||||
|
||||
public void writeRows(XMLStreamWriter writer, GraphModel graphModel) throws XMLStreamException {
|
||||
writer.writeStartElement(ELEMENT_ROWS);
|
||||
|
||||
HierarchicalGraph hierarchicalGraph = graphModel.getHierarchicalGraph();
|
||||
for (Node node : hierarchicalGraph.getNodesTree()) {
|
||||
if (node.getNodeData().getAttributes() != null && node.getNodeData().getAttributes() instanceof AttributeRowImpl) {
|
||||
AttributeRowImpl row = (AttributeRowImpl) node.getNodeData().getAttributes();
|
||||
writer.writeStartElement(ELEMENT_NODE_ROW);
|
||||
writer.writeAttribute("for", String.valueOf(node.getId()));
|
||||
if (writeRow(writer, row)) {
|
||||
writer.writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Node node : hierarchicalGraph.getNodesTree()) {
|
||||
for (Edge edge : hierarchicalGraph.getEdges(node)) {
|
||||
if (edge.getEdgeData().getAttributes() != null && edge.getEdgeData().getAttributes() instanceof AttributeRowImpl) {
|
||||
AttributeRowImpl row = (AttributeRowImpl) edge.getEdgeData().getAttributes();
|
||||
writer.writeStartElement(ELEMENT_EDGE_ROW);
|
||||
writer.writeAttribute("for", String.valueOf(edge.getId()));
|
||||
if (writeRow(writer, row)) {
|
||||
writer.writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
writer.writeEndElement();
|
||||
}
|
||||
|
||||
public void readRows(XMLStreamReader reader, GraphModel graphModel, AbstractAttributeModel attributeModel) throws XMLStreamException {
|
||||
HierarchicalGraph hierarchicalGraph = graphModel.getHierarchicalGraph();
|
||||
|
||||
boolean end = false;
|
||||
while (reader.hasNext() && !end) {
|
||||
int type = reader.next();
|
||||
|
||||
switch (type) {
|
||||
case XMLStreamReader.START_ELEMENT:
|
||||
String name = reader.getLocalName();
|
||||
if (ELEMENT_NODE_ROW.equalsIgnoreCase(name)) {
|
||||
int id = Integer.parseInt(reader.getAttributeValue(null, "for"));
|
||||
Node node = hierarchicalGraph.getNode(id);
|
||||
if (node.getNodeData().getAttributes() != null && node.getNodeData().getAttributes() instanceof AttributeRowImpl) {
|
||||
AttributeRowImpl row = (AttributeRowImpl) node.getNodeData().getAttributes();
|
||||
readRow(reader, attributeModel, attributeModel.getNodeTable(), row);
|
||||
}
|
||||
} else if (ELEMENT_EDGE_ROW.equalsIgnoreCase(name)) {
|
||||
int id = Integer.parseInt(reader.getAttributeValue(null, "for"));
|
||||
Edge edge = hierarchicalGraph.getEdge(id);
|
||||
if (edge.getEdgeData().getAttributes() != null && edge.getEdgeData().getAttributes() instanceof AttributeRowImpl) {
|
||||
AttributeRowImpl row = (AttributeRowImpl) edge.getEdgeData().getAttributes();
|
||||
readRow(reader, attributeModel, attributeModel.getEdgeTable(), row);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XMLStreamReader.END_ELEMENT:
|
||||
if (ELEMENT_ROWS.equalsIgnoreCase(reader.getLocalName())) {
|
||||
end = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean writeRow(XMLStreamWriter writer, AttributeRowImpl row) throws XMLStreamException {
|
||||
writer.writeAttribute("version", String.valueOf(row.getRowVersion()));
|
||||
int writtenRows = 0;
|
||||
for (AttributeValue value : row.getValues()) {
|
||||
int index = value.getColumn().getIndex();
|
||||
Object obj = value.getValue();
|
||||
if (obj != null) {
|
||||
writtenRows++;
|
||||
writer.writeStartElement(ELEMENT_VALUE);
|
||||
writer.writeAttribute("index", String.valueOf(index));
|
||||
writer.writeCharacters(obj.toString());
|
||||
writer.writeEndElement();
|
||||
}
|
||||
}
|
||||
return writtenRows > 0;
|
||||
}
|
||||
|
||||
public void readRow(XMLStreamReader reader, AbstractAttributeModel model, AttributeTableImpl table, AttributeRowImpl row) throws XMLStreamException {
|
||||
row.setRowVersion(Integer.parseInt(reader.getAttributeValue(null, "version")));
|
||||
AttributeColumnImpl col = null;
|
||||
String value = "";
|
||||
|
||||
boolean end = false;
|
||||
while (reader.hasNext() && !end) {
|
||||
int t = reader.next();
|
||||
|
||||
switch (t) {
|
||||
case XMLStreamReader.START_ELEMENT:
|
||||
String name = reader.getLocalName();
|
||||
if (ELEMENT_VALUE.equalsIgnoreCase(name)) {
|
||||
col = (AttributeColumnImpl) table.getColumn(Integer.parseInt(reader.getAttributeValue(null, "index")));
|
||||
}
|
||||
break;
|
||||
case XMLStreamReader.CHARACTERS:
|
||||
if (!reader.isWhiteSpace() && col != null) {
|
||||
value += reader.getText();
|
||||
}
|
||||
break;
|
||||
case XMLStreamReader.END_ELEMENT:
|
||||
if (ELEMENT_NODE_ROW.equalsIgnoreCase(reader.getLocalName()) || ELEMENT_EDGE_ROW.equalsIgnoreCase(reader.getLocalName())) {
|
||||
end = true;
|
||||
}
|
||||
if (!value.isEmpty() && col != null) {
|
||||
AttributeType type = col.getType();
|
||||
Object v = type.parse(value);
|
||||
v = model.getManagedValue(v, type);
|
||||
row.setValue(col, v);
|
||||
}
|
||||
value = "";
|
||||
col = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.gephi.data.attributes.api.AttributeOrigin;
|
||||
import org.gephi.data.attributes.api.AttributeRow;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.api.AttributeValue;
|
||||
import org.gephi.data.attributes.model.TemporaryAttributeModel;
|
||||
import org.gephi.data.attributes.type.StringList;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu
|
||||
*/
|
||||
public class AttributeClassTest {
|
||||
|
||||
private AbstractAttributeModel manager;
|
||||
private AttributeTableImpl nodeClass;
|
||||
private AttributeFactoryImpl factory;
|
||||
//Test map
|
||||
private Map<String, AttributeColumnImpl> columnMap;
|
||||
private List<AttributeRowImpl> rows;
|
||||
|
||||
public AttributeClassTest() {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpClass() throws Exception {
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDownClass() throws Exception {
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
manager = new TemporaryAttributeModel();//Id and Label columns are automatically created at indexes 0 and 1
|
||||
nodeClass = manager.getNodeTable();
|
||||
factory = new AttributeFactoryImpl(manager);
|
||||
columnMap = new HashMap<String, AttributeColumnImpl>();
|
||||
rows = new ArrayList<AttributeRowImpl>();
|
||||
|
||||
AttributeColumnImpl co1 = nodeClass.addColumn("col1", "Column 1", AttributeType.STRING, AttributeOrigin.DATA, "nil");
|
||||
AttributeColumnImpl co2 = nodeClass.addColumn("col2", "Column 2", AttributeType.INT, AttributeOrigin.PROPERTY, 0);
|
||||
AttributeColumnImpl co3 = nodeClass.addColumn("col3", "Column 3", AttributeType.LIST_STRING, AttributeOrigin.DATA, new StringList("nothing", ","));
|
||||
AttributeColumnImpl co4 = nodeClass.addColumn("col4", "Column 4", AttributeType.STRING, AttributeOrigin.COMPUTED, "zero");
|
||||
AttributeColumnImpl co5 = nodeClass.addColumn("col5", "Column 5", AttributeType.BOOLEAN, AttributeOrigin.DATA, true);
|
||||
AttributeColumnImpl co6 = nodeClass.addColumn("col6", "Column 6", AttributeType.STRING, AttributeOrigin.DATA, "default");
|
||||
|
||||
columnMap.put("col1", co1);
|
||||
columnMap.put("col2", co2);
|
||||
columnMap.put("col3", co3);
|
||||
columnMap.put("col4", co4);
|
||||
columnMap.put("col5", co5);
|
||||
columnMap.put("col6", co6);
|
||||
|
||||
//Rows
|
||||
for (int i = 0; i < 10; i++) {
|
||||
AttributeRowImpl r = factory.newNodeRow(null);
|
||||
r.setValue(co1, "col1value " + i);
|
||||
r.setValue("col2", i);
|
||||
r.setValue("Column 3", null);
|
||||
r.setValue(5, "col4value " + i);
|
||||
r.setValue(factory.newValue(co5, false));
|
||||
rows.add(r);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
manager = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetColumn() {
|
||||
assertSame(columnMap.get("col1"), nodeClass.getColumn("col1"));
|
||||
assertSame(columnMap.get("col1"), nodeClass.getColumn("Column 1"));
|
||||
assertSame(columnMap.get("col1"), nodeClass.getColumn(2));
|
||||
assertTrue(nodeClass.hasColumn("col1"));
|
||||
assertTrue(nodeClass.hasColumn("Column 1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValues() {
|
||||
int i = 0;
|
||||
|
||||
AttributeRow row = rows.get(0);
|
||||
assertEquals("col1value 0", row.getValue(columnMap.get("col1")));
|
||||
assertEquals(0, row.getValue(columnMap.get("col2")));
|
||||
assertNull(row.getValue(columnMap.get("col3")));
|
||||
assertEquals("col4value 0", row.getValue(columnMap.get("col4")));
|
||||
assertEquals(false, row.getValue(columnMap.get("col5")));
|
||||
assertEquals(columnMap.get("col6").getDefaultValue(), row.getValue(columnMap.get("col6")));
|
||||
|
||||
showValues(row);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddColumn() {
|
||||
AttributeColumnImpl co7 = nodeClass.addColumn("col7", "Column 7", AttributeType.STRING, AttributeOrigin.DATA, "def");
|
||||
columnMap.put("col7", co7);
|
||||
|
||||
//Test GetColumn
|
||||
assertSame(co7, nodeClass.getColumn("col7"));
|
||||
|
||||
//Test value
|
||||
AttributeRow row = rows.get(0);
|
||||
assertEquals(columnMap.get("col7").getDefaultValue(), row.getValue(columnMap.get("col7")));
|
||||
row.setValue(co7, "test");
|
||||
assertEquals("test", row.getValue(columnMap.get("col7")));
|
||||
|
||||
showValues(row);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteColumn() {
|
||||
nodeClass.removeColumn(columnMap.get("col4"));
|
||||
|
||||
//Test GetColumn
|
||||
assertNull(nodeClass.getColumn("col4"));
|
||||
|
||||
//Test value
|
||||
AttributeRow row = rows.get(0);
|
||||
assertNull(row.getValue(columnMap.get("col4")));
|
||||
|
||||
showValues(row);
|
||||
}
|
||||
|
||||
public void showValues(AttributeRow row) {
|
||||
System.out.print("Values: ");
|
||||
for (AttributeValue val : row.getValues()) {
|
||||
System.out.print("#" + val.getValue() + " ");
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
-148
@@ -1,148 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import java.io.StringReader;
|
||||
import javax.xml.stream.Location;
|
||||
import javax.xml.stream.XMLInputFactory;
|
||||
import javax.xml.stream.XMLOutputFactory;
|
||||
import javax.xml.stream.XMLReporter;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import javax.xml.stream.XMLStreamWriter;
|
||||
import org.gephi.data.attributes.serialization.AttributeModelSerializer;
|
||||
import java.io.StringWriter;
|
||||
import org.gephi.data.attributes.api.AttributeOrigin;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.model.IndexedAttributeModel;
|
||||
import org.gephi.data.attributes.type.StringList;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.w3c.dom.Element;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public class AttributeModelSerializerTest {
|
||||
|
||||
private IndexedAttributeModel model;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
model = new IndexedAttributeModel();
|
||||
AttributeTableImpl nodeTableImpl = model.getNodeTable();
|
||||
nodeTableImpl.addColumn("id", "Identifier", AttributeType.INT, AttributeOrigin.DATA, new Integer(0));
|
||||
nodeTableImpl.addColumn("url", AttributeType.STRING);
|
||||
nodeTableImpl.addColumn("position", "Position&<>\"'$*", AttributeType.FLOAT, AttributeOrigin.PROPERTY, new Float(0));
|
||||
nodeTableImpl.addColumn("cats", "Catégories", AttributeType.LIST_STRING, AttributeOrigin.DATA, new StringList("a,b,c,d"));
|
||||
AttributeTableImpl edgeTableImpl = model.getEdgeTable();
|
||||
edgeTableImpl.addColumn("name", AttributeType.STRING, AttributeOrigin.DATA);
|
||||
//edgeTableImpl.addColumn("weight", AttributeType.DOUBLE, AttributeOrigin.DATA);
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSerializer() {
|
||||
try {
|
||||
AttributeModelSerializer serializer = new AttributeModelSerializer();
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
XMLStreamWriter writer = createWriter(stringWriter);
|
||||
serializer.writeModel(writer, model);
|
||||
writer.close();
|
||||
String s1 = stringWriter.toString();
|
||||
System.out.println(s1);
|
||||
IndexedAttributeModel model2 = new IndexedAttributeModel();
|
||||
StringReader stringReader = new StringReader(s1);
|
||||
XMLStreamReader reader = createReader(stringReader);
|
||||
serializer.readModel(reader, model2);
|
||||
stringWriter = new StringWriter();
|
||||
writer = createWriter(stringWriter);
|
||||
serializer.writeModel(writer, model2);
|
||||
String s2 = stringWriter.toString();
|
||||
System.out.println(s2);
|
||||
assertEquals(s1, s2);
|
||||
} catch (XMLStreamException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private XMLStreamWriter createWriter(StringWriter stringWriter) {
|
||||
XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
|
||||
outputFactory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.FALSE);
|
||||
|
||||
try {
|
||||
XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(stringWriter);
|
||||
xmlWriter.writeStartDocument("UTF-8", "1.0");
|
||||
return xmlWriter;
|
||||
} catch (XMLStreamException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private XMLStreamReader createReader(StringReader stringReader) {
|
||||
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
|
||||
if (inputFactory.isPropertySupported("javax.xml.stream.isValidating")) {
|
||||
inputFactory.setProperty("javax.xml.stream.isValidating", Boolean.FALSE);
|
||||
}
|
||||
inputFactory.setXMLReporter(new XMLReporter() {
|
||||
|
||||
@Override
|
||||
public void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException {
|
||||
System.out.println("Error:" + errorType + ", message : " + message);
|
||||
}
|
||||
});
|
||||
try {
|
||||
return inputFactory.createXMLStreamReader(stringReader);
|
||||
} catch (XMLStreamException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
/*
|
||||
Copyright 2008-2010 Gephi
|
||||
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
|
||||
Website : http://www.gephi.org
|
||||
|
||||
This file is part of Gephi.
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright 2011 Gephi Consortium. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 3 only ("GPL") or the Common
|
||||
Development and Distribution License("CDDL") (collectively, the
|
||||
"License"). You may not use this file except in compliance with the
|
||||
License. You can obtain a copy of the License at
|
||||
http://gephi.org/about/legal/license-notice/
|
||||
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
|
||||
specific language governing permissions and limitations under the
|
||||
License. When distributing the software, include this License Header
|
||||
Notice in each file and include the License files at
|
||||
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
|
||||
License Header, with the fields enclosed by brackets [] replaced by
|
||||
your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
If you wish your version of this file to be governed by only the CDDL
|
||||
or only the GPL Version 3, indicate your decision by adding
|
||||
"[Contributor] elects to include this software in this distribution
|
||||
under the [CDDL or GPL Version 3] license." If you do not indicate a
|
||||
single choice of license, a recipient has the option to distribute
|
||||
your version of this file under either the CDDL, the GPL Version 3 or
|
||||
to extend the choice of license to its licensees as provided above.
|
||||
However, if you add GPL Version 3 code and therefore, elected the GPL
|
||||
Version 3 license, then the option applies only if the new code is
|
||||
made subject to such option by the copyright holder.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Portions Copyrighted 2011 Gephi Consortium.
|
||||
*/
|
||||
package org.gephi.data.attributes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.gephi.data.attributes.api.AttributeColumn;
|
||||
import org.gephi.data.attributes.api.AttributeEvent;
|
||||
import org.gephi.data.attributes.api.AttributeListener;
|
||||
import org.gephi.data.attributes.api.AttributeType;
|
||||
import org.gephi.data.attributes.api.AttributeValue;
|
||||
import org.gephi.data.attributes.event.AttributeEventManager;
|
||||
import org.gephi.data.attributes.model.IndexedAttributeModel;
|
||||
import org.junit.Test;
|
||||
import org.openide.util.Exceptions;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mathieu Bastian
|
||||
*/
|
||||
public class EventsTest {
|
||||
|
||||
private int countEvents = 0;
|
||||
private int countElements = 0;
|
||||
|
||||
@Test
|
||||
public void testEventsPerformance() {
|
||||
IndexedAttributeModel attModel = new IndexedAttributeModel();
|
||||
attModel.addAttributeListener(new AttributeListener() {
|
||||
|
||||
public void attributesChanged(AttributeEvent event) {
|
||||
if(event.is(AttributeEvent.EventType.SET_VALUE)) {
|
||||
countEvents++;
|
||||
countElements+=event.getData().getTouchedValues().length;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Add table
|
||||
AttributeTableImpl table = new AttributeTableImpl(attModel, "table");
|
||||
attModel.addTable(table);
|
||||
|
||||
//Add Column
|
||||
AttributeColumnImpl col = table.addColumn("test", AttributeType.DOUBLE);
|
||||
|
||||
AttributeRowImpl r1 = attModel.getFactory().newRowForTable("table", 1.0);
|
||||
AttributeRowImpl r2 = attModel.getFactory().newRowForTable("table", 1.0);
|
||||
|
||||
for(int i=0;i<1000000;i++) {
|
||||
r1.setValue(col.getIndex(), Math.random());
|
||||
r2.setValue(col.getIndex(), Math.random());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
|
||||
System.out.println("Number events: "+countEvents+" with "+countElements+" elements touched");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEvents() {
|
||||
IndexedAttributeModel attModel = new IndexedAttributeModel();
|
||||
EventCollector eventCollector = new EventCollector();
|
||||
attModel.addAttributeListener(eventCollector);
|
||||
|
||||
//Add table
|
||||
AttributeTableImpl table = new AttributeTableImpl(attModel, "table");
|
||||
attModel.addTable(table);
|
||||
|
||||
//Add Column
|
||||
AttributeColumnImpl col = table.addColumn("test", AttributeType.STRING);
|
||||
|
||||
//Create objects
|
||||
Object o1 = new Object() {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "o1";
|
||||
}
|
||||
};
|
||||
Object o2 = new Object() {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "o2";
|
||||
}
|
||||
};
|
||||
AttributeRowImpl r1 = attModel.getFactory().newRowForTable("table", o1);
|
||||
AttributeRowImpl r2 = attModel.getFactory().newRowForTable("table", o2);
|
||||
|
||||
//Set values
|
||||
r1.setValue(col, "value 1");
|
||||
r2.setValue(col, "value 2");
|
||||
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
} catch (InterruptedException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
|
||||
//Look events
|
||||
eventCollector.print();
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static class EventCollector implements AttributeListener {
|
||||
|
||||
private List<AttributeEvent> events = new ArrayList<AttributeEvent>();
|
||||
|
||||
public void attributesChanged(AttributeEvent event) {
|
||||
events.add(event);
|
||||
}
|
||||
|
||||
public void print() {
|
||||
for (AttributeEvent e : events) {
|
||||
System.out.println("Event: " + e.getEventType() + " source: " + e.getSource().getName());
|
||||
switch (e.getEventType()) {
|
||||
case ADD_COLUMN:
|
||||
for (AttributeColumn c : e.getData().getAddedColumns()) {
|
||||
System.out.println("-- "+c.getTitle());
|
||||
}
|
||||
break;
|
||||
case REMOVE_COLUMN:
|
||||
for (AttributeColumn c : e.getData().getRemovedColumns()) {
|
||||
System.out.println("-- "+c.getTitle());
|
||||
}
|
||||
break;
|
||||
case SET_VALUE:
|
||||
for (int i = 0; i < e.getData().getTouchedValues().length; i++) {
|
||||
AttributeValue val = e.getData().getTouchedValues()[i];
|
||||
Object obj = e.getData().getTouchedObjects()[i];
|
||||
System.out.println("-- Value '" + val.getValue() + "' set for '" + obj.toString() + "' in column '" + val.getColumn().getTitle() + "'");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.gephi.lib.batik" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.gephi.lib.batik.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
||||
@@ -1,5 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.gephi.lib.batik
|
||||
OpenIDE-Module-Localizing-Bundle: org/gephi/lib/batik/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 1.7
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.gephi.lib.batik-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=760d3c5b
|
||||
build.xml.script.CRC32=1d17fb26
|
||||
build.xml.stylesheet.CRC32=79c3b980@1.31.1.7
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=760d3c5b
|
||||
nbproject/build-impl.xml.script.CRC32=5060c575
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=261c4bef@1.31.1.7
|
||||
@@ -1,4 +0,0 @@
|
||||
is.autoload=true
|
||||
license.file=${basedir}/LICENSE
|
||||
keystore=nbproject/private/keystore.ks
|
||||
nbm_alias=gephi
|
||||
@@ -1,169 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.gephi.lib.batik</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies/>
|
||||
<public-packages>
|
||||
<package>org.apache.avalon.framework</package>
|
||||
<package>org.apache.avalon.framework.activity</package>
|
||||
<package>org.apache.avalon.framework.configuration</package>
|
||||
<package>org.apache.avalon.framework.container</package>
|
||||
<package>org.apache.batik</package>
|
||||
<package>org.apache.batik.anim</package>
|
||||
<package>org.apache.batik.anim.timing</package>
|
||||
<package>org.apache.batik.anim.values</package>
|
||||
<package>org.apache.batik.bridge</package>
|
||||
<package>org.apache.batik.bridge.svg12</package>
|
||||
<package>org.apache.batik.css.dom</package>
|
||||
<package>org.apache.batik.css.engine</package>
|
||||
<package>org.apache.batik.css.engine.sac</package>
|
||||
<package>org.apache.batik.css.engine.value</package>
|
||||
<package>org.apache.batik.css.engine.value.css2</package>
|
||||
<package>org.apache.batik.css.engine.value.svg</package>
|
||||
<package>org.apache.batik.css.engine.value.svg12</package>
|
||||
<package>org.apache.batik.css.parser</package>
|
||||
<package>org.apache.batik.dom</package>
|
||||
<package>org.apache.batik.dom.anim</package>
|
||||
<package>org.apache.batik.dom.events</package>
|
||||
<package>org.apache.batik.dom.svg</package>
|
||||
<package>org.apache.batik.dom.svg12</package>
|
||||
<package>org.apache.batik.dom.traversal</package>
|
||||
<package>org.apache.batik.dom.util</package>
|
||||
<package>org.apache.batik.dom.xbl</package>
|
||||
<package>org.apache.batik.ext.awt</package>
|
||||
<package>org.apache.batik.ext.awt.color</package>
|
||||
<package>org.apache.batik.ext.awt.font</package>
|
||||
<package>org.apache.batik.ext.awt.g2d</package>
|
||||
<package>org.apache.batik.ext.awt.geom</package>
|
||||
<package>org.apache.batik.ext.awt.image</package>
|
||||
<package>org.apache.batik.ext.awt.image.renderable</package>
|
||||
<package>org.apache.batik.ext.awt.image.rendered</package>
|
||||
<package>org.apache.batik.ext.awt.image.spi</package>
|
||||
<package>org.apache.batik.ext.swing</package>
|
||||
<package>org.apache.batik.gvt</package>
|
||||
<package>org.apache.batik.gvt.event</package>
|
||||
<package>org.apache.batik.gvt.filter</package>
|
||||
<package>org.apache.batik.gvt.flow</package>
|
||||
<package>org.apache.batik.gvt.font</package>
|
||||
<package>org.apache.batik.gvt.renderer</package>
|
||||
<package>org.apache.batik.gvt.svg12</package>
|
||||
<package>org.apache.batik.gvt.text</package>
|
||||
<package>org.apache.batik.i18n</package>
|
||||
<package>org.apache.batik.parser</package>
|
||||
<package>org.apache.batik.script</package>
|
||||
<package>org.apache.batik.script.rhino</package>
|
||||
<package>org.apache.batik.script.rhino.svg12</package>
|
||||
<package>org.apache.batik.transcoder</package>
|
||||
<package>org.apache.batik.transcoder.image</package>
|
||||
<package>org.apache.batik.transcoder.image.resources</package>
|
||||
<package>org.apache.batik.transcoder.keys</package>
|
||||
<package>org.apache.batik.transcoder.print</package>
|
||||
<package>org.apache.batik.transcoder.svg2svg</package>
|
||||
<package>org.apache.batik.transcoder.wmf</package>
|
||||
<package>org.apache.batik.transcoder.wmf.tosvg</package>
|
||||
<package>org.apache.batik.util</package>
|
||||
<package>org.apache.batik.util.io</package>
|
||||
<package>org.apache.batik.util.resources</package>
|
||||
<package>org.apache.batik.xml</package>
|
||||
<package>org.apache.commons.io</package>
|
||||
<package>org.apache.commons.io.output</package>
|
||||
<package>org.apache.commons.logging</package>
|
||||
<package>org.apache.commons.logging.impl</package>
|
||||
<package>org.apache.fop</package>
|
||||
<package>org.apache.fop.apps</package>
|
||||
<package>org.apache.fop.fo</package>
|
||||
<package>org.apache.fop.fonts</package>
|
||||
<package>org.apache.fop.fonts.apps</package>
|
||||
<package>org.apache.fop.fonts.autodetect</package>
|
||||
<package>org.apache.fop.fonts.base14</package>
|
||||
<package>org.apache.fop.fonts.truetype</package>
|
||||
<package>org.apache.fop.fonts.type1</package>
|
||||
<package>org.apache.fop.image</package>
|
||||
<package>org.apache.fop.image.analyser</package>
|
||||
<package>org.apache.fop.pdf</package>
|
||||
<package>org.apache.fop.render.pdf</package>
|
||||
<package>org.apache.fop.render.ps</package>
|
||||
<package>org.apache.fop.render.ps.extensions</package>
|
||||
<package>org.apache.fop.svg</package>
|
||||
<package>org.apache.fop.util</package>
|
||||
<package>org.apache.xmlgraphics.fonts</package>
|
||||
<package>org.apache.xmlgraphics.java2d</package>
|
||||
<package>org.apache.xmlgraphics.java2d.ps</package>
|
||||
<package>org.apache.xmlgraphics.ps</package>
|
||||
<package>org.apache.xmlgraphics.ps.dsc</package>
|
||||
<package>org.apache.xmlgraphics.ps.dsc.events</package>
|
||||
<package>org.apache.xmlgraphics.ps.dsc.tools</package>
|
||||
<package>org.apache.xmlgraphics.util.io</package>
|
||||
<package>org.w3c.css.sac</package>
|
||||
<package>org.w3c.css.sac.helpers</package>
|
||||
<package>org.w3c.dom</package>
|
||||
<package>org.w3c.dom.events</package>
|
||||
<package>org.w3c.dom.smil</package>
|
||||
<package>org.w3c.dom.svg</package>
|
||||
</public-packages>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-transcoder.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-transcoder.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-css.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-css.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-util.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-util.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xml-apis-ext.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/xml-apis-ext.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-dom.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-dom.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-gvt.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-gvt.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-script.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-script.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-ext.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-ext.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-parser.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-parser.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-awt-util.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-awt-util.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-svg-dom.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-svg-dom.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-xml.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-xml.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-anim.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-anim.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/batik-bridge.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/batik-bridge.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/pdf-transcoder.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/pdf-transcoder.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
suite.dir=${basedir}/..
|
||||
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário