public final class OriginEntity extends ParamsEntity implements Origin
Modifier and Type | Class and Description |
---|---|
static class |
OriginEntity.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT_NAME
Origin element name.
|
static String |
ENTITY_PREFIX
Origin entity prefix.
|
static String |
ENTITY_REFERENCE_NAME
Origin entity reference name.
|
UUID_COMPARATOR
Modifier | Constructor and Description |
---|---|
protected |
OriginEntity(Optional<String> name,
Optional<UUID> uuid,
Optional<KeyedGroups> attributes,
Optional<Map<String,Text>> texts,
Optional<Params> params,
Set<PointEntity> pointEntities)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addPointEntity(PointEntity pointEntity)
Adds a a point entity.
|
OriginEntity |
copy()
Creates a copy of this entity.
|
boolean |
equals(Object other)
|
String |
getElementName()
Gets the entity element name.
|
Set<PointEntity> |
getPointEntities()
Gets the point entities.
|
String |
getPrefix()
Gets the class prefix.
|
String |
getReferenceName()
Gets the entity reference name.
|
int |
hashCode() |
static OriginEntity.Builder |
newBuilder()
Returns a new builder.
|
getParams, setParams
addText, getAttributes, getAttributes, getTexts, setAttributes
compareTo, getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID, toString
getAttributes, getName, getNameInUpperCase, getUUID
public static final String ELEMENT_NAME
public static final String ENTITY_PREFIX
public static final String ENTITY_REFERENCE_NAME
protected OriginEntity(@Nonnull Optional<String> name, @Nonnull Optional<UUID> uuid, @Nonnull Optional<KeyedGroups> attributes, @Nonnull Optional<Map<String,Text>> texts, @Nonnull Optional<Params> params, @Nonnull Set<PointEntity> pointEntities)
name
- The optional entity name.uuid
- The optional entity UUID.attributes
- The optional attributes.texts
- The optional texts.params
- The optional params.pointEntities
- The point entities.@Nonnull @CheckReturnValue public static OriginEntity.Builder newBuilder()
@CheckReturnValue public boolean addPointEntity(@Nonnull PointEntity pointEntity)
pointEntity
- The point entity.public OriginEntity copy()
public boolean equals(Object other)
For two Entity
to be equal, they must at least be instances of
the same class, have the same UUID
and name.
For two Metadata
Entity
to be equal, they must at
least be instances of the same class, have the same UUID
,
Attributes
, name and descriptive texts.
equals
in class ParamsEntity
public String getElementName()
The entity element is used to in the generation of the entity URI.
getElementName
in interface Entity
@Nonnull @CheckReturnValue public Set<PointEntity> getPointEntities()
public String getPrefix()
Each concrete entity subclass has its own prefix which will be the same for all its instances. This prefix is used to avoid name collision between different classes in a common registry.
public String getReferenceName()
getReferenceName
in interface Entity
public int hashCode()
hashCode
in class ParamsEntity
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.