CsdlParser
import io.skipcheck.tm1.csdl.CsdlParser; Parses CSDL XML ($metadata) into a CsdlDocument.
The parser is hardened for documents from servers you may not control: DOCTYPE declarations are refused, so external entities and entity expansion can't apply. It's lenient about content instead. Unknown elements, attributes and annotation terms are ignored or kept as data, as the CSDL specification asks of clients.
Members
EDMX_NAMESPACE static | The edmx namespace of OData 4.0 and 4.01. |
EDM_NAMESPACE static | The edm namespace of OData 4.0 and 4.01. |
parse static | Parses a CSDL document from text. |
parse static | Parses a CSDL document. |
EDMX_NAMESPACE
staticString EDMX_NAMESPACEThe edmx namespace of OData 4.0 and 4.01.
EDM_NAMESPACE
staticString EDM_NAMESPACEThe edm namespace of OData 4.0 and 4.01.
parse
staticstatic CsdlDocument parse(String xml)Parses a CSDL document from text.
Parameters
xml- the document's XML
Returns
- the parsed document
Throws
CsdlParseException- if it isn't well-formed XML, or not a CSDL document
parse
staticstatic CsdlDocument parse(InputStream xml)Parses a CSDL document. The stream isn't closed.
Parameters
xml- the document's XML, read to the end
Returns
- the parsed document
Throws
CsdlParseException- if it isn't well-formed XML, or not a CSDL document
Also in the Javadoc.