public XML createXML(String name) { try { return new XML(name); } catch (Exception e) { e.printStackTrace(); return null; } }
/** * @nowebref */ static public XML parse(String data, String options) throws IOException, ParserConfigurationException, SAXException { return new XML(new StringReader(data), null); }
/** * @nowebref */ static public XML parse(String data, String options) throws IOException, ParserConfigurationException, SAXException { return new XML(new StringReader(data), null); }
/** * Honey, can you just check on the kids? Thanks. * * Internal function; not included in reference. */ protected void checkChildren() { if (children == null) { NodeList kids = node.getChildNodes(); int childCount = kids.getLength(); children = new XML[childCount]; for (int i = 0; i < childCount; i++) { children[i] = new XML(this, kids.item(i)); } } }
/** * Honey, can you just check on the kids? Thanks. * * Internal function; not included in reference. */ protected void checkChildren() { if (children == null) { NodeList kids = node.getChildNodes(); int childCount = kids.getLength(); children = new XML[childCount]; for (int i = 0; i < childCount; i++) { children[i] = new XML(this, kids.item(i)); } } }
private XML createXML() { XML root = new XML(PLANAR_TOUCH_CALIBRATION_XML_NAME); setIn(root); return root; }
/** Internal handler to add the node structure. */ protected XML appendChild(Node newNode) { node.appendChild(newNode); XML newbie = new XML(this, newNode); if (children != null) { children = (XML[]) PApplet.concat(children, new XML[] { newbie }); } return newbie; }
protected XML loadXML(String filename, String options) { try { return new XML(createReader(filename), options); } catch (Exception e) { e.printStackTrace(); return null; } }
private XML createXML(String name, Vec3D v) { XML node = new XML(name); this.setVectorIn(node, v); return node; }
private XML intrinsicNode() { XML node = new XML(INTRINSICS_XML_NAME); setXmlTo(node, intrinsics); return node; }
private XML extrinsicsNode() { XML node = new XML(EXTRINSICS_XML_NAME); setXmlTo(node, extrinsics); return node; }
/** Internal handler to add the node structure. */ protected XML appendChild(Node newNode) { node.appendChild(newNode); XML newbie = new XML(this, newNode); if (children != null) { children = (XML[]) PApplet.concat(children, new XML[] { newbie }); } return newbie; }
public XML loadXML(String filename, String options) { try { return new XML(createInput(filename), options); } catch (Exception e) { e.printStackTrace(); return null; } }
/** * @nowebref */ public XML loadXML(String filename, String options) { try { return new XML(createReader(filename), options); // can't use catch-all exception, since it might catch the // RuntimeException about the incorrect case sensitivity } catch (IOException e) { throw new RuntimeException(e); } catch (ParserConfigurationException e) { throw new RuntimeException(e); } catch (SAXException e) { throw new RuntimeException(e); } }
@Override public void addTo(XML xml) { XML homographyNode = new XML(HOMOGRAPHY_XML_NAME); setHomographyTo(homographyNode); xml.addChild(homographyNode); }
private XML resolutionNode() { XML node = new XML(RESOLUTION_XML_NAME); node.setInt(WIDTH_XML_NAME, width); node.setInt(HEIGHT_XML_NAME, height); return node; }
public void saveToXML(PApplet parent, String fileName) { assert (isValid()); XML root = new XML(Calibration.CALIBRATION_XML_NAME); this.addTo(root); parent.saveXML(root, fileName); } public void saveToYAML(PApplet parent, String fileName) {
@Override public void addTo(XML xml) { XML root = new XML(PLANE_XML_NAME); XML pos = createXML(PLANE_POS_XML_NAME, (Vec3D) plane); XML normal = createXML(PLANE_NORMAL_XML_NAME, plane.normal); XML height = new XML(PLANE_HEIGHT_XML_NAME); height.setFloat(PLANE_HEIGHT_XML_NAME, this.height); root.addChild(pos); root.addChild(normal); root.addChild(height); xml.addChild(root); }
private XML createCameraNode() { XML cameraNode = new XML(CAMERA_XML_NAME); cameraNode.setString(CAMERA_NAME_XML_NAME, cameraName); cameraNode.setString(CAMERA_FORMAT_XML_NAME, cameraFormat); String type = this.cameraType.name(); cameraNode.setString(CAMERA_TYPE_XML_NAME, type); return cameraNode; }
private XML createScreenNode() { XML screenNode = new XML(SCREEN_XML_NAME); screenNode.setInt(SCREEN_WIDTH_XML_NAME, projectionScreenWidth); screenNode.setInt(SCREEN_HEIGHT_XML_NAME, projectionScreenHeight); screenNode.setInt(SCREEN_OFFSET_X_XML_NAME, projectionScreenOffsetX); screenNode.setInt(SCREEN_OFFSET_Y_XML_NAME, projectionScreenOffsetY); return screenNode; }