Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-server
Commits
8d0f6b8c
Commit
8d0f6b8c
authored
Dec 18, 2019
by
François Agneray
Browse files
WIP
parent
2cef2811
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/routes.php
View file @
8d0f6b8c
...
...
@@ -18,14 +18,18 @@ $app->map([OPTIONS, GET, PUT, DELETE], '/database/{id}', App\Action\DatabaseActi
$app
->
map
([
OPTIONS
,
GET
],
'/database/{id}/table'
,
App\Action\TableListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/project'
,
App\Action\ProjectListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/project/{name}'
,
App\Action\ProjectAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/family/{type}'
,
App\Action\FamilyListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/family/{type}/{id}'
,
App\Action\FamilyAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/output-category'
,
App\Action\OutputCategoryListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/output-category/{id}'
,
App\Action\OutputCategoryAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/instance'
,
App\Action\InstanceListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/instance/{name}'
,
App\Action\InstanceAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/instance/{name}/dataset'
,
App\Action\DatasetListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/instance/{name}/dataset-family'
,
App\Action\DatasetFamilyListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/dataset-family/{id}'
,
App\Action\DatasetFamilyAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/dataset-family/{id}/dataset'
,
App\Action\DatasetListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/dataset/{name}'
,
App\Action\DatasetAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/dataset/{name}/criteria-family'
,
App\Action\CriteriaFamilyListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/dataset/{name}/output-family'
,
App\Action\OutputFamilyListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
],
'/dataset/{name}/attribute'
,
App\Action\AttributeListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
],
'/dataset/{name}/attribute/{id}'
,
App\Action\AttributeAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/criteria-family/{id}'
,
App\Action\CriteriaFamilyAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/output-family/{id}'
,
App\Action\OutputFamilyAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
POST
],
'/output-family/{id}/output-category'
,
App\Action\OutputCategoryListAction
::
class
);
$app
->
map
([
OPTIONS
,
GET
,
PUT
,
DELETE
],
'/output-category/{id}'
,
App\Action\OutputCategoryAction
::
class
);
$app
->
get
(
'/search/{dname}'
,
App\Action\SearchAction
::
class
);
src/Entity/Attribute.php
View file @
8d0f6b8c
...
...
@@ -263,333 +263,333 @@ class Attribute implements \JsonSerializable
*/
protected
$outputCategory
;
public
function
__construct
(
$id
,
$dataset
)
public
function
__construct
(
int
$id
,
Dataset
$dataset
)
{
$this
->
id
=
$id
;
$this
->
dataset
=
$dataset
;
}
public
function
getId
()
public
function
getId
()
:
int
{
return
$this
->
id
;
}
public
function
getName
()
public
function
getName
()
:
string
{
return
$this
->
name
;
}
public
function
setName
(
$name
)
public
function
setName
(
string
$name
):
void
{
$this
->
name
=
$name
;
}
public
function
getTableName
()
public
function
getTableName
()
:
string
{
return
$this
->
tableName
;
}
public
function
setTableName
(
$tableName
)
public
function
setTableName
(
string
$tableName
)
:
void
{
$this
->
tableName
=
$tableName
;
}
public
function
getLabel
()
public
function
getLabel
()
:
string
{
return
$this
->
label
;
}
public
function
setLabel
(
$label
)
public
function
setLabel
(
string
$label
)
:
void
{
$this
->
label
=
$label
;
}
public
function
getFormLabel
()
public
function
getFormLabel
()
:
string
{
return
$this
->
formLabel
;
}
public
function
setFormLabel
(
$formLabel
)
public
function
setFormLabel
(
string
$formLabel
)
:
void
{
$this
->
formLabel
=
$formLabel
;
}
public
function
getDescription
()
public
function
getDescription
()
:
string
{
return
$this
->
description
;
}
public
function
setDescription
(
$description
)
public
function
setDescription
(
string
$description
)
:
void
{
$this
->
description
=
$description
;
}
public
function
getOutputDisplay
()
public
function
getOutputDisplay
()
:
int
{
return
$this
->
outputDisplay
;
}
public
function
setOutputDisplay
(
$outputDisplay
)
public
function
setOutputDisplay
(
int
$outputDisplay
)
:
void
{
$this
->
outputDisplay
=
$outputDisplay
;
}
public
function
setCriteriaDisplay
(
$criteriaDisplay
)
public
function
setCriteriaDisplay
(
int
$criteriaDisplay
)
:
void
{
$this
->
criteriaDisplay
=
$criteriaDisplay
;
}
public
function
getCriteriaDisplay
()
public
function
getCriteriaDisplay
()
:
int
{
return
$this
->
criteriaDisplay
;
}
public
function
getSearchFlag
()
public
function
getSearchFlag
()
:
string
{
return
$this
->
searchFlag
;
}
public
function
setSearchFlag
(
$searchFlag
)
public
function
setSearchFlag
(
string
$searchFlag
)
:
void
{
$this
->
searchFlag
=
$searchFlag
;
}
public
function
getSearchType
()
public
function
getSearchType
()
:
string
{
return
$this
->
searchType
;
}
public
function
setSearchType
(
$searchType
)
public
function
setSearchType
(
string
$searchType
)
:
void
{
$this
->
searchType
=
$searchType
;
}
public
function
getOperator
()
public
function
getOperator
()
:
string
{
return
$this
->
operator
;
}
public
function
setOperator
(
$operator
)
public
function
setOperator
(
string
$operator
)
:
void
{
$this
->
operator
=
$operator
;
}
public
function
getType
()
public
function
getType
()
:
string
{
return
$this
->
type
;
}
public
function
setType
(
$type
)
public
function
setType
(
string
$type
):
void
{
$this
->
type
=
$type
;
}
public
function
getMin
()
public
function
getMin
()
:
string
{
return
$this
->
min
;
}
public
function
setMin
(
$min
)
public
function
setMin
(
string
$min
):
void
{
$this
->
min
=
$min
;
}
public
function
getMax
()
public
function
getMax
()
:
string
{
return
$this
->
max
;
}
public
function
setMax
(
$max
)
public
function
setMax
(
string
$max
):
void
{
$this
->
max
=
$max
;
}
public
function
getPlaceholderMin
()
public
function
getPlaceholderMin
()
:
string
{
return
$this
->
placeholderMin
;
}
public
function
setPlaceholderMin
(
$placeholderMin
)
public
function
setPlaceholderMin
(
string
$placeholderMin
)
:
void
{
$this
->
placeholderMin
=
$placeholderMin
;
}
public
function
getPlaceholderMax
()
public
function
getPlaceholderMax
()
:
string
{
return
$this
->
placeholderMax
;
}
public
function
setPlaceholderMax
(
$placeholderMax
)
public
function
setPlaceholderMax
(
string
$placeholderMax
)
:
void
{
$this
->
placeholderMax
=
$placeholderMax
;
}
public
function
getUriAction
()
public
function
getUriAction
()
:
string
{
return
$this
->
uriAction
;
}
public
function
setUriAction
(
$uriAction
)
public
function
setUriAction
(
string
$uriAction
)
:
void
{
$this
->
uriAction
=
$uriAction
;
}
public
function
getRenderer
()
public
function
getRenderer
()
:
string
{
return
$this
->
renderer
;
}
public
function
setRenderer
(
$renderer
)
public
function
setRenderer
(
string
$renderer
)
:
void
{
$this
->
renderer
=
$renderer
;
}
public
function
getDisplayDetail
()
public
function
getDisplayDetail
()
:
int
{
return
$this
->
displayDetail
;
}
public
function
setDisplayDetail
(
$displayDetail
)
public
function
setDisplayDetail
(
int
$displayDetail
)
:
void
{
$this
->
displayDetail
=
$displayDetail
;
}
public
function
getVoUtype
()
public
function
getVoUtype
()
:
string
{
return
$this
->
voUtype
;
}
public
function
setVoUtype
(
$voUtype
)
public
function
setVoUtype
(
string
$voUtype
)
:
void
{
$this
->
voUtype
=
$voUtype
;
}
public
function
getVoUcd
()
public
function
getVoUcd
()
:
string
{
return
$this
->
voUcd
;
}
public
function
setVoUcd
(
$voUcd
)
public
function
setVoUcd
(
string
$voUcd
)
:
void
{
$this
->
voUcd
=
$voUcd
;
}
public
function
getVoUnit
()
public
function
getVoUnit
()
:
string
{
return
$this
->
voUnit
;
}
public
function
setVoUnit
(
$voUnit
)
public
function
setVoUnit
(
string
$voUnit
)
:
void
{
$this
->
voUnit
=
$voUnit
;
}
public
function
getVoDescription
()
public
function
getVoDescription
()
:
string
{
return
$this
->
voDescription
;
}
public
function
setVoDescription
(
$voDescription
)
public
function
setVoDescription
(
string
$voDescription
)
:
void
{
$this
->
voDescription
=
$voDescription
;
}
public
function
getVoDatatype
()
public
function
getVoDatatype
()
:
string
{
return
$this
->
voDatatype
;
}
public
function
setVoDatatype
(
$voDatatype
)
public
function
setVoDatatype
(
string
$voDatatype
)
:
void
{
$this
->
voDatatype
=
$voDatatype
;
}
public
function
getVoSize
()
public
function
getVoSize
()
:
int
{
return
$this
->
voSize
;
}
public
function
setVoSize
(
$voSize
)
public
function
setVoSize
(
int
$voSize
)
:
void
{
$this
->
voSize
=
(
int
)
$voSize
;
$this
->
voSize
=
$voSize
;
}
public
function
getSelected
()
public
function
getSelected
()
:
bool
{
return
$this
->
selected
;
}
public
function
setSelected
(
$selected
)
public
function
setSelected
(
bool
$selected
)
:
void
{
$this
->
selected
=
$selected
;
}
public
function
getOrderBy
()
public
function
getOrderBy
()
:
bool
{
return
$this
->
orderBy
;
}
public
function
setOrderBy
(
$orderBy
)
public
function
setOrderBy
(
bool
$orderBy
)
:
void
{
$this
->
orderBy
=
$orderBy
;
}
public
function
getOrderDisplay
()
public
function
getOrderDisplay
()
:
int
{
return
$this
->
orderDisplay
;
}
public
function
setOrderDisplay
(
$orderDisplay
)
public
function
setOrderDisplay
(
int
$orderDisplay
)
:
void
{
$this
->
orderDisplay
=
$orderDisplay
;
}
public
function
getDetail
()
public
function
getDetail
()
:
bool
{
return
$this
->
detail
;
}
public
function
setDetail
(
$detail
)
public
function
setDetail
(
bool
$detail
)
:
void
{
$this
->
detail
=
$detail
;
}
public
function
getRendererDetail
()
public
function
getRendererDetail
()
:
string
{
return
$this
->
rendererDetail
;
}
public
function
setRendererDetail
(
$rendererDetail
)
public
function
setRendererDetail
(
string
$rendererDetail
)
:
void
{
$this
->
rendererDetail
=
$rendererDetail
;
}
public
function
getOptions
()
public
function
getOptions
()
:
string
{
return
$this
->
options
;
}
public
function
setOptions
(
$options
)
public
function
setOptions
(
string
$options
)
:
void
{
$this
->
options
=
$options
;
}
public
function
getCriteriaFamily
()
public
function
getCriteriaFamily
()
:
CriteriaFamily
{
return
$this
->
criteriaFamily
;
}
public
function
setCriteriaFamily
(
$criteriaFamily
)
public
function
setCriteriaFamily
(
CriteriaFamily
$criteriaFamily
)
:
void
{
$this
->
criteriaFamily
=
$criteriaFamily
;
}
public
function
getOutputCategory
()
public
function
getOutputCategory
()
:
OutputCategory
{
return
$this
->
outputCategory
;
}
public
function
setOutputCategory
(
$outputCategory
)
public
function
setOutputCategory
(
OutputCategory
$outputCategory
)
:
void
{
$this
->
outputCategory
=
$outputCategory
;
}
...
...
src/Entity/CriteriaFamily.php
View file @
8d0f6b8c
...
...
@@ -19,7 +19,7 @@ namespace App\Entity;
class
CriteriaFamily
implements
\
JsonSerializable
{
/**
* @var int
eger
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
...
...
@@ -35,33 +35,46 @@ class CriteriaFamily implements \JsonSerializable
protected
$label
;
/**
* @var int
eger
* @var int
*
* @Column(type="integer", nullable=false)
*/
protected
$display
;
public
function
getId
()
/**
* @var Anis\Entity\Dataset
*
* @ManyToOne(targetEntity="Dataset")
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false)
*/
protected
$dataset
;
public
function
__construct
(
Dataset
$dataset
)
{
$this
->
dataset
=
$dataset
;
}
public
function
getId
():
int
{
return
$this
->
id
;
}
public
function
getLabel
()
public
function
getLabel
()
:
string
{
return
$this
->
label
;
}
public
function
setLabel
(
$label
)
public
function
setLabel
(
string
$label
)
:
void
{
$this
->
label
=
$label
;
}
public
function
getDisplay
()
public
function
getDisplay
()
:
int
{
return
$this
->
display
;
}
public
function
setDisplay
(
$display
)
public
function
setDisplay
(
int
$display
)
:
void
{
$this
->
display
=
$display
;
}
...
...
@@ -71,8 +84,7 @@ class CriteriaFamily implements \JsonSerializable
return
[
'id'
=>
$this
->
getId
(),
'label'
=>
$this
->
getLabel
(),
'display'
=>
$this
->
getDisplay
(),
'type'
=>
'criteria'
'display'
=>
$this
->
getDisplay
()
];
}
}
src/Entity/Database.php
View file @
8d0f6b8c
...
...
@@ -81,7 +81,7 @@ class Database implements \JsonSerializable
*
* @return int
*/
public
function
getId
()
public
function
getId
()
:
int
{
return
$this
->
id
;
}
...
...
@@ -91,7 +91,7 @@ class Database implements \JsonSerializable
*
* @return string
*/
public
function
getLabel
()
public
function
getLabel
()
:
string
{
return
$this
->
label
;
}
...
...
@@ -101,7 +101,7 @@ class Database implements \JsonSerializable
*
* @param string $label
*/
public
function
setLabel
(
$label
)
public
function
setLabel
(
string
$label
)
:
void
{
$this
->
label
=
$label
;
}
...
...
@@ -111,7 +111,7 @@ class Database implements \JsonSerializable
*
* @return string
*/
public
function
getDbName
()
public
function
getDbName
()
:
string
{
return
$this
->
dbname
;
}
...
...
@@ -121,57 +121,57 @@ class Database implements \JsonSerializable
*
* @param string $dbname
*/
public
function
setDbName
(
$dbname
)
public
function
setDbName
(
string
$dbname
)
:
void
{
$this
->
dbname
=
$dbname
;
}
public
function
getType
()
public
function
getType
()
:
string
{
return
$this
->
type
;
}
public
function
setType
(
$type
)
public
function
setType
(
string
$type
):
void
{
$this
->
type
=
$type
;
}
public
function
getHost
()
public
function
getHost
()
:
string
{
return
$this
->
host
;
}
public
function
setHost
(
$host
)
public
function
setHost
(
string
$host
):
void
{
$this
->
host
=
$host
;
}
public
function
getPort
()
public
function
getPort
()
:
int
{
return
$this
->
port
;
}
public
function
setPort
(
$port
)
public
function
setPort
(
int
$port
)
:
void
{
$this
->
port
=
$port
;
}
public
function
getLogin
()
public
function
getLogin
()
:
string
{
return
$this
->
login
;
}
public
function
setLogin
(
$login
)
public
function
setLogin
(
string
$login
)
:
void
{
$this
->
login
=
$login
;
}
public
function
getPassword
()
public
function
getPassword
()
:
string
{
return
$this
->
password
;
}
public
function
setPassword
(
$password
)
public
function
setPassword
(
string
$password
)
:
void
{
$this
->
password
=
$password
;
}
...
...
src/Entity/Dataset.php
View file @
8d0f6b8c
...
...
@@ -92,14 +92,6 @@ class Dataset implements \JsonSerializable
*/
protected
$project
;
/**
* @var Anis\Entity\Instance
*
* @ManyToOne(targetEntity="Instance")
* @JoinColumn(name="instance_name", referencedColumnName="name", nullable=false)
*/
protected
$instance
;
/**
* @var Anis\Entity\Project
*
...
...
@@ -121,122 +113,112 @@ class Dataset implements \JsonSerializable
$this
->
attributes
=
new
ArrayCollection
();
}
public
function
getName
()
public
function
getName
()
:
string
{