예제 #1
0
 @Override
 public void addReference(ObjectReference ref) {
   if (ref != null) {
     ObjectRefType objectRef = EbXMLFactory30.RIM_FACTORY.createObjectRefType();
     objectRef.setId(ref.getId());
     objectRef.setHome(ref.getHome());
     getContents().add(EbXMLFactory30.RIM_FACTORY.createObjectRef(objectRef));
   }
 }
예제 #2
0
  @Override
  public List<ObjectReference> getReferences() {
    List<ObjectReference> results = new ArrayList<ObjectReference>();
    for (JAXBElement<? extends IdentifiableType> identifiable : getContents()) {
      ObjectRefType objRefEbXML = cast(identifiable, ObjectRefType.class);
      if (objRefEbXML != null) {
        ObjectReference objRef = new ObjectReference();
        objRef.setId(objRefEbXML.getId());
        objRef.setHome(objRefEbXML.getHome());
        results.add(objRef);
      }
    }

    return results;
  }