Exemplo n.º 1
0
        /**
         * Factory method for this type.
         *
         * @param server   Server the new instance lives within. Non-null.
         * @param parent   Parent instance. May be null.
         * @param element  XML element to create instance from. Non-null.
         * @return         New WITSML log instance. Never null.
         */
        static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent,
                                        XElement element)
        { //throws WitsmlParseException {
          //Debug.Assert(server != null : "server cannot be null";
          //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());

            WitsmlLog log = new WitsmlLog(server, id, name, parent, parentId);

            log.update(element);

            return(log);
        }
Exemplo n.º 2
0
        /**
         * Factory method for this type.
         *
         * @param server   Server the new instance lives within. Non-null.
         * @param parent   Parent instance. May be null.
         * @param element  XML element to create instance from. Non-null.
         * @return         New WITSML log instance. Never null.
         */
        static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent,
            XElement element)
        {
            //throws WitsmlParseException {

            //Debug.Assert(server != null : "server cannot be null";
            //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());

            WitsmlLog log = new WitsmlLog(server, id, name, parent, parentId);
            log.update(element);

            return log;
        }