Ensure that the given property type_id is supported by the graph.
336055
def validate_supported_property_type_id(property_name, property_type_id):
    """"""
    if property_type_id not in PROPERTY_TYPE_ID_TO_NAME:
        raise AssertionError(u'Property "{}" has unsupported property type id: '
                             u'{}'.format(property_name, property_type_id))
736353
function idSearch( id, type, callback ) {
    if ( ! endpoints['id'].hasOwnProperty(type) ) {
        return callback(new Error('No valid type'));
    }

    var url = apiBaseUrl+endpoints['id'][type] + id;

    fetch(url, function(result) {
        callback(result);
    });
}
671576
public BaseTypeId getBaseTypeId(final Class<? extends GraphObject> type) {

		final CMISInfo info = getCMISInfo(type);
		if (info != null) {

			return info.getBaseTypeId();
		}

		return null;
	}
1304947
function registerTypeById(type) {
    if (registryLogger.isDebugEnabled()) {
        registryLogger.debug('Register Type \'%s\' by id [%s]', type.typeName, type.id);
    }
    if(type.id) {
        typeById[type.id] = type;
    }
    return type;
}
107729
def _validate_non_edges_do_not_have_edge_like_properties(class_name, properties):
    """"""
    has_source = EDGE_SOURCE_PROPERTY_NAME in properties
    has_destination = EDGE_DESTINATION_PROPERTY_NAME in properties

    if has_source or has_destination:
        raise IllegalSchemaStateError(u'Found a non-edge class that defines edge-like "in" or '
                                      u'"out" properties: {} {}'.format(class_name, properties))

    for property_name, property_descriptor in six.iteritems(properties):
        if property_descriptor.type_id == PROPERTY_TYPE_LINK_ID:
            raise IllegalSchemaStateError(u'Non-edge class "{}" has a property of type Link, this '
                                          u'is not allowed: {}'.format(class_name, property_name))
40089
function(name, graphType){
    Flotr.graphTypes[name] = graphType;
    Flotr.defaultOptions[name] = graphType.options || {};
    Flotr.defaultOptions.defaultType = Flotr.defaultOptions.defaultType || name;
  }
70606
static LabelId getVertexTypeId(Vertex vertex) {
        if (vertex.property(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()).isPresent()) {
            return LabelId.of(vertex.value(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()));
        }
        return LabelId.invalid();
    }
1230970
public static void addPropertyBoolean(
        CmsCmisTypeManager typeManager,
        PropertiesImpl props,
        String typeId,
        Set<String> filter,
        String id,
        boolean value) {

        if (!checkAddProperty(typeManager, props, typeId, filter, id)) {
            return;
        }

        props.addProperty(new PropertyBooleanImpl(id, Boolean.valueOf(value)));
    }
566888
function(posType) {
    posType = posType || "current";

    var root = this.graph.getNode(this.root),
        config = this.config,
        size = this.canvas.getSize(),
        width = size.width,
        height = size.height,
        offset = config.offset,
        levelsToShow = config.constrained ? config.levelsToShow : Number.MAX_VALUE;

    this.controller.onBeforeCompute(root);

    Graph.Util.computeLevels(this.graph, root.id, 0, "ignore");

    var treeDepth = 0;

    Graph.Util.eachLevel(root, 0, false, function (n, d) { if(d > treeDepth) treeDepth = d; });

    var startNode = this.graph.getNode(this.clickedNode && this.clickedNode.id || root.id);
    var maxDepth = Math.min(treeDepth, levelsToShow-1);
    var initialDepth = startNode._depth;
    if(this.layout.horizontal()) {
      this.computeSubtree(startNode, -width/2, -height/2, width/(maxDepth+1), height, initialDepth, maxDepth, posType);
    } else {
      this.computeSubtree(startNode, -width/2, -height/2, width, height/(maxDepth+1), initialDepth, maxDepth, posType);
    }
  }
408412
function checkValue(typeVarMap, index, k, x) {
        var propPath = [k];
        var t = expType.types[k];
        return (
          t.type === VARIABLE ?
            Z.chain (
              function(typeVarMap) {
                return isEmpty (typeVarMap[t.name].types) ?
                  Left (function() {
                    return typeVarConstraintViolation (
                      env,
                      typeInfo,
                      index,
                      propPath,
                      typeVarMap[t.name].valuesByPath
                    );
                  }) :
                  Right (typeVarMap);
              },
              Right (updateTypeVarMap (env,
                                       typeVarMap,
                                       t,
                                       index,
                                       propPath,
                                       [x]))
            ) :
          // else
            Z.map (
              function(r) { return r.typeVarMap; },
              satisfactoryTypes (env,
                                 typeInfo,
                                 typeVarMap,
                                 t,
                                 index,
                                 propPath,
                                 [x])
            )
        );
      }
100397
def register_id(self, cmd_type, obj):
    """"""
    ids = self._ids.setdefault(cmd_type, {})
    if obj.id in ids:
      raise IntegrationIdExistsError
    self._ids[cmd_type][obj.id] = obj
5167
def _supported_rule(protocol, ethertype):
        """"""
        if not protocol or protocol not in utils.SUPPORTED_SG_PROTOCOLS:
            return False

        if ethertype != n_const.IPv4:
            return False

        return True
368896
def _is_valid_type(self, inpt):
        """"""
        from dlkit.abstract_osid.type.primitives import Type as abc_type
        if isinstance(inpt, abc_type):
            return True
        else:
            return False
29074
public static void addPropertyInteger(
        CmsCmisTypeManager typeManager,
        PropertiesImpl props,
        String typeId,
        Set<String> filter,
        String id,
        long value) {

        addPropertyBigInteger(typeManager, props, typeId, filter, id, BigInteger.valueOf(value));
    }
1269095
final void validateColumnType(int columnIndex, VoltType... types) {
        if (m_position < 0)
            throw new RuntimeException("VoltTableRow is in an invalid state. Consider calling advanceRow().");

        if ((columnIndex >= getColumnCount()) || (columnIndex < 0)) {
            throw new IndexOutOfBoundsException("Column index " + columnIndex + " is greater than the number of columns");
        }
        final VoltType columnType = getColumnType(columnIndex);
        for (VoltType type : types)
            if (columnType == type)
                return;
        throw new IllegalArgumentException("Column index " + columnIndex + " is type " + columnType);
    }
657763
function(node, id, propertyName) {
			if(this.hasRootID(node, id, propertyName) === false){
				var rootids = [];
				if(modules.domUtils.hasAttribute(node,'rootids')){
					rootids = modules.domUtils.getAttributeList(node,'rootids');
				}
				rootids.push('id' + id + '-' + propertyName);
				modules.domUtils.setAttribute(node, 'rootids', rootids.join(' '));
			}
		}
969127
def supportsType(self, type_uri):
        
        return (
            (type_uri in self.type_uris) or 
            (type_uri == OPENID_2_0_TYPE and self.isOPIdentifier())
            )