Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
f57e146b
Commit
f57e146b
authored
Sep 14, 2021
by
Piotr Gawron
Browse files
lambda parameter name restrictions added
parent
36122b2d
Changes
12
Hide whitespace changes
Inline
Side-by-side
checkstyle.xml
View file @
f57e146b
...
...
@@ -172,12 +172,12 @@
<message
key=
"name.invalidPattern"
value=
"Parameter name ''{0}'' must match pattern ''{1}''."
/>
</module>
<!--
<module name="LambdaParameterName">
<module
name=
"LambdaParameterName"
>
<property
name=
"format"
value=
"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"
/>
<message
key=
"name.invalidPattern"
value=
"Lambda parameter name ''{0}'' must match pattern ''{1}''."
/>
</module>
<module name="CatchParameterName">
<!--
<module name="CatchParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
...
...
converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerParserForVersion25Test.java
View file @
f57e146b
...
...
@@ -35,9 +35,9 @@ public class CellDesignerParserForVersion25Test extends CellDesignerTestFunction
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/cd_2.5"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/cd_2.5"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/CellDesigner2SbgnmlConversionTest.java
View file @
f57e146b
...
...
@@ -36,16 +36,16 @@ public class CellDesigner2SbgnmlConversionTest extends SbgnmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<>();
Files
.
walk
(
Paths
.
get
(
"../converter-CellDesigner/testFiles"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
)
&&
fPath
.
toString
().
indexOf
(
"invalid"
)
==
-
1
)
{
Files
.
walk
(
Paths
.
get
(
"../converter-CellDesigner/testFiles"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
)
&&
f
ile
Path
.
toString
().
indexOf
(
"invalid"
)
==
-
1
)
{
try
{
String
tempPath
=
fPath
.
toString
()
.
substring
(
fPath
.
toString
().
indexOf
(
"testFiles"
)
+
"testFiles"
.
length
()
+
1
);
String
tempPath
=
f
ile
Path
.
toString
()
.
substring
(
f
ile
Path
.
toString
().
indexOf
(
"testFiles"
)
+
"testFiles"
.
length
()
+
1
);
if
(!
tempPath
.
contains
(
"_full"
))
{
String
content
=
FileUtils
.
readFileToString
(
fPath
.
toFile
(),
StandardCharsets
.
UTF_8
);
String
content
=
FileUtils
.
readFileToString
(
f
ile
Path
.
toFile
(),
StandardCharsets
.
UTF_8
);
if
(
content
.
indexOf
(
"xmlns:celldesigner"
)
>=
0
)
{
data
.
add
(
new
Object
[]
{
fPath
});
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
}
}
catch
(
Exception
e
)
{
...
...
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlSerializationTest.java
View file @
f57e146b
...
...
@@ -40,9 +40,9 @@ public class SbgnmlSerializationTest extends SbgnmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/CellDesigner-serializable"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/CellDesigner-serializable"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlExporterGenericTest.java
View file @
f57e146b
...
...
@@ -33,14 +33,14 @@ public class SbgnmlXmlExporterGenericTest extends SbgnmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlParserTestFiles/sbgnmlFiles"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".sbgn"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlParserTestFiles/sbgnmlFiles"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".sbgn"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlCellDesignerInompatible"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".sbgn"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlCellDesignerInompatible"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".sbgn"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlParserTest.java
View file @
f57e146b
...
...
@@ -48,10 +48,10 @@ public class SbgnmlXmlParserTest extends SbgnmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlParserTestFiles/sbgnmlFiles"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".sbgn"
)
&&
!
fPath
.
getFileName
().
toString
().
startsWith
(
"ASTHMA"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/sbgnmlParserTestFiles/sbgnmlFiles"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".sbgn"
)
&&
!
f
ile
Path
.
getFileName
().
toString
().
startsWith
(
"ASTHMA"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/CellDesignerToMultiExportTest.java
View file @
f57e146b
...
...
@@ -39,9 +39,9 @@ public class CellDesignerToMultiExportTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/cd_for_multi"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/cd_for_multi"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/CopasiImportTest.java
View file @
f57e146b
...
...
@@ -34,9 +34,9 @@ public class CopasiImportTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/copasi"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/copasi"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/GenericSbmlParserTest.java
View file @
f57e146b
...
...
@@ -47,14 +47,14 @@ public class GenericSbmlParserTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/layoutExample"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/layoutExample"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
Files
.
walk
(
Paths
.
get
(
"testFiles/invalidButParseable"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/invalidButParseable"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/GenericSbmlToXmlParserTest.java
View file @
f57e146b
...
...
@@ -42,14 +42,14 @@ public class GenericSbmlToXmlParserTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/layoutExample"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/layoutExample"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
Files
.
walk
(
Paths
.
get
(
"testFiles/small"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/small"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/MultiParserTest.java
View file @
f57e146b
...
...
@@ -41,9 +41,9 @@ public class MultiParserTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/multi"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/multi"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/SbmlPareserForInvalidReactionTest.java
View file @
f57e146b
...
...
@@ -32,9 +32,9 @@ public class SbmlPareserForInvalidReactionTest extends SbmlTestFunctions {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]>();
Files
.
walk
(
Paths
.
get
(
"testFiles/invalidReaction"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
fPath
});
Files
.
walk
(
Paths
.
get
(
"testFiles/invalidReaction"
)).
forEach
(
f
ile
Path
->
{
if
(
Files
.
isRegularFile
(
f
ile
Path
)
&&
f
ile
Path
.
toString
().
endsWith
(
".xml"
))
{
data
.
add
(
new
Object
[]
{
f
ile
Path
});
}
});
return
data
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment