Property provides access to root object in CFB.
540887
def root(self):
        
        sector = self.header.directory_sector_start
        position = (sector + 1) << self.header.sector_shift
        return RootEntry(self, position)
1006376
function forOwn(obj, fn, thisObj){
        forIn_1(obj, function(val, key){
            if (hasOwn_1(obj, key)) {
                return fn.call(thisObj, obj[key], key, obj);
            }
        });
    }
230671
function _getRoot(transform) {
  return function() {
    var parent = transform.parent;
    return parent === undefined ? transform : parent.root;
  }
}
385861
def root(self):
        
        root = self
        while root.parent is not None:
            root = root.parent
        return root
1119068
def root(force_reload=nil)
      @root = nil if force_reload
      @root ||= transaction do
        reload_boundaries
        base_class.roots.find(:first, :conditions => ["#{nested_set_column(:left)} <= ? AND #{nested_set_column(:right)} >= ?", left, right])
      end
    end
348377
@Override
    public Root get(Root root) throws WIMException {
        final String METHODNAME = "get";
        Root outRoot = new Root();

        Map<String, Control> ctrlMap = ControlsHelper.getControlMap(root);
        PropertyControl propertyCtrl = (PropertyControl) ctrlMap.get(SchemaConstants.DO_PROPERTY_CONTROL);
        GroupMembershipControl grpMbrshipCtrl = (GroupMembershipControl) ctrlMap.get(SchemaConstants.DO_GROUP_MEMBERSHIP_CONTROL);
        GroupMemberControl grpMbrCtrl = (GroupMemberControl) ctrlMap.get(SchemaConstants.DO_GROUP_MEMBER_CONTROL);
        AncestorControl ancesCtrl = (AncestorControl) ctrlMap.get(SchemaConstants.DO_ANCESTOR_CONTROL);
        DescendantControl descCtrl = (DescendantControl) ctrlMap.get(SchemaConstants.DO_DESCENDANT_CONTROL);
        CheckGroupMembershipControl chkGrpMbrshipCtrl = (CheckGroupMembershipControl) ctrlMap.get(SchemaConstants.DO_CHECK_GROUP_MEMBERSHIP_CONTROL);
        CacheControl cacheCtrl = (CacheControl) ctrlMap.get(SchemaConstants.DO_CACHE_CONTROL);

        boolean clearCacheForMembership = false;

        // If a cache control is passed, the cache should be cleared
        if (cacheCtrl != null) {
            String cacheMode = cacheCtrl.getMode();
            if (tc.isDebugEnabled())
                Tr.debug(tc, METHODNAME + " Cache Control is passed with mode " + cacheMode);

            // If the mode is 'clearAll', then invalidate the caches
            if (cacheMode != null && SchemaConstants.CACHE_MODE_CLEARALL.equalsIgnoreCase(cacheMode)) {
                // Invalidate the attributes cache
                iLdapConn.invalidateAttributeCache();

                // Invalidate the search cache
                iLdapConn.invalidateSearchCache();

                // Log this clearAll call
                String uniqueName = getCallerUniqueName();
                if (tc.isWarningEnabled())
                    Tr.warning(tc, WIMMessageKey.CLEAR_ALL_CLEAR_CACHE_MODE, WIMMessageHelper.generateMsgParms(reposId, cacheMode, uniqueName));
            }

            // If the mode is 'clearEntity', then invalidate the attribute cache for the DN
            else if (cacheMode != null && SchemaConstants.CACHE_MODE_CLEAR_ENTITY.equalsIgnoreCase(cacheMode)) {
                // Get the entities
                List<Entity> entities = root.getEntities();

                // Iterate over the entities and remove each one from the cache.
                for (Entity inEntity : entities) {
                    // Get the identifier
                    IdentifierType id = inEntity.getIdentifier();
                    String externalName = id.getExternalName();
                    String extId = id.getExternalId();
                    String uniqueName = id.getUniqueName();

                    // Invalidate attibutes
                    iLdapConn.invalidateAttributes(externalName, extId, uniqueName);
                }

                // Set the flag that would be used to determine if the search
                // cache needs to be cleared later, depending on whether
                // the user has passed the Group Member and/or Group Membership controls.
                clearCacheForMembership = true;
            } else if (tc.isWarningEnabled())
                Tr.warning(tc, WIMMessageKey.UNKNOWN_CLEAR_CACHE_MODE, WIMMessageHelper.generateMsgParms(reposId, cacheMode));
        }

        List<String> propNames = null;
        if (propertyCtrl != null) {
            propNames = propertyCtrl.getProperties();
        }
        boolean needMbrAttr = false;

        if (grpMbrCtrl != null
            && (iLdapConfigMgr.getMembershipAttribute() == null || !iLdapConfigMgr.isDefaultMbrAttr())) {
            needMbrAttr = true;
        }

        for (Entity inEntity : root.getEntities()) {
            String inEntityType = inEntity.getTypeName();
            List<String> properties = iLdapConfigMgr.getSupportedProperties(inEntityType, propNames);

            List<String> EntityType = new ArrayList<String>(1);
            EntityType.add(inEntityType);

            IdentifierType inId = inEntity.getIdentifier();

            // Only retrieve member attr when there grpMbrCtrl is not null and no grpMbrship attr.
            LdapEntry ldapEntry = iLdapConn.getEntityByIdentifier(inId, EntityType, properties,
                                                                  (grpMbrshipCtrl != null || chkGrpMbrshipCtrl != null), needMbrAttr);

            // New:: Change to Input/Output property <<START>>
            if (ldapEntry != null && propNames != null) {
                if (propNames.contains(SchemaConstantsInternal.PROP_DISPLAY_BRIDGE_PRINCIPAL_NAME)) {
                    String type = ldapEntry.getType();
                    LdapEntity entity = iLdapConfigMgr.getLdapEntity(type);
                    String attrName = entity.getAttribute(SchemaConstants.PROP_PRINCIPAL_NAME);
                    String[] attrIds = new String[] { attrName };
                    ArrayList<String> entityTypes = new ArrayList<String>(1);
                    entityTypes.add(type);
                    Attributes attrs = iLdapConn.getAttributesByUniqueName(ldapEntry.getUniqueName(), attrIds, entityTypes);
                    if (attrs != null) {
                        NamingEnumeration<? extends Attribute> attEnum = attrs.getAll();
                        while (attEnum.hasMoreElements()) {
                            try {
                                ldapEntry.getAttributes().put(attEnum.next());
                            } catch (NamingException e) {
                                /* Ignore. */
                            }
                        }
                    }

                    if (properties != null)
                        properties.add(SchemaConstants.PROP_PRINCIPAL_NAME);
                    else {
                        properties = new ArrayList<String>();
                        properties.add(SchemaConstants.PROP_PRINCIPAL_NAME);
                    }
                } else if (propNames.contains(SchemaConstantsInternal.PROP_DISPLAY_BRIDGE_CN)) {
                    String type = ldapEntry.getType();
                    LdapEntity entity = iLdapConfigMgr.getLdapEntity(type);
                    String attrName = entity.getAttribute("cn");
                    String[] attrIds = new String[] { attrName };
                    ArrayList<String> entityTypes = new ArrayList<String>(1);
                    entityTypes.add(type);
                    Attributes attrs = iLdapConn.getAttributesByUniqueName(ldapEntry.getUniqueName(), attrIds, entityTypes);
                    if (attrs != null) {
                        NamingEnumeration<? extends Attribute> attEnum = attrs.getAll();
                        while (attEnum.hasMoreElements()) {
                            try {
                                ldapEntry.getAttributes().put(attEnum.next());
                            } catch (NamingException e) {
                                /* Ignore. */
                            }
                        }
                    }

                    if (properties != null)
                        properties.add("cn");
                    else {
                        properties = new ArrayList<String>();
                        properties.add("cn");
                    }
                }
            }
            // New:: Change to Input/Output property <<END>>

            Entity outEntity = createEntityFromLdapEntry(outRoot, SchemaConstants.DO_ENTITIES, ldapEntry, properties);

            // If Cache needs to be cleared
            if (clearCacheForMembership) {
                // If fetched entity is a group
                if (iLdapConfigMgr.isGroup(ldapEntry.getType())) {
                    // If group member control is passed, clear the search cache.
                    // This is done in order to correctly fetch members of dynamic groups.
                    if (grpMbrCtrl != null)
                        iLdapConn.invalidateSearchCache();
                    // If the membership control is passed, clear the search cache as the membership will be determined
                    // by a search
                    if ((grpMbrshipCtrl != null || chkGrpMbrshipCtrl != null))
                        iLdapConn.invalidateSearchCache();
                }
                // If fetched entity is a person or person account
                else if (iLdapConfigMgr.isPerson(ldapEntry.getType()) || iLdapConfigMgr.isPersonAccount(ldapEntry.getType())) {
                    // If the membership control is passed.
                    if ((grpMbrshipCtrl != null || chkGrpMbrshipCtrl != null)) {
                        // If membership attribute is not specified, clear the search cache.
                        if (iLdapConfigMgr.getMembershipAttribute() != null) {
                            String mbrshipAttrName = iLdapConfigMgr.getMembershipAttribute();
                            Attribute mbrshipAttr = ldapEntry.getAttributes().get(mbrshipAttrName);
                            try {
                                // If membership attr is not found
                                if (mbrshipAttr == null || (mbrshipAttr.size() == 1 && mbrshipAttr.get(0) == null)) {
                                    iLdapConn.invalidateSearchCache();
                                }

                                // If membership attr does not include dynamic groups i.e. the membership attribute is defined but its scope is not "All"
                                // or if the membership attribute does not support dynamic groups, then the search results cache need to be cleared.
                                if (iLdapConfigMgr.getMembershipAttributeScope() != LDAP_ALL_GROUP_MEMBERSHIP && iLdapConfigMgr.supportDynamicGroup()) {
                                    iLdapConn.invalidateSearchCache();
                                }
                            } catch (NamingException e) {
                                // If there was any exception in fetching the attributes, clear the search results cache.
                                iLdapConn.invalidateSearchCache();
                            }
                        } else {
                            // If membership attribute is not defined, then clear the search results cache.
                            iLdapConn.invalidateSearchCache();
                        }
                    }
                }
            }

            // Retrieve groups
            getGroups(outEntity, ldapEntry, grpMbrshipCtrl);

            // Retrieve members if this is a group
            if (iLdapConfigMgr.isGroup(ldapEntry.getType())) {
                getMembers(outEntity, ldapEntry, grpMbrCtrl);
            }

            // Retrieve descendants
            getDescendants(outEntity, ldapEntry, descCtrl);

            // Retrieve ancestors
            getAncestors(outEntity, ldapEntry, ancesCtrl);

            if (chkGrpMbrshipCtrl != null) {
                int level = chkGrpMbrshipCtrl.getLevel();
                CheckGroupMembershipControl reChkCtrl = new CheckGroupMembershipControl();
                reChkCtrl.setInGroup(isMemberInGroup(inEntity, ldapEntry, level));
            }
        }

        return outRoot;
    }
605511
def root_context
      context = parent
      context = context.parent until context.is_a? Symbol
      return context
    end
527177
public void defineOwnProperties(Context cx, ScriptableObject props) {
        Object[] ids = props.getIds(false, true);
        ScriptableObject[] descs = new ScriptableObject[ids.length];
        for (int i = 0, len = ids.length; i < len; ++i) {
            Object descObj = ScriptRuntime.getObjectElem(props, ids[i], cx);
            ScriptableObject desc = ensureScriptableObject(descObj);
            checkPropertyDefinition(desc);
            descs[i] = desc;
        }
        for (int i = 0, len = ids.length; i < len; ++i) {
            defineOwnProperty(cx, ids[i], descs[i]);
        }
    }
1185603
protected void createPropertyControlDataObject(Root inputRootDataObject, String inputProperty) {
        // use the root DataGraph to create a PropertyControl DataGraph
        List<Control> propertyControls = inputRootDataObject.getControls();
        PropertyControl propCtrl = null;
        if (propertyControls != null) {
            propCtrl = new PropertyControl();
            propertyControls.add(propCtrl);
        }
        // add the requested property to the return list of properties
        if (propCtrl != null) {
            propCtrl.getProperties().add(inputProperty);
        }
    }
611720
function getProperty1() {
  const type = NodeType.PropertyType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = getIdentOrInterpolation();

  return newNode(type, content, line, column);
}
508326
def update_property_node(node_to_insert, field_uri):
  
  root = T.SetItemField(
            T.FieldURI(FieldURI=field_uri),
            T.CalendarItem(node_to_insert)
        )
  return root
1360395
private String checkOrMarkInnerFieldAccess(Expression source, FieldNode fn, boolean lhsOfAssignment, String delegationData) {
        if (fn == null || fn.isStatic()) return delegationData;
        ClassNode enclosingClassNode = typeCheckingContext.getEnclosingClassNode();
        ClassNode declaringClass = fn.getDeclaringClass();
        // private handled elsewhere
        if ((fn.isPublic() || fn.isProtected()) &&
                (declaringClass != enclosingClassNode || typeCheckingContext.getEnclosingClosure() != null) &&
                declaringClass.getModule() == enclosingClassNode.getModule() && !lhsOfAssignment && enclosingClassNode.isDerivedFrom(declaringClass)) {
            if (source instanceof PropertyExpression) {
                PropertyExpression pe = (PropertyExpression) source;
                // this and attributes handled elsewhere
                if ("this".equals(pe.getPropertyAsString()) || source instanceof AttributeExpression) return delegationData;
                pe.getObjectExpression().putNodeMetaData(StaticTypesMarker.IMPLICIT_RECEIVER, "owner");
            }
            return "owner";
        }
        return delegationData;
    }
37431
protected void bindProperty(PersistentProperty grailsProperty, Property prop, InFlightMetadataCollector mappings) {
        // set the property name
        prop.setName(grailsProperty.getName());
        if (isBidirectionalManyToOneWithListMapping(grailsProperty, prop)) {
            prop.setInsertable(false);
            prop.setUpdateable(false);
        } else {
            prop.setInsertable(getInsertableness(grailsProperty));
            prop.setUpdateable(getUpdateableness(grailsProperty));
        }

        AccessType accessType = AccessType.getAccessStrategy(
                grailsProperty.getMapping().getMappedForm().getAccessType()
        );

        if(accessType == AccessType.FIELD) {
            EntityReflector.PropertyReader reader = grailsProperty.getReader();
            Method getter  = reader != null ? reader.getter() : null;
            if(getter != null && getter.getAnnotation(Traits.Implemented.class) != null) {
                prop.setPropertyAccessorName(TraitPropertyAccessStrategy.class.getName());
            }
            else {
                prop.setPropertyAccessorName( accessType.getType() );
            }
        }
        else {
            prop.setPropertyAccessorName( accessType.getType() );
        }


        prop.setOptional(grailsProperty.isNullable());

        setCascadeBehaviour(grailsProperty, prop);

        // lazy to true
        final boolean isToOne = grailsProperty instanceof ToOne && !(grailsProperty instanceof Embedded);
        PersistentEntity propertyOwner = grailsProperty.getOwner();
        boolean isLazyable = isToOne ||
                !(grailsProperty instanceof Association) && !grailsProperty.equals(propertyOwner.getIdentity());

        if (isLazyable) {
            final boolean isLazy = getLaziness(grailsProperty);
            prop.setLazy(isLazy);

            if (isLazy && isToOne && !(PersistentAttributeInterceptable.class.isAssignableFrom(propertyOwner.getJavaClass()))) {
//                handleLazyProxy(propertyOwner, grailsProperty);
            }
        }
    }
373699
function handleProperties(schema, properties, node, stack) {
    var name = handleTagName(schema, node.tagName, node, stack)
    var attrs = schema.attributes
    var props = properties || {}
    var result = {}
    var allowed
    var prop
    var value

    allowed = own.call(attrs, name) ? attrs[name] : []
    allowed = [].concat(allowed, attrs['*'])

    for (prop in props) {
        value = props[prop]

        if (
            allowed.indexOf(prop) === -1 &&
            !(data(prop) && allowed.indexOf('data*') !== -1)
        ) {
            continue
        }

        if (value && typeof value === 'object' && 'length' in value) {
            value = handlePropertyValues(schema, value, prop)
        } else {
            value = handlePropertyValue(schema, value, prop)
        }

        if (value !== null && value !== undefined) {
            result[prop] = value
        }
    }

    return result
}
232621
function (contextModel, properties, parentContext) {

                if (!(contextModel || properties && _.size(properties))) {
                    // no contextModel OR no properties or empty object passed
                    return this.root();
                }

                parentContext = parentContext || this.root();
                return parentContext.getContext(contextModel, properties);

            }
582512
def _property(methode, zone, key, value):
    '''
    

    '''
    ret = {'status': True}

    # generate update script
    cfg_file = None
    if methode not in ['set', 'clear']:
        ret['status'] = False
        ret['message'] = 'unkown methode {0}!'.format(methode)
    else:
        cfg_file = salt.utils.files.mkstemp()
        with salt.utils.files.fpopen(cfg_file, 'w+', mode=0o600) as fp_:
            if methode == 'set':
                if isinstance(value, dict) or isinstance(value, list):
                    value = _sanitize_value(value)
                value = six.text_type(value).lower() if isinstance(value, bool) else six.text_type(value)
                fp_.write("{0} {1}={2}\n".format(methode, key, _sanitize_value(value)))
            elif methode == 'clear':
                fp_.write("{0} {1}\n".format(methode, key))

    # update property
    if cfg_file:
        _dump_cfg(cfg_file)
        res = __salt__['cmd.run_all']('zonecfg -z {zone} -f {path}'.format(
            zone=zone,
            path=cfg_file,
        ))
        ret['status'] = res['retcode'] == 0
        ret['message'] = res['stdout'] if ret['status'] else res['stderr']
        if ret['message'] == '':
            del ret['message']
        else:
            ret['message'] = _clean_message(ret['message'])

        # cleanup config file
        if __salt__['file.file_exists'](cfg_file):
            __salt__['file.remove'](cfg_file)

    return ret
910949
@NullableDecl
  private Throwable rootCause() {
    for (Step step : steps) {
      if (!step.isCheckCall() && step.subject.actual() instanceof Throwable) {
        return (Throwable) step.subject.actual();
      }
    }
    return null;
  }