cleanup/fixes of label/relation definition usages in the old style

This commit is contained in:
zadam
2020-09-08 20:42:50 +02:00
parent 80f269d844
commit 8b4cf474bd
5 changed files with 9 additions and 49 deletions

View File

@@ -3,9 +3,7 @@ import Attribute from './attribute.js';
import noteAttributeCache from "../services/note_attribute_cache.js";
const LABEL = 'label';
const LABEL_DEFINITION = 'label-definition';
const RELATION = 'relation';
const RELATION_DEFINITION = 'relation-definition';
/**
* FIXME: since there's no "full note" anymore we can rename this to Note
@@ -243,14 +241,6 @@ class NoteShort {
return this.getAttributes(LABEL, name);
}
/**
* @param {string} [name] - label name to filter
* @returns {Attribute[]} all note's label definitions, including inherited ones
*/
getLabelDefinitions(name) {
return this.getAttributes(LABEL_DEFINITION, name);
}
/**
* @param {string} [name] - relation name to filter
* @returns {Attribute[]} all note's relations (attributes with type relation), including inherited ones
@@ -267,14 +257,6 @@ class NoteShort {
return this.getAttributes(RELATION, name);
}
/**
* @param {string} [name] - relation name to filter
* @returns {Attribute[]} all note's relation definitions including inherited ones
*/
getRelationDefinitions(name) {
return this.getAttributes(RELATION_DEFINITION, name);
}
/**
* @param {string} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name