Trait

models.services

EntityService

Related Doc: package services

Permalink

trait EntityService extends AnyRef

Defines common data access methods for retrieving and manipulating models.Entity.

The trait is implemented by models.services.DBDocumentService.

Annotations
@ImplementedBy()
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EntityService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def blacklist(ids: List[Long])(index: String): Boolean

    Permalink

    Marks the entities associated with the given ids as blacklisted.

    Marks the entities associated with the given ids as blacklisted.

    Blacklisted entities don't appear in any result set.

    ids

    the entity ids to blacklist.

    index

    the data source index or database name to query.

    returns

    true, if all entities are successfully marked as blacklisted. False if at least one entity is not correct marked.

  2. abstract def changeName(id: Long, newName: String)(index: String): Boolean

    Permalink

    Changes the name of the entity corresponding to the given entity id.

    Changes the name of the entity corresponding to the given entity id.

    id

    the entity id to change.

    newName

    the new name to apply.

    index

    the data source index or database name to query.

    returns

    true, if the operation was successful. False otherwise.

  3. abstract def changeType(id: Long, newType: String)(index: String): Boolean

    Permalink

    Changes the type of the entity corresponding to the given entity id.

    Changes the type of the entity corresponding to the given entity id.

    id

    the entity id to change.

    newType

    the new type to apply.

    index

    the data source index or database name to query.

    returns

    true, if the operation was successful. False otherwise.

  4. abstract def getBlacklisted()(index: String): List[Entity]

    Permalink

    Returns all blacklisted entities for the underlying collection.

    Returns all blacklisted entities for the underlying collection.

    index

    the data source index or database name to query.

    returns

    a list of models.Entity, where each entity is marked as blacklisted.

  5. abstract def getByIds(ids: List[Long])(index: String): List[Entity]

    Permalink

    Returns a list of models.Entity matching the given entity ids.

    Returns a list of models.Entity matching the given entity ids.

    ids

    a list of entity ids.

    index

    the data source index or database name to query.

    returns

    a list of models.Entity corresponding to the given ids or scala.Nil if no matching entity is found.

  6. abstract def getEntityFragments(docId: Long)(index: String): List[(Entity, Fragment)]

    Permalink

    Returns all entity occurrences for the given document including their position in the document.

    Returns all entity occurrences for the given document including their position in the document.

    docId

    the document id.

    index

    the data source index or database name to query.

    returns

    a list of tuple consisting of an entity and its position in the document.

  7. abstract def getMerged()(index: String): Map[Entity, List[Entity]]

    Permalink

    Returns all merged entities for the underlying collection.

    Returns all merged entities for the underlying collection.

    index

    the data source index or database name to query.

    returns

    a map linking from the focal entity to its duplicates.

  8. abstract def getTypes()(index: String): List[String]

    Permalink

    Returns a list of distinct entity types in the underlying collection.

  9. abstract def merge(focalId: Long, duplicates: List[Long])(index: String): Boolean

    Permalink

    Merges multiple nodes in a given focal node.

    Merges multiple nodes in a given focal node.

    The duplicates don't appear in any result set anymore. Further, any entity-related search using the focal node as instance also queries for its duplicates i.e. searching for "Angela Merkel" will also search for "Angela" or "Dr. Merkel".

    focalId

    the central entity id.

    duplicates

    entity ids referring to similar textual mentions of the focal id.

    index

    the data source index or database name to query.

    returns

    true, if the operation was successful. False otherwise.

  10. abstract def undoBlacklist(ids: List[Long])(index: String): Boolean

    Permalink

    Removes the blacklisted mark from the entities associated with the given ids.

    Removes the blacklisted mark from the entities associated with the given ids.

    After executing this operation, the respective entities do appear in result sets again.

    ids

    the entity ids to remove the blacklist mark from.

    index

    the data source index or database name to query.

    returns

    true, if the blacklist mark is successfully removed from all entities. False if at least one blacklist mark for an entity is not correct removed.

  11. abstract def undoMerge(focalIds: List[Long])(index: String): Boolean

    Permalink

    Withdraws models.services.EntityService#merge for the given entity id.

    Withdraws models.services.EntityService#merge for the given entity id.

    focalIds

    the central entity ids.

    index

    the data source index or database name to query.

    returns

    true, if the removal was successful. False otherwise.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped