Returns an array index for a specific level from the metadata from a flattened json tree.
@param meta
@param level
@return
5841
static Integer getArrayIndex(Map<String,String> meta, int level) {
        return Integer.parseInt(meta.get(level + ARRAY_IDX_SUFFIX));
    }
1104420
function (property, recursive) {
        var metaName = recursive ? jsonUtils.META_FOR_RECLISTENERS : jsonUtils.META_FOR_LISTENERS;
        if (property != null) {// the comparison with null is important, as 0 or "" must be considered as valid
            // property names
            metaName += "_" + property;
        }
        return metaName;
    }
356229
public void indexTSMeta(final TSMeta meta) {
    if (search != null) {
      search.indexTSMeta(meta).addErrback(new PluginError());
    }
  }
728013
@Nullable
	public <T> T getMeta(Class<?> metaType) {
		if (meta != null && deserializer != null) {
			return (T) deserializer.convertValue(meta, metaType);
		}

		return null;
	}
452684
@Nullable
    public static Level findLevel(@Nullable String name) {
        if(name == null || name.isEmpty())
            return null;
        return Level.parse(name);

    }
166508
def get_max_levels_metadata(self):
        """"""
        metadata = dict(self._max_levels_metadata)
        metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['maxLevels']})
        return Metadata(**metadata)
942487
private String getPropertyValue(String level, String name)
    {
        return getDefForLevel(level).getProperty(name);
    }
416207
public Element getElementAtLevel(int level) {
        checkArgument(level >= 0);
        if (level > element.level) return null;
        if (level < element.level) return parent.getElementAtLevel(level);
        return element;
    }
280301
public String getResource(final int level) {
        if (level < resource.length) {
            return resource[level];
        }
        // offset is out of bounds...
        throw new IndexOutOfBoundsException("Index: " + level + ", Size: " + resource.length);
    }
647077
private void readObject(final JsonLevel level) throws EOFException {
        while (true) {
            readNextChar(level);
            if (this.currentChar == JSON_ST) {
                if (!level.isHashValue()) {
                    level.pushMode(Mode.JSON_STRING_HASH_KEY);
                } else {
                    level.pushMode(Mode.JSON_STRING_VALUE);
                }
                readValue(level);
            } else if (this.currentChar == JSON_COLON) {
                //look for value
                level.isHashValue(true);
            } else if (this.currentChar == O_CURLY) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json object can only be a hash value not key");
                }
                if (this.tree.isIntermediaryPath(level.jsonPointer())) {
                    this.pushLevel(Mode.JSON_OBJECT);
                    level.removeLastTokenFromJsonPointer();
                    return;
                }
                level.pushMode(Mode.JSON_OBJECT_VALUE);
                readValue(level);
            } else if (this.currentChar == O_SQUARE) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json array can only be a hash value not key");
                }
                if (this.tree.isIntermediaryPath(level.jsonPointer())) {
                    this.pushLevel(Mode.JSON_ARRAY);
                    level.removeLastTokenFromJsonPointer();
                    return;
                }
                level.pushMode(Mode.JSON_ARRAY_VALUE);
                readValue(level);
            } else if (this.currentChar == JSON_T) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json true can only be a hash value not key");
                }
                level.pushMode(Mode.JSON_BOOLEAN_TRUE_VALUE);
                readValue(level);
            } else if (this.currentChar == JSON_F) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json false can only be a hash value not key");
                }
                level.pushMode(Mode.JSON_BOOLEAN_FALSE_VALUE);
                readValue(level);
            } else if (this.currentChar == JSON_N) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json null can only be a hash value not key");
                }
                level.pushMode(Mode.JSON_NULL_VALUE);
                readValue(level);
            } else if (isNumber(this.currentChar)) {
                if (!level.isHashValue()) {
                    throw new IllegalStateException("Invalid json, json number can only be a hash value not key");
                }
                level.pushMode(JSON_NUMBER_VALUE);
                readValue(level);
            } else if (this.currentChar == JSON_COMMA) {
                level.isHashValue(false);
            } else if (this.currentChar == C_CURLY) {
                popAndResetToOldLevel();
                return;
            }
        }
    }
109390
public <T> IMetadataDictionary getMetadataFor(T instance) {
        if (instance == null) {
            throw new IllegalArgumentException("Instance cannot be null");
        }

        DocumentInfo documentInfo = getDocumentInfo(instance);
        if (documentInfo.getMetadataInstance() != null) {
            return documentInfo.getMetadataInstance();
        }

        ObjectNode metadataAsJson = documentInfo.getMetadata();
        MetadataAsDictionary metadata = new MetadataAsDictionary(metadataAsJson);
        documentInfo.setMetadataInstance(metadata);
        return metadata;
    }
982886
public static function getLevel($level = null) {

        $level = strtoupper($level);

        if ( array_key_exists($level, self::$levels) ) return self::$levels[$level];

        return self::$levels[self::DEFAULT_LOG_LEVEL];

    }
1104530
public Object getMetadata(ITree node, String key) {
        Object metadata;
        if (node == null || (metadata = node.getMetadata(key)) == null)
            return getMetadata(key);
        return metadata;
    }
169549
def get_level(self, level, relations=None, **args):
        
        g = self.get_filtered_graph(relations)
        nodes = self.get_roots(relations=relations, **args)
        for i in range(level):
            logger.info(" ITERATING TO LEVEL: {} NODES: {}".format(i, nodes))
            nodes = [c for n in nodes
                     for c in g.successors(n)]
        logger.info(" FINAL: {}".format(nodes))
        return nodes
841493
private DefBase getDefForLevel(String level)
    {
        if (LEVEL_CLASS.equals(level))
        {
            return _curClassDef;
        }
        else if (LEVEL_FIELD.equals(level))
        {
            return _curFieldDef;
        }
        else if (LEVEL_REFERENCE.equals(level))
        {
            return _curReferenceDef;
        }
        else if (LEVEL_COLLECTION.equals(level))
        {
            return _curCollectionDef;
        }
        else if (LEVEL_OBJECT_CACHE.equals(level))
        {
            return _curObjectCacheDef;
        }
        else if (LEVEL_INDEX_DESC.equals(level))
        {
            return _curIndexDescriptorDef;
        }
        else if (LEVEL_TABLE.equals(level))
        {
            return _curTableDef;
        }
        else if (LEVEL_COLUMN.equals(level))
        {
            return _curColumnDef;
        }
        else if (LEVEL_FOREIGNKEY.equals(level))
        {
            return _curForeignkeyDef;
        }
        else if (LEVEL_INDEX.equals(level))
        {
            return _curIndexDef;
        }
        else if (LEVEL_PROCEDURE.equals(level))
        {
            return _curProcedureDef;
        }
        else if (LEVEL_PROCEDURE_ARGUMENT.equals(level))
        {
            return _curProcedureArgumentDef;
        }
        else
        {
            return null;
        }
    }
136240
function loadMetaSet(root) {
            var paths = innerCore.getMemberPaths(root, CONSTANTS.META_SET_NAME),
                i,
                metaNodes = [];

            return TASYNC.call(function () {
                for (i = 0; i < paths.length; i += 1) {
                    metaNodes.push(innerCore.loadByPath(root, paths[i]));
                }

                return TASYNC.lift(metaNodes);
            }, self.loadPaths(self.getHash(root), JSON.parse(JSON.stringify(paths))));
        }
849628
public TreeElement getChild(int index)
    {
        TreeElement childNode = null;
        if (_children == null)
            return null;
        Object child = _children.get(index);
        if (child != null) {
            childNode = (TreeElement) child;
        }
        return childNode;
    }