XMLMapAttr attrMap = topRE.getAttr(true); Object retVal = attrMap.put(foName, attr);
/** Initialize a reference with parsed element. * @param currentRef the reference * @param resElem the new element * @return ret&0x01 if content changed, ret&0x02 if attributes changed. */ private int initializeReference(FileObjRef currentRef, ResourceElem resElem) { if (!currentRef.isInitialized()) { currentRef.initialize(resElem); return 0x00; } else { boolean attrDiff = currentRef.attacheAttrs(resElem.getAttr(false)); currentRef.setUrlContext(resElem.getUrlContext()); boolean diff = false; if (resElem.getContent() != null) { diff = !(currentRef.content instanceof byte[]) || !java.util.Arrays.equals((byte[])currentRef.content, resElem.getContent()); currentRef.content = resElem.getContent(); } else if (resElem.getURI() != null) { diff = !resElem.getURI().equals(currentRef.content); currentRef.content = resElem.getURI(); } return (diff ? 0x01 : 0x00) + (attrDiff ? 0x02 : 0x00); } }
if (XMLMapAttr.Attr.isValid(key) != -1) { XMLMapAttr.Attr attr = XMLMapAttr.createAttributeAndDecode(key,value); XMLMapAttr attrMap = topRE.getAttr (true); Object retVal = attrMap.put(foName,attr); if (retVal != null)
if (XMLMapAttr.Attr.isValid(key) != -1) { XMLMapAttr.Attr attr = XMLMapAttr.createAttributeAndDecode(key,value); XMLMapAttr attrMap = topRE.getAttr (true); Object retVal = attrMap.put(foName,attr); if (retVal != null)
public void initialize (ResourceElem res) { content = res.getContent (); XMLMapAttr tmp = res.getAttr (false); if (tmp != null && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte)(res.isFolder ()?1:0); if (content == null) content = res.getURI (); setUrlContext (res.getUrlContext ()); }
private void initializeReference (FileObjRef currentRef, ResourceElem resElem) { if (!currentRef.isInitialized ()) currentRef.initialize (resElem); else { currentRef.attacheAttrs (resElem.getAttr (false)); currentRef.setUrlContext (resElem.getUrlContext ()); if (resElem.getContent() != null) { currentRef.content = resElem.getContent(); } else if (resElem.getURI() != null) { currentRef.content = resElem.getURI(); } } }
public void initialize (ResourceElem res) { content = res.getContent (); XMLMapAttr tmp = res.getAttr (false); if (tmp != null && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte)(res.isFolder ()?1:0); if (content == null) content = res.getURI (); setUrlContext (res.getUrlContext ()); }
private void initializeReference (FileObjRef currentRef, ResourceElem resElem) { if (!currentRef.isInitialized ()) currentRef.initialize (resElem); else { currentRef.attacheAttrs (resElem.getAttr (false)); currentRef.setUrlContext (resElem.getUrlContext ()); if (resElem.getContent() != null) { currentRef.content = resElem.getContent(); } else if (resElem.getURI() != null) { currentRef.content = resElem.getURI(); } } }
public void initialize(ResourceElem res) { content = res.getContent(); XMLMapAttr tmp = res.getAttr(false); if ((tmp != null) && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte) (res.isFolder() ? 1 : 0); if (content == null) { content = res.getURI(); } setUrlContext(res.getUrlContext()); }