Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 public void AddType(SchemaType t)
 {
     _types.Add(t);
 }
Exemplo n.º 3
0
 public void AddType(SchemaType t)
 {
     _types.Add(t);
 }