public interface TaggingBackend
extends com.escenic.spi.ServiceProvider
Modifier and Type | Method and Description |
---|---|
void |
addAlias(GenericTag<URI,URI> pTag,
String pAlias)
Add the provided alias to the specific tag.
|
URI |
addChild(GenericTag<URI,URI> pParent,
String pName,
String pDescription)
Adds tag as a child of this tag in the same tag structure.
|
URI |
addChild(GenericTag<URI,URI> pParent,
String pTagId,
String pName,
String pDescription)
Adds tag as a child of this tag in the same tag structure.
|
URI |
addChildWithAliases(GenericTag<URI,URI> pParent,
String pName,
String pDescription,
List<String> pAliases)
Adds tag as a child of this tag in the same tag structure.
|
URI |
addChildWithAliases(GenericTag<URI,URI> pParent,
String pTagId,
String pName,
String pDescription,
List<String> pAliases)
Adds tag as a child of this tag in the same tag structure.
|
URI |
createTag(GenericTagStructure<URI> pParent,
String pName,
String pDescription)
Creates a tag in this tag structure.
|
URI |
createTag(GenericTagStructure<URI> pParent,
String pTagIdentifier,
String pName,
String pDescription)
Creates a tag with a specified identifier in this tag structure.
|
GenericTagStructure<URI> |
createTagStructure(URI pScheme,
String pName,
String pDescription)
Creates a tag structure supported by this backend.
|
URI |
createTagWithAliases(GenericTagStructure<URI> pStructure,
String pName,
String pDescription,
List<String> pAliases)
Creates a tag in this tag structure.
|
URI |
createTagWithAliases(GenericTagStructure<URI> pStructure,
String pTagIdentifier,
String pName,
String pDescription,
List<String> pAliases)
Creates a tag with a specified identifier in this tag structure.
|
void |
delete(GenericTag<URI,URI> pTag)
Deletes this tag.
|
void |
delete(GenericTagStructure<URI> pTagStructure)
Delete this tag structure.
|
void |
deleteAlias(GenericTag<URI,URI> pTag,
String pAlias)
Delete the provided alias from the specific tag.
|
Map<URI,List<Hit>> |
findTagByName(String pStartsWith)
Deprecated.
use Solr instead.
|
Map<URI,List<Hit>> |
findTagByName(String pStartsWith,
List<URI> pSchemes)
Deprecated.
use Solr instead.
|
GenericTag<URI,URI> |
getTag(long pTagDatabaseId)
Gets a tag in this backend identified by a tag database id.
|
GenericTag<URI,URI> |
getTag(URI pTagIdentifier)
Gets a tag in this backend identified by a tag identifier.
|
int |
getTagByNameLimit()
Find tags by name methods considers this limit, this is the maximum number of hits
that can be returned by those methods.
|
GenericTagStructure<URI> |
getTagStructure(URI pScheme)
Gets a tag structure by scheme.
|
Set<GenericTagStructure<URI>> |
getTagStructures()
Get the set of tag structures supported by this backend.
|
GenericTag<URI,URI> |
mergeTags(GenericTag<URI,URI> pTarget,
List<GenericTag<URI,URI>> pTagsToMerge,
boolean pKeepAsAlias)
Merges a list of tags into the given target tag.
|
void |
updateTag(GenericTag<URI,URI> pTag,
GenericTag<URI,URI> pParent)
Updates a tag with the specified parent.
|
void |
updateTag(GenericTag<URI,URI> pTag,
String pName,
String pDescription)
Updates a tag with specified name and description.
|
Set<GenericTagStructure<URI>> getTagStructures() throws ClassificationException
ClassificationException
- if getting the tag structures fails.GenericTagStructure<URI> getTagStructure(URI pScheme) throws ClassificationException
pScheme
- the scheme of the tag structure.null
if not found.ClassificationException
- if getting the tag structure fails.GenericTagStructure<URI> createTagStructure(URI pScheme, String pName, String pDescription) throws URISyntaxException, ClassificationException
pScheme
- the scheme of the tag structure, must conform to the syntax of the
tag:<taggingEntity> part of the TagURI
.pName
- the name of the tag structure.pDescription
- the description of the tag structure.URISyntaxException
- if the identifier is in invalid format.ClassificationException
- if crating the tag structure fails.@Deprecated Map<URI,List<Hit>> findTagByName(String pStartsWith) throws ClassificationException
ClassificationException
@Deprecated Map<URI,List<Hit>> findTagByName(String pStartsWith, List<URI> pSchemes) throws ClassificationException
ClassificationException
GenericTag<URI,URI> getTag(URI pTagIdentifier) throws ClassificationException
pTagIdentifier
- the identifier of the tag.ClassificationException
- if loading of tag fails.GenericTag<URI,URI> getTag(long pTagDatabaseId) throws ClassificationException
pTagDatabaseId
- the database id of the tag.ClassificationException
URI createTag(GenericTagStructure<URI> pParent, String pName, String pDescription) throws ClassificationException
pParent
- the tag structure where the tag should be createdpName
- the name of the tag.pDescription
- the description of the tag.ClassificationException
- if the tag creation fails.URI createTag(GenericTagStructure<URI> pParent, String pTagIdentifier, String pName, String pDescription) throws ClassificationException
pParent
- the tag structure where the tag should be createdpTagIdentifier
- the identifier of the tag.pName
- the name of the tag.pDescription
- the description of the tag.ClassificationException
- if the tag creation fails.URI createTagWithAliases(GenericTagStructure<URI> pStructure, String pName, String pDescription, List<String> pAliases) throws ClassificationException
pStructure
- the tag structure where the tag should be createdpName
- the name of the tag.pDescription
- the description of the tag.pAliases
- the list of aliases to be created with this tag.ClassificationException
- if the tag creation fails.URI createTagWithAliases(GenericTagStructure<URI> pStructure, String pTagIdentifier, String pName, String pDescription, List<String> pAliases) throws ClassificationException
pParent
- the tag structure where the tag should be createdpTagIdentifier
- the identifier of the tag.pName
- the name of the tag.pDescription
- the description of the tag.pAliases
- the list of aliases to be created with this tag.ClassificationException
- if the tag creation fails.void delete(GenericTagStructure<URI> pTagStructure) throws ClassificationException
pTagStructure
- the tag structure to deleteClassificationException
- if tag structure deletion fails.URI addChild(GenericTag<URI,URI> pParent, String pName, String pDescription) throws ClassificationException
pParent
- the parent of the new tagpName
- the name of the new tag.pDescription
- the description of the new tag.ClassificationException
- if adding tag fails.URI addChild(GenericTag<URI,URI> pParent, String pTagId, String pName, String pDescription) throws ClassificationException
pParent
- the parent of the new tagpTagId
- is the identifier of the tag to be created.pName
- the name of the new tag.pDescription
- the description of the new tag.ClassificationException
- if adding tag fails.URI addChildWithAliases(GenericTag<URI,URI> pParent, String pName, String pDescription, List<String> pAliases) throws ClassificationException
pParent
- the parent of the new tagpName
- the name of the new tag.pDescription
- the description of the new tag.pAliases
- the list of aliases to be created with this tag.ClassificationException
- if adding tag fails.URI addChildWithAliases(GenericTag<URI,URI> pParent, String pTagId, String pName, String pDescription, List<String> pAliases) throws ClassificationException
pParent
- the parent of the new tagpTagId
- is the identifier of the tag to be created.pName
- the name of the new tag.pDescription
- the description of the new tag.pAliases
- the list of aliases to be created with this tag.ClassificationException
- if adding tag fails.void delete(GenericTag<URI,URI> pTag) throws ClassificationException
pTag
- the tag to deleteClassificationException
- if tag deletion fails.void updateTag(GenericTag<URI,URI> pTag, String pName, String pDescription) throws ClassificationException
pTag
- the tag to update.pName
- the new name of the tag.pDescription
- the new description of the tag.ClassificationException
- if tag update fails.void updateTag(GenericTag<URI,URI> pTag, GenericTag<URI,URI> pParent) throws ClassificationException
pTag
- the tag to update.pParent
- the new parent of the tag.ClassificationException
- if tag update fails.GenericTag<URI,URI> mergeTags(GenericTag<URI,URI> pTarget, List<GenericTag<URI,URI>> pTagsToMerge, boolean pKeepAsAlias) throws ClassificationException
pTarget
- the target to merge the tags into.pTagsToMerge
- the list of tags to merge into the target tag.pKeepAsAlias
- keep the label of merged tags as aliases for the target tag.ClassificationException
- if the merge fails.int getTagByNameLimit()
void addAlias(GenericTag<URI,URI> pTag, String pAlias) throws ClassificationException
pTag
- the tag to which the alias to be added.pAlias
- the alias to be added.ClassificationException
- if adding alias fails.void deleteAlias(GenericTag<URI,URI> pTag, String pAlias) throws ClassificationException
pTag
- the tag from which the alias to be deleted.pAlias
- the alias to be deleted.ClassificationException
- if deletion of alias fails.© 1998- 2021 Escenic AS