Search in sources :

Example 1 with IdentifiableObject

use of com.sun.xml.bind.marshaller.IdentifiableObject in project OpenAM by OpenRock.

the class SAXMarshaller method reconcileID.

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();
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) Iterator(java.util.Iterator) NotIdentifiableEventImpl(javax.xml.bind.helpers.NotIdentifiableEventImpl) IdentifiableObject(com.sun.xml.bind.marshaller.IdentifiableObject)

Example 2 with IdentifiableObject

use of com.sun.xml.bind.marshaller.IdentifiableObject in project OpenAM by OpenRock.

the class SAXMarshaller method reconcileID.

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();
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) Iterator(java.util.Iterator) NotIdentifiableEventImpl(javax.xml.bind.helpers.NotIdentifiableEventImpl) IdentifiableObject(com.sun.xml.bind.marshaller.IdentifiableObject)

Example 3 with IdentifiableObject

use of com.sun.xml.bind.marshaller.IdentifiableObject in project OpenAM by OpenRock.

the class SAXMarshaller method reconcileID.

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();
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) Iterator(java.util.Iterator) NotIdentifiableEventImpl(javax.xml.bind.helpers.NotIdentifiableEventImpl) IdentifiableObject(com.sun.xml.bind.marshaller.IdentifiableObject)

Example 4 with IdentifiableObject

use of com.sun.xml.bind.marshaller.IdentifiableObject in project OpenAM by OpenRock.

the class SAXMarshaller method reconcileID.

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();
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) Iterator(java.util.Iterator) NotIdentifiableEventImpl(javax.xml.bind.helpers.NotIdentifiableEventImpl) IdentifiableObject(com.sun.xml.bind.marshaller.IdentifiableObject)

Aggregations

IdentifiableObject (com.sun.xml.bind.marshaller.IdentifiableObject)4 Iterator (java.util.Iterator)4 NotIdentifiableEventImpl (javax.xml.bind.helpers.NotIdentifiableEventImpl)4 ValidationEventLocatorImpl (javax.xml.bind.helpers.ValidationEventLocatorImpl)4