/** * Get the default Java reader. * @return The Java reader. */ public static TypeInfoPathManager getPathManager() { if(pathmanager==null) { synchronized(JavaReader.class) { if(pathmanager==null) { pathmanager = new TypeInfoPathManager(typeinfos); } } } return pathmanager; }
/** * Create a new manager. */ public TypeInfoPathManager(Set typeinfos) { if(typeinfos!=null) { for(Iterator it=typeinfos.iterator(); it.hasNext(); ) { addTypeInfo((TypeInfo)it.next()); } } }
/** * 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(QName tag, QName[] fullpath, Map rawattributes) { return findTypeInfo((Set)typeinfos.get(tag), fullpath, rawattributes); }
TypeInfo typeinfo = readcontext.getPathManager().getTypeInfo(localname, fullpath, rawattrs); IObjectReaderHandler handler = typeinfo!=null ? typeinfo.getReaderHandler() : null; if(handler==null)
final TypeInfo typeinfo = readcontext.getPathManager().getTypeInfo(localname, fullpath, topse.getRawAttributes());
/** * Get the default Java reader. * @return The Java reader. */ public static TypeInfoPathManager getPathManager() { if(pathmanager==null) { synchronized(JavaReader.class) { if(pathmanager==null) { pathmanager = new TypeInfoPathManager(getTypeInfos()); } } } return pathmanager; }
public void read(File file) throws Exception { FileInputStream is = new FileInputStream(file); AReader reader = XMLReaderFactory.getInstance().createReader(false, false, null); Set types = getXMLMapping(); reader.read(new TypeInfoPathManager(types), new BeanObjectReaderHandler(types) { public void handleAttributeValue(Object object, QName xmlattrname, List attrpath, String attrval, Object attrinfo, AReadContext context) throws Exception { if (attrinfo != null) { super.handleAttributeValue(object, xmlattrname, attrpath, attrval, attrinfo, context); } } }, is, BpmnModelReader.class.getClassLoader(), new BpmnReadContext()); }
manager = new TypeInfoPathManager(mappings); handler = new BeanObjectReaderHandler(mappings);
manager = new TypeInfoPathManager(mappings); handler = new BeanObjectReaderHandler(mappings);
typeinfosread.add(ti_ocp); return new Tuple2<TypeInfoPathManager, IObjectReaderHandler>(new TypeInfoPathManager(typeinfosread), new BeanObjectReaderHandler(typeinfosread));
typeinfosread.add(ti_ocp); return new Tuple2<TypeInfoPathManager, IObjectReaderHandler>(new TypeInfoPathManager(typeinfosread), new BeanObjectReaderHandler(typeinfosread));
typeinfosread.add(ti_ocp); return new Tuple2<TypeInfoPathManager, IObjectReaderHandler>(new TypeInfoPathManager(typeinfosread), new BeanObjectReaderHandler(typeinfosread));