public override EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType xmlEventType, string propertyExpression) { foreach (var attribute in complexProperty.Attributes) { if (attribute.Name.Equals(PropertyNameAtomic)) { return new DOMSimpleAttributeGetter(PropertyNameAtomic); } } foreach (var simple in complexProperty.SimpleElements) { if (simple.Name.Equals(PropertyNameAtomic)) { return new DOMComplexElementGetter(PropertyNameAtomic, null, simple.IsArray); } } foreach (SchemaElementComplex complex in complexProperty.ComplexElements) { var complexFragmentFactory = new FragmentFactoryDOMGetter( eventBeanTypedEventFactory, xmlEventType, propertyExpression); if (complex.Name.Equals(PropertyNameAtomic)) { return new DOMComplexElementGetter(PropertyNameAtomic, complexFragmentFactory, complex.IsArray); } } return null; }
public override EventPropertyGetter GetGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, String propertyExpression) { foreach (SchemaElementSimple simple in complexProperty.SimpleElements) { if (!simple.IsArray) { continue; } if (simple.Name != PropertyNameAtomic) { continue; } return(new DOMIndexedGetter(PropertyNameAtomic, _index, null)); } foreach (SchemaElementComplex complex in complexProperty.ComplexElements) { if (!complex.IsArray) { continue; } if (complex.Name != PropertyNameAtomic) { continue; } return(new DOMIndexedGetter(PropertyNameAtomic, _index, new FragmentFactoryDOMGetter(eventAdapterService, eventType, propertyExpression))); } return(null); }
public override EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType eventType, string propertyExpression) { foreach (var simple in complexProperty.SimpleElements) { if (!simple.IsArray) { continue; } if (!simple.Name.Equals(PropertyNameAtomic)) { continue; } return new DOMIndexedGetter(PropertyNameAtomic, Index, null); } foreach (var complex in complexProperty.ComplexElements) { if (!complex.IsArray) { continue; } if (!complex.Name.Equals(PropertyNameAtomic)) { continue; } return new DOMIndexedGetter( PropertyNameAtomic, Index, new FragmentFactoryDOMGetter(eventBeanTypedEventFactory, eventType, propertyExpression)); } return null; }
public SchemaItem GetPropertyTypeSchema(SchemaElementComplex parentComplexProperty, EventAdapterService eventAdapterService) { Property lastProperty = null; SchemaElementComplex complexElement = parentComplexProperty; for (var en = Properties.EnumerateWithLookahead(); en.HasNext();) { Property property = en.Next(); lastProperty = property; if (en.HasNext()) { SchemaItem childSchemaItem = property.GetPropertyTypeSchema(complexElement, eventAdapterService); if (childSchemaItem == null) { // if the property is not valid, return null return(null); } if ((childSchemaItem is SchemaItemAttribute) || (childSchemaItem is SchemaElementSimple)) { return(null); } complexElement = (SchemaElementComplex)childSchemaItem; } } return(lastProperty.GetPropertyTypeSchema(complexElement, eventAdapterService)); }
public SchemaItem GetPropertyTypeSchema(SchemaElementComplex parentComplexProperty) { Property lastProperty = null; var complexElement = parentComplexProperty; var properties = Properties; var propertiesCount = properties.Count; for (var ii = 0; ii < propertiesCount; ii++) { var property = properties[ii]; lastProperty = property; if (ii < (propertiesCount - 1)) { var childSchemaItem = property.GetPropertyTypeSchema(complexElement); if (childSchemaItem == null) { // if the property is not valid, return null return null; } if (childSchemaItem is SchemaItemAttribute || childSchemaItem is SchemaElementSimple) { return null; } complexElement = (SchemaElementComplex) childSchemaItem; } } return lastProperty.GetPropertyTypeSchema(complexElement); }
public override EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, string propertyExpression) { return(new DOMMapGetter(PropertyNameAtomic, _key, null)); }
public override EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType eventType, string propertyExpression) { return new DOMIndexedGetter(PropertyNameAtomic, Index, null); }
public EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex parentComplexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType eventType, string propertyExpression) { IList<EventPropertyGetter> getters = new List<EventPropertyGetter>(); var complexElement = parentComplexProperty; var properties = Properties; var propertiesCount = properties.Count; for (var ii = 0; ii < propertiesCount; ii++) { var property = properties[ii]; var getter = property.GetGetterDOM( complexElement, eventBeanTypedEventFactory, eventType, propertyExpression); if (getter == null) { return null; } if (ii < (propertiesCount - 1)) { var childSchemaItem = property.GetPropertyTypeSchema(complexElement); if (childSchemaItem == null) { // if the property is not valid, return null return null; } if (childSchemaItem is SchemaItemAttribute || childSchemaItem is SchemaElementSimple) { return null; } complexElement = (SchemaElementComplex) childSchemaItem; if (complexElement.IsArray) { if (property is SimpleProperty || property is DynamicSimpleProperty) { return null; } } } getters.Add(getter); } return new DOMNestedPropertyGetter( getters, new FragmentFactoryDOMGetter(eventBeanTypedEventFactory, eventType, propertyExpression)); }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty) { foreach (SchemaElementComplex complex in complexProperty.ComplexElements) { if (!complex.Name.Equals(PropertyNameAtomic)) { continue; } foreach (var attribute in complex.Attributes) { if (!string.Equals(attribute.Name, "id", StringComparison.InvariantCultureIgnoreCase)) { } } return complex; } return null; }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService) { foreach (SchemaElementComplex complex in complexProperty.ComplexElements.Where(c => c.Name == PropertyNameAtomic)) { foreach (SchemaItemAttribute attribute in complex.Attributes) { if (!String.Equals(attribute.Name, "id", StringComparison.OrdinalIgnoreCase)) { continue; } } return(complex); } return(null); }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService) { foreach (var simple in complexProperty.SimpleElements) { if (simple.Name != PropertyNameAtomic) { continue; } if ((simple.IsArray) || (simple.SimpleType == XmlSchemaSimpleType.GetBuiltInSimpleType(XmlTypeCode.String))) { // return the simple as a non-array since an index is provided return(new SchemaElementSimple( simple.Name, simple.Namespace, simple.SimpleType, simple.TypeName, false, simple.FractionDigits)); } } foreach (var complex in complexProperty.ComplexElements) { if (complex.Name != PropertyNameAtomic) { continue; } if (complex.IsArray) { // return the complex as a non-array since an index is provided return(new SchemaElementComplex( complex.Name, complex.Namespace, complex.Attributes, complex.ComplexElements, complex.SimpleElements, false, null, null)); } } return(null); }
public override EventPropertyGetter GetGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, String propertyExpression) { foreach (SchemaElementComplex complex in complexProperty.ComplexElements.Where(c => c.Name == PropertyNameAtomic)) { foreach (SchemaItemAttribute attribute in complex.Attributes) { if (!String.Equals(attribute.Name, "id", StringComparison.OrdinalIgnoreCase)) { continue; } } return(new DOMMapGetter(PropertyNameAtomic, _key, null)); } return(null); }
public EventPropertyGetter GetGetterDOM(SchemaElementComplex parentComplexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, String propertyExpression) { List <EventPropertyGetter> getters = new List <EventPropertyGetter>(); SchemaElementComplex complexElement = parentComplexProperty; for (var it = Properties.EnumerateWithLookahead(); it.HasNext();) { Property property = it.Next(); EventPropertyGetter getter = property.GetGetterDOM(complexElement, eventAdapterService, eventType, propertyExpression); if (getter == null) { return(null); } if (it.HasNext()) { SchemaItem childSchemaItem = property.GetPropertyTypeSchema(complexElement, eventAdapterService); if (childSchemaItem == null) { // if the property is not valid, return null return(null); } if ((childSchemaItem is SchemaItemAttribute) || (childSchemaItem is SchemaElementSimple)) { return(null); } complexElement = (SchemaElementComplex)childSchemaItem; if (complexElement.IsArray) { if ((property is SimpleProperty) || (property is DynamicSimpleProperty)) { return(null); } } } getters.Add(getter); } return(new DOMNestedPropertyGetter(getters, new FragmentFactoryDOMGetter(eventAdapterService, eventType, propertyExpression))); }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty) { foreach (var simple in complexProperty.SimpleElements) { if (!simple.IsArray) { continue; } if (!simple.Name.Equals(PropertyNameAtomic)) { continue; } // return the simple as a non-array since an index is provided return new SchemaElementSimple( simple.Name, simple.Namespace, simple.SimpleType, simple.TypeName, false, simple.FractionDigits); } foreach (var complex in complexProperty.ComplexElements) { if (!complex.IsArray) { continue; } if (!complex.Name.Equals(PropertyNameAtomic)) { continue; } // return the complex as a non-array since an index is provided return new SchemaElementComplex( complex.Name, complex.Namespace, complex.Attributes, complex.ComplexElements, complex.SimpleElements, false, complex.OptionalSimpleType, complex.OptionalSimpleTypeName); } return null; }
public override EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType eventType, string propertyExpression) { foreach (SchemaElementComplex complex in complexProperty.ComplexElements) { if (!complex.Name.Equals(PropertyNameAtomic)) { continue; } foreach (var attribute in complex.Attributes) { if (!attribute.Name.Equals("id", StringComparison.InvariantCultureIgnoreCase)) { } } return new DOMMapGetter(PropertyNameAtomic, Key, null); } return null; }
public override EventPropertyGetter GetGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType xmlEventType, String propertyExpression) { if (complexProperty.Attributes.Any(attribute => attribute.Name == PropertyNameAtomic)) { return(new DOMSimpleAttributeGetter(PropertyNameAtomic)); } foreach (var simple in complexProperty.SimpleElements.Where(simple => simple.Name == PropertyNameAtomic)) { return(new DOMComplexElementGetter(PropertyNameAtomic, null, simple.IsArray)); } foreach (SchemaElementComplex complex in complexProperty.ComplexElements) { var complexFragmentFactory = new FragmentFactoryDOMGetter(eventAdapterService, xmlEventType, propertyExpression); if (complex.Name == PropertyNameAtomic) { return(new DOMComplexElementGetter(PropertyNameAtomic, complexFragmentFactory, complex.IsArray)); } } return(null); }
public abstract SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty);
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty) { return null; // always returns Node }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService) { return(null); // always returns Node }
public override EventPropertyGetter GetGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, string propertyExpression) { return(new DOMAttributeAndElementGetter(PropertyNameAtomic)); }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService) { return(SchemaUtil.FindPropertyMapping(complexProperty, PropertyNameAtomic)); }
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty) { return null; // dynamic properties always return Node }
/// <summary> /// Returns the getter-method for use with XML DOM event representations. /// </summary> /// <param name="complexProperty">a element-within-element type definition</param> /// <param name="eventAdapterService">for resolving or creating further event types that are property types</param> /// <param name="xmlEventType">the event type</param> /// <param name="propertyExpression">the full property expression</param> /// <returns> /// getter /// </returns> public abstract EventPropertyGetterSPI GetGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType xmlEventType, string propertyExpression);
/// <summary> /// Returns the property type for use with DOM event representations. /// </summary> /// <param name="complexProperty">a element-within-element type definition</param> /// <param name="eventAdapterService">for resolving further element event types if defined</param> /// <returns> /// property type /// </returns> public abstract SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService);
public abstract EventPropertyGetterSPI GetGetterDOM( SchemaElementComplex complexProperty, EventBeanTypedEventFactory eventBeanTypedEventFactory, BaseXMLEventType xmlEventType, string propertyExpression);
public override SchemaItem GetPropertyTypeSchema(SchemaElementComplex complexProperty) { return SchemaUtil.FindPropertyMapping(complexProperty, PropertyNameAtomic); }