Returns the node where all membership types are stored.
763112
Node getMembershipTypeStorageNode(Session session) throws PathNotFoundException, RepositoryException
   {
      return (Node)session.getItem(service.getStoragePath() + "/"
         + JCROrganizationServiceImpl.STORAGE_JOS_MEMBERSHIP_TYPES);
   }
1263710
def member_ids(self):
        """"""
        info = self.raw.get(ATTR_MEMBERS, {})

        if not info or ROOT_DEVICES2 not in info:
            return []

        return info[ROOT_DEVICES2].get(ATTR_ID, [])
435301
public function findNodesOfType(array $nodes, string $type): array
    {
        $collectedNodes = [];

        foreach ($nodes as $node) {
            if (is_array($node)) {
                $collectedNodes = array_merge(
                    $this->findNodesOfType($node, $type),
                    $collectedNodes
                );
            } elseif ($node instanceof Node) {
                if (is_a($node, $type, true)) {
                    $collectedNodes[] = $node;
                }

                $collectedNodes = array_merge(
                    $this->findNodesOfType(
                        AstHelper::getSubNodes($node),
                        $type
                    ),
                    $collectedNodes
                );
            }
        }

        return $collectedNodes;
    }
1123002
private MembershipType readMembershipType(Node node) throws Exception
   {
      MembershipTypeImpl mt = new MembershipTypeImpl();
      mt.setName(node.getName().equals(JCROrganizationServiceImpl.JOS_MEMBERSHIP_TYPE_ANY) ? ANY_MEMBERSHIP_TYPE : node
         .getName());
      mt.setInternalId(node.getUUID());
      mt.setDescription(utils.readString(node, MembershipTypeProperties.JOS_DESCRIPTION));
      mt.setCreatedDate(utils.readDate(node, MembershipTypeProperties.EXO_DATE_CREATED));
      mt.setModifiedDate(utils.readDate(node, MembershipTypeProperties.EXO_DATE_MODIFIED));

      return mt;
   }
1197544
boolean containsAllMembers(ProtoType type) {
    if (type == null) throw new NullPointerException("type == null");
    return types.contains(type) && !members.containsKey(type);
  }
30104
public NodeTypeIterator getMixinNodeTypes() throws RepositoryException
   {
      List<NodeTypeData> allNodeTypes = typesManager.getAllNodeTypes();

      Collections.sort(allNodeTypes, new NodeTypeDataComparator());

      EntityCollection ec = new EntityCollection();
      for (NodeTypeData nodeTypeData : allNodeTypes)
      {
         if (nodeTypeData.isMixin())
         {
            ec.add(new NodeTypeImpl(nodeTypeData, typesManager, this, locationFactory, valueFactory, dataManager));
         }
      }
      return ec;
   }
401145
public List<String> getNodeTypes() {
        List<String> result = new ArrayList<String>();

        List<?> configuredNodeTypes = doc.getArray(FieldName.NODE_TYPES);
        if (configuredNodeTypes != null) {
            for (Object configuredNodeType : configuredNodeTypes) {
                result.add(configuredNodeType.toString());
            }
        }

        return result;
    }
214374
public function getLocationNodeTypes() {
    $fieldMap = $this->entityFieldManager->getFieldMap();
    $locationBundles = $fieldMap['node']['field_location_coordinates']['bundles'];
    $nodeTypes = $this->entityTypeManager->getStorage('node_type')->loadByProperties(['type' => array_keys($locationBundles)]);

    return $nodeTypes;
  }
1269530
def get_schema_spec(self, key):
    """"""
    member_node = self._ast_node.member.get(key, None)
    if not member_node:
      return schema.AnySchema()

    s = framework.eval(member_node.member_schema, self.env(self))
    if not isinstance(s, schema.Schema):
      raise ValueError('Node %r with schema node %r should evaluate to Schema, got %r' % (member_node, member_node.member_schema, s))
    return s
1120209
public List<MemberState> getRemoteMemberStates(Member.Type type) {
    List<MemberState> members = memberTypes.get(type);
    return members != null ? members : Collections.EMPTY_LIST;
  }
1112417
public static Map<String, StoreDefinition> getUserStoreDefMapOnNode(AdminClient adminClient,
                                                                        Integer nodeId) {
        List<StoreDefinition> storeDefinitionList = adminClient.metadataMgmtOps.getRemoteStoreDefList(nodeId)
                                                                               .getValue();
        Map<String, StoreDefinition> storeDefinitionMap = Maps.newHashMap();
        for(StoreDefinition storeDefinition: storeDefinitionList) {
            storeDefinitionMap.put(storeDefinition.getName(), storeDefinition);
        }
        return storeDefinitionMap;
    }
112236
def _node_type(st):
    
    _types = [
        (stat.S_ISBLK, "block device"),
        (stat.S_ISCHR, "character device"),
        (stat.S_ISFIFO, "named pipe"),
        (stat.S_ISSOCK, "socket")
    ]
    for t in _types:
        if t[0](st.st_mode):
            return t[1]
600467
def _members(self):
        
        return {
            key: value
            for key, value in self.__dict__.items()
            # NB: ignore internal SQLAlchemy state and nested relationships
            if not key.startswith("_") and not isinstance(value, Model)
        }
142840
def list_members(self, retrieve_all=True, **_params):
        """"""
        # Pass filters in "params" argument to do_request
        return self.list('members', self.members_path, retrieve_all,
                         **_params)
1350776
private static List<String> resolveMemberShapes(MemberModel member) {

        if (member == null) return new LinkedList<String>();
        if (member.getEnumType() != null) {
            return Collections.singletonList(member.getEnumType());
        } else if (member.isList()) {
            return resolveMemberShapes(member.getListModel().getListMemberModel());
        } else if (member.isMap()) {
            List<String> memberShapes = new LinkedList<String>();
            memberShapes.addAll(resolveMemberShapes(member.getMapModel().getKeyModel()));
            memberShapes.addAll(resolveMemberShapes(member.getMapModel().getValueModel()));
            return memberShapes;
        } else if (member.isSimple()) {
            // member is scalar, do nothing
            return new LinkedList<String>();
        } else {
            // member is a structure.
            return Collections.singletonList(member.getVariable().getSimpleType());
        }
    }
1077068
def get_node_type(self, node, parent=None):
        
        if isinstance(node, CompositeDocument):
            return 'composite-page'
        elif isinstance(node, (Document, DocumentPointer)):
            return 'page'
        elif isinstance(node, Binder) and parent is None:
            return 'book'
        for child in node:
            if isinstance(child, TranslucentBinder):
                return 'unit'
        return 'chapter'
144715
def _collect_node_profiles(self):
        """"""
        bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()

        # map of profile capability -> [node_uuid, ...]
        profile_map = collections.defaultdict(list)

        for node in bm_client.node.list(maintenance=False):
            node = bm_client.node.get(node.uuid)
            profiles = re.findall(r'profile:(.*?)(?:,|$)',
                                  node.properties.get('capabilities', ''))
            if not profiles:
                profile_map[None].append(node.uuid)
            for p in profiles:
                profile_map[p].append(node.uuid)

        return dict(profile_map)