Manage the set of identifers for an object.

@see {@link https://github.com/FamilySearch/gedcomx/blob/master/specifications/json-format-specification.md#identifier-type|GEDCOM X JSON Spec}

@class
@extends Base
@param {Object} [json]
540608
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Identifiers)){
    return new Identifiers(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Identifiers.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
1191755
function(json) {
    
        /*
         * Property: _list
         *   List of selected values.
         *
         * Property: _index
         *   Index of currently selected value.
         *
         * Property: json
         *   Current value to operate on
         */
        // check if simple or compound constructor was passed in
        if (arguments.length === 2) {
            if (!(this instanceof jDoc)) {
                return new jDoc(arguments[0], arguments[1]);
            }
            var list = arguments[0];
            var index = arguments[1];
            this._list = list;
            this._index = index;
        } else {
            if (!(this instanceof jDoc)) {
                return new jDoc(json);
            }
            
            // simple assignment
            this._list = (json !== null) ? [json] : [];
            this._index = 0;
        }
    }
413870
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof EventRole)){
    return new EventRole(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(GedcomX.Conclusion.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
379348
function marshallCustomIdentifiersHelper(result, params, shape) {
  if (!shape || params === undefined || params === null) return;
  if (shape.type === 'structure' && shape.required && shape.required.length > 0) {
    util.arrayEach(shape.required, function(name) {
      var memberShape = shape.members[name];
      if (memberShape.endpointDiscoveryId === true) {
        var locationName = memberShape.isLocationName ? memberShape.name : name;
        result[locationName] = String(params[name]);
      } else {
        marshallCustomIdentifiersHelper(result, params[name], memberShape);
      }
    });
  }
}
486932
function(json, name, type) {
  if (json && json.widget) {
    var nodes = json.widget[type];

    if (!!nodes && isArray(nodes)) {
      for (var i = 0; i < nodes.length; i++) {
        if (nameIsMatch(nodes[i], name)) {
          return true;
        }
      }
    }
  }

  return false;
}
772260
def custom_object_prefix_strict(instance):
    
    if (instance['type'] not in enums.TYPES and
            instance['type'] not in enums.RESERVED_OBJECTS and
            not CUSTOM_TYPE_PREFIX_RE.match(instance['type'])):
        yield JSONError("Custom object type '%s' should start with 'x-' "
                        "followed by a source unique identifier (like a "
                        "domain name with dots replaced by hyphens), a hyphen "
                        "and then the name." % instance['type'],
                        instance['id'], 'custom-prefix')
1028340
function initJsonSchema (args) {
    // get global validator instance
    var validator = this.global().validator
    // get schema id based on model name - must be globally unique
    this.schemaId = '/model/'+this.name
    // set option to perform schema validation on created/update
    this.validateSchema = args.validate === false ? false : true
    // create schema for model
    var schema = this.schemaMeta = {
        id: this.schemaId,
        properties: {},
        required: [],
        type: 'object',
    }
    // get data column
    var dataColumn = this.columnName('data')
    // create entry in schema for data if model has data
    if (dataColumn) {
        // schema id for data only
        this.schemaDataId = '/model/'+this.name+'/data'
        // create data schema - meta and data schemas are compiled without
        // ref so that the complete schemas can be easily sent to clients
        var schemaData = this.schemaData = schema.properties[dataColumn] = {
            additionalProperties: args.additionalProperties,
            id: this.schemaDataId,
            properties: {},
            type: 'object',
        }
        // merge schema from args over data schema
        _.merge(schemaData.properties, args.properties)
        // if required properties are set then add
        if (args.required) {
            // required must be array
            if (typeof args.required === 'string') {
                args.required = [args.required]
            }
            // throw error if not array
            assert.ok(Array.isArray(args.required), 'required must be array or string')
            // add list of required properties
            schemaData.required = args.required
        }
        // add data schema
        validator.addSchema(schemaData, this.schemaDataId)
    }
    // create schema for each default column
    _.each(this.defaultColumns, (defaultName, columnName) => {
        // skip data column which is already specified
        if (defaultName === 'data') {
            return
        }
        // get column spec
        var column = this.columns[columnName]
        // if there is not schema for type then skip
        if (!defaultSchemas[column.type]) {
            return
        }
        // get column schema
        var columnSchema = _.cloneDeep(defaultSchemas[column.type])
        // set default schema based on type
        schema.properties[columnName] = columnSchema
        // make property required unless nullable
        if (column.null === false) {
            schema.required.push(columnName)
        }
    })
    // add schema
    validator.addSchema(schema, this.schemaId)
}
811364
function (identifier) {
            var idField = this.idField;
            if (this.schema.hasOwnProperty(idField)) {
                var schemaObject = this.schema[idField];
                if (schemaObject.type && schemaObject.type === Number) {
                    return parseInt(identifier);
                }
            }
            return identifier;
        }
1001558
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Address)){
    return new Address(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Address.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
1064162
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Document)){
    return new Document(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Document.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
421552
def ids(type)

      Dir[File.join(dir_for(type), '**', '*.json')].collect { |path|
        File.basename(path, '.json')
      }.sort
    end
211399
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Relationship)){
    return new Relationship(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Relationship.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
889983
function _identifiers (options) {
  var query = {}

  for (var prop in options.hash) {
    if (/^-/.test(prop)) {
      query[prop.replace(/^-/, '!')] = options.hash[prop]
    } else if (/^_/.test(prop)) {
      query[prop.replace(/^_/, '')] = new RegExp(options.hash[prop])
    } else {
      query[prop] = options.hash[prop]
    }
  }
  return arrayify(options.data.root).filter(where(query)).filter(function (doclet) {
    return !doclet.ignore && (state.options.private ? true : doclet.access !== 'private')
  })
}
38516
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Root)){
    return new Root(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Root.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
567705
function evalheaders(json, type) {
		var id = json.$originalid || json.$instanceid;
		delete json.$instanceid;
		delete json.$originalid;
		if (id) {
			Object.defineProperty(type, "$originalid", gui.Property.nonenumerable({
				value: id
			}));
		}
	}
270603
private void resetIdentifierType()
  {
    Expression expression = getExpression();
    if( expression == null )
    {
      return;
    }

    Identifier identifier = getIdentifier();
    if( identifier == null )
    {
      return;
    }

    ISymbol symbol = identifier.getSymbol();
    if( symbol.getType() == GosuParserTypes.NULL_TYPE() )
    {
      symbol.setType( expression.getType() );
    }
  }
1008196
function _identifiers (options) {
  var query = {}

  for (var prop in options.hash) {
    if (/^-/.test(prop)) {
      query[prop.replace(/^-/, '!')] = options.hash[prop]
    } else if (/^_/.test(prop)) {
      query[prop.replace(/^_/, '')] = new RegExp(options.hash[prop])
    } else {
      query[prop] = options.hash[prop]
    }
  }
  return arrayify(options.data.root).filter(where(query))
}