private void appendEntityTypes(final XMLStreamWriter writer, final List<EdmEntityType> entityTypes) throws XMLStreamException { for (EdmEntityType entityType : entityTypes) { writer.writeStartElement(XML_ENTITY_TYPE); writer.writeAttribute(XML_NAME, entityType.getName()); if (entityType.hasStream()) { writer.writeAttribute(XML_HAS_STREAM, "" + entityType.hasStream()); } if (entityType.getBaseType() != null) { writer.writeAttribute(XML_BASE_TYPE, getAliasedFullQualifiedName(entityType.getBaseType(), false)); } if (entityType.isAbstract()) { writer.writeAttribute(ABSTRACT, TRUE); } if (entityType.isOpenType()) { writer.writeAttribute(OPEN_TYPE, TRUE); } appendKey(writer, entityType); appendProperties(writer, entityType); appendNavigationProperties(writer, entityType); appendAnnotations(writer, entityType); writer.writeEndElement(); } }
private void appendEntityTypes(final XMLStreamWriter writer, final List<EdmEntityType> entityTypes) throws XMLStreamException { for (EdmEntityType entityType : entityTypes) { writer.writeStartElement(XML_ENTITY_TYPE); writer.writeAttribute(XML_NAME, entityType.getName()); if (entityType.hasStream()) { writer.writeAttribute(XML_HAS_STREAM, "" + entityType.hasStream()); } if (entityType.getBaseType() != null) { writer.writeAttribute(XML_BASE_TYPE, getAliasedFullQualifiedName(entityType.getBaseType(), false)); } if (entityType.isAbstract()) { writer.writeAttribute(ABSTRACT, TRUE); } if (entityType.isOpenType()) { writer.writeAttribute(OPEN_TYPE, TRUE); } appendKey(writer, entityType); appendProperties(writer, entityType); appendNavigationProperties(writer, entityType); appendAnnotations(writer, entityType); writer.writeEndElement(); } }
private void appendEntityTypes(JsonGenerator json, List<EdmEntityType> entityTypes) throws SerializerException, IOException { for (EdmEntityType entityType : entityTypes) { json.writeObjectFieldStart(entityType.getName()); json.writeStringField(KIND, Kind.EntityType.name()); if (entityType.hasStream()) { json.writeBooleanField(HAS_STREAM, entityType.hasStream()); } if (entityType.getBaseType() != null) { json.writeStringField(BASE_TYPE, getAliasedFullQualifiedName(entityType.getBaseType())); } if (entityType.isAbstract()) { json.writeBooleanField(ABSTRACT, entityType.isAbstract()); } appendKey(json, entityType); appendProperties(json, entityType); appendNavigationProperties(json, entityType); appendAnnotations(json, entityType, null); json.writeEndObject(); } }
private void appendEntityTypes(JsonGenerator json, List<EdmEntityType> entityTypes) throws SerializerException, IOException { for (EdmEntityType entityType : entityTypes) { json.writeObjectFieldStart(entityType.getName()); json.writeStringField(KIND, Kind.EntityType.name()); if (entityType.hasStream()) { json.writeBooleanField(HAS_STREAM, entityType.hasStream()); } if (entityType.getBaseType() != null) { json.writeStringField(BASE_TYPE, getAliasedFullQualifiedName(entityType.getBaseType())); } if (entityType.isAbstract()) { json.writeBooleanField(ABSTRACT, entityType.isAbstract()); } appendKey(json, entityType); appendProperties(json, entityType); appendNavigationProperties(json, entityType); appendAnnotations(json, entityType, null); json.writeEndObject(); } }