Java Code Examples for org.apache.olingo.odata2.api.edm.provider.Property#getFacets()
The following examples show how to use
org.apache.olingo.odata2.api.edm.provider.Property#getFacets() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmlMetadataConsumerTest.java From olingo-odata2 with Apache License 2.0 | 6 votes |
@Test public void stringValueForMaxLegthFacet() throws Exception { XmlMetadataConsumer parser = new XmlMetadataConsumer(); XMLStreamReader reader = createStreamReader(xmlWithStringValueForMaxLengthFacet); DataServices result = parser.readMetadata(reader, true); List<Property> properties = result.getSchemas().get(0).getEntityTypes().get(0).getProperties(); assertEquals(2, properties.size()); Property property = getForName(properties, "Id"); EdmFacets facets = property.getFacets(); assertEquals(new Integer(Integer.MAX_VALUE), facets.getMaxLength()); property = getForName(properties, "Name"); facets = property.getFacets(); assertEquals(new Integer(Integer.MAX_VALUE), facets.getMaxLength()); }
Example 2
Source File: EdmPropertyImplProv.java From olingo-odata2 with Apache License 2.0 | 4 votes |
public EdmPropertyImplProv(final EdmImplProv edm, final FullQualifiedName propertyName, final Property property) throws EdmException { super(edm, property.getName(), propertyName, property.getFacets(), property.getMapping()); this.property = property; }