import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
-import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.Parameter;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.envers.Audited;
nodeNumber = getMaxNodeNumberFromRoot() + 1;
}
-
children.add(index, child);
child.setKey(this.getKey());
//this.removeNullValueFromChildren();
}
-
-
/**
* Removes the given polytomous key node from the list of
* {@link #getChildren() children} of <i>this</i> polytomous key node.
/**
* Returns the current maximum value of the node number in the entire key
* starting from the root.
- *
- * @return
*/
private int getMaxNodeNumberFromRoot() {
PolytomousKeyNode rootKeyNode = this.getKey().getRoot();
// result.addException(new Exception("The polytomouskey node was already deleted."));;
return result;
}
- List<PolytomousKeyNode> children = new ArrayList<PolytomousKeyNode>();
+ List<PolytomousKeyNode> children = new ArrayList<>();
node.removeNullValueFromChildren();
for (PolytomousKeyNode child: node.getChildren()){
import java.util.UUID;
import java.util.stream.Collectors;
-import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Service;