com.tle.core.taxonomy.scripting.types
Interface TaxonomyScriptType
Declaration: public interface TaxonomyScriptType extends java.io.Serializable
All Superinterfaces: java.io.Serializable

 

Retrieve one of these objects with the TaxonomyServiceScriptObject ('data') E.g. var myTaxonomy = data.getTaxonomyByName('myTaxonomy')

 

 

Methods Summary
abstract java.util.List<TermScriptType> getChildTerms(TermScriptType term)
    
abstract TermScriptType getParentTerm(TermScriptType term)
    
abstract TermScriptType getTerm(java.lang.String fullTermPath)
    
abstract TermScriptType insertTerm(java.lang.String parentFullPath, java.lang.String termValue)
    
Add a new term to a taxonomy.
abstract java.util.List<TermScriptType> searchTerms(java.lang.String query)
    
Search for the full term paths in this taxonomy matching the partial query
abstract boolean supportsTermAddition()
    
abstract boolean supportsTermBrowsing()
    
abstract boolean supportsTermSearching()
    

 

 

 

 

getTerm

 

public abstract TermScriptType getTerm( java.lang.String fullTermPath)

 

Parameters:
fullTermPath-
The full path of the term to find.
Returns:
The term at fullTermPath or null if no term found.

 

 

 

getChildTerms

 

public abstract java.util.List<TermScriptType> getChildTerms( TermScriptType term)

 

Parameters:
term-
The term to find the children of.
Returns:
Gets all immediate child terms of the given term. (That is: not grandchild terms)

 

 

 

getParentTerm

 

public abstract TermScriptType getParentTerm( TermScriptType term)

 

Parameters:
term-
The term to find the parent of.
Returns:
Gets the parent of the given term.

 

 

 

searchTerms

 

public abstract java.util.List<TermScriptType> searchTerms( java.lang.String query)

 

Search for the full term paths in this taxonomy matching the partial query

 

Parameters:
query-
The query to match terms against. You may use a wildcard character '*', but there will always be an implied wildcard at the end of the query.
Returns:
A list of full term paths matching the query.

 

 

 

insertTerm

 

public abstract TermScriptType insertTerm( java.lang.String parentFullPath,
java.lang.String termValue)

 

Add a new term to a taxonomy. If the taxonomy does not support term addition an exception will be thrown. Use supportsTermAddition to check this first.

 

Parameters:
parentFullPath-
The full path of the parent node. Depending on the taxonomy data source implementation an exception may be thrown if the parent node cannot be found.
termValue-
The node name of the new term.

 

 

 

supportsTermAddition

 

public abstract boolean supportsTermAddition( )

 

Returns:
true if this taxonomy supports the addition of new terms. This is dependent on the data source of the taxonomy.

 

 

 

supportsTermSearching

 

public abstract boolean supportsTermSearching( )

 

Returns:
true if this taxonomy supports term searching. This is dependent on the data source of the taxonomy (although this will almost always return true).

 

 

 

supportsTermBrowsing

 

public abstract boolean supportsTermBrowsing( )

 

Returns:
true if this taxonomy supports term browsing. This is dependent on the data source of the taxonomy.