francesco-ficarola/gexf4j

语言: Java

git: https://github.com/francesco-ficarola/gexf4j

GEXF文件格式的java库。
A java library for the GEXF file format.
README.md (中文)

gexf4j - GEXF文件格式的java库

最新版本:1.0.0

作者:Francesco Ficarola

测试作者:Tadas Subonis

合着者:Tadas Subonis,Justin Harris

v0.2作者:Javier Campanini

关于

GEXF文件格式Java库。它支持GEXF 1.2。该库用于创建和编写GEXF文件,以便使用Gephi和任何其他支持GEXF的应用程序可视化图形。 根据Apache许可证2.0版,Javier Campanini保留了最高0.2.0的版本。新版本0.3.0及更高版本将由Francesco Ficarola以相同许可证维护。

执照

版权所有2012 Francesco Ficarola

根据Apache许可证2.0版(“许可证”)获得许可;除非符合许可,否则您不得使用此文件。您可以在以下位置获取许可证副本

HTTP://呜呜呜.Apache.org/licenses/license-2.0

除非适用法律要求或书面同意,否则根据许可证分发的软件按“原样”分发,不附带任何明示或暗示的担保或条件。有关管理许可下的权限和限制的特定语言,请参阅许可证。

在Maven项目中使用gexf4j(推荐)

在您的pom.xml文件中输入最新的gexf4j依赖关系信息:Maven Central

在非Maven项目中使用gexf4j

如果您不想构建maven项目,可以将gexf4j库用作项目中的jar文件,但还需要链接以下依赖项:

  • 番石榴18.0.jar
  • woodstox核-ASL-4.4.1.jar
  • 基于JUnit 4.12.jar
  • XMLUnit测试-1.6.jar
  • 公地IO-2.4.jar

运行以下命令以编译和打包gexf4j:

$ git clone https://github.com/francesco-ficarola/gexf4j.git
$ mvn clean package

如果一切正常,您将在目标/目录中找到jar文件。

现在,您可以在Java项目中使用gex4j库(及其所有依赖项)。如果您使用GNU / Linux发行版,您可能会在〜/ .m2 / repository / path中找到所有依赖项。

示例代码

在以下路径中:

  • SRC /示例/ JAVA
  • 的src /测试/ JAVA
  • SRC /测试/资源

您可以找到一些示例代码(以及生成的输出文件),其中显示了如何使用gexf4j库构建GEXF图。

版本1.0.0(由Francesco Ficarola提供)

已应用以下更改:

  • 添加了“getNode(String id)”方法,链接问题
  • XML输出文件现在以漂亮的打印模式,链接问题格式化

版本0.4.4 - BETA(Francesco Ficarola)

已应用以下更改:

  • 错误修复:节点形状URI,链接问题
  • 错误修复:节点形状名称(“节点形状”现在是“形状”)
  • StaticGexfGraph.java已使用一些viz代码进行了更新。

版本0.4.3 - BETA(juharris的拉动请求)

已应用以下更改:

  • 添加了为边缘设置标签的功能。
  • 添加了在connectTo中设置边缘类型

版本0.4.2 - BETA(Francesco Ficarola)

已应用以下更改:

  • 所有内容都集成在pom.xml文件中,以正确使用Maven。
  • 版本0.4.2已上载到Maven Central。

版本0.4.1 - BETA(Francesco Ficarola)

所有库都作为maven依赖项添加到pom.xml中。

版本0.4.0 - BETA(dankeris的拉动请求)

已应用以下更改:

  • 单元测试已包括在内
  • STAX实现已从JDK默认更改为woodstox
  • 为方便起见,添加了流写入

其他变化:

  • SimpleDateFormat变量现在可以安全地用于多线程
  • Javadoc已更新

版本0.3.2 - ALPHA(dankeris提出的请求)

应用了以下更改:

  • 将OutputStream写入更改为Writer输出
  • 添加了向文档添加编码的功能

版本0.3.1 - ALPHA(Francesco Ficarola)

应用了以下更改:

  • Javadoc被添加了
  • 错误修复了静态图中未包含timeformat属性的问题
  • 方法参数的智能名称
  • 添加了两个关于静态和动态图的示例(包“it.uniroma1.dis.wiserver.gexf4j.examples”)

版本0.3.0 - ALPHA(Francesco Ficarola)

应用了以下更改:

  • “timetype”属性重命名为“timeformat”
  • “切片”和“切片”相应地重命名为“法术”和“拼写”
  • 现在“timeformat”可以是整数,双精度(默认),日期,日期时间
  • 添加了开放间隔(不包括):“startopen”和“endopen”属性
  • 修复了一些“Attribute setTitle(String title)”方法:checkArgument中的表达式错误
  • 方法“setStartDate(Date d)”和“setEndDate(d)”在“setStartValue(Object o)”和“setEndValue(Object o)”中进行了更改,
  • 方法“Date getStartDate()”和“Date getEndDate()”在“Object getStartValue()”和“Object getEndValue()”中更改,尊重

版本0.2 - ALPHA(作者Javier Campanini)

注意:alpha版本没有完整的测试套件。

底层API发生了巨大变化。 Gexf4j现在支持整个GEXF文件格式,包括:

  • 数据图
  • 动力学
  • 等级制度
  • 发展史
  • 可视化

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

gexf4j - A java library for the GEXF file format

Latest Version: 1.0.0

Author: Francesco Ficarola

Tests Author: Tadas Subonis

Co-Authors: Tadas Subonis, Justin Harris

v0.2 Author: Javier Campanini

About

GEXF File Format Java Library. It supports GEXF 1.2. This library is used to create and write GEXF files for visualizing graphs using Gephi and any other GEXF-supporting application.
Versions up to 0.2.0 are mantained by Javier Campanini, under the Apache License, Version 2.0. The new version 0.3.0 and later will be maintained by Francesco Ficarola, under the same license.

License

Copyright 2012 Francesco Ficarola

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Using gexf4j in Maven projects (Recommended)

Enter in your pom.xml file the latest gexf4j dependency information: Maven Central

Using gexf4j in not-Maven projects

If you don't want to build a maven project, you can use the gexf4j library as a jar file in your project, but you also need to link the following dependencies:

  • guava-18.0.jar
  • woodstox-core-asl-4.4.1.jar
  • junit-4.12.jar
  • xmlunit-1.6.jar
  • commons-io-2.4.jar

Run the following commands to compile and package gexf4j:

$ git clone https://github.com/francesco-ficarola/gexf4j.git
$ mvn clean package

If everything is fine, you will find the jar file in the target/ directory.

Now you can use the gex4j library (and all its dependencies) in your Java project. If you use a GNU/Linux distribution, you may find all dependencies in the ~/.m2/repository/ path.

Sample Code

In the following paths:

  • src/examples/java
  • src/test/java
  • src/test/resources

you can find some example code (and resulting output files) that shows how to build GEXF graphs by using the gexf4j library.

Version 1.0.0 (by Francesco Ficarola)

The following changes have been applied:

  • The "getNode(String id)" method has been added, link issue
  • XML output files are now formatted in pretty printing mode, link issue

Version 0.4.4 - BETA (by Francesco Ficarola)

The following changes have been applied:

  • Bug fix: node shape URI, link issue
  • Bug fix: node shape name ("node-shape" is now "shape")
  • StaticGexfGraph.java has been updated with some viz code.

Version 0.4.3 - BETA (pull request by juharris)

The following changes have been applied:

  • Added the ability to set a label for an edge.
  • Added setting the edge type in connectTo

Version 0.4.2 - BETA (by Francesco Ficarola)

The following changes have been applied:

  • Everything was integrated in the pom.xml file to correctly work with Maven.
  • Version 0.4.2 was uploaded to Maven Central.

Version 0.4.1 - BETA (by Francesco Ficarola)

All libraries were added into the pom.xml as maven dependencies.

Version 0.4.0 - BETA (pull request by dankeris)

The following changes have been applied:

  • Unit tests have been included
  • STAX impementation has been changed from JDK default to woodstox
  • Stream writing has been added for convenience

Additional changes:

  • SimpleDateFormat variables are now safe for multi-threading
  • Javadoc has been updated

Version 0.3.2 - ALPHA (pull request by dankeris)

The following changes were applied:

  • Changed OutputStream writing to Writer output
  • Added capability to add encoding to document

Version 0.3.1 - ALPHA (by Francesco Ficarola)

The following changes were applied:

  • Javadoc was added
  • Bug fix for the not-inclusion of the timeformat attribute in static graphs
  • Smart names for the method parameters
  • Two examples about static and dynamic graphs have been added (package "it.uniroma1.dis.wiserver.gexf4j.examples")

Version 0.3.0 - ALPHA (by Francesco Ficarola)

The following changes were applied:

  • "timetype" attribute is renamed to "timeformat"
  • "slices" and "slice" are renamed "spells" and "spell" correspondingly
  • Now the "timeformat" can be integer, double (default), date, dateTime
  • Open intervals (non-inclusive) are added: "startopen" and "endopen" attributes
  • Bug fix on some "Attribute setTitle(String title)" method: the expression in checkArgument was wrong
  • The methods "setStartDate(Date d)" and "setEndDate(d)" are changed in "setStartValue(Object o)" and "setEndValue(Object o)", respectly
  • The Methods "Date getStartDate()" and "Date getEndDate()" are changed in "Object getStartValue()" and "Object getEndValue()", respectly

Version 0.2 - ALPHA (by Javier Campanini)

NOTE: The alpha version does NOT have a full test suite.

The underlying API has changed dramatically. Gexf4j now supports the entire GEXF file format, including:

  • Data Graphs
  • Dynamics
  • Hierarchy
  • Phylogeny
  • Visualization