Changed AbstractDataSoure to AbstractPrimitiveSource

This commit is contained in:
Kevin Frantz 2018-11-21 18:22:05 +01:00
parent aaf335ce30
commit 11dc206575
7 changed files with 27 additions and 17 deletions

View File

@ -23,7 +23,7 @@ use App\Entity\Source\Collection\TreeCollectionSourceInterface;
* @ORM\Table(name="source") * @ORM\Table(name="source")
* @ORM\InheritanceType("JOINED") * @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"data" = "App\Entity\Source\Primitive\AbstractDataSource", "collection" = "App\Entity\Source\Collection\AbstractCollectionSource","operation"="App\Entity\Source\Operation\AbstractOperation"}) * @ORM\DiscriminatorMap({"primitive" = "App\Entity\Source\Primitive\AbstractPrimitiveSource", "collection" = "App\Entity\Source\Collection\AbstractCollectionSource","operation"="App\Entity\Source\Operation\AbstractOperation"})
*/ */
abstract class AbstractSource extends AbstractEntity implements SourceInterface abstract class AbstractSource extends AbstractEntity implements SourceInterface
{ {

View File

@ -2,8 +2,13 @@
namespace App\Entity\Source\Complex; namespace App\Entity\Source\Complex;
use App\Entity\Source\Primitive\DataSourceInterface; use App\Entity\Source\SourceInterface;
interface ComplexSourceInterface extends DataSourceInterface /**
* Complex sources contain out of one or more primitive sources.
*
* @author kevinfrantz
*/
interface ComplexSourceInterface extends SourceInterface
{ {
} }

View File

@ -14,6 +14,6 @@ use App\Entity\Source\AbstractSource;
* @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"name" = "App\Entity\Source\Primitive\Name\AbstractNameSource"}) * @ORM\DiscriminatorMap({"name" = "App\Entity\Source\Primitive\Name\AbstractNameSource"})
*/ */
abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface abstract class AbstractPrimitiveSource extends AbstractSource implements PrimitiveSourceInterface
{ {
} }

View File

@ -1,9 +0,0 @@
<?php
namespace App\Entity\Source\Primitive;
use App\Entity\Source\SourceInterface;
interface DataSourceInterface extends SourceInterface
{
}

View File

@ -2,7 +2,7 @@
namespace App\Entity\Source\Primitive\Name; namespace App\Entity\Source\Primitive\Name;
use App\Entity\Source\Primitive\AbstractDataSource; use App\Entity\Source\Primitive\AbstractPrimitiveSource;
use App\Entity\Attribut\NameAttribut; use App\Entity\Attribut\NameAttribut;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
@ -19,7 +19,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"nickname" = "NicknameSource","firstname" = "FirstNameSource", "surname" = "SurnameSource"}) * @ORM\DiscriminatorMap({"nickname" = "NicknameSource","firstname" = "FirstNameSource", "surname" = "SurnameSource"})
*/ */
class AbstractNameSource extends AbstractDataSource implements NameSourceInterface class AbstractNameSource extends AbstractPrimitiveSource implements NameSourceInterface
{ {
use NameAttribut; use NameAttribut;

View File

@ -2,9 +2,9 @@
namespace App\Entity\Source\Primitive\Name; namespace App\Entity\Source\Primitive\Name;
use App\Entity\Source\Primitive\DataSourceInterface; use App\Entity\Source\Primitive\PrimitiveSourceInterface;
use App\Entity\Attribut\NameAttributInterface; use App\Entity\Attribut\NameAttributInterface;
interface NameSourceInterface extends DataSourceInterface, NameAttributInterface interface NameSourceInterface extends PrimitiveSourceInterface, NameAttributInterface
{ {
} }

View File

@ -0,0 +1,14 @@
<?php
namespace App\Entity\Source\Primitive;
use App\Entity\Source\SourceInterface;
/**
* Primitive sources contain one attribut, which is not a source.
*
* @author kevinfrantz
*/
interface PrimitiveSourceInterface extends SourceInterface
{
}