Project

General

Profile

Actions

feature request #8257

closed

Remove factory methods for term node creation

Added by Patrick Plitzner about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
New
Assignee:
Patrick Plitzner
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Tags:

Description

Currently it is possible to create a FeatureNode on its own, e.g. with a given term

 public static <T extends DefinedTermBase<T>> FeatureNode<T> NewInstance(T term){
        FeatureNode<T> result = new FeatureNode<>(term.getTermType());
        result.setTerm(term);
        return result;
    }

It should only be possible to create a term node based on its parent or its term tree.

AM: Aus einem ähnlichen Grund hatte ich bei TaxonNodes glaube ich mal grundsätzlich keine alleinstehende Instanzerzeugung zugelassen, weil es gefährlich ist, einen Knoten ohne seinen Baum zu erzeugen.
Ich denke, in diesem Fall sollten wir das auch anpassen. Erzeugen von Knoten sollte nur über Parent oder den Baum möglich sein mittels add-Methoden oder ähnlichem. In diesem Fall ist dann der termType des Baums immer bekannt und wird immer korrekt gesetzt.

Actions #1

Updated by Patrick Plitzner about 5 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Patrick Plitzner about 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 50
Actions #3

Updated by Patrick Plitzner about 5 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Patrick Plitzner to Andreas Müller

@Andreas M.: Can you please have look at the last remaining factory method which is used in one last spot:

    @Deprecated
    public static FeatureNode<Feature> NewInstance(){
        return new FeatureNode<>(TermType.Feature);
    }
Actions #4

Updated by Andreas Müller almost 5 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by Andreas Müller almost 5 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner
  • % Done changed from 50 to 80

should be fixed now and can be closed I guess

Actions #6

Updated by Patrick Plitzner almost 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 80 to 100
Actions

Also available in: Atom PDF