/** * Get the most specific mapping info. * @param tag The tag. * @param fullpath The full path. * @return The most specific mapping info. */ public synchronized TypeInfo getTypeInfo(Object type, QName[] fullpath) { // Object type = getObjectType(object, context); // System.out.println("type is: "+type); TypeInfo ret = findTypeInfo((Set)typeinfos.get(type), fullpath); return ret; }
/** * Get the most specific mapping info. * @param type The type. * @param fullpath The full path. * @return The most specific mapping info. */ public TypeInfo getTypeInfo(Object object, QName[] fullpath, IContext context) { TypeInfo ret = null; Object type = getObjectType(object, context); Set tis = titmanager.getTypeInfosByType(type); if(tis!=null) { // Take not into account path if only one candidate if(tis.size()==1) { ret = (TypeInfo)tis.iterator().next(); } // Else disambiguate using path else if(tis.size()>1) { ret = titmanager.findTypeInfo(tis, fullpath); } } return ret; // return titmanager.getTypeInfo(type, fullpath); }