skipcheck

TM1 CSDL docs · Metadata

CsdlDocument

import io.skipcheck.tm1.csdl.CsdlDocument;

A parsed CSDL document ($metadata): its schemas, and lookups across them.

Lookups take a qualified name using either the namespace or the alias, so ibm.tm1.api.v1.Cube and tm1.Cube find the same type.

Members

CsdlDocument constructorValidates and copies the components.
SCHEMA_VERSION_TERM staticThe term holding the service's schema version.
qualifyRewrites a qualified name to use its schema's namespace rather than its alias.
schemaVersionThe schema version from Core.SchemaVersion, e.g.
entityContainerThe document's entity container, if any.
entityTypeThe entity type with this qualified name.
complexTypeThe complex type with this qualified name.
structuredTypeThe entity or complex type with this qualified name.
enumTypeThe enum type with this qualified name.
operationsEvery overload of the action or function with this qualified name.
boundToThe operations bound to this type (not collections of it), e.g.
typeHierarchyA structured type followed by its base types, nearest first.
qualifiedNameThe qualified name, by namespace, of a type defined in one of this document's schemas.
structuredTypesEvery structured type in the document.
toString
hashCode
equals
version
schemas

CsdlDocument

constructor
CsdlDocument(String version, List<CsdlSchema> schemas)

Validates and copies the components.

SCHEMA_VERSION_TERM

static
String SCHEMA_VERSION_TERM

The term holding the service's schema version.

qualify

String qualify(String qualifiedName)

Rewrites a qualified name to use its schema's namespace rather than its alias: tm1.Cube becomes ibm.tm1.api.v1.Cube. Names in other namespaces, such as Edm.String, are returned unchanged.

Parameters

qualifiedName
a name qualified by namespace or alias

Returns

the name qualified by namespace

schemaVersion

Optional<String> schemaVersion()

The schema version from Core.SchemaVersion, e.g. 11.8.35, if declared.

Returns

the schema version, or empty if no schema declares one

entityContainer

Optional<CsdlEntityContainer> entityContainer()

The document's entity container, if any.

Returns

the first schema's entity container, or empty if none has one

entityType

Optional<CsdlEntityType> entityType(String qualifiedName)

The entity type with this qualified name.

Parameters

qualifiedName
the type's name, qualified by namespace or alias

Returns

the entity type, or empty if the document doesn't define it

complexType

Optional<CsdlComplexType> complexType(String qualifiedName)

The complex type with this qualified name.

Parameters

qualifiedName
the type's name, qualified by namespace or alias

Returns

the complex type, or empty if the document doesn't define it

structuredType

Optional<CsdlStructuredType> structuredType(String qualifiedName)

The entity or complex type with this qualified name.

Parameters

qualifiedName
the type's name, qualified by namespace or alias

Returns

the type, or empty if the document doesn't define it

enumType

Optional<CsdlEnumType> enumType(String qualifiedName)

The enum type with this qualified name.

Parameters

qualifiedName
the type's name, qualified by namespace or alias

Returns

the enum type, or empty if the document doesn't define it

operations

List<CsdlOperation> operations(String qualifiedName)

Every overload of the action or function with this qualified name.

Parameters

qualifiedName
the operation's name, qualified by namespace or alias

Returns

the overloads in document order, or an empty list if there are none

boundTo

List<CsdlOperation> boundTo(String qualifiedTypeName)

The operations bound to this type (not collections of it), e.g. every tm1.Cube action.

Parameters

qualifiedTypeName
the binding type's name, qualified by namespace or alias

Returns

the bound operations in document order, or an empty list if there are none

typeHierarchy

List<CsdlStructuredType> typeHierarchy(String qualifiedName)

A structured type followed by its base types, nearest first. Stops at a base type the document doesn't define, and at a cycle (which valid CSDL never has).

Parameters

qualifiedName
the type's name, qualified by namespace or alias

Returns

the type and its base types, or an empty list if the document doesn't define the type

qualifiedName

Optional<String> qualifiedName(CsdlStructuredType type)

The qualified name, by namespace, of a type defined in one of this document's schemas.

Parameters

type
the type to name

Returns

its name qualified by namespace, or empty if it isn't in this document

structuredTypes

Stream<CsdlStructuredType> structuredTypes()

Every structured type in the document.

Returns

the entity and complex types, schema by schema, entity types first

toString

String toString()

hashCode

int hashCode()

equals

boolean equals(Object o)

version

String version()

schemas

List<CsdlSchema> schemas()

Also in the Javadoc.