List of usage examples for javax.xml.registry UnexpectedObjectException UnexpectedObjectException
public UnexpectedObjectException(Throwable cause)
JAXRException
object initialized with the given Throwable
object. From source file:it.cnr.icar.eric.client.xml.registry.BusinessQueryManagerImpl.java
@SuppressWarnings("unused") static private String classificationToConceptId(Object obj) throws JAXRException { if (!(obj instanceof Classification)) { throw new UnexpectedObjectException(JAXRResourceBundle.getInstance() .getString("message.error.expected.collection.objectType.Classification")); }//ww w .ja v a 2 s .c om Classification cl = (Classification) obj; if (cl.isExternal()) { throw new JAXRException(JAXRResourceBundle.getInstance() .getString("message.error.no.support.external.classification.qaulifier")); } Concept concept = cl.getConcept(); if (concept == null) { throw new JAXRException(JAXRResourceBundle.getInstance() .getString("message.error.internal.classification.concept.null")); } return concept.getKey().getId(); }