Java 类javax.xml.bind.helpers.NotIdentifiableEventImpl 实例源码
项目:OpenJSharp
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:OpenJSharp
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:openjdk-jdk10
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:openjdk-jdk10
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:openjdk9
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:openjdk9
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:lookaside_java-1.8.0-openjdk
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:lookaside_java-1.8.0-openjdk
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:infobip-open-jdk-8
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:infobip-open-jdk-8
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:cxf-plus
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:cxf-plus
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:OLD-OpenJDK8
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:OLD-OpenJDK8
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:openjdk-icedtea7
文件:XMLSerializer.java
public String onIDREF( Object obj ) throws SAXException {
String id;
try {
id = getIdFromObject(obj);
} catch (JAXBException e) {
reportError(null,e);
return null; // recover by returning null
}
idReferencedObjects.add(obj);
if(id==null) {
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.NOT_IDENTIFIABLE.format(),
new ValidationEventLocatorImpl(obj) ) );
}
return id;
}
项目:openjdk-icedtea7
文件:XMLSerializer.java
void reconcileID() throws SAXException {
// find objects that were not a part of the object graph
idReferencedObjects.removeAll(objectsWithId);
for( Object idObj : idReferencedObjects ) {
try {
String id = getIdFromObject(idObj);
reportError( new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.DANGLING_IDREF.format(id),
new ValidationEventLocatorImpl(idObj) ) );
} catch (JAXBException e) {
// this error should have been reported already. just ignore here.
}
}
// clear the garbage
idReferencedObjects.clear();
objectsWithId.clear();
}
项目:javacash
文件:ValidationContext.java
/** Tests if all IDREFs have corresponding IDs. */
protected void reconcileIDs() throws SAXException {
if(!validateID) return;
for (Iterator itr = IDREFs.entrySet().iterator(); itr.hasNext();) {
Map.Entry e = (Map.Entry) itr.next();
if(IDs.contains(e.getKey()))
continue; // OK.
// ID was not found.
ValidatableObject source = (ValidatableObject)e.getValue();
reportEvent(
source,
new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.format( Messages.ID_NOT_FOUND, e.getKey() ),
new ValidationEventLocatorImpl( source ) ) );
}
IDREFs.clear();
}
项目:javacash
文件:SAXMarshaller.java
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();
}
项目:wustl-common-package
文件:ValidationContext.java
/** Tests if all IDREFs have corresponding IDs. */
protected void reconcileIDs() throws SAXException {
if(!validateID) return;
for (Iterator itr = IDREFs.entrySet().iterator(); itr.hasNext();) {
Map.Entry e = (Map.Entry) itr.next();
if(IDs.contains(e.getKey()))
continue; // OK.
// ID was not found.
ValidatableObject source = (ValidatableObject)e.getValue();
reportEvent(
source,
new NotIdentifiableEventImpl(
ValidationEvent.ERROR,
Messages.format( Messages.ID_NOT_FOUND, e.getKey() ),
new ValidationEventLocatorImpl( source ) ) );
}
IDREFs.clear();
}
项目:wustl-common-package
文件:SAXMarshaller.java
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();
}
项目:javacash
文件:SAXMarshaller.java
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;
}
项目:wustl-common-package
文件:SAXMarshaller.java
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;
}