354 Commits

Autor SHA1 Mensagem Data
Eduardo Ramos f8c032d38b Bump maven plugins versions
Use Netbeans platform 8 and hide new unnecessary menus
2014-08-03 02:16:13 +02:00
Eduardo Ramos d873229ed8 Merge pull request #920 from count0/master
Make the GML exporter's Creator tag syntax conformant
2014-08-03 00:53:44 +02:00
Eduardo Ramos 17798a0f81 Merge pull request #923 from chirayuk/patch-1
Fix "Plugin Quick Start" link in README.md
2014-08-03 00:51:26 +02:00
Chirayu Krishnappa 586e72d4fb Fix "Plugin Quick Start" link in README.md
Fix the markdown for the "Plugin Quick Start (5 minutes)" link.
2014-05-30 19:27:54 -07:00
Tiago de Paula Peixoto ec2916565f Make the GML exporter's Creator tag syntax conformant 2014-05-22 12:13:58 +02:00
Eduardo Ramos b5c0de406d Fix graphstore call for new table observer 2014-05-19 22:55:50 +02:00
Mathieu Bastian 5777cab4a8 Enable auto-apply in DesktopAppearance 2014-03-30 19:14:17 -07:00
Mathieu Bastian 8d05d3958e Refactor calls to createObserver 2014-03-30 16:15:11 -07:00
Mathieu Bastian 38e540d8b3 Update GraphStore dependency 2014-03-30 15:44:25 -07:00
Mathieu Bastian 2ce8a3378c Update graphstore dependency 2014-03-02 17:54:17 -08:00
Mathieu Bastian 23b47bfe12 Fix dmg creation path on Linux 2014-01-18 17:55:51 -08:00
Mathieu Bastian 4b93a004f6 Fix LayoutPlugin compile issue 2014-01-18 17:38:01 -08:00
Mathieu Bastian 5b36a9f4b6 Add Application symlink in DMG 2014-01-18 17:35:32 -08:00
Eduardo Ramos b92f7dd857 Merge branch 'master' of github.com:gephi/gephi 2014-01-13 21:15:20 +01:00
Eduardo Ramos 52819685e9 Fix compilation dependency problem 2014-01-13 21:15:04 +01:00
Mathieu Bastian c2ee37971f Format Info.plist 2013-12-30 17:07:59 +01:00
Mathieu Bastian 96951871fd Add column observer in Appearance UI 2013-12-30 17:07:50 +01:00
Mathieu Bastian 1b99cc7fe2 Implement equals and hashCode on ranking and partition functions 2013-12-30 17:07:30 +01:00
Mathieu Bastian d873611a2b Set isRanking and isPartition as private methods 2013-12-30 17:06:59 +01:00
Mathieu Bastian 7a2dcf9bbb Update to JOGL 2.1.3 2013-12-25 18:03:42 +01:00
Mathieu Bastian 046c8efcfb Add TestNG to gephi-parent 2013-12-23 17:25:09 +01:00
Mathieu Bastian 325f60dcab Merge and update to new API 2013-12-23 17:23:44 +01:00
Mathieu Bastian 5d7ce7249d Update ImportAPI to use TimeFormat from GraphAPI 2013-12-22 22:09:09 +01:00
Mathieu Bastian 535b3ebf99 Add Statistics modules and update implementations to use the new API 2013-12-22 22:08:42 +01:00
Eduardo Ramos a56db00d36 Update nbm maven plugin to 3.11.1
Hide IDE Tools and Web browser from Window Menu
2013-10-26 00:51:42 +02:00
Eduardo Ramos 440b0bdf7e Remove old JOGL native binaries 2013-10-26 00:14:35 +02:00
Eduardo Ramos f27bbaf7c7 Update fastutil dependency to 6.5.9 2013-10-26 00:14:03 +02:00
Eduardo Ramos d7f321a4bb Revert platform localization zip to 7.2 2013-10-25 23:14:21 +02:00
Eduardo Ramos 7409c4fdf6 Updated JOGL dependencies to latest 2.1.1 release, which seems to finally fix the loading native libraries from JAR files problems.
Updated Netbeans maven platform version to 7.4
2013-10-23 23:07:55 +02:00
Mathieu Bastian ca72bf6e58 Minor refactoring 2013-08-25 22:50:52 -07:00
Mathieu Bastian 16547aeb93 Add partition palette management and UI 2013-08-25 22:50:20 -07:00
Mathieu Bastian 761701b37e Try again using dependency patch 2013-08-19 07:57:43 -07:00
Mathieu Bastian 84d050fc48 Revert last commit 2013-08-18 18:07:10 -07:00
Mathieu Bastian d4bd6896b6 Workaround for MNBMODULE-215 2013-08-18 18:04:55 -07:00
Mathieu Bastian 076e9dde7f A few more version upgrade 2013-08-18 17:59:47 -07:00
Mathieu Bastian 3af6a89dcd Update a few Maven plugin versions 2013-08-18 17:52:13 -07:00
Mathieu Bastian 30a10531f6 Debug Appearerance and implement apply button 2013-08-18 16:58:56 -07:00
Mathieu Bastian 70d8a4b766 Ranking and interpolation work in progress 2013-08-18 16:31:04 -07:00
Mathieu Bastian 93e8d2f1cc Work on appearance ranking, add Ranking object 2013-08-18 16:30:10 -07:00
Mathieu Bastian d99e990ef2 Debug AppearanceUI events 2013-08-18 16:29:20 -07:00
Mathieu Bastian 0f392cfb57 Add appearance control toolbar 2013-08-18 16:28:46 -07:00
Mathieu Bastian 9a99053130 Allow setting control points on spline editor 2013-08-18 16:27:32 -07:00
Mathieu Bastian 4608208d8e Debugging in ImportAPI and ImportPlugin 2013-08-18 15:00:27 -07:00
Mathieu Bastian 4df863a221 Add funnel image in DesktopAppearance 2013-08-18 14:59:55 -07:00
Mathieu Bastian db61bb4ac0 Remove target folder in AppearancePluginUI 2013-08-18 14:59:37 -07:00
Mathieu Bastian 23cb8c875f Move SplineEditor to UIComponents 2013-08-18 14:56:45 -07:00
Mathieu Bastian 2b9df0f666 Debug edge functions 2013-07-29 08:03:56 -07:00
Mathieu Bastian 9ead548b8e Debug Appearance UI 2013-07-28 22:50:40 -07:00
Mathieu Bastian a516fac1c3 Fix attribute value import in GEXF 2013-07-28 19:29:25 -07:00
Mathieu Bastian 3ecaa139a6 Implement appearance center panel system for partition 2013-07-28 19:24:35 -07:00
Mathieu Bastian 8743d446d2 Implement category and transformer toolbar system 2013-07-23 08:05:46 -07:00
Mathieu Bastian 0299ef4031 Fix text refresh performance issue 2013-07-21 14:32:18 -07:00
Mathieu Bastian 77ec95b76d Update JOGL version 2013-07-21 14:32:08 -07:00
Mathieu Bastian 2d49376813 Remove Partition modules and replace them with work in progress on appearance modules 2013-07-21 14:31:22 -07:00
Mathieu Bastian 9b4ffe4ad3 Fix databridge edge array grow issue 2013-06-10 23:39:13 -07:00
Mathieu Bastian 1841a0dde6 Fix arrow display issue 2013-06-10 23:38:59 -07:00
Mathieu Bastian f79e56880d Using Newt canvas as default 2013-06-10 23:38:47 -07:00
Mathieu Bastian e343581ea4 Using latest JOGL dev version due to window positioning issue 2013-06-10 23:38:10 -07:00
Mathieu Bastian 36327abc0b Debug perspective controller 2013-06-08 15:31:32 -07:00
Mathieu Bastian 133d787f12 Visualization animator 2013-06-08 15:31:17 -07:00
Mathieu Bastian d419d857b4 Experiment NEWT renderer 2013-06-08 15:31:03 -07:00
Mathieu Bastian b247f7e310 Fix ZipFile compile issue with Java 1.6 2013-05-30 23:14:44 -07:00
Mathieu Bastian ef1695fe59 Fix node border issue 2013-05-30 18:40:01 -07:00
Mathieu Bastian 8a168364ff Add snapshots repo for GraphAPI to pull graph-store 2013-05-30 18:39:43 -07:00
Mathieu Bastian 8b3e6c75fd Disable snapshots for netbeans and thirdparty repositories 2013-05-30 18:38:39 -07:00
Mathieu Bastian f2d01585c7 Minor debug 2013-05-27 23:15:45 -07:00
Mathieu Bastian 795eb453ce Add Preview export modules back 2013-05-27 18:25:21 -07:00
Mathieu Bastian 1bc40b4dfc Rename Processing to G2D 2013-05-27 17:14:33 -07:00
Mathieu Bastian e4fb5b4fcf Remove ProcessingApplet 2013-05-27 17:02:57 -07:00
Mathieu Bastian 851507afeb Setup preview zoom buttons 2013-05-27 17:01:59 -07:00
Mathieu Bastian 6e1f812846 Preview sketch mouse events 2013-05-27 16:48:39 -07:00
Mathieu Bastian 4afd75b332 Add @Override annotation in DesktopPreview 2013-05-27 13:14:15 -07:00
Mathieu Bastian 9bef9d46d7 Enable ProcessingGraphics resize and repaint 2013-05-27 13:10:35 -07:00
Mathieu Bastian b4ade84641 Update to NB Platform 7.3 2013-05-27 11:16:24 -07:00
Mathieu Bastian 54b6662663 Add Export and Preview dependence in gephi-app 2013-05-27 11:15:54 -07:00
Mathieu Bastian c7f95f1bf9 Add Preview modules and removed Processing dependency 2013-05-27 11:15:33 -07:00
Mathieu Bastian 2b2721f795 Update ExportPlugin code to the new GraphAPI 2013-05-25 19:21:46 -07:00
Mathieu Bastian 509d6baf8f ReportPanel UI fixes 2013-05-25 19:21:16 -07:00
Mathieu Bastian 84e721aa6b Add @Override annotations in ExportAPI 2013-05-25 19:20:56 -07:00
Mathieu Bastian dd1ed43235 Remove hierarchy export checkboxes in ExportPluginUI 2013-05-25 19:20:28 -07:00
Mathieu Bastian 56b65b1d9f Debug in ImportContainerImpl 2013-05-25 19:18:55 -07:00
Mathieu Bastian 3955dfbf42 Add text column getters in VisualizationAPI 2013-05-25 19:18:04 -07:00
Mathieu Bastian c9e397ba43 Merge branch 'master' of github.com:gephi/gephi 2013-05-18 20:03:42 -07:00
Mathieu Bastian 27e9ae02ac Rename transformer builder 2013-05-18 20:03:21 -07:00
Mathieu Bastian 5c89726fc3 Debug ReportPanel graph type selection 2013-05-18 20:03:01 -07:00
Mathieu Bastian f217730682 Update Ranking modules to the new API and add to project 2013-05-18 20:02:31 -07:00
Mathieu Bastian 83452510e1 Merge pull request #773 from ZiyaoWei/master
Bug fix for Issue #320.
2013-05-18 19:11:47 -07:00
Mathieu Bastian 4ffa88d58c Append timestamp and dynamic attributes in processor 2013-05-18 12:59:04 -07:00
Mathieu Bastian 10aeb80029 Fix TGF importer with new API 2013-05-18 12:58:44 -07:00
Mathieu Bastian d1f6cd6b40 Add dynamic value getters in ElementDraft 2013-05-18 12:58:26 -07:00
Mathieu Bastian 297fe912af Add edgeExists in container loader 2013-05-18 12:58:02 -07:00
Mathieu Bastian af722fae5e Add dynamic attribute label in report panel 2013-05-18 12:57:25 -07:00
Mathieu Bastian 5086cce845 Merge branch 'master' of github.com:gephi/gephi 2013-05-18 12:35:30 -07:00
Sébastien Heymann c071086d9b Merge pull request #742 from rlfnb/master
added trivial graph format to the list of importers
2013-05-16 13:56:48 -07:00
Sébastien Heymann 68e7822ea5 Merge pull request #703 from andygarcia/master
Fix issue #699: Reset size defaults to 10.0, not 1.0
2013-05-16 13:55:45 -07:00
Sébastien Heymann 69ccc43101 Merge pull request #774 from annaalkh/master
Fix issue #680
2013-05-16 13:53:18 -07:00
Mathieu Bastian acbe4bcaf9 Set dynamic attribute values in ElementDraft 2013-05-15 07:57:45 -07:00
Mathieu Bastian 017f801f88 Add dynamic attribute support in ImportAPI 2013-05-14 23:45:56 -07:00
Mathieu Bastian f4888f5d46 Minor fix on ReportPanel 2013-05-14 23:45:23 -07:00
Mathieu Bastian 9852ec5bda Report panel UI fixes 2013-05-13 18:33:33 -07:00
Mathieu Bastian acb1ceba7f Remove self-loop in close container 2013-05-13 18:33:19 -07:00
Mathieu Bastian f61e469c9a Update Netbeans Maven repository URL to avoid cookie rejected issues 2013-05-13 18:31:11 -07:00
Mathieu Bastian 683c30ce39 Add more options in the import report panel 2013-05-12 22:35:22 -07:00
Mathieu Bastian b66ff8cae2 Fix typo update 2013-05-12 22:35:02 -07:00
Mathieu Bastian 9bb97e2454 Fix typo 2013-05-12 22:34:05 -07:00
Mathieu Bastian d9c9522e1e Merge branch 'master' of github.com:gephi/gephi 2013-05-12 12:06:20 -07:00
Mathieu Bastian db459ff9f9 Add bytes graph persistence provider using GraphStore's serialization 2013-05-12 10:48:44 -07:00
Mathieu Bastian 2aa35be755 Add support for bytes workspace persistence provider data 2013-05-12 10:48:19 -07:00
Mathieu Bastian 5b00186710 Separate project zip file into multiple entries, one for the project and one for each workspace. Improve error handling. 2013-05-11 20:51:53 -07:00
Mathieu Bastian 0ad61139c5 Minor reformatting 2013-05-11 17:05:04 -07:00
Mathieu Bastian 39a99e5856 Cleanup and minor fixes on Project API. Add localization for project and workspace prefixes, as well as auto increment counters. 2013-05-11 17:04:37 -07:00
Mathieu Bastian cbdce1c18f Add custom XMLChar class to avoid XML Sun dependency 2013-05-11 17:02:54 -07:00
Mathieu Bastian f28957b9b8 Update LayoutPlugin with new node methods 2013-05-11 14:11:32 -07:00
Mathieu Bastian 68d0488623 Minor tweak 2013-04-29 18:04:03 -07:00
Mathieu Bastian 9b5f8f0b58 Use float buffers for drawable matrices. Reduce memory consumption in myGluProject. 2013-04-29 18:03:20 -07:00
Mathieu Bastian c6af330b52 Fix non EDT execution issue in DesktopImport 2013-04-29 17:36:43 -07:00
annaalkh 07d67961b8 Fix issue #750 2013-04-24 23:26:05 +04:00
Mathieu Bastian ae6074f3af Data bridge clearing 2013-04-23 08:47:55 -07:00
Mathieu Bastian 5afef61125 Display node labels 2013-04-23 08:25:31 -07:00
Mathieu Bastian b5948fc750 Minor debugging 2013-04-23 08:25:10 -07:00
Mathieu Bastian e6f79529a9 Visualization implementation debug 2013-04-22 10:43:52 -07:00
Mathieu Bastian c9e0742720 Fix LayoutPlugin getStoreId 2013-04-22 10:43:20 -07:00
Mathieu Bastian b3d11ae86b Visualization debug 2013-04-20 23:48:46 -07:00
Mathieu Bastian 21bea2bea7 Fix node and edge color issues 2013-04-20 22:29:28 -07:00
Mathieu Bastian 46ee327fc6 Node radius fix 2013-04-20 16:09:06 -07:00
Mathieu Bastian 5eda676d97 Fix edge display 2013-04-20 16:08:29 -07:00
Mathieu Bastian 143635f90b Integrate arrows in edges models 2013-04-20 16:07:50 -07:00
Mathieu Bastian cc37a02844 Octree and node reposition debug 2013-04-18 08:30:28 -07:00
ZiyaoWei c30f743f85 Issue #320 Fix broken DOT parser: The original parser will ignore single node, which would make the parser confused when parsing the rest of the file. 2013-04-17 23:29:24 -04:00
Mathieu Bastian 8fb939bfed Minor fixes 2013-04-17 00:08:44 -07:00
Mathieu Bastian 14d32a80c2 Debugging in VisualizationImpl 2013-04-16 23:55:14 -07:00
Mathieu Bastian 8e350df215 Fix issue in default processor with mixed graphs 2013-04-16 23:54:58 -07:00
Mathieu Bastian 3d12ba9b88 Update some Tools to the new GraphAPI 2013-04-16 23:54:46 -07:00
Mathieu Bastian 3fa18e67d4 More @Override annotation 2013-04-16 23:54:26 -07:00
Mathieu Bastian bc05917012 Add @Override annotation across the board 2013-04-16 23:53:32 -07:00
Mathieu Bastian d2af0fbca1 Update the AlgorithmsPlugin to the new Graph API 2013-04-16 23:51:10 -07:00
Mathieu Bastian 431fc592f2 Include ToolsAPI in POM 2013-04-16 00:08:52 -07:00
Mathieu Bastian 9f5857a96f Migrate Visualization to JOGL2. 2013-04-16 00:08:39 -07:00
Mathieu Bastian 0f0da1be77 Minor debug with graph visible 2013-04-15 17:51:57 -07:00
Mathieu Bastian 1b4080c7af Temporarily disable some modules on POM 2013-04-15 17:39:01 -07:00
Mathieu Bastian e59b7ccf01 Refactor and simplify the Visualization module. Update to the new Graph API. 2013-04-15 17:37:58 -07:00
Mathieu Bastian 7b36dbfe02 Comment some DynamicAPI code and update UIUtils to new attributes API 2013-04-15 17:37:17 -07:00
Mathieu Bastian baec9199a9 Minor debugging 2013-04-15 17:36:33 -07:00
Mathieu Bastian 1c2f686d48 Add TimeFormat in ImportAPi 2013-04-15 17:36:07 -07:00
Mathieu Bastian 24098f8bdc Add Context refresh thread in DesktopContext 2013-04-15 17:35:40 -07:00
Mathieu Bastian 5398cd1dda Fix bug when launching without Timelime component 2013-04-15 08:40:39 -07:00
Mathieu Bastian 7a3e579f7a Comment out dynamic graph generation. 2013-04-15 08:40:07 -07:00
Mathieu Bastian be4c42e229 Add GraphController @ServiceProvider annotation 2013-04-15 08:39:45 -07:00
Mathieu Bastian 0e3facf787 Comment out text dimensions in LabelAdjust 2013-04-15 08:39:14 -07:00
Mathieu Bastian 865db80e51 Comment out the Dynamic support in Processor. 2013-04-15 08:37:25 -07:00
Mathieu Bastian 396a5f8666 Use the new TimeFormat from ImportAPI and replace usage of AttributeUtils by the new setValueString method to parse values. 2013-04-15 08:36:28 -07:00
Mathieu Bastian c34d0ea9c3 Add setValueString to parse attribute values automatically in ImportAPI. 2013-04-15 08:35:02 -07:00
Mathieu Bastian 9057c563e2 Remove old Attributes API from DataLaboratoryAPI 2013-04-15 08:34:14 -07:00
Mathieu Bastian 0c962cf783 Update DesktopImport to the new Graph API. Remove hierarchical graph support and enable crash reports on imports. 2013-04-15 08:33:34 -07:00
Mathieu Bastian 4104a2e7b8 Update DesktopContext to the new Graph API. Remove pie chart. 2013-04-15 08:32:12 -07:00
annaalkh f031ff6b63 Merge branch 'master' of git://github.com/gephi/gephi 2013-04-12 21:48:32 +04:00
Mathieu Bastian b9d67a895d Update ProcessorPlugin to the latest API 2013-04-09 23:03:52 -07:00
Mathieu Bastian 223da54ac5 Minor changes on ImportAPI 2013-04-09 23:03:35 -07:00
Mathieu Bastian 1fb3fd0726 Remove dynamic processor in ProcessorPlugin 2013-04-09 23:03:12 -07:00
Mathieu Bastian 310efb3522 POM dependencies fies 2013-04-09 23:02:47 -07:00
Mathieu Bastian 3a48a5c87e Update and refactor ImportAPI for new GraphAPI. Update file importers. 2013-04-06 18:12:00 -07:00
Mathieu Bastian 3ebffd4807 Update LayoutAPI and LayoutPlugin to new GraphAPI 2013-04-06 18:10:45 -07:00
Mathieu Bastian 5e7eb963aa Remove YifanHUMultilevel layout algorithm 2013-04-06 18:09:54 -07:00
Mathieu Bastian 5b70b184b1 Remove GraphAPI and DHNSGraph and add GraphStore dependency 2013-04-06 18:08:54 -07:00
Sébastien Heymann 240f4a5ccf fix bug #767 2013-04-02 21:41:29 +03:00
Mathieu Bastian 70c4f5fee2 Merge pull request #764 from bfontaine/master
Two links fixed in the README
2013-03-23 12:16:21 -07:00
Baptiste Fontaine e4ac375e15 Fixed Plugins Quick Start link. 2013-03-15 00:43:39 +01:00
Baptiste Fontaine ab62a6bede Correct Javadoc link. 2013-03-15 00:38:25 +01:00
Eduardo Ramos 1ab13abd05 Fix project files saving and loading when in toolkit. 2013-03-13 22:20:03 +01:00
annaalkh 09decb6804 Fix issue #680 2013-03-08 00:47:57 +04:00
Ralf Neeb 0fa6e99a3f added trivial graph format support 2013-01-29 21:44:08 +01:00
Eduardo Ramos dd10de286c Fix attribute delegate providers type mismatch mechanism. (Issue #707) 2013-01-20 21:02:23 +01:00
Mathieu Bastian 930a4d3364 Update Branding 2013-01-13 14:20:44 -08:00
Mathieu Bastian b4ed125b9f Update all versions to 0.9-SNAPSHOT 2013-01-13 14:10:13 -08:00
Mathieu Bastian 4ad80ff76e Merge branch 'master' of github.com:gephi/gephi 2013-01-09 08:34:18 -08:00
Mathieu Bastian ee3bff1ec9 Set DBDrivers dependencies as compile #720 2013-01-09 08:33:07 -08:00
Eduardo Ramos 80fcd3fd23 Merge branch 'master' of github.com:gephi/gephi 2013-01-04 23:28:54 +01:00
Eduardo Ramos abc058d404 Use gephi version name in windows default install folder to avoid overwriting old installed version. 2013-01-04 23:27:13 +01:00
Mathieu Bastian 24a797be13 Fix release-extra POM 2013-01-02 16:27:34 -08:00
Eduardo Ramos f946cb3289 Pulled latest translations from tranxifex. 2013-01-01 22:20:57 +01:00
Eduardo Ramos 1b0ca6dc39 Update translation resources 2012-12-31 02:09:24 +01:00
Eduardo Ramos 97199a3e43 Replace icon for new netbeans-generated gephi64.exe launcher in release-windows profile. 2012-12-31 00:14:51 +01:00
Eduardo Ramos 635b6f4284 Fix in PreviewModelImpl 2012-12-30 23:01:50 +01:00
Mathieu Bastian 0bca238f9c Configure updates path for release profile 2012-12-29 12:19:18 +01:00
Mathieu Bastian c72846a35e Update maven plugin versions and avoid deploy twice for assembly artifacts 2012-12-29 12:02:47 +01:00
Mathieu Bastian 9194c27d62 Configure apidocs and updates path for release 2012-12-29 11:32:47 +01:00
Mathieu Bastian c6a2e7d31c POM repository url properties 2012-12-29 11:18:40 +01:00
Mathieu Bastian 85a4e3325d POM fix 2012-12-29 10:53:57 +01:00
Mathieu Bastian 810602a62d Assembly fix 2012-12-29 10:21:08 +01:00
Mathieu Bastian b8bd3bb214 Debug inherited 2012-12-28 17:42:29 +01:00
Mathieu Bastian 7669105933 Javadoc and sources POM tweaks 2012-12-28 17:27:46 +01:00
Mathieu Bastian 16611286ec Bump nbm plugin version 2012-12-28 15:45:21 +01:00
Mathieu Bastian 3f219e903c Avoid JAR in gephi-app 2012-12-28 15:45:05 +01:00
Mathieu Bastian 41062bd4ab Remove duplicated zip attach in application POM 2012-12-28 13:58:42 +01:00
Mathieu Bastian 62ad2c6eb5 Remove java.net repository as now included in nexus proxy 2012-12-28 12:14:36 +01:00
Mathieu Bastian ac91e04884 Separate javadoc aggregate and parent assembly to another profile 2012-12-28 11:31:19 +01:00
Mathieu Bastian 42b0f6f9b5 Pom fixes 2012-12-27 09:55:30 +01:00
Mathieu Bastian 92727e6469 Merge pull request #698 from shepdl/master
Fix #697: Exporting SVG file throws DomException due to invalid stroke-widths.
2012-12-26 00:14:37 -08:00
Mathieu Bastian 1758293a0c Formatting 2012-12-26 09:11:35 +01:00
Mathieu Bastian ecc7fe12dc Merge pull request #711 2012-12-26 09:07:59 +01:00
Mathieu Bastian 1eeb8b6a4f Signing and Maven requirements 2012-12-26 09:05:39 +01:00
Eduardo Ramos 542cfa4c7a Add ant target to release-windows profile that replaces Windows launcher icon with our own icon 2012-12-23 00:16:27 +01:00
Jacobien Carstens 26c437105d Fixed bug #176 Duplicating filter works now 2012-12-18 13:10:59 +11:00
Andy Garcia a37ff1aed0 Fix issues #699: Reset size tool and its dialog now default to 10.0 for node size, not 1.0. 2012-12-13 13:36:06 -05:00
shepdl 1e6b9849ac Fix issue #697: Exporting SVG File throws DomException due to invalid stroke-widths. 2012-12-11 09:43:25 -08:00
Eduardo Ramos 418f0a7fee Add license file for InnoSetup installer script 2012-12-10 23:39:05 +01:00
Mathieu Bastian a5136f4083 Remove xml-apis dependency which duplicate with default jdk 2012-12-10 08:55:59 -08:00
Eduardo Ramos ff65a9edaa Include preview mouse listeners support and bug fixes implemented in legend project. 2012-12-07 22:27:42 +01:00
Eduardo Ramos 3cef860299 Fix Issue #628 : Spreadsheet export is now able to export hidden columns in data laboratory and is not affected by localization. 2012-12-07 20:28:13 +01:00
Eduardo Ramos ab02babbd8 Allow custom date format in data laboratory create time interval column merge strategy 2012-12-07 18:56:08 +01:00
Eduardo Ramos 8f23ee564b Fix bug in ExporterGEXF 2012-12-07 18:03:53 +01:00
Eduardo Ramos 8e6e2ce55e Fix Issue #691 2012-12-07 18:02:42 +01:00
Mathieu Bastian c376f88ca8 Apply mavenization of Gephi project to trunk, please read http://wiki.gephi.org/index.php/Continuous_Integration for details. 2012-11-18 15:51:22 -08:00
Mathieu Bastian a5a4310644 Update README message 2012-11-18 11:55:35 -08:00
Mathieu Bastian 460ddd7407 Merge branch 'master' of github.com:gephi/gephi 2012-11-18 10:37:38 -08:00
Eduardo Ramos 1daa71b0d3 Fix Issue #616 - Link to nodes feature in data lab now directs the user to Add edge UI if only one node is selected. 2012-11-04 22:34:12 +01:00
Eduardo Ramos 77b973c1a9 Fix Issue #663 (Use toString() instead of String cast in Equal attribute filter) 2012-11-04 21:58:41 +01:00
Mathieu Bastian 2691a96bf6 Bump netbeans version 2012-11-02 23:24:51 -07:00
Mathieu Bastian 0df20c3d6e Merge branch 'master' of github.com:gephi/gephi-maven 2012-11-02 23:03:02 -07:00
Mathieu Bastian 893f599078 Codesign instructions in Mac OS X bundle 2012-11-02 23:02:55 -07:00
Eduardo Ramos 8e0cf5eb27 More fixes for correct dynamic index updates due to attribute events. 2012-11-01 19:41:51 +01:00
Eduardo Ramos d818ed3c43 Fix Issue #679 2012-11-01 03:04:01 +01:00
Eduardo Ramos c13ff9e39a Fix Issue #686 2012-11-01 01:53:35 +01:00
Eduardo Ramos ae2c66f737 Fix preferences for last commit. 2012-11-01 01:40:50 +01:00
Eduardo Ramos a5ac72e43d Implement Convert column to dynamic in data laboratory (Issue #619) + some fixes in Dynamic Model. 2012-11-01 01:37:42 +01:00
Eduardo Ramos 569eaf8af0 Fix for column replacement in attributes API 2012-10-31 00:06:29 +01:00
Eduardo Ramos e9b20ac529 Rename Validation API artifact for old plugins. 2012-10-30 22:58:30 +01:00
Eduardo Ramos ee9e693bb7 Fix Issue #631 (Accept 'Infinity' in dynamic intervals ignoring letters case). 2012-10-28 19:39:37 +01:00
Eduardo Ramos a24452bfd8 Fix Issue #664 (add missing license headers) 2012-10-28 19:16:22 +01:00
Eduardo Ramos 408b47f3f8 Review Project serialization with some fixes and documentation. 2012-10-28 19:04:31 +01:00
Eduardo Ramos 357672ff4d Change some artifact names in order to be able to install old plugins (nbms dependencies names have to match).
Update modules specification version to 0.8.2
2012-10-28 02:55:09 +01:00
Eduardo Ramos 3dad51bc9d Make attributes API friendly to adding columns with different ids but the same title.
Fix dynamic average degree column title.
2012-10-28 00:05:55 +02:00
Mathieu Bastian 3102fc9be5 Override thirdparty update center url to avoid 404 error in nightly build 2012-10-25 08:46:56 -07:00
Mathieu Bastian a7480870ac Fix README typos 2012-10-23 08:36:45 -07:00
Mathieu Bastian 3ff58b88e0 Merge pull request #671 from bradh/master
Minor documentation fixes
2012-10-23 08:35:13 -07:00
Mathieu Bastian 96c33c0aad Fix localization integration 2012-10-22 21:02:04 -07:00
Eduardo Ramos 8406d5ac6f Remove UseCompressedOops option for 32 bit JVM. 2012-10-21 21:58:47 +02:00
Mathieu Bastian 4b6d6a175c Update splash.gif 2012-10-21 12:46:47 -07:00
Mathieu Bastian 6dd61b1fb0 Merge branch 'master' of github.com:gephi/gephi-maven 2012-10-19 18:23:13 -07:00
Mathieu Bastian df73f31cb3 JVM options 2012-10-19 18:23:00 -07:00
Mathieu Bastian a020fff6be JVM options fix 2012-10-19 18:18:15 -07:00
Mathieu Bastian a946ef1d9c JVM options 2012-10-19 18:17:08 -07:00
Mathieu Bastian ad28029706 Speed up the build by using parallel builds, one thread per cpu 2012-10-19 18:10:13 -07:00
Eduardo Ramos 4634e7217e Debug dynamic parser 2012-10-19 13:26:22 +02:00
Eduardo Ramos 759e056375 Improved parser for dynamic types. Literal strings are now supported. 2012-10-18 19:02:33 +02:00
Eduardo Ramos ccc765d34f Control and log attribute serialization problems. 2012-10-16 23:35:27 +02:00
Eduardo Ramos f61a8e9793 Fix add edge in data laboratory Issue #683 2012-10-16 23:09:01 +02:00
Mathieu Bastian d1f76ded6e Update splash to 0.8.2 2012-10-16 00:04:29 -07:00
Mathieu Bastian e0a446bc46 Unpack localization during prepare-package phase 2012-10-15 23:52:41 -07:00
Mathieu Bastian aeaa23d7e9 Update branding and metadata 2012-10-15 23:35:43 -07:00
Mathieu Bastian 22c58489a7 Fix nightly build link 2012-10-15 23:03:45 -07:00
Mathieu Bastian 8ee85137a0 Remove version in external and separate to profiles 2012-10-13 20:32:46 -07:00
Mathieu Bastian 7e43adaf80 Updates and apidocs location 2012-10-13 18:22:11 -07:00
Mathieu Bastian a8d9686f95 Better major version detection 2012-10-13 18:17:41 -07:00
Mathieu Bastian 76387e918b Main version 2012-10-13 18:16:55 -07:00
Mathieu Bastian cbc252297f Formatting 2012-10-13 18:15:24 -07:00
Mathieu Bastian faa835ed32 README 2012-10-12 08:39:48 -07:00
Mathieu Bastian 00f23677b6 Fix warning in JOGLNativeInstaller 2012-10-12 00:11:36 -07:00
Mathieu Bastian dc091c5849 Exclude batik dependencies from flamingo 2012-10-11 23:44:42 -07:00
Mathieu Bastian ce0e9a69a9 Dependency to core-library-wrapper 2012-10-11 23:36:01 -07:00
Mathieu Bastian 64463f8e6c Typo in startup param 2012-10-11 23:35:45 -07:00
Mathieu Bastian 48cc183263 Add key in Info.plist for retina display on Mac OS X 2012-10-11 22:47:45 -07:00
Mathieu Bastian 7cf6000e18 Clean old file 2012-10-11 22:47:22 -07:00
Mathieu Bastian 98b31c955f Check for updates every day 2012-10-11 22:47:12 -07:00
Mathieu Bastian b5db9996ab Add core and ui library wrapper modules. Update module dependencies. 2012-10-11 21:57:10 -07:00
Mathieu Bastian 5c635bb6ca Remove jfreechart and commons wrappers 2012-10-11 21:55:51 -07:00
Mathieu Bastian 1754417b85 Merge branch 'master' of github.com:gephi/gephi-maven 2012-10-11 10:58:39 -07:00
Mathieu Bastian 306adefd0f Debug 2012-10-10 23:28:00 -07:00
Mathieu Bastian 5983869d7f Only unpack localization zip in deployment profile 2012-10-10 22:32:21 -07:00
Mathieu Bastian 625495f5dc Centralize commons and jfreechart dependencies in new wrapper modules. Add swinglabs and other librairies as public packages in UI Components. Reduce the number of librariries dependencies. 2012-10-10 22:32:02 -07:00
Eduardo Ramos 098a260c64 Move translations scripts to a new folder 2012-10-10 18:59:41 +02:00
Mathieu Bastian 5778417458 Fix missing netbeans dependencies 2012-10-10 08:36:02 -07:00
Mathieu Bastian 86ce44ba55 Set up dependency management in parent pom to avoid explicit versions in child POMs. 2012-10-09 23:44:54 -07:00
Mathieu Bastian 99fdd776e0 NBM config 2012-10-09 23:07:11 -07:00
Mathieu Bastian e5d13c0203 Add nbm settings 2012-10-09 22:59:25 -07:00
Mathieu Bastian 298aca0d5b Fix typos 2012-10-09 22:58:54 -07:00
Mathieu Bastian c51a160ab2 Fix indentation 2012-10-09 22:58:45 -07:00
Mathieu Bastian 373c35bc79 Add licences 2012-10-09 22:58:16 -07:00
Mathieu Bastian 6bfc371fdc Remove unused property 2012-10-08 08:06:39 -07:00
Eduardo Ramos cd0ea5221f Adapt translation related scripts and configure translations for mavenized repository. 2012-10-07 19:28:01 +02:00
Mathieu Bastian c881cd267f README toolkit 2012-10-05 08:36:28 -07:00
Mathieu Bastian 9d3541085a Merge branch 'master' of github.com:gephi/gephi-maven 2012-10-04 22:10:06 -07:00
Mathieu Bastian 61ce299b06 Try different sources setting to attach and deploy sources artifacts 2012-10-04 22:09:56 -07:00
Eduardo Ramos 0aad688d16 Move branding Bundle.properties to correct folder. 2012-10-04 20:45:52 +02:00
Eduardo Ramos befb397071 Merge branch 'master' of github.com:gephi/gephi-maven 2012-10-04 19:31:24 +02:00
Eduardo Ramos 949c78e4c0 Fix gephi.update.center.thirdparty.url 2012-10-04 19:30:41 +02:00
Mathieu Bastian 2a7bd148ae Remove nbm type dependency 2012-10-03 23:15:52 -07:00
Mathieu Bastian 3e512a8fee Add assmbly plugin to pluginManagement 2012-10-03 18:53:06 -07:00
Mathieu Bastian da7b035d36 Remove unused dependency 2012-10-03 08:41:10 -07:00
Mathieu Bastian bffc9b648c Update plugin versions and clean unused 2012-10-03 08:22:17 -07:00
Mathieu Bastian 566ac791c9 Fix README 2012-10-03 08:04:42 -07:00
Mathieu Bastian 4934ac0fd6 Overview HTML fix 2012-10-02 23:57:03 -07:00
Mathieu Bastian f727bc1642 Update overview style 2012-10-02 22:55:17 -07:00
Mathieu Bastian 78f6f3105e Add javadoc and sources to nightly builds 2012-10-02 18:38:56 -07:00
Mathieu Bastian f9136081a4 Clean stylesheet 2012-10-02 18:27:22 -07:00
Mathieu Bastian bdf6b20b2a Javadoc default stylesheet 2012-10-02 18:25:54 -07:00
Mathieu Bastian b65651d29b Try latest javadoc plugin version to fix doclet issue 2012-10-02 09:24:38 -07:00
Mathieu Bastian 5b6dd5648a Update README 2012-10-02 08:52:32 -07:00
Mathieu Bastian 1ee73a5aaf Update README 2012-10-02 08:44:42 -07:00
Mathieu Bastian abfa850163 Add README 2012-10-01 23:57:02 -07:00
Mathieu Bastian 8d41db01d8 Update testing repository URL 2012-10-01 23:56:52 -07:00
Mathieu Bastian 245434de18 Documentation 2012-10-01 20:52:17 -07:00
Mathieu Bastian 1ee91ec0d3 Update to latest localization file 2012-10-01 20:51:47 -07:00
Mathieu Bastian f030b6f9ce Push latest commits on gephi repository 2012-10-01 20:30:49 -07:00
Eduardo Ramos b69395c3a9 Some Javadoc for Renderable and TextData 2012-09-26 21:08:37 +02:00
Brad Hards 4434ff4487 Fix some README typos. 2012-09-15 11:28:19 +10:00
Mathieu Bastian 409302299b Fix Javadoc wagon includes 2012-08-19 14:25:37 -07:00
Mathieu Bastian e302638077 Add last commit 2012-08-19 12:46:12 -07:00
Mathieu Bastian 564acfb4fa Add reactor plugin 2012-08-19 12:45:59 -07:00
Mathieu Bastian 73b4730c4a Upload javadoc 2012-08-13 17:50:44 -07:00
Mathieu Bastian 0bbe484b0c Updates location 2012-08-13 17:48:40 -07:00
Mathieu Bastian 1cae117a23 Generate javadoc and sources 2012-08-02 08:29:21 -07:00
Mathieu Bastian 016648903e Debug windows artifact 2012-07-31 21:57:11 -07:00
Mathieu Bastian 372e79c738 Debug 2012-07-31 20:31:04 -07:00
Mathieu Bastian 75237b89f4 Adding the ability to independently create windows and compressed dmg artifacts 2012-07-31 19:57:00 -07:00
Mathieu Bastian fb7f2621df Fix spec version 2012-07-31 08:22:13 -07:00
Mathieu Bastian 1dab2cb3b6 Work on windows installer and fix gephi.conf 2012-07-30 09:01:40 -07:00
Mathieu Bastian 15442be80d Fix symbolic links in dmg 2012-07-30 08:24:55 -07:00
Mathieu Bastian 0fb90a528a Debug wagon upload serverId 2012-07-29 23:29:48 -07:00
Mathieu Bastian ee9f42be38 Debug dmg filename 2012-07-29 22:31:07 -07:00
Mathieu Bastian 5883056b47 Debug linux dmg 2012-07-29 22:10:31 -07:00
Mathieu Bastian 4b67c38e5f Add custom specification version support 2012-07-29 19:57:10 -07:00
Mathieu Bastian 83d315cf0c Update to latest sources 2012-07-25 19:45:24 -07:00
Mathieu Bastian b42417a3f0 Add filtering for autoupdate URLs 2012-07-23 22:51:38 -07:00
Mathieu Bastian 41f82f6484 Documentation 2012-07-23 21:47:13 -07:00
Mathieu Bastian e401428610 Add app title in parent pom 2012-07-23 21:46:44 -07:00
Mathieu Bastian 4ee4857c0e Automate application title in branding 2012-07-23 21:45:05 -07:00
Mathieu Bastian 4377d04fb5 Symlink task optional 2012-07-19 22:46:45 -07:00
Mathieu Bastian e1762d9aee Fix broken dependency 2012-07-19 22:17:37 -07:00
Mathieu Bastian dc93a09e93 Fix Javadoc generation and documentation 2012-07-19 21:05:17 -07:00
Mathieu Bastian aa251f940a Working on the Javadoc generation 2012-07-15 17:18:46 -07:00
Mathieu Bastian da0fd339f2 Fix poms 2012-07-15 12:43:39 -07:00
Mathieu Bastian 9b2079668f Add dmg and correct zip to artifacts and use wagon plugin to upload update center 2012-07-15 11:17:33 -07:00
Mathieu Bastian ff1ae68c1c Add snapshot to modules version 2012-07-14 20:25:35 -07:00
Mathieu Bastian de8c087fd0 Debug pom 2012-07-14 19:15:24 -07:00
Mathieu Bastian 1ab845fe12 Customize install artifacts 2012-07-14 18:57:52 -07:00
Mathieu Bastian f5161a55ac Update parent POM version 2012-07-14 18:01:26 -07:00
Mathieu Bastian 3ede3af94a Fix keystore location 2012-07-14 16:22:03 -07:00
Mathieu Bastian bdc1f92bd8 Skip tests in normal build mode 2012-07-14 16:04:21 -07:00
Mathieu Bastian 9f813b5500 Add keystore support for nbms 2012-07-14 15:42:59 -07:00
Mathieu Bastian 4935d58946 Trying out with Netbeans installers 2012-07-14 11:25:55 -07:00
Mathieu Bastian b88b7e2a03 Disable standalone-zip during normal package phase and create release profile 2012-07-12 08:51:49 -07:00
Mathieu Bastian c7b4fa002c Create OS X application bundle 2012-07-11 21:31:08 -07:00
Mathieu Bastian 3c13058c33 Clean pom 2012-07-11 08:36:54 -07:00
Mathieu Bastian 84bba149f4 Download and unpack localization JARs during branding 2012-07-11 08:36:26 -07:00
Mathieu Bastian b18bd02d3d Update gephi repostory url and add dependency-plugin 2012-07-11 08:36:01 -07:00
Mathieu Bastian 8d1c63c22c Use project.version variable in gephi.conf 2012-07-10 23:56:35 -07:00
Mathieu Bastian 69e7a7b1cd Moving things around and working on poms 2012-07-10 22:07:59 -07:00
Mathieu Bastian 8b07bc8d97 Debug poms 2012-07-10 08:41:46 -07:00
Mathieu Bastian e9ba8cde2a Add missing Bundle.properties for JOGL installer 2012-07-10 08:41:34 -07:00
Mathieu Bastian 67a820003d Working on the parent pom to add properties and automate builds. Cleaning modules pom. 2012-07-10 00:00:13 -07:00
Mathieu Bastian 64b97a17b9 Initial import 2012-07-08 18:11:58 -07:00
Mathieu Bastian f4fdf2c4b7 Merge branch 'master' of github.com:gephi/gephi 2012-07-08 10:36:02 -07:00
Mathieu Bastian f2934accc0 Improve dynamic set interval responsivness 2012-07-07 19:02:57 -07:00
8802 arquivos alterados com 188419 adições e 227494 exclusões
+99 -9
Ver Arquivo
@@ -1,11 +1,101 @@
**/build
**/nbproject/private
**/nbproject/platform.properties
nbproject/project.properties
**/dist
**/target
.DS_Store
toolkit
keystore.ks
dist/**
build/**
nbproject/private/**
/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/
+883 -795
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-8
Ver Arquivo
@@ -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>
-5
Ver Arquivo
@@ -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.1
-45
Ver Arquivo
@@ -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>
-8
Ver Arquivo
@@ -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
-6
Ver Arquivo
@@ -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
-55
Ver Arquivo
@@ -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
Ver Arquivo
@@ -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:
# Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-02-29 20\:31+0000\nLast-Translator\: Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>\nLanguage-Team\: Czech (http\://www.transifex.net/projects/p/gephi/language/cs/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: cs\nPlural-Forms\: nplurals\=3; plural\=(n\=\=1) ? 0 \: (n>\=2 && n<\=4) ? 1 \: 2\n
OpenIDE-Module-Long-Description=Z\u00e1kladn\u00ed algoritmy teorie graf\u016f
OpenIDE-Module-Short-Description=Z\u00e1kladn\u00ed algoritmy teorie graf\u016f
@@ -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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-11 00\:30+0000\nLast-Translator\: Siro Kida <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/language/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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 23\:22+0000\nLast-Translator\: C\u00e9lio Faria Jr. <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazil) (http\://www.transifex.net/projects/p/gephi/language/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,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\://github.com/gephi/gephi/issues\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\: Russian (http\://www.transifex.net/projects/p/gephi/language/ru/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ru\nPlural-Forms\: nplurals\=3; plural\=(n%10\=\=1 && n%100\!\=11 ? 0 \: n%10>\=2 && n%10<\=4 && (n%100<10 || n%100>\=20) ? 1 \: 2)\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,10 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-08 00\:21+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Chinese (China) (http\://www.transifex.net/projects/p/gephi/language/zh_CN/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: zh_CN\nPlural-Forms\: nplurals\=1; plural\=0\n
OpenIDE-Module-Long-Description=\u57fa\u672c\u7684\u56fe\u8bba\u7b97\u6cd5
OpenIDE-Module-Short-Description=\u57fa\u672c\u7684\u56fe\u8bba\u7b97\u6cd5
-25
Ver Arquivo
@@ -1,25 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Zbyněk Schwarz <zbynek.schwarz@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-02-29 20:31+0000\n"
"Last-Translator: Zbyněk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/gephi/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "Základní algoritmy teorie grafů"
msgid "OpenIDE-Module-Short-Description"
msgstr "Základní algoritmy teorie grafů"
-25
Ver Arquivo
@@ -1,25 +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://github.com/gephi/gephi/issues\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/language/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"
-25
Ver Arquivo
@@ -1,25 +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://github.com/gephi/gephi/issues\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/language/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"
-25
Ver Arquivo
@@ -1,25 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-11 00:30+0000\n"
"Last-Translator: Siro Kida <kida.siro@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/language/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 "基礎グラフ理論アルゴリズム"
-25
Ver Arquivo
@@ -1,25 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-06 23:22+0000\n"
"Last-Translator: Célio Faria Jr. <celiofariajr@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.net/projects/p/gephi/language/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 "
-25
Ver Arquivo
@@ -1,25 +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://github.com/gephi/gephi/issues\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: Russian (http://www.transifex.net/projects/p/gephi/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "Базовые алгоритмы теории графов"
msgid "OpenIDE-Module-Short-Description"
msgstr "Базовые алгоритмы теории графов"
@@ -1,138 +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.gephi.graph.api.NodeData;
import org.openide.util.Lookup;
/**
*
* @author Mathieu Bastian
*/
public class BellmanFordShortestPathAlgorithm extends AbstractShortestPathAlgorithm {
protected final DirectedGraph graph;
protected final HashMap<NodeData, Edge> predecessors;
protected TimeInterval timeInterval;
public BellmanFordShortestPathAlgorithm(DirectedGraph graph, Node sourceNode) {
super(sourceNode);
this.graph = graph;
predecessors = new HashMap<NodeData, 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.getNodeData(), Double.POSITIVE_INFINITY);
nodeCount++;
}
distances.put(sourceNode.getNodeData(), 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.getNodeData(), edge);
}
}
if (!relaxed) {
break;
}
}
//Check for negative-weight cycles
for (Edge edge : graph.getEdges()) {
if (distances.get(edge.getSource().getNodeData()) + edgeWeight(edge) < distances.get(edge.getTarget().getNodeData())) {
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.getNodeData());
if (edge != null) {
if (edge.getSource().getNodeData() != node.getNodeData()) {
return edge.getSource();
} else {
return edge.getTarget();
}
}
return null;
}
public Edge getPredecessorIncoming(Node node) {
return predecessors.get(node.getNodeData());
}
}
@@ -1,158 +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.gephi.graph.api.NodeData;
import org.openide.util.Lookup;
/**
*
* @author Mathieu Bastian
*/
public class DijkstraShortestPathAlgorithm extends AbstractShortestPathAlgorithm {
protected final Graph graph;
protected final HashMap<NodeData, Edge> predecessors;
protected TimeInterval timeInterval;
public DijkstraShortestPathAlgorithm(Graph graph, Node sourceNode) {
super(sourceNode);
this.graph = graph;
predecessors = new HashMap<NodeData, 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> unsettledNodes = new HashSet<Node>();
Set<NodeData> settledNodes = new HashSet<NodeData>();
//Initialize
for (Node node : graph.getNodes()) {
distances.put(node.getNodeData(), Double.POSITIVE_INFINITY);
}
distances.put(sourceNode.getNodeData(), 0d);
unsettledNodes.add(sourceNode);
while (!unsettledNodes.isEmpty()) {
// find node with smallest distance value
Double minDistance = Double.POSITIVE_INFINITY;
Node minDistanceNode = null;
for (Node k : unsettledNodes) {
Double dist = distances.get(k.getNodeData());
if (minDistanceNode == null) {
minDistanceNode = k;
}
if (dist.compareTo(minDistance) < 0) {
minDistance = dist;
minDistanceNode = k;
}
}
unsettledNodes.remove(minDistanceNode);
settledNodes.add(minDistanceNode.getNodeData());
for (Edge edge : graph.getEdges(minDistanceNode)) {
Node neighbor = graph.getOpposite(minDistanceNode, edge);
if (!settledNodes.contains(neighbor.getNodeData())) {
double dist = getShortestDistance(minDistanceNode) + edgeWeight(edge);
if (getShortestDistance(neighbor) > dist) {
distances.put(neighbor.getNodeData(), dist);
predecessors.put(neighbor.getNodeData(), edge);
unsettledNodes.add(neighbor);
maxDistance = Math.max(maxDistance, dist);
}
}
}
}
graph.readUnlock();
}
private double getShortestDistance(Node destination) {
Double d = distances.get(destination.getNodeData());
if (d == null) {
return Double.POSITIVE_INFINITY;
} else {
return d;
}
}
@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.getNodeData());
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.getNodeData());
}
}
-24
Ver Arquivo
@@ -1,24 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-08 00:21+0000\n"
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/gephi/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "基本的图论算法"
msgid "OpenIDE-Module-Short-Description"
msgstr "基本的图论算法"
-8
Ver Arquivo
@@ -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>
-6
Ver Arquivo
@@ -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
@@ -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:
# Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-02-29 19\:11+0000\nLast-Translator\: Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>\nLanguage-Team\: Czech (http\://www.transifex.net/projects/p/gephi/language/cs/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: cs\nPlural-Forms\: nplurals\=3; plural\=(n\=\=1) ? 0 \: (n>\=2 && n<\=4) ? 1 \: 2\n
OpenIDE-Module-Long-Description=Tyto edito\u0159i vlastnost\u00ed mohou b\u00fdt pou\u017eity pro zobrazen\u00ed rozbalovac\u00edho r\u00e1me\u010dku se sou\u010dasn\u00fdmi sloupci v PropertySheet.
OpenIDE-Module-Short-Description=Poskytnout t\u0159\u00eddu PropertyEditor pro vlastnosti 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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-18 10\:40+0000\nLast-Translator\: Siro Kida <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/language/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
@@ -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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-06 23\:31+0000\nLast-Translator\: C\u00e9lio Faria Jr. <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazil) (http\://www.transifex.net/projects/p/gephi/language/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,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:
# <altsoph@gmail.com>, 2011.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-10-07 06\:10+0000\nLast-Translator\: Altsoph <altsoph@gmail.com>\nLanguage-Team\: Russian (http\://www.transifex.net/projects/p/gephi/language/ru/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ru\nPlural-Forms\: nplurals\=3; plural\=(n%10\=\=1 && n%100\!\=11 ? 0 \: n%10>\=2 && n%10<\=4 && (n%100<10 || n%100>\=20) ? 1 \: 2)\n
OpenIDE-Module-Long-Description=\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0431\u043e-\u0431\u043e\u043a\u0441\u0430 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438 \u0432 PropertySheet
OpenIDE-Module-Short-Description=\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 PropertyEditor \u0434\u043b\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 AttributeColumn
@@ -1,10 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-08 00\:21+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Chinese (China) (http\://www.transifex.net/projects/p/gephi/language/zh_CN/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: zh_CN\nPlural-Forms\: nplurals\=1; plural\=0\n
OpenIDE-Module-Long-Description=\u8fd9\u4e9b\u5c5e\u6027\u7f16\u8f91\u5668\u53ef\u7528\u4e8e\u663e\u793a\u5f53\u524d\u5217\u5728PropertySheet\u4e2d\u7684\u4e00\u4e2aComboBox\u3002
OpenIDE-Module-Short-Description=\u63d0\u4f9bAttributeColumn\u5c5e\u6027\u7684PropertyEditor\u7c7b
@@ -1,25 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Zbyněk Schwarz <zbynek.schwarz@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-02-29 19:11+0000\n"
"Last-Translator: Zbyněk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/gephi/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "Tyto editoři vlastností mohou být použity pro zobrazení rozbalovacího rámečku se současnými sloupci v PropertySheet."
msgid "OpenIDE-Module-Short-Description"
msgstr "Poskytnout třídu PropertyEditor pro vlastnosti AttributeColumn"
@@ -1,25 +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://github.com/gephi/gephi/issues\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/language/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,25 +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://github.com/gephi/gephi/issues\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/language/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,25 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-18 10:40+0000\n"
"Last-Translator: Siro Kida <kida.siro@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/language/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,25 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-06 23:31+0000\n"
"Last-Translator: Célio Faria Jr. <celiofariajr@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.net/projects/p/gephi/language/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,25 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# <altsoph@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-10-07 06:10+0000\n"
"Last-Translator: Altsoph <altsoph@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.net/projects/p/gephi/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "Редакторы свойств могут быть использованы для отображения комбо-бокса с текущими колонками в PropertySheet"
msgid "OpenIDE-Module-Short-Description"
msgstr "Предоставляет класс PropertyEditor для свойств AttributeColumn "
@@ -1,24 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-08 00:21+0000\n"
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/gephi/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "这些属性编辑器可用于显示当前列在PropertySheet中的一个ComboBox。"
msgid "OpenIDE-Module-Short-Description"
msgstr "提供AttributeColumn属性的PropertyEditor类"
-8
Ver Arquivo
@@ -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>
-5
Ver Arquivo
@@ -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.7
AutoUpdate-Essential-Module: true
-45
Ver Arquivo
@@ -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
-6
Ver Arquivo
@@ -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
-59
Ver Arquivo
@@ -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
Ver Arquivo
@@ -1 +0,0 @@
suite.dir=${basedir}/..
@@ -1,602 +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.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import org.gephi.data.attributes.type.*;
import org.openide.util.Exceptions;
/**
* 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 or null if not able to parse given string as the type
* <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 single double:
low = Double.parseDouble(parts[0]);
} catch (Exception ex) {
try {
low = getDoubleFromXMLDateString(parts[0]);
} catch (ParseException ex1) {
return null;//Can't parse as number or date
}
}
try {
//Try first to parse as a single double:
high = Double.parseDouble(parts[1]);
} catch (Exception ex) {
try {
high = getDoubleFromXMLDateString(parts[1]);
} catch (ParseException ex1) {
return null;//Can't parse as number or date
}
}
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]*");
//For trying date parsing:
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static DatatypeFactory dateFactory;
static {
try {
dateFactory = DatatypeFactory.newInstance();
} catch (DatatypeConfigurationException ex) {
}
}
//Throws exception when a date can't be parsed
public static double getDoubleFromXMLDateString(String str) throws ParseException {
try {
return dateFactory.newXMLGregorianCalendar(str.length() > 23 ? str.substring(0, 23) : str).
toGregorianCalendar().getTimeInMillis();
} catch (IllegalArgumentException ex) {
//Try simple format
Date date = dateFormat.parse(str);
return date.getTime();
}
}
}
@@ -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:
# Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-02-29 19\:39+0000\nLast-Translator\: Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>\nLanguage-Team\: Czech (http\://www.transifex.net/projects/p/gephi/language/cs/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: cs\nPlural-Forms\: nplurals\=3; plural\=(n\=\=1) ? 0 \: (n>\=2 && n<\=4) ? 1 \: 2\n
OpenIDE-Module-Long-Description=API vlastnost\u00ed poskytuje p\u0159\u00edstup k hodnot\u00e1m vlastnost\u00ed pomoc\u00ed \u00fa\u010dinn\u00e9ho syst\u00e9mu sloupec/\u0159\u00e1dek.
AttributeOrigin_property=Vlastnost
AttributeOrigin_data=Data
AttributeOrigin_computed_name=Spo\u010d\u00edt\u00e1no
OpenIDE-Module-Short-Description=API pro ukl\u00e1d\u00e1n\u00ed a z\u00edsk\u00e1v\u00e1n\u00ed vlastnost\u00ed
@@ -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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\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/language/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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-29 18\:30+0000\nLast-Translator\: Siro Kida <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/language/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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-05 16\:43+0000\nLast-Translator\: C\u00e9lio Faria Jr. <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazil) (http\://www.transifex.net/projects/p/gephi/language/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,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\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2011-08-04 19\:14+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Russian (http\://www.transifex.net/projects/p/gephi/language/ru/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ru\nPlural-Forms\: nplurals\=3; plural\=(n%10\=\=1 && n%100\!\=11 ? 0 \: n%10>\=2 && n%10<\=4 && (n%100<10 || n%100>\=20) ? 1 \: 2)\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,16 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-08 00\:21+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: Chinese (China) (http\://www.transifex.net/projects/p/gephi/language/zh_CN/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: zh_CN\nPlural-Forms\: nplurals\=1; plural\=0\n
OpenIDE-Module-Long-Description=\u5c5e\u6027\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3\u63d0\u4f9b\u4e86\u4e00\u4e2a\u901a\u8fc7\u6709\u6548\u7684\u5217/\u884c\u7cfb\u7edf\u6765\u8bbf\u95ee\u5c5e\u6027\u503c\u3002
AttributeOrigin_property=\u5c5e\u6027
AttributeOrigin_data=\u6570\u636e
AttributeOrigin_computed_name=\u8ba1\u7b97
OpenIDE-Module-Short-Description=\u7528\u4e8e\u5b58\u50a8\u548c\u63d0\u53d6\u5c5e\u6027\u7684\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3
@@ -1,34 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Zbyněk Schwarz <zbynek.schwarz@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-02-29 19:39+0000\n"
"Last-Translator: Zbyněk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/gephi/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "API vlastností poskytuje přístup k hodnotám vlastností pomocí účinného systému sloupec/řádek."
msgid "AttributeOrigin_property"
msgstr "Vlastnost"
msgid "AttributeOrigin_data"
msgstr "Data"
msgid "AttributeOrigin_computed_name"
msgstr "Spočítáno"
msgid "OpenIDE-Module-Short-Description"
msgstr "API pro ukládání a získávání vlastností"
@@ -1,34 +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://github.com/gephi/gephi/issues\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/language/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,34 +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://github.com/gephi/gephi/issues\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/language/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,34 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-29 18:30+0000\n"
"Last-Translator: Siro Kida <kida.siro@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/language/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,34 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-05 16:43+0000\n"
"Last-Translator: Célio Faria Jr. <celiofariajr@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.net/projects/p/gephi/language/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,34 +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://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2011-08-04 19:14+0000\n"
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.net/projects/p/gephi/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\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,33 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-08 00:21+0000\n"
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/gephi/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid "OpenIDE-Module-Long-Description"
msgstr "属性应用程序接口提供了一个通过有效的列/行系统来访问属性值。"
msgid "AttributeOrigin_property"
msgstr "属性"
msgid "AttributeOrigin_data"
msgstr "数据"
msgid "AttributeOrigin_computed_name"
msgstr "计算"
msgid "OpenIDE-Module-Short-Description"
msgstr "用于存储和提取属性的应用程序接口"
@@ -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,96 +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.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 IntervalTree class.
*
* @author Cezary Bartosiak
*/
public class IntervalTreeTest {
public IntervalTreeTest() { }
@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 testClass() {
System.out.println("Class");
IntervalTree<Integer> itree = new IntervalTree<Integer>();
itree.insert(new Interval<Integer>(1.0, 1.0));
itree.insert(new Interval<Integer>(5.0, 5.0));
itree.insert(new Interval<Integer>(7.0, 7.0));
itree.delete(new Interval<Integer>(5.0, 5.0));
itree.insert(new Interval<Integer>(5.0, 6.0));
itree.delete(new Interval<Integer>(5.0, 7.0));
itree.insert(new Interval<Integer>(5.0, 7.0));
itree.delete(new Interval<Integer>(1.0, 1.0));
itree.insert(new Interval<Integer>(1.0, 2.0));
itree.delete(new Interval<Integer>(1.0, 2.0));
itree.insert(new Interval<Integer>(1.0, 2.0));
List<Interval<Integer>> list = new ArrayList<Interval<Integer>>();
list.add(new Interval<Integer>(5.0, 7.0));
assertEquals(itree.search(4.0, 5.0), list);
System.out.println("itree.search(4.0, 5.0): " + itree.search(4.0, 5.0));
System.out.println("list: " + list);
System.out.println();
}
}
@@ -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]);
}
}
-8
Ver Arquivo
@@ -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>
-6
Ver Arquivo
@@ -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.5
-45
Ver Arquivo
@@ -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
-68
Ver Arquivo
@@ -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
Ver Arquivo
@@ -1 +0,0 @@
suite.dir=${basedir}/..
@@ -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,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,15 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-02-29 20\:31+0000\nLast-Translator\: Zbyn\u011bk Schwarz <zbynek.schwarz@gmail.com>\nLanguage-Team\: Czech (http\://www.transifex.net/projects/p/gephi/language/cs/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: cs\nPlural-Forms\: nplurals\=3; plural\=(n\=\=1) ? 0 \: (n>\=2 && n<\=4) ? 1 \: 2\n
NodeAttributeTable.name=Uzly
EdgeAttributeTable.name=Hrany
GraphAttributeTable.name=Graf
OpenIDE-Module-Short-Description=V\u00fdchoz\u00ed zaveden\u00e9 API vlastnost\u00ed
@@ -1,16 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Eduardo Ramos <eduramiba@gmail.com>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-16 23\:07+0000\nLast-Translator\: Eduardo Ramos <eduramiba@gmail.com>\nLanguage-Team\: Spanish (Castilian) (http\://www.transifex.net/projects/p/gephi/language/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
GraphAttributeTable.name=Grafo
OpenIDE-Module-Short-Description=Implementaci\u00f3n por defecto del m\u00f3dulo Attributes API
@@ -1,16 +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.
# <sebastien.heymann@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-03-08 15\:11+0000\nLast-Translator\: gephi <sebastien.heymann@gmail.com>\nLanguage-Team\: French (http\://www.transifex.net/projects/p/gephi/language/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
GraphAttributeTable.name=Graphe
OpenIDE-Module-Short-Description=Impl\u00e9mentation standard du module Attributes API
@@ -1,15 +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, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-15 02\:15+0000\nLast-Translator\: Siro Kida <kida.siro@gmail.com>\nLanguage-Team\: Japanese (http\://www.transifex.net/projects/p/gephi/language/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
GraphAttributeTable.name=\u30b0\u30e9\u30d5
OpenIDE-Module-Short-Description=\u5c5e\u6027API\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5b9f\u88c5
@@ -1,16 +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.
# C\u00e9lio Faria Jr. <celiofariajr@gmail.com>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-17 13\:08+0000\nLast-Translator\: C\u00e9lio Faria Jr. <celiofariajr@gmail.com>\nLanguage-Team\: Portuguese (Brazil) (http\://www.transifex.net/projects/p/gephi/language/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
GraphAttributeTable.name=Grafo
OpenIDE-Module-Short-Description=Implementa\u00e7\u00e3o padr\u00e3o da API Attributes.
@@ -1,16 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# <altsoph@gmail.com>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-01-15 08\:32+0000\nLast-Translator\: Altsoph <altsoph@gmail.com>\nLanguage-Team\: Russian (http\://www.transifex.net/projects/p/gephi/language/ru/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ru\nPlural-Forms\: nplurals\=3; plural\=(n%10\=\=1 && n%100\!\=11 ? 0 \: n%10>\=2 && n%10<\=4 && (n%100<10 || n%100>\=20) ? 1 \: 2)\n
NodeAttributeTable.name=\u0423\u0437\u043b\u044b
EdgeAttributeTable.name=\u0420\u0451\u0431\u0440\u0430
GraphAttributeTable.name=\u0413\u0440\u0430\u0444
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,15 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Xi-Nian Zuo <zuoxn@psych.ac.cn>, 2012.
!=Project-Id-Version\: Gephi\nReport-Msgid-Bugs-To\: https\://github.com/gephi/gephi/issues\nPOT-Creation-Date\: 2011-08-05 14\:52+0200\nPO-Revision-Date\: 2012-03-15 09\:34+0000\nLast-Translator\: Xi-Nian Zuo <zuoxn@psych.ac.cn>\nLanguage-Team\: Chinese (China) (http\://www.transifex.net/projects/p/gephi/language/zh_CN/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: zh_CN\nPlural-Forms\: nplurals\=1; plural\=0\n
NodeAttributeTable.name=\u8282\u70b9
EdgeAttributeTable.name=\u8fb9
GraphAttributeTable.name=\u56fe
OpenIDE-Module-Short-Description=\u5c5e\u6027API\u7684\u9ed8\u8ba4\u5b9e\u73b0\u3002
@@ -1,31 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Zbyněk Schwarz <zbynek.schwarz@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-02-29 20:31+0000\n"
"Last-Translator: Zbyněk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/gephi/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
msgid "NodeAttributeTable.name"
msgstr "Uzly"
msgid "EdgeAttributeTable.name"
msgstr "Hrany"
msgid "GraphAttributeTable.name"
msgstr "Graf"
msgid "OpenIDE-Module-Short-Description"
msgstr "Výchozí zavedené API vlastností"
@@ -1,32 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Eduardo Ramos <eduramiba@gmail.com>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-16 23:07+0000\n"
"Last-Translator: Eduardo Ramos <eduramiba@gmail.com>\n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/gephi/language/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 "GraphAttributeTable.name"
msgstr "Grafo"
msgid "OpenIDE-Module-Short-Description"
msgstr "Implementación por defecto del módulo Attributes API"
@@ -1,32 +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.
# <sebastien.heymann@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-03-08 15:11+0000\n"
"Last-Translator: gephi <sebastien.heymann@gmail.com>\n"
"Language-Team: French (http://www.transifex.net/projects/p/gephi/language/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 "GraphAttributeTable.name"
msgstr "Graphe"
msgid "OpenIDE-Module-Short-Description"
msgstr "Implémentation standard du module Attributes API"
@@ -1,31 +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, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-15 02:15+0000\n"
"Last-Translator: Siro Kida <kida.siro@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.net/projects/p/gephi/language/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 "GraphAttributeTable.name"
msgstr "グラフ"
msgid "OpenIDE-Module-Short-Description"
msgstr "属性APIのデフォルトの実装"
@@ -1,32 +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.
# Célio Faria Jr. <celiofariajr@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-17 13:08+0000\n"
"Last-Translator: Célio Faria Jr. <celiofariajr@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.net/projects/p/gephi/language/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 "GraphAttributeTable.name"
msgstr "Grafo"
msgid "OpenIDE-Module-Short-Description"
msgstr "Implementação padrão da API Attributes."
@@ -1,32 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# <altsoph@gmail.com>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-01-15 08:32+0000\n"
"Last-Translator: Altsoph <altsoph@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.net/projects/p/gephi/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
msgid "NodeAttributeTable.name"
msgstr "Узлы"
msgid "EdgeAttributeTable.name"
msgstr "Рёбра"
msgid "GraphAttributeTable.name"
msgstr "Граф"
msgid "OpenIDE-Module-Short-Description"
msgstr "Стандартное API для работы с атрибутами"
@@ -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")));
Integer index = 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)) {
index = Integer.parseInt(reader.getAttributeValue(null, "index"));
}
break;
case XMLStreamReader.CHARACTERS:
if (!reader.isWhiteSpace() && index != 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() && index != null) {
AttributeType type = table.getColumn(index).getType();
Object v = type.parse(value);
v = model.getManagedValue(v, type);
row.setValue(index, v);
}
value = "";
index = null;
break;
}
}
}
}
@@ -1,31 +0,0 @@
# Translation file for Gephi.
# Copyright (C) 2011 Gephi contributors.
# This file is distributed under the same license as the Gephi package.
#
# Translators:
# Xi-Nian Zuo <zuoxn@psych.ac.cn>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Gephi\n"
"Report-Msgid-Bugs-To: https://github.com/gephi/gephi/issues\n"
"POT-Creation-Date: 2011-08-05 14:52+0200\n"
"PO-Revision-Date: 2012-03-15 09:34+0000\n"
"Last-Translator: Xi-Nian Zuo <zuoxn@psych.ac.cn>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/gephi/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid "NodeAttributeTable.name"
msgstr "节点"
msgid "EdgeAttributeTable.name"
msgstr "边"
msgid "GraphAttributeTable.name"
msgstr "图"
msgid "OpenIDE-Module-Short-Description"
msgstr "属性API的默认实现。"
@@ -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();
}
}
@@ -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;
}
}

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais