Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Christnowx
Gephi
提交
683c30ce
G
Gephi
项目概览
Christnowx
/
Gephi
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gephi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
683c30ce
编写于
5月 12, 2013
作者:
M
Mathieu Bastian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add more options in the import report panel
上级
b66ff8ca
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
496 addition
and
187 deletion
+496
-187
modules/DesktopImport/pom.xml
modules/DesktopImport/pom.xml
+4
-0
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/DesktopImportControllerUI.java
...org/gephi/desktop/importer/DesktopImportControllerUI.java
+2
-1
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/ReportPanel.form
...src/main/java/org/gephi/desktop/importer/ReportPanel.form
+130
-47
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/ReportPanel.java
...src/main/java/org/gephi/desktop/importer/ReportPanel.java
+229
-63
modules/DesktopImport/src/main/resources/org/gephi/desktop/importer/Bundle.properties
...in/resources/org/gephi/desktop/importer/Bundle.properties
+13
-0
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/Container.java
...PI/src/main/java/org/gephi/io/importer/api/Container.java
+1
-11
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/ContainerLoader.java
.../main/java/org/gephi/io/importer/api/ContainerLoader.java
+14
-2
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/ContainerUnloader.java
...ain/java/org/gephi/io/importer/api/ContainerUnloader.java
+7
-2
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/EdgeWeightMergeStrategy.java
...va/org/gephi/io/importer/api/EdgeWeightMergeStrategy.java
+47
-0
modules/ImportAPI/src/main/java/org/gephi/io/importer/impl/ImportContainerParameters.java
...org/gephi/io/importer/impl/ImportContainerParameters.java
+9
-21
modules/ImportAPI/src/main/java/org/gephi/io/importer/impl/ImportControllerImpl.java
...java/org/gephi/io/importer/impl/ImportControllerImpl.java
+40
-40
未找到文件。
modules/DesktopImport/pom.xml
浏览文件 @
683c30ce
...
...
@@ -72,6 +72,10 @@
<groupId>
${project.groupId}
</groupId>
<artifactId>
core-library-wrapper
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
ui-library-wrapper
</artifactId>
</dependency>
</dependencies>
<build>
...
...
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/DesktopImportControllerUI.java
浏览文件 @
683c30ce
...
...
@@ -115,7 +115,8 @@ public class DesktopImportControllerUI implements ImportControllerUI {
// }
// NotifyDescriptor.Message msg = new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE);
// DialogDisplayer.getDefault().notify(msg);
Logger
.
getLogger
(
""
).
log
(
Level
.
SEVERE
,
""
,
t
.
getCause
());
Exceptions
.
printStackTrace
(
t
);
t
.
printStackTrace
();
}
};
executor
=
new
LongTaskExecutor
(
true
,
"Importer"
,
10
);
...
...
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/ReportPanel.form
浏览文件 @
683c30ce
...
...
@@ -23,7 +23,7 @@
<Group
type=
"102"
attributes=
"0"
>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Component
id=
"tabbedPane"
alignment=
"0"
max=
"32767"
attributes=
"0"
/>
<Component
id=
"tabbedPane"
alignment=
"0"
pref=
"609"
max=
"32767"
attributes=
"0"
/>
<Group
type=
"102"
alignment=
"0"
attributes=
"0"
>
<Component
id=
"labelSrc"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
...
...
@@ -33,20 +33,22 @@
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Group
type=
"102"
attributes=
"0"
>
<Component
id=
"labelGraphType"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
min=
"-2"
pref=
"49"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"graphTypeCombo"
min=
"-2"
pref=
"107"
max=
"-2"
attributes=
"1"
/>
<EmptySpace
type=
"separate"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"graphTypeCombo"
min=
"-2"
pref=
"152"
max=
"-2"
attributes=
"1"
/>
<EmptySpace
min=
"0"
pref=
"0"
max=
"32767"
attributes=
"0"
/>
</Group>
<Component
id=
"
jPanel1
"
max=
"32767"
attributes=
"1"
/>
<Component
id=
"
statsPanel
"
max=
"32767"
attributes=
"1"
/>
</Group>
<EmptySpace
max=
"32767"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"1"
attributes=
"0"
>
<Group
type=
"103"
groupAlignment=
"0"
max=
"-2"
attributes=
"0"
>
<Component
id=
"createMissingNodesCheckbox"
alignment=
"1"
max=
"32767"
attributes=
"1"
/>
<Component
id=
"autoscaleCheckbox"
alignment=
"1"
max=
"32767"
attributes=
"1"
/>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Component
id=
"processorPanel"
alignment=
"1"
min=
"-2"
pref=
"175"
max=
"-2"
attributes=
"0"
/>
<Group
type=
"102"
alignment=
"1"
attributes=
"0"
>
<Component
id=
"moreOptionsLink"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
min=
"-2"
pref=
"8"
max=
"-2"
attributes=
"0"
/>
</Group>
<Component
id=
"processorPanel"
min=
"-2"
pref=
"175"
max=
"-2"
attributes=
"0"
/>
</Group>
</Group>
<Component
id=
"moreOptionsPanel"
max=
"32767"
attributes=
"0"
/>
</Group>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
</Group>
...
...
@@ -61,23 +63,21 @@
<Component
id=
"sourceLabel"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
</Group>
<EmptySpace
type=
"separate"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"tabbedPane"
pref=
"137"
max=
"32767
"
attributes=
"0"
/>
<EmptySpace
type=
"unrelated"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"tabbedPane"
min=
"-2"
pref=
"160"
max=
"-2
"
attributes=
"0"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"3"
attributes=
"0"
>
<Component
id=
"labelGraphType"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"autoscaleCheckbox"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"graphTypeCombo"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"moreOptionsLink"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
</Group>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"1"
attributes=
"0"
>
<Group
type=
"102"
alignment=
"0"
attributes=
"0"
>
<Component
id=
"createMissingNodesCheckbox"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
type=
"unrelated"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"processorPanel"
pref=
"62"
max=
"32767"
attributes=
"1"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
</Group>
<Component
id=
"jPanel1"
alignment=
"0"
min=
"-2"
pref=
"98"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"moreOptionsPanel"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Component
id=
"processorPanel"
max=
"32767"
attributes=
"1"
/>
<Component
id=
"statsPanel"
pref=
"121"
max=
"32767"
attributes=
"0"
/>
</Group>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
</Group>
</Group>
</DimensionLayout>
...
...
@@ -151,38 +151,12 @@
</Properties>
</Component>
<Component
class=
"javax.swing.JComboBox"
name=
"graphTypeCombo"
>
<Properties>
<Property
name=
"model"
type=
"javax.swing.ComboBoxModel"
editor=
"org.netbeans.modules.form.editors2.ComboBoxModelEditor"
>
<StringArray
count=
"3"
>
<StringItem
index=
"0"
value=
"Directed"
/>
<StringItem
index=
"1"
value=
"Undirected"
/>
<StringItem
index=
"2"
value=
"Mixed"
/>
</StringArray>
</Property>
</Properties>
</Component>
<Component
class=
"javax.swing.JCheckBox"
name=
"autoscaleCheckbox"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.autoscaleCheckbox.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
<Property
name=
"toolTipText"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.autoscaleCheckbox.toolTipText"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Container
class=
"javax.swing.JPanel"
name=
"processorPanel"
>
<Layout
class=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"
/>
</Container>
<Component
class=
"javax.swing.JCheckBox"
name=
"createMissingNodesCheckbox"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.createMissingNodesCheckbox.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Container
class=
"javax.swing.JPanel"
name=
"jPanel1"
>
<Container
class=
"javax.swing.JPanel"
name=
"statsPanel"
>
<Layout
class=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"
/>
<SubComponents>
...
...
@@ -288,5 +262,114 @@
</Component>
</SubComponents>
</Container>
<Component
class=
"org.jdesktop.swingx.JXHyperlink"
name=
"moreOptionsLink"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.moreOptionsLink.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Container
class=
"javax.swing.JPanel"
name=
"moreOptionsPanel"
>
<Properties>
<Property
name=
"border"
type=
"javax.swing.border.Border"
editor=
"org.netbeans.modules.form.editors2.BorderEditor"
>
<Border
info=
"org.netbeans.modules.form.compat2.border.EtchedBorderInfo"
>
<EtchetBorder/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout
dim=
"0"
>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Group
type=
"102"
attributes=
"0"
>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Group
type=
"102"
attributes=
"0"
>
<Component
id=
"selfLoopCheckBox"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"32767"
attributes=
"0"
/>
<Component
id=
"labelParallelEdgesMergeStrategy"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Component
id=
"edgesMergeStrategyCombo"
min=
"-2"
pref=
"111"
max=
"-2"
attributes=
"0"
/>
</Group>
<Group
type=
"102"
attributes=
"0"
>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Component
id=
"createMissingNodesCheckbox"
min=
"-2"
max=
"-2"
attributes=
"1"
/>
<Component
id=
"autoscaleCheckbox"
alignment=
"0"
min=
"-2"
pref=
"168"
max=
"-2"
attributes=
"1"
/>
</Group>
<EmptySpace
min=
"0"
pref=
"0"
max=
"32767"
attributes=
"0"
/>
</Group>
</Group>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout
dim=
"1"
>
<Group
type=
"103"
groupAlignment=
"0"
attributes=
"0"
>
<Group
type=
"102"
alignment=
"0"
attributes=
"0"
>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
groupAlignment=
"3"
attributes=
"0"
>
<Component
id=
"selfLoopCheckBox"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<Group
type=
"103"
alignment=
"3"
groupAlignment=
"3"
attributes=
"0"
>
<Component
id=
"labelParallelEdgesMergeStrategy"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<Component
id=
"edgesMergeStrategyCombo"
alignment=
"3"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
</Group>
</Group>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Component
id=
"autoscaleCheckbox"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"-2"
attributes=
"0"
/>
<Component
id=
"createMissingNodesCheckbox"
min=
"-2"
max=
"-2"
attributes=
"0"
/>
<EmptySpace
max=
"32767"
attributes=
"0"
/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component
class=
"javax.swing.JCheckBox"
name=
"autoscaleCheckbox"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.autoscaleCheckbox.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
<Property
name=
"toolTipText"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.autoscaleCheckbox.toolTipText"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Component
class=
"javax.swing.JCheckBox"
name=
"createMissingNodesCheckbox"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.createMissingNodesCheckbox.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
<Property
name=
"toolTipText"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.createMissingNodesCheckbox.toolTipText"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Component
class=
"javax.swing.JCheckBox"
name=
"selfLoopCheckBox"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.selfLoopCheckBox.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
<Property
name=
"toolTipText"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.selfLoopCheckBox.toolTipText"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
<Property
name=
"horizontalTextPosition"
type=
"int"
value=
"4"
/>
</Properties>
</Component>
<Component
class=
"javax.swing.JLabel"
name=
"labelParallelEdgesMergeStrategy"
>
<Properties>
<Property
name=
"text"
type=
"java.lang.String"
editor=
"org.netbeans.modules.i18n.form.FormI18nStringEditor"
>
<ResourceString
bundle=
"org/gephi/desktop/importer/Bundle.properties"
key=
"ReportPanel.labelParallelEdgesMergeStrategy.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Properties>
</Component>
<Component
class=
"javax.swing.JComboBox"
name=
"edgesMergeStrategyCombo"
>
<Properties>
<Property
name=
"model"
type=
"javax.swing.ComboBoxModel"
editor=
"org.netbeans.modules.form.editors2.ComboBoxModelEditor"
>
<StringArray
count=
"0"
/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>
modules/DesktopImport/src/main/java/org/gephi/desktop/importer/ReportPanel.java
浏览文件 @
683c30ce
此差异已折叠。
点击以展开。
modules/DesktopImport/src/main/resources/org/gephi/desktop/importer/Bundle.properties
浏览文件 @
683c30ce
...
...
@@ -21,6 +21,10 @@ ReportPanel.autoscaleCheckbox.text=Auto-scale
ReportPanel.noIssues
=
No issue found during import
ReportPanel.yes
=
yes
ReportPanel.no
=
no
ReportPanel.graphType.directed
=
Directed
ReportPanel.graphType.undirected
=
Undirected
ReportPanel.graphType.mixed
=
Mixed
ReportPanel.issueTable.issues
=
Issues
DesktopImportControllerUI.spigotSource
=
Spigot {0}
DesktopImportControllerUI.streamSource
=
Stream {0}
...
...
@@ -39,4 +43,13 @@ DesktopImportControllerUI.spigot.ui.dialog.title = {0} settings
DesktopImportControllerUI.processor.ui.dialog.title
=
Processor settings
ReportPanel.createMissingNodesCheckbox.text
=
Create missing nodes
ReportPanel.createMissingNodesCheckbox.toolTipText
=
Create missing nodes found as edges' source or target
ReportPanel.moreOptionsLink.text
=
More options...
ReportPanel.jLabel1.text
=
ReportPanel.selfLoopCheckBox.text=Self-loops
ReportPanel.selfLoopCheckBox.toolTipText
=
Allow self-loops on nodes
ReportPanel.labelParallelEdgesMergeStrategy.text
=
Edges merge strategy:
ReportPanel.mergeStrategy.sum
=
Sum
ReportPanel.mergeStrategy.avg
=
Average
ReportPanel.mergeStrategy.min
=
Minimum
ReportPanel.mergeStrategy.max
=
Maximum
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/Container.java
浏览文件 @
683c30ce
...
...
@@ -95,16 +95,6 @@ public interface Container {
*/
public
ContainerUnloader
getUnloader
();
public
void
setAutoScale
(
boolean
autoscale
);
public
boolean
isAutoScale
();
public
void
setAllowSelfLoop
(
boolean
value
);
public
void
setAllowAutoNode
(
boolean
value
);
public
void
setAllowParallelEdge
(
boolean
value
);
/**
* Set a report this container can use to report issues detected when
* loading the container. Report are used to log info and issues during
...
...
@@ -128,7 +118,7 @@ public interface Container {
* This method must be called after the loading is complete and before
* unloading. Its aim is to verify data consistency as a whole.
*
* @return <code>true</code> if container data is * * consistent, <code>false</code> otherwise
* @return <code>true</code> if container data is *
*
* consistent, <code>false</code> otherwise
*/
public
boolean
verify
();
...
...
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/ContainerLoader.java
浏览文件 @
683c30ce
...
...
@@ -133,7 +133,8 @@ public interface ContainerLoader {
*
* @param source the edge source node
* @param target the edge target node
* @return the edge from <code>source</code> to <code>target</code> * * * * or <code>null</code> if not found
* @return the edge from <code>source</code> to <code>target</code> * * * *
* or <code>null</code> if not found
*/
// public EdgeDraft getEdge(NodeDraft source, NodeDraft target);
/**
...
...
@@ -163,7 +164,7 @@ public interface ContainerLoader {
*
* @param edgeDefault the edge default type value
*/
public
void
setEdgeDefault
(
EdgeDiretionDefault
edgeDefault
);
public
void
setEdgeDefault
(
EdgeDire
c
tionDefault
edgeDefault
);
public
ColumnDraft
getNodeColumn
(
String
key
);
...
...
@@ -188,4 +189,15 @@ public interface ContainerLoader {
* @param timeFormat the current time format
*/
public
void
setTimeFormat
(
TimeFormat
timeFormat
);
//PARAMETERS SETTERS
public
void
setAllowSelfLoop
(
boolean
value
);
public
void
setAllowAutoNode
(
boolean
value
);
public
void
setAllowParallelEdge
(
boolean
value
);
public
void
setAutoScale
(
boolean
autoscale
);
public
void
setEdgesMergeStrategy
(
EdgeWeightMergeStrategy
edgesMergeStrategy
);
}
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/ContainerUnloader.java
浏览文件 @
683c30ce
...
...
@@ -72,15 +72,20 @@ public interface ContainerUnloader {
public
Iterable
<
ColumnDraft
>
getEdgeColumns
();
// public EdgeDraft getEdge(NodeDraft source, NodeDraft target);
public
EdgeDiretionDefault
getEdgeDefault
();
public
EdgeDire
c
tionDefault
getEdgeDefault
();
public
TimeFormat
getTimeFormat
();
public
String
getSource
();
//PARAMETERS GETTERS
public
boolean
allowSelfLoop
();
public
boolean
allowAutoNode
();
public
boolean
allowParallelEdges
();
public
String
getSource
();
public
boolean
isAutoScale
();
public
EdgeWeightMergeStrategy
getEdgesMergeStrategy
();
}
modules/ImportAPI/src/main/java/org/gephi/io/importer/api/EdgeWeightMergeStrategy.java
0 → 100644
浏览文件 @
683c30ce
/*
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.io.importer.api
;
public
enum
EdgeWeightMergeStrategy
{
SUM
,
AVG
,
MAX
,
MIN
}
modules/ImportAPI/src/main/java/org/gephi/io/importer/impl/ImportContainerParameters.java
浏览文件 @
683c30ce
...
...
@@ -41,25 +41,21 @@
*/
package
org.gephi.io.importer.impl
;
import
org.gephi.io.importer.api.EdgeWeightMergeStrategy
;
/**
*
* @author Mathieu Bastian
*/
public
class
ImportContainerParameters
{
public
enum
EdgeWeightMergeStrategy
{
SUM
,
AVG
,
MAX
,
MIN
}
protected
boolean
selfLoops
=
true
;
protected
boolean
parallelEdges
=
true
;
protected
boolean
autoNode
=
true
;
protected
boolean
autoScale
=
true
;
protected
boolean
sortNodesBySize
=
true
;
protected
boolean
fillLabelWithId
=
true
;
protected
EdgeWeightMergeStrategy
parallelEdgesMergeStrategy
=
EdgeWeightMergeStrategy
.
SUM
;
protected
EdgeWeightMergeStrategy
undirectedMergeStrategy
=
EdgeWeightMergeStrategy
.
SUM
;
protected
boolean
mergeParallelEdgesWeight
=
true
;
protected
EdgeWeightMergeStrategy
edgesMergeStrategy
=
EdgeWeightMergeStrategy
.
SUM
;
protected
boolean
mergeParallelEdgesAttributes
=
true
;
protected
boolean
duplicateWithLabels
=
false
;
...
...
@@ -71,12 +67,8 @@ public class ImportContainerParameters {
this
.
autoNode
=
autoNode
;
}
public
EdgeWeightMergeStrategy
getParallelEdgesMergeStrategy
()
{
return
parallelEdgesMergeStrategy
;
}
public
EdgeWeightMergeStrategy
getUndirectedMergeStrategy
()
{
return
undirectedMergeStrategy
;
public
EdgeWeightMergeStrategy
getEdgesMergeStrategy
()
{
return
edgesMergeStrategy
;
}
public
boolean
isParallelEdges
()
{
...
...
@@ -119,14 +111,6 @@ public class ImportContainerParameters {
this
.
autoScale
=
autoScale
;
}
public
boolean
isMergeParallelEdgesWeight
()
{
return
mergeParallelEdgesWeight
;
}
public
void
setMergeParallelEdgesWeight
(
boolean
mergeParallelEdgesWeight
)
{
this
.
mergeParallelEdgesWeight
=
mergeParallelEdgesWeight
;
}
public
boolean
isDuplicateWithLabels
()
{
return
duplicateWithLabels
;
}
...
...
@@ -142,4 +126,8 @@ public class ImportContainerParameters {
public
void
setMergeParallelEdgesAttributes
(
boolean
mergeParallelEdgesAttributes
)
{
this
.
mergeParallelEdgesAttributes
=
mergeParallelEdgesAttributes
;
}
public
void
setEdgesMergeStrategy
(
EdgeWeightMergeStrategy
edgesMergeStrategy
)
{
this
.
edgesMergeStrategy
=
edgesMergeStrategy
;
}
}
modules/ImportAPI/src/main/java/org/gephi/io/importer/impl/ImportControllerImpl.java
浏览文件 @
683c30ce
/*
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.
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.io.importer.impl
;
...
...
@@ -268,7 +268,7 @@ public class ImportControllerImpl implements ImportController {
@Override
public
void
process
(
Container
container
,
Processor
processor
,
Workspace
workspace
)
{
container
.
closeLoader
();
if
(
container
.
isAutoScale
())
{
if
(
container
.
getUnloader
().
isAutoScale
())
{
Scaler
scaler
=
Lookup
.
getDefault
().
lookup
(
Scaler
.
class
);
if
(
scaler
!=
null
)
{
scaler
.
doScale
(
container
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录