-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #229 from dickschoeller/228-dependency-updates
Fixes #228 - dependency updates
- Loading branch information
Showing
9 changed files
with
97 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...c/main/java/org/schoellerfamily/gedbrowser/analytics/visitor/AbstractAnalysisVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package org.schoellerfamily.gedbrowser.analytics.visitor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.schoellerfamily.gedbrowser.datamodel.Attribute; | ||
import org.schoellerfamily.gedbrowser.datamodel.Child; | ||
import org.schoellerfamily.gedbrowser.datamodel.visitor.GedObjectVisitor; | ||
|
||
/** | ||
* Implements behaviors shared by Person and Family analysis visitors. | ||
* | ||
* @author Dick Schoeller | ||
*/ | ||
public abstract class AbstractAnalysisVisitor extends IgnoreableProcessor | ||
implements GedObjectVisitor { | ||
/** */ | ||
private final List<Attribute> attributes = new ArrayList<>(); | ||
/** */ | ||
private final List<Attribute> trimmedAttributes = new ArrayList<>(); | ||
/** */ | ||
private final List<Child> children = new ArrayList<>(); | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
public AbstractAnalysisVisitor() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @return the list of all attributes | ||
*/ | ||
public final List<Attribute> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
/** | ||
* @return the list of attributes that are interesting | ||
*/ | ||
public final List<Attribute> getTrimmedAttributes() { | ||
return trimmedAttributes; | ||
} | ||
|
||
/** | ||
* @return the list of attributes that are interesting | ||
*/ | ||
public final List<Child> getChildren() { | ||
return children; | ||
} | ||
|
||
/** | ||
* Visit an Attribute. Track the complete list of Attributes and a list | ||
* trimmed by removing "ignoreable" attributes. | ||
* | ||
* @see GedObjectVisitor#visit(Attribute) | ||
*/ | ||
@Override | ||
public final void visit(final Attribute attribute) { | ||
attributes.add(attribute); | ||
if (ignoreable(attribute)) { | ||
return; | ||
} | ||
trimmedAttributes.add(attribute); | ||
} | ||
|
||
/** | ||
* Visit a Child. The list of children may be used by the calling | ||
* algorithm. | ||
* | ||
* @see GedObjectVisitor#visit(Child) | ||
*/ | ||
@Override | ||
public final void visit(final Child child) { | ||
children.add(child); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 1 addition & 63 deletions
64
...src/main/java/org/schoellerfamily/gedbrowser/analytics/visitor/PersonAnalysisVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters