ExistProperty() public method

public ExistProperty ( String propertyName, String aspect, String vocabularyIRI ) : VocabularyProperty
propertyName String
aspect String
vocabularyIRI String
return Oddr.Models.Vocabularies.VocabularyProperty
            public Device GetDevice(VocabularyHolder vocabularyHolder)
            {
                Dictionary<string, string> dic = new Dictionary<string, string>();

                if (vocabularyHolder != null)
                {
                    foreach (StringPair sp in properties)
                    {
                        try
                        {
                            //vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_DEVICE, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI);
                            if (vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_DEVICE, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI) != null)
                            {
                                //dic.Add(sp.key, sp.value);
                                dic[sp.key] = sp.value;
                            }
                        }
                        //catch (NameException ex)
                        //{
                        //    Console.WriteLine(ex.Message);
                        //    //property non loaded
                        //}
                        catch (ArgumentException ae)
                        {
                            //Console.WriteLine(this.GetType().FullName + " " + sp.key + " already present in device " + id);
                        }
                    }
                }
                else
                {
                    foreach (StringPair sp in properties)
                    {
                        //dic.Add(sp.key, sp.value);
                        dic[sp.key] = sp.value;
                    }
                }

                Device d = new Device();
                d.id = this.id;
                d.parentId = this.parentId;
                d.PutPropertiesMap(dic);

                return d;
            }
            public Oddr.Models.OS.OperatingSystem GetOperatingSystem(VocabularyHolder vocabularyHolder)
            {
                Dictionary<string, string> dic = new Dictionary<string, string>();

                if (vocabularyHolder != null)
                {
                    foreach (StringPair sp in properties)
                    {
                        try
                        {
                            //vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_OPERATIVE_SYSTEM, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI);
                            if (vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_OPERATIVE_SYSTEM, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI) != null)
                            {
                                dic.Add(sp.key, sp.value);
                            }
                        }
                        //catch (NameException ex)
                        //{
                        //    //property non loaded
                        //}
                        catch (ArgumentException ae)
                        {
                            //Console.WriteLine(this.GetType().FullName + " " + sp.key + " already present!!!");
                        }
                    }
                }
                else
                {
                    foreach (StringPair sp in properties)
                    {
                        dic.Add(sp.key, sp.value);
                    }
                }

                return new Oddr.Models.OS.OperatingSystem(dic);
            }
            public Browser GetBrowser(VocabularyHolder vocabularyHolder)
            {
                Dictionary<string, string> dic = new Dictionary<string, string>();

                if (vocabularyHolder != null)
                {
                    foreach (StringPair sp in properties)
                    {
                        try
                        {
                            //vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_WEB_BROWSER, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI);
                            if (vocabularyHolder.ExistProperty(sp.key, ODDRService.ASPECT_WEB_BROWSER, ODDRVocabularyService.ODDR_LIMITED_VOCABULARY_IRI) != null)
                            {
                                dic.Add(sp.key, sp.value);
                            }
                        }
                        //catch (NameException ex)
                        //{
                        //    //property non loaded
                        //}
                        catch (ArgumentException ae)
                        {
                            //Console.WriteLine(this.GetType().FullName + " " + sp.key + " already present in device " + id);
                        }
                    }
                }
                else
                {
                    foreach (StringPair sp in properties)
                    {
                        dic.Add(sp.key, sp.value);
                    }
                }

                Browser b;
                b = new Browser(dic);

                return b;
            }