User: Dallan Date: 12/27/11
| 21 | * Date: 12/27/11 |
| 22 | */ |
| 23 | public class SpouseRef extends ExtensionContainer { |
| 24 | private String ref = null; |
| 25 | private String _pref = null; |
| 26 | |
| 27 | public String getRef() { |
| 28 | return ref; |
| 29 | } |
| 30 | |
| 31 | public void setRef(String ref) { |
| 32 | this.ref = ref; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Convenience function to dereference person |
| 37 | * @param gedcom Gedcom |
| 38 | * @return referenced person |
| 39 | */ |
| 40 | public Person getPerson(Gedcom gedcom) { |
| 41 | return gedcom.getPerson(ref); |
| 42 | } |
| 43 | |
| 44 | public String getPreferred() { |
| 45 | return _pref; |
| 46 | } |
| 47 | |
| 48 | public void setPreferred(String pref) { |
| 49 | this._pref = pref; |
| 50 | } |
| 51 | |
| 52 | public void accept(Visitor visitor) { |
| 53 | throw new RuntimeException("Not implemented - pass isHusband"); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Handle the visitor |
| 58 | * @param visitor Visitor |
| 59 | * @param isHusband false for wife; ChildRef overrides this method |
| 60 | */ |
| 61 | public void accept(Visitor visitor, boolean isHusband) { |
| 62 | if (visitor.visit(this, isHusband)) { |
| 63 | super.visitContainedObjects(visitor); |
| 64 | visitor.endVisit(this); |
| 65 | } |
| 66 | } |
| 67 | } |
nothing calls this directly
no outgoing calls
no test coverage detected