private void ProcessClass(OntologyClass ontologyClass, SchemaType parentType) { if (IncludeInOutput(ontologyClass)) { var schemaType = new SchemaType(); var resource = ontologyClass.Resource as IUriNode; schemaType.Name = MakeTypeName(resource); schemaType.TypeUri = resource.Uri; if (parentType == null) { // Needs to define an Id property schemaType.IdentifierProperty = new SchemaProperty { Name = _args.IdentifierPropertyName, DeclaredType = typeof (string), }; } else { schemaType.DerivedFrom = parentType; } foreach (var derivedClass in ontologyClass.DirectSubClasses) { ProcessClass(derivedClass, schemaType); } } }
public void AddType(SchemaType t) { _types.Add(t); }