private void buildPropertiesInternal() throws EdmException { properties = new HashMap<String, Property>(); if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { properties.put(property.getName(), property); } } }
private void buildPropertiesInternal() throws EdmException { properties = new HashMap<String, Property>(); if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { properties.put(property.getName(), property); } } }
private void buildPropertiesInternal() throws EdmException { properties = new HashMap<String, Property>(); if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { properties.put(property.getName(), property); } } }
private Property getProperty(ComplexType type, String name) { for (Property p : type.getProperties()) { if (p.getName().equals(name)) { return p; } } return null; }
@Override public List<String> getPropertyNames() throws EdmException { if (edmPropertyNames == null) { edmPropertyNames = new ArrayList<String>(); if (edmBaseType != null) { edmPropertyNames.addAll(edmBaseType.getPropertyNames()); } if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { edmPropertyNames.add(property.getName()); } } } return edmPropertyNames; }
@Override public List<String> getPropertyNames() throws EdmException { if (edmPropertyNames == null) { final List<String> temp = new ArrayList<String>(); if (edmBaseType != null) { temp.addAll(edmBaseType.getPropertyNames()); } if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { temp.add(property.getName()); } } edmPropertyNames = temp; } return edmPropertyNames; }
@Override public List<String> getPropertyNames() throws EdmException { if (edmPropertyNames == null) { final List<String> temp = new ArrayList<String>(); if (edmBaseType != null) { temp.addAll(edmBaseType.getPropertyNames()); } if (structuralType.getProperties() != null) { for (final Property property : structuralType.getProperties()) { temp.add(property.getName()); } } edmPropertyNames = temp; } return edmPropertyNames; }
private void includeComplexType(Schema targetSchema, IServiceInfo service, ComplexType sourceType) throws ODataException { List<ComplexType> types = targetSchema.getComplexTypes(); if (types != null) { for (ComplexType type : types) { if (type.getName().equals(sourceType.getName())) { throw new ODataException("complex type " + sourceType.getName() + " already defined"); } } } else { types = new ArrayList<ComplexType>(); } ComplexType newType = clone(sourceType); if (newType.getProperties() != null) { for (Property property : newType.getProperties()) { if (property instanceof ComplexProperty) { ((ComplexProperty) property).setType(new FullQualifiedName( targetSchema.getNamespace(), ((ComplexProperty) property).getType().getName())); } } } types.add(newType); targetSchema.setComplexTypes(types); }
for(ComplexType eCompType : eCompTypes){ if((cProp.getType().getName()).equals(eCompType.getName())){ List<Property> compPropList = eCompType.getProperties(); for(Property compProp : compPropList){ if(propNameList.contains(prop.getName()+" - "+compProp.getName())){
public void normalizeComplexKey(final ComplexType complexType, final List<PropertyRef> propertyRefList) { for (Property property : complexType.getProperties()) { try { SimpleProperty simpleProperty = (SimpleProperty) property; Facets facets = (Facets) simpleProperty.getFacets(); if (facets == null) { simpleProperty.setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(simpleProperty.getName()); propertyRefList.add(propertyRef); } catch (ClassCastException e) { ComplexProperty complexProperty = (ComplexProperty) property; normalizeComplexKey(complexTypeView.searchEdmComplexType(complexProperty.getType()), propertyRefList); } } } }
public void normalizeComplexKey(final ComplexType complexType, final List<PropertyRef> propertyRefList) { for (Property property : complexType.getProperties()) { try { SimpleProperty simpleProperty = (SimpleProperty) property; Facets facets = (Facets) simpleProperty.getFacets(); if (facets == null) { simpleProperty.setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(simpleProperty.getName()); propertyRefList.add(propertyRef); } catch (ClassCastException e) { ComplexProperty complexProperty = (ComplexProperty) property; normalizeComplexKey(complexTypeView.searchEdmComplexType(complexProperty.getType()), propertyRefList); } } } }
Collection<Property> properties = complexType.getProperties(); if (properties != null) { writeProperties(properties, predefinedNamespaces, xmlStreamWriter);
Collection<Property> properties = complexType.getProperties(); if (properties != null) { writeProperties(properties, predefinedNamespaces, xmlStreamWriter);
Collection<Property> properties = complexType.getProperties(); if (properties != null) { writeProperties(properties, predefinedNamespaces, xmlStreamWriter);
private ComplexType clone(ComplexType type) { if (type == null) { return null; } ComplexType newType = new ComplexType(); newType.setAbstract(type.isAbstract()); newType.setAnnotationAttributes(type.getAnnotationAttributes()); newType.setAnnotationElements(type.getAnnotationElements()); newType.setBaseType(type.getBaseType()); newType.setDocumentation(type.getDocumentation()); newType.setMapping(type.getMapping()); newType.setName(type.getName()); newType.setProperties(cloneProperties(type.getProperties())); return newType; }
expandedList = new ArrayList<Property>(); for (Property property : complexType.getProperties()) { try { SimpleProperty newSimpleProperty = new SimpleProperty();
expandedList = new ArrayList<Property>(); for (Property property : complexType.getProperties()) { try { SimpleProperty newSimpleProperty = new SimpleProperty();