Class ODataResponse


  • public class ODataResponse
    extends java.lang.Object
    A helper class for exploring and evaluating content of an ODataResponse
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ODataResponse createFrom​(org.apache.olingo.odata2.api.processor.ODataResponse r)  
      ODataSchema getSchema​(java.lang.String namespace)
      Searches for the specified schema in the content of this response.
      java.util.Collection<java.lang.String> getSchemaNames()
      Returns namespaces of the schemas present in the response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createFrom

        public static ODataResponse createFrom​(org.apache.olingo.odata2.api.processor.ODataResponse r)
                                        throws org.apache.olingo.odata2.api.exception.ODataException
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException
      • getSchemaNames

        public java.util.Collection<java.lang.String> getSchemaNames()
                                                              throws org.apache.olingo.odata2.api.exception.ODataException
        Returns namespaces of the schemas present in the response.
        Returns:
        a collection of all schema names in this response or an empty collection, if this response contains no schemas.
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException - if failed to obtain schemas from the response.
      • getSchema

        public ODataSchema getSchema​(java.lang.String namespace)
                              throws org.apache.olingo.odata2.api.exception.ODataException
        Searches for the specified schema in the content of this response.
        Parameters:
        namespace - namespace of the EDMX schema to select.
        Returns:
        the schema in the content of this response, which the namespace matching the specified value.
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException - if schemas could not be accessed in the response.
        java.lang.IllegalArgumentException - if the schema does not exist