List of usage examples for javax.xml.registry JAXRException JAXRException
public JAXRException(Throwable cause)
JAXRException
object initialized with the given Throwable
object. From source file:org.freebxml.omar.common.BindingUtility.java
public Classification createClassification(String classifiedObjectId, String classificationNodeId) throws JAXRException { Classification classification = null; try {//ww w . java 2 s.com classification = rimFac.createClassification(); classification.setId(org.freebxml.omar.common.Utility.getInstance().createId()); classification.setClassifiedObject(classifiedObjectId); classification.setClassificationNode(classificationNodeId); } catch (javax.xml.bind.JAXBException e) { throw new JAXRException(e); } return classification; }
From source file:org.freebxml.omar.common.BindingUtility.java
public Association createAssociation(String src, String target, String associationTypeNodeId, String assocId) throws JAXRException { Association ass = null;//from ww w . jav a 2s . c o m try { ass = rimFac.createAssociation(); ass.setId(assocId); ass.setAssociationType(associationTypeNodeId); ass.setSourceObject(src); ass.setTargetObject(target); } catch (JAXBException e) { throw new JAXRException(e); } return ass; }
From source file:org.freebxml.omar.server.query.QueryManagerImpl.java
/** * Creates and caches all QueryPlugins/*from w w w.ja v a2 s . c o m*/ */ private void getQueryPlugins() { RegistryProperties props = RegistryProperties.getInstance(); Iterator propsIter = props.getPropertyNamesStartingWith(QUERY_PLUGIN_PROPERTY_PREFIX); while (propsIter.hasNext()) { String prop = (String) propsIter.next(); String queryId = prop.substring(QUERY_PLUGIN_PROPERTY_PREFIX.length() + 1); String pluginClassName = props.getProperty(prop); try { Object plugin = createPluginInstance(pluginClassName); if (!(plugin instanceof QueryPlugin)) { throw new JAXRException( CommonResourceBundle.getInstance().getString("message.unexpectedObjectType", new String[] { plugin.getClass().toString(), QueryPlugin.class.toString() })); } queryPluginsMap.put(queryId, plugin); } catch (Exception e) { log.error(e); } } }
From source file:org.freebxml.omar.server.query.QueryManagerImpl.java
/** * Creates and caches all QueryFilterPlugins *//*w w w. ja v a2s.com*/ private void getQueryFilterPlugins() { RegistryProperties props = RegistryProperties.getInstance(); Iterator propsIter = props.getPropertyNamesStartingWith(QUERY_FILTER_PLUGIN_PROPERTY_PREFIX); while (propsIter.hasNext()) { String prop = (String) propsIter.next(); String queryId = prop.substring(QUERY_FILTER_PLUGIN_PROPERTY_PREFIX.length() + 1); String pluginClassName = props.getProperty(prop); try { Object plugin = createPluginInstance(pluginClassName); if (!(plugin instanceof QueryPlugin)) { throw new JAXRException( CommonResourceBundle.getInstance().getString("message.unexpectedObjectType", new String[] { plugin.getClass().toString(), QueryPlugin.class.toString() })); } queryPluginsMap.put(queryId, plugin); } catch (Exception e) { log.error(e); } } }