Tripal
Public Member Functions | List of all members
Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface Interface Reference
Inheritance diagram for Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface:
Collaboration graph
[legend]

Public Member Functions

 getIdSpaceNames ()
 
 addIdSpace ($idSpace)
 
 removeIdSpace ($idspace)
 
 getTerms ($name, $exact=True)
 
 getURL ()
 
 setURL ($url)
 
 getNameSpace ()
 
 setLabel ($label)
 
 getLabel ()
 
- Public Member Functions inherited from Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface
 createRecord ()
 
 destroy ()
 
 isValid ()
 
 recordExists ()
 

Detailed Description

Defines an interface for tripal vocabulary plugins.

Member Function Documentation

◆ addIdSpace()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::addIdSpace (   $idSpace)

Adds the id space with the given collection name to this vocabulary. The given collection name must be a valid id space collection.

Parameters
string$idSpaceThe id space collection name.
Returns
bool True on success or false otherwise.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ getIdSpaceNames()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::getIdSpaceNames ( )

Returns list of id space collection names that is contained in this vocabulary.

Returns
array An array of id space collection name strings.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ getLabel()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::getLabel ( )

Returns the label of the vocabulary.

This is the human readable proper name of the vocabulary.

Note that the name of the collection serves as the namespace of the vocabulary.

Returns
string $label The name of the vocabulary.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ getNameSpace()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::getNameSpace ( )

Returns the namespace of the vocabulary

This should be identical to the name of the collection, and therefore, there is no setter function.

Returns
string $namespace The namespace of the vocabulary.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ getTerms()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::getTerms (   $name,
  $exact = True 
)

Returns the terms in this vocabulary whose names match the given name. Matches can only be exact or a substring depending on the given flag. The default is to only return exact matches.

Parameters
string$nameThe name.
bool$exactTrue to only include exact matches else include all substring matches.
Returns
array Array of matching Drupal\tripal\TripalVocabTerms\TripalTerm instances.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, Drupal\tripal\TripalVocabTerms\TripalVocabularyBase, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ getURL()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::getURL ( )

Returns the URL of this vocabulary.

Returns
string The URL.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ removeIdSpace()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::removeIdSpace (   $idspace)

Removes the id space from this vocabulary with the given collection name.

Parameters
string$idSpaceThe id space collection name.
Returns
bool True on success or false otherwise.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ setLabel()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::setLabel (   $label)

Sets the label for the vocabulary.

This is the human readable proper name of the vocabulary.

Note that the name of the collection serves as the namespace of the vocabulary.

Parameters
string$labelThe name of the vocabulary.
Returns
bool True on success or false otherwise.
bool True if the value was set or false otherwise.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.

◆ setURL()

Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface::setURL (   $url)

Sets the URL of this vocabulary to the given URL.

Parameters
string$urlThe URL.
Returns
bool True if the value was set or false otherwise.

Implemented in Drupal\tripal_chado\Plugin\TripalVocabulary\ChadoVocabulary, and Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary.


The documentation for this interface was generated from the following file: