Exemplo n.º 1
0
 /// <summary>
 /// Loads the preset property predicates.
 /// </summary>
 /// <remarks></remarks>
 private static void LoadPresetPropertyPredicates()
 {
     PresetPropertyPredicates = new List<PresetPropertyPredicate>();
     var elements = _document.XPathSelectElements("/InstantRDFConfiguration/presetPropertyPredicates/preset");
     foreach (var element in elements)
     {
         var alias = element.Attribute("alias");
         var predicate = element.Attribute("rdfPredicate");
         if (alias == null || predicate == null) continue;
         var preset = new PresetPropertyPredicate { PropertyAlias = alias.Value, Predicate = predicate.Value };
         LoadPresetPropertyEquivalents(preset);
         PresetPropertyPredicates.Add(preset);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Loads the preset property equivalents.
 /// </summary>
 /// <param name="preset">The preset.</param>
 private static void LoadPresetPropertyEquivalents(PresetPropertyPredicate preset)
 {
     var elements = _document.XPathSelectElements(string.Format("/InstantRDFConfiguration/presetPropertyPredicates/preset[@alias='{0}']/equivalent", preset.PropertyAlias));
     foreach (var element in elements)
     {
         var equivalent = element.Attribute("predicate");
         if (equivalent == null) continue;
         preset.Equivalents.Add(equivalent.Value);
     }
 }