예제 #1
0
  void reconcileID() throws AbortSerializationException {
    // find objects that were not a part of the object graph
    idReferencedObjects.removeAll(objectsWithId);

    for (Iterator itr = idReferencedObjects.iterator(); itr.hasNext(); ) {
      IdentifiableObject o = (IdentifiableObject) itr.next();
      reportError(
          new NotIdentifiableEventImpl(
              ValidationEvent.ERROR,
              Messages.format(Messages.ERR_DANGLING_IDREF, o.____jaxb____getId()),
              new ValidationEventLocatorImpl(o)));
    }

    // clear the garbage
    idReferencedObjects.clear();
    objectsWithId.clear();
  }
예제 #2
0
 public String onIDREF(IdentifiableObject obj) throws SAXException {
   idReferencedObjects.add(obj);
   String id = obj.____jaxb____getId();
   if (id == null) {
     reportError(
         new NotIdentifiableEventImpl(
             ValidationEvent.ERROR,
             Messages.format(Messages.ERR_NOT_IDENTIFIABLE),
             new ValidationEventLocatorImpl(obj)));
   }
   return id;
 }