497 lines
11 KiB
PHP
497 lines
11 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\SiteRepository;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use \JsonSerializable;
|
|
|
|
#[ORM\Entity(repositoryClass: SiteRepository::class)]
|
|
#[ORM\Table(name: 'sito')]
|
|
class Site implements JsonSerializable
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(name: 'localita', length: 255, nullable: true)]
|
|
private ?string $place = null;
|
|
|
|
#[ORM\Column(name: 'indirizzo', type: Types::TEXT, nullable: true)]
|
|
private ?string $address = null;
|
|
|
|
#[ORM\Column(name: 'comune', length: 30)]
|
|
private ?string $municipality = null;
|
|
|
|
#[ORM\Column(name: 'localizzazione', type: Types::TEXT, nullable: true)]
|
|
private ?string $localization = null;
|
|
|
|
#[ORM\Column(name: 'denominazione', type: Types::TEXT, nullable: true)]
|
|
private ?string $denomination = null;
|
|
|
|
#[ORM\Column(name: 'definizione', length: 255, nullable: true)]
|
|
private ?string $definition = null;
|
|
|
|
#[ORM\Column(name: 'periodo', length: 255, nullable: true)]
|
|
private ?string $period = null;
|
|
|
|
#[ORM\Column(name: 'fase', length: 255, nullable: true)]
|
|
private ?string $phase = null;
|
|
|
|
#[ORM\Column(name: 'cronologia', length: 255, nullable: true)]
|
|
private ?string $chronology = null;
|
|
|
|
#[ORM\Column(name: 'motivazione_cron', length: 255, nullable: true)]
|
|
private ?string $chronologyMotivation = null;
|
|
|
|
#[ORM\Column(name: 'descrizione', type: Types::TEXT, nullable: true)]
|
|
private ?string $description = null;
|
|
|
|
#[ORM\Column(name: 'ritrovamento', length: 255, nullable: true)]
|
|
private ?string $finding = null;
|
|
|
|
#[ORM\Column(name: 'materiali_rinv', length: 255, nullable: true)]
|
|
private ?string $materials = null;
|
|
|
|
#[ORM\Column(name: 'luogo_custodia_mat', type: Types::TEXT, nullable: true)]
|
|
private ?string $conservationPlace = null;
|
|
|
|
#[ORM\Column(name: 'documenti', type: Types::TEXT, nullable: true)]
|
|
private ?string $documentation = null;
|
|
|
|
#[ORM\Column(name: 'rilievi', length: 255, nullable: true)]
|
|
private ?string $surveys = null;
|
|
|
|
#[ORM\Column(name: 'proprietà', length: 255, nullable: true)]
|
|
private ?string $ownership = null;
|
|
|
|
#[ORM\Column(name: 'gis_id', length: 20)]
|
|
private ?string $gisId = null;
|
|
|
|
#[ORM\Column(name: 'stato_conserv', length: 255, nullable: true)]
|
|
private ?string $conservationState = null;
|
|
|
|
#[ORM\Column(name: 'desc_breve', length: 255, nullable: true)]
|
|
private ?string $shortDescription = null;
|
|
|
|
#[ORM\Column(name: 'loc_generica', length: 200, nullable: true)]
|
|
private ?string $genericPlace = null;
|
|
|
|
#[ORM\Column(name: 'tecniche_ed', nullable: true)]
|
|
private ?string $techniques = null;
|
|
|
|
#[ORM\Column(name: 'autore_scheda', nullable: true)]
|
|
private ?string $author = null;
|
|
|
|
#[ORM\Column(name: 'geojson', nullable: false, type: Types::BOOLEAN)]
|
|
private ?bool $geojson = null;
|
|
|
|
#[ORM\Column(name: 'area', nullable: false, type: Types::BOOLEAN)]
|
|
private ?bool $area = null;
|
|
|
|
#[ORM\Column(name: 'etichetta', nullable: false, length: 100)]
|
|
private ?string $label = null;
|
|
|
|
private ?float $lat;
|
|
|
|
private ?float $lng;
|
|
|
|
private ?ArrayCollection $images;
|
|
|
|
/**
|
|
* @var Document[] $documents
|
|
*/
|
|
private ?array $documents;
|
|
|
|
/**
|
|
* @var Bibliography[] $bibliography
|
|
*/
|
|
private ?array $bibliography;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setId(string $id): static
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPlace(): ?string
|
|
{
|
|
return $this->place;
|
|
}
|
|
|
|
public function setPlace(?string $place): static
|
|
{
|
|
$this->place = $place;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAddress(): ?string
|
|
{
|
|
return $this->address;
|
|
}
|
|
|
|
public function setAddress(?string $address): static
|
|
{
|
|
$this->address = $address;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMunicipality(): ?string
|
|
{
|
|
return $this->municipality;
|
|
}
|
|
|
|
public function setMunicipality(string $municipality): static
|
|
{
|
|
$this->municipality = $municipality;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLocalization(): ?string
|
|
{
|
|
return $this->localization;
|
|
}
|
|
|
|
public function setLocalization(?string $localization): static
|
|
{
|
|
$this->localization = $localization;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDenomination(): ?string
|
|
{
|
|
return $this->denomination;
|
|
}
|
|
|
|
public function setDenomination(?string $denomination): static
|
|
{
|
|
$this->denomination = $denomination;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDefinition(): ?string
|
|
{
|
|
return $this->definition;
|
|
}
|
|
|
|
public function setDefinition(?string $definition): static
|
|
{
|
|
$this->definition = $definition;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPeriod(): ?string
|
|
{
|
|
return $this->period;
|
|
}
|
|
|
|
public function setPeriod(?string $period): static
|
|
{
|
|
$this->period = $period;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPhase(): ?string
|
|
{
|
|
return $this->phase;
|
|
}
|
|
|
|
public function setPhase(?string $phase): static
|
|
{
|
|
$this->phase = $phase;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getChronology(): ?string
|
|
{
|
|
return $this->chronology;
|
|
}
|
|
|
|
public function setChronology(?string $chronology): static
|
|
{
|
|
$this->chronology = $chronology;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getChronologyMotivation(): ?string
|
|
{
|
|
return $this->chronologyMotivation;
|
|
}
|
|
|
|
public function setChronologyMotivation(?string $chronologyMotivation): static
|
|
{
|
|
$this->chronologyMotivation = $chronologyMotivation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDescription(): ?string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
public function setDescription(?string $description): static
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getFinding(): ?string
|
|
{
|
|
return $this->finding;
|
|
}
|
|
|
|
public function setFinding(?string $finding): static
|
|
{
|
|
$this->finding = $finding;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMaterials(): ?string
|
|
{
|
|
return $this->materials;
|
|
}
|
|
|
|
public function setMaterials(?string $materials): static
|
|
{
|
|
$this->materials = $materials;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getConservationPlace(): ?string
|
|
{
|
|
return $this->conservationPlace;
|
|
}
|
|
|
|
public function setConservationPlace(?string $conservationPlace): static
|
|
{
|
|
$this->conservationPlace = $conservationPlace;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSurveys(): ?string
|
|
{
|
|
return $this->surveys;
|
|
}
|
|
|
|
public function setSurveys(?string $surveys): static
|
|
{
|
|
$this->surveys = $surveys;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getOwnership(): ?string
|
|
{
|
|
return $this->ownership;
|
|
}
|
|
|
|
public function setOwnership(?string $ownership): static
|
|
{
|
|
$this->ownership = $ownership;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGisId(): ?string
|
|
{
|
|
return $this->gisId;
|
|
}
|
|
|
|
public function setGisId(string $gisId): static
|
|
{
|
|
$this->gisId = $gisId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getConservationState(): ?string
|
|
{
|
|
return $this->conservationState;
|
|
}
|
|
|
|
public function setConservationState(?string $conservationState): static
|
|
{
|
|
$this->conservationState = $conservationState;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getShortDescription(): ?string
|
|
{
|
|
return $this->shortDescription;
|
|
}
|
|
|
|
public function setShortDescription(?string $shortDescription): static
|
|
{
|
|
$this->shortDescription = $shortDescription;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGenericPlace(): ?string
|
|
{
|
|
return $this->genericPlace;
|
|
}
|
|
|
|
public function setGenericPlace(?string $genericPlace): static
|
|
{
|
|
$this->genericPlace = $genericPlace;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDocumentation(): ?string
|
|
{
|
|
return $this->documentation;
|
|
}
|
|
|
|
public function setDocumentation(string $documentation): static
|
|
{
|
|
$this->documentation = $documentation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getTechniques(): ?string
|
|
{
|
|
return $this->techniques;
|
|
}
|
|
|
|
public function setTechniques(string $techniques): static
|
|
{
|
|
$this->techniques = $techniques;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAuthor(): ?string
|
|
{
|
|
return $this->author;
|
|
}
|
|
|
|
public function setAuthor(string $author): static
|
|
{
|
|
$this->author = $author;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLat(): ?float
|
|
{
|
|
return $this->lat;
|
|
}
|
|
|
|
public function setLat(float $lat): static
|
|
{
|
|
$this->lat = $lat;
|
|
|
|
return $this;
|
|
}
|
|
public function getLng(): ?float
|
|
{
|
|
return $this->lng;
|
|
}
|
|
public function setLng(float $lng): static
|
|
{
|
|
$this->lng = $lng;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getImages(): ?ArrayCollection
|
|
{
|
|
return $this->images;
|
|
}
|
|
|
|
public function setImages(ArrayCollection $images): static
|
|
{
|
|
$this->images = $images;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDocuments(): ?array
|
|
{
|
|
return $this->documents;
|
|
}
|
|
|
|
public function setDocuments(array $documents): static
|
|
{
|
|
$this->documents = $documents;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getBibliography(): ?array
|
|
{
|
|
return $this->bibliography;
|
|
}
|
|
|
|
public function setBibliography(array $bibliography): static
|
|
{
|
|
$this->bibliography = $bibliography;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function jsonSerialize(): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'gisId' => $this->gisId,
|
|
'place' => $this->place,
|
|
'genericPlace' => $this->genericPlace,
|
|
'address' => $this->address,
|
|
'municipality' => $this->municipality,
|
|
'localization' => $this->localization,
|
|
'coordinates' => [$this->lat, $this->lng],
|
|
'denomination' => $this->denomination,
|
|
'definition' => $this->definition,
|
|
'period' => $this->period,
|
|
'phase' => $this->phase,
|
|
'chronology' => $this->chronology,
|
|
'motivation' => $this->chronologyMotivation,
|
|
'finding' => $this->finding,
|
|
'surveys' => $this->surveys,
|
|
'materials' => $this->materials,
|
|
'conservationState' => $this->conservationState,
|
|
'conservationPlace' => $this->conservationPlace,
|
|
'documentation' => $this->documentation,
|
|
'description' => $this->description,
|
|
'shortDescription' => $this->shortDescription,
|
|
'ownership' => $this->ownership,
|
|
'images' => $this->images->toArray(),
|
|
'documents' => $this->documents,
|
|
'bibliography' => $this->bibliography,
|
|
'techniques' => $this->techniques,
|
|
'author' => $this->author,
|
|
'geojson' => $this->geojson,
|
|
'area' => $this->area,
|
|
'label' => $this->label,
|
|
];
|
|
}
|
|
}
|