Class ODataSchema


  • public class ODataSchema
    extends java.lang.Object
    A helper class for exploring and evaluating content of an OData Schema object.
    • Method Detail

      • from

        public static ODataSchema from​(org.apache.olingo.odata2.api.edm.provider.Schema schema)
      • isEmpty

        public boolean isEmpty()
        Checks whether content of this schema is empty.
        Returns:
        true, if this schema has empty content; false, if at least one element (XML element) is found in the schema content.
      • getEntityTypeNames

        public java.util.Collection<java.lang.String> getEntityTypeNames()
        Retrieves names of all entity types defined in this schema.
        Returns:
        a collection of all entity type names present in this schema or an empty collection, if this schema does not contain a single entity type.
      • getEntityType

        public ODataEntityType getEntityType​(java.lang.String type)
        Retrieves an entity type defined in this schema.
        Parameters:
        type - name of the type to retrieve
        Returns:
        entity type matching the type name.
        Throws:
        java.lang.IllegalArgumentException - if the specified type does not exist in this schema.
      • containsAssociationBetween

        public boolean containsAssociationBetween​(java.lang.String type1,
                                                  java.lang.String type2)
      • getAssociation

        public org.apache.olingo.odata2.api.edm.provider.Association getAssociation​(java.lang.String name)
      • getAssociations

        public java.util.Collection<org.apache.olingo.odata2.api.edm.provider.Association> getAssociations()
      • getDefaultEntityContainer

        public ODataEntityContainer getDefaultEntityContainer()
        Retrieves default entity container in this schema content.
        Returns:
        the default entity container or null, if default entity container is not present.