/** * Factory method for this type. * * @param server Server the new instance lives within. Non-null. * @param parent Parent instance. Always null on this level. * @param element XML element to create instance from. Non-null. * @return New WITSML rig instance. Never null. */ static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent, XElement element) { //Debug.Assert(element != null : "element cannot be null"; String id = element.Attribute("uid").Value; String parentId = element.Attribute("uidWellbore").Value; String name = element.Element(element.Name.Namespace + "name").Value.Trim(); //, element.getNamespace()); WitsmlRig rig = new WitsmlRig(server, id, name, parent, parentId); rig.update(element); return(rig); }
/** * Factory method for this type. * * @param server Server the new instance lives within. Non-null. * @param parent Parent instance. Always null on this level. * @param element XML element to create instance from. Non-null. * @return New WITSML rig instance. Never null. */ static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent, XElement element) { //Debug.Assert(element != null : "element cannot be null"; String id = element.Attribute("uid").Value; String parentId = element.Attribute("uidWellbore").Value; String name = element.Element(element.Name.Namespace + "name").Value.Trim(); //, element.getNamespace()); WitsmlRig rig = new WitsmlRig(server, id, name, parent, parentId); rig.update(element); return rig; }