@Override public String toString() { return "type=" + getKnownType(); }
/** * Build up this gender with a field. * * @param field The field. * @return this. */ public Gender field(Field field) { addField(field); return this; }
checkSources(errors, "Error 12: " + personString + " (gender)", person.getGender().getSources(), null, person.getGender().getFields(), docMap);
/** * Build up this gender with a type. * * @param type The type. * @return this. */ public Gender type(GenderType type) { setKnownType(type); return this; }
/** * Build up this gender with a type. * * @param type The type. * @return this. */ public Gender type(URI type) { setType(type); return this; }
@Override public void visitGender(Gender gender) { this.contextStack.push(gender); visitConclusion(gender); List<Field> fields = gender.getFields(); if (fields != null) { for (Field field : fields) { if (field != null) { field.accept(this); } } } this.contextStack.pop(); }
person.getGender().accept(this);
/** * Constructs a new gender object with the passed in type. * * @param type The type of the gender. */ public Gender(GenderType type) { setKnownType(type); }
/** * The type of the gender. * * @param type The type of the gender. */ @JsonIgnore @org.codehaus.jackson.annotate.JsonIgnore public void setKnownType(GenderType type) { setType(type == null ? null : type.toQNameURI()); }
addFields(person.getFields(), person, personFieldsMap); if (person.getGender() != null) { addFields(person.getGender().getFields(), person, personFieldsMap);
public PersonState readFather() { PersonState father = null; //if no male parent found, return null; List<Person> listOfParents = getPersons(); //extract List<Person> from this PersonParentsState if (null != listOfParents) { for (Person parent : listOfParents) { if (GenderType.Male.equals(parent.getGender().getKnownType())) { //father is first male parent father = readParent(parent); break; } } } return father; }
public PersonState readMother() { PersonState mother = null; //if no male parent found, return null; List<Person> listOfParents = getPersons(); //extract List<Person> from this PersonParentsState if (null != listOfParents) { for (Person parent : listOfParents) { if (GenderType.Female.equals(parent.getGender().getKnownType())) { //mother is first female parent mother = readParent(parent); break; } } } return mother; }