MatrixToolkit.addAssetToXML(xml, assetids[i], startLoc, limit);
Asset asset = getAsset(assetids[i]); if (asset != null) { String[] linkids = asset.getLinkIds(); if (assetids[i].equals("1")) { MatrixToolkit.addAssetToXML(xml, assetids[i], "0", startLoc, limit); } else { for (int j=0; j< linkids.length; j++) { MatrixToolkit.addAssetToXML(xml, assetids[i], linkids[j], startLoc, limit); } } }
	public static Element makeRefreshRequest(String[] assetids, String direction, int start, int limit) throws IOException {		int startLoc = start;		if (limit < 0) {			limit = getLimit();		}		StringBuffer xml = new StringBuffer("<command action=\"get assets\" >");		for (int i = 0; i < assetids.length; i++) {			if (start < 0) {				// start was not specified, calculate it				if (direction.equals("prev")) {					startLoc = calcPrevOffset(assetids[i]);				} else if (direction.equals("next")) {					startLoc = calcNextOffset(assetids[i]);				} else if (direction.equals("base")) {					Asset asset = getAsset(assetids[i]);					asset.setTotalKidsLoaded(0);					startLoc = 0;				} else {					Asset asset = getAsset(assetids[i]);					if (asset != null) {						startLoc = asset.getTotalKidsLoaded();					}				}			} else {				Asset asset = getAsset(assetids[i]);				if (asset != null) {					asset.setTotalKidsLoaded(startLoc);				}			}			MatrixToolkit.addAssetToXML(xml, assetids[i], startLoc, limit);		}		xml.append("</command>");		Document doc = Matrix.doRequest(xml.toString());		return doc.getDocumentElement();	}