/** * Returns a list containing Relation GData extension objects. This method takes a formatted OM Element * and converts it to a list of event objects. * * @param relationsElement The parent element containing the individual elements. * @return a list containing GData extension Relation objects. */ protected final List<Relation> getRelationList(final OMElement relationsElement) { Map<String, Relation.Rel> relationRelMap = buildRelationRelMap(); List<Relation> relationList = new ArrayList<Relation>(); Iterator< ? > relationIterator = relationsElement.getChildElements(); while (relationIterator.hasNext()) { OMElement singleRelationElement = (OMElement) relationIterator.next(); Relation relation = new Relation(); relation.setRel(relationRelMap.get(singleRelationElement.getLocalName())); relation.setValue(singleRelationElement.getText()); relationList.add(relation); } return relationList; }
/** * Immutable constructor. * * @param label label. * @param rel relation type. * @param value value. */ public Relation(String label, Rel rel, String value) { super(); setLabel(label); setRel(rel); setValue(value); setImmutable(true); }
/** * Immutable constructor. * * @param label label. * @param rel relation type. * @param value value. */ public Relation(String label, Rel rel, String value) { super(); setLabel(label); setRel(rel); setValue(value); setImmutable(true); }
/** * Immutable constructor. * * @param label label. * @param rel relation type. * @param value value. */ public Relation(String label, Rel rel, String value) { super(); setLabel(label); setRel(rel); setValue(value); setImmutable(true); }