Project

General

Profile

« Previous | Next » 

Revision 909d16e8

Added by Andreas Müller almost 15 years ago

Taxon.childrenCount etc. deprecated

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
120 120
	@XmlIDREF
121 121
	@XmlSchemaType(name = "IDREF")
122 122
	@ManyToOne(fetch = FetchType.LAZY)
123
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
123 124
	private Taxon taxonomicParentCache;
124 125
	
125 126
	
127
	
126 128
	@XmlElementWrapper(name = "taxonNodes")
127 129
	@XmlElement(name = "taxonNode")
128 130
    //@XmlIDREF
......
133 135

  
134 136
	//cached number of taxonomic children
135 137
	@XmlElement(name = "TaxonomicChildrenCount")
138
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
136 139
	private int taxonomicChildrenCount;
137 140
	
138 141
// ************* CONSTRUCTORS *************/	
......
571 574
	 * @see    	   			#getTaxonomicParent()
572 575
	 * @see    	   			#getTaxonomicChildrenCount()
573 576
	 */
574
	@Deprecated  //use TaxonNode instead
577
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
575 578
	public void addTaxonomicChild(Taxon child, ReferenceBase citation, String microcitation){
576 579
		if (child == null){
577 580
			throw new NullPointerException("Child Taxon is 'null'");
......
602 605
	 * @see    			eu.etaxonomy.cdm.model.common.RelationshipBase#getRelatedTo()
603 606
	 * 
604 607
	 */
608
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
605 609
	public void removeTaxonomicChild(Taxon child){
606 610
		Set<TaxonRelationship> taxRels = this.getTaxonRelations();
607 611
		for (TaxonRelationship taxRel : taxRels ){
......
627 631
	 * @see  #getTaxonomicChildrenCount()
628 632
	 * @see  #getRelationsFromThisTaxon()
629 633
	 */
634
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
630 635
	public Taxon getTaxonomicParent() {
631 636
		return this.taxonomicParentCache;
632 637
	}
......
635 640
	 * Sets the taxononomic parent of <i>this</i> taxon to null.
636 641
	 * Note that this method does not handle taxonomic relationships.
637 642
	 */
643
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
638 644
	public void nullifyTaxonomicParent() {
639 645
		this.taxonomicParentCache = null;
640 646
	}
......
665 671
	 * @see    	   			#getRelationsToThisTaxon()
666 672
	 * @see    	   			#getTaxonomicChildrenCount()
667 673
	 */
674
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
668 675
	public void setTaxonomicParent(Taxon newParent, ReferenceBase citation, String microcitation){
669 676
		//remove previously existing parent relationship!!!
670 677
		Taxon oldParent = this.getTaxonomicParent();
......
695 702
	 * @see  #getRelationsToThisTaxon()
696 703
	 */
697 704
	@Transient
705
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
698 706
	public Set<Taxon> getTaxonomicChildren() {
699 707
		Set<Taxon> taxa = new HashSet<Taxon>();
700 708
		Set<TaxonRelationship> rels = this.getRelationsToThisTaxon();
......
721 729
	 * @see  #getTaxonomicChildren()
722 730
	 * @see  #getRelationsToThisTaxon()
723 731
	 */
732
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
724 733
	public int getTaxonomicChildrenCount(){
725 734
		return taxonomicChildrenCount;
726 735
	}	
......
728 737
	/**
729 738
	 * @see  #getTaxonomicChildrenCount()
730 739
	 */
740
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
731 741
	public void setTaxonomicChildrenCount(int taxonomicChildrenCount) {
732 742
		this.taxonomicChildrenCount = taxonomicChildrenCount;
733 743
	}
......
739 749
	 * @see  #getTaxonomicChildrenCount()
740 750
	 * @see  #getTaxonomicChildren()
741 751
	 */
752
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
742 753
	public boolean hasTaxonomicChildren(){
743 754
		return this.taxonomicChildrenCount > 0;
744 755
	}
745 756

  
757
	@Deprecated //will be removed in future versions. Use Taxonomic Tree/TaxonNode instead
746 758
	private int computeTaxonomicChildrenCount(){
747 759
		int count = 0;
748 760
		for (TaxonRelationship rel: this.getRelationsToThisTaxon()){

Also available in: Unified diff