Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public enum PropertyDefinition {
ProviderName(RowsetDefinitionType.STRING, null, XmlaConstants.Access.Read, "Mondrian XML for Analysis Provider",
XmlaConstants.Method.DISCOVER, "The XML for Analysis Provider name."),

ProviderVersion(RowsetDefinitionType.STRING, null, XmlaConstants.Access.Read, "10.50.1600.1",
ProviderVersion(RowsetDefinitionType.STRING, null, XmlaConstants.Access.Read, "11.0.7001.0",
// MondrianServer.forId(null).getVersion().getVersionString(),
XmlaConstants.Method.DISCOVER, "The version of the Mondrian XMLA Provider"),

Expand Down Expand Up @@ -186,7 +186,15 @@ public enum PropertyDefinition {
// Microsoft-specific XMLA definition.
DbpropMsmdSubqueries(RowsetDefinitionType.INTEGER, null, XmlaConstants.Access.ReadWrite, "1",
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
"An enumeration value that determines the behavior of subqueries.");
"An enumeration value that determines the behavior of subqueries."),

DbpropMsmdActivityID(RowsetDefinitionType.STRING, null, XmlaConstants.Access.ReadWrite, null,
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
"DbpropMsmdActivityID"),

DBMSVersion(RowsetDefinitionType.STRING, null, XmlaConstants.Access.Read, "11.0.7001.0",
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
"DBMSVersion");

final RowsetDefinitionType type;
final Set<? extends Enum> enumSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ public enum ItemTypeEnum {

DOUBLE("xsd:double"),

STRING("xsd:string");
STRING("xsd:string"),

DATETIME("xsd:dateTime"),

UNSIGNEDSHOT("xsd:unsignedShort"),

UNSIGNEDINT("xsd:unsignedInt"),

BOOLEAN("xsd:boolean");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class OperationNames {
public static final String DBSCHEMA_CATALOGS = "DBSCHEMA_CATALOGS";
public static final String DISCOVER_DATASOURCES = "DISCOVER_DATASOURCES";
public static final String DISCOVER_XML_METADATA = "DISCOVER_XML_METADATA";
public static final String DISCOVER_CSDL_METADATA = "DISCOVER_CSDL_METADATA";
public static final String DBSCHEMA_COLUMNS = "DBSCHEMA_COLUMNS";
public static final String DBSCHEMA_PROVIDER_TYPES = "DBSCHEMA_PROVIDER_TYPES";
public static final String DBSCHEMA_SCHEMATA = "DBSCHEMA_SCHEMATA";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;

import org.eclipse.daanse.xmla.api.annotation.Operation;
import org.eclipse.daanse.xmla.api.discover.Properties;

import static org.eclipse.daanse.xmla.api.common.properties.OperationNames.DISCOVER_CSDL_METADATA;

@Operation(name = DISCOVER_CSDL_METADATA, guid = "87B86062-21C3-460F-B4F8-5BE98394F13B")
public interface DiscoverCsdlMetaDataRequest {

Properties properties();

DiscoverCsdlMetaDataRestrictions restrictions();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;

/**
* This schema rowset returns a rowset with one row and one column. The single cell in the rowset
* contains an XML document that contains the requested XML metadata.
*/
public interface DiscoverCsdlMetaDataResponseRow {

/**
* @return An XML document that describes the object requested by the restriction.
*/
String metaData();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;

import static org.eclipse.daanse.xmla.api.common.properties.XsdType.XSD_STRING;

import java.util.Optional;

import org.eclipse.daanse.xmla.api.annotation.Restriction;

public interface DiscoverCsdlMetaDataRestrictions {

@Restriction(name = "CATALOG_NAME", type = XSD_STRING, order = 0)
Optional<String> catalogName();

@Restriction(name = "PERSPECTIVE_NAME", type = XSD_STRING, order = 1)
Optional<String> perspectiveName();

@Restriction(name = "VERSION", type = XSD_STRING, order = 2)
Optional<String> version();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/

@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("0.0.1")
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public interface RowSetRowItem {

String tagName();

String fieldName();

String value();

Optional<ItemTypeEnum> type();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;

import org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata.DiscoverCsdlMetaDataRequest;
import org.eclipse.daanse.xmla.model.record.discover.PropertiesR;

public record DiscoverCsdlMetaDataRequestR(PropertiesR properties, DiscoverCsdlMetaDataRestrictionsR restrictions)
implements DiscoverCsdlMetaDataRequest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;

import org.eclipse.daanse.xmla.api.discover.discover.xmlmetadata.DiscoverXmlMetaDataResponseRow;

public record DiscoverCsdlMetaDataResponseRowR(String metaData) implements DiscoverXmlMetaDataResponseRow {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;

import java.util.Optional;

import org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata.DiscoverCsdlMetaDataRestrictions;

public record DiscoverCsdlMetaDataRestrictionsR(Optional<String> catalogName, Optional<String> perspectiveName, Optional<String> version ) implements DiscoverCsdlMetaDataRestrictions {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SmartCity Jena - initial
* Stefan Bischof (bipolis.org) - initial
*/

@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("0.0.1")
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import java.util.Optional;

public record RowSetRowItemR(String tagName, String value, Optional<ItemTypeEnum> type) implements RowSetRowItem {
public record RowSetRowItemR(String tagName, String fieldName, String value, Optional<ItemTypeEnum> type) implements RowSetRowItem {

public RowSetRowItemR(String tagName, String value, Optional<ItemTypeEnum> type) {
this(tagName, tagName, value, type);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static class MSXMLA {
public static final QName QN_EXECUTE = new QName(NS_URN, "Execute", PREFIX);
public static final QName QN_EXECUTE_RESPONSE = new QName(NS_URN, "ExecuteResponse", "");
public static final QName QN_PROPERTIES = new QName(NS_URN, "Properties", PREFIX);
public static final QName QN_PARAMETERS = new QName(NS_URN, "Parameters", PREFIX);
public static final QName QN_PROPERTY_LIST = new QName(NS_URN, "PropertyList", PREFIX);
public static final QName QN_RESTRICTIONS = new QName(NS_URN, "Restrictions", PREFIX);
public static final QName QN_RESTRICTION_LIST = new QName(NS_URN, "RestrictionList", PREFIX);
Expand Down Expand Up @@ -179,8 +180,8 @@ static class ROW_PROPERTY {
public static final String AUTHENTICATION_MODE = "AuthenticationMode";
public static final QName QN_AUTHENTICATION_MODE = new QName(ROWSET.NS_URN, AUTHENTICATION_MODE, ROWSET.PREFIX);

public static final String META_DATA = "MetaData";
public static final QName QN_META_DATA = new QName(ROWSET.NS_URN, META_DATA, ROWSET.PREFIX);
public static final String META_DATA = "METADATA";
public static final QName QN_META_DATA = new QName(ROWSET.NS_URN, META_DATA, "xars");

public static final String SCHEMA_OWNER = "SCHEMA_OWNER";
public static final QName QN_SCHEMA_OWNER = new QName(ROWSET.NS_URN, SCHEMA_OWNER, ROWSET.PREFIX);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.eclipse.daanse.xmla.api.engine300_300.RelationshipEndTranslation;
import org.eclipse.daanse.xmla.api.engine300_300.Relationships;
import org.eclipse.daanse.xmla.api.engine300_300.XEvent;
import org.eclipse.daanse.xmla.api.execute.ExecuteParameter;
import org.eclipse.daanse.xmla.api.xmla.*;
import org.eclipse.daanse.xmla.model.record.discover.PropertiesR;
import org.eclipse.daanse.xmla.model.record.discover.dbschema.catalogs.DbSchemaCatalogsRestrictionsR;
Expand Down Expand Up @@ -97,6 +98,7 @@
import org.eclipse.daanse.xmla.model.record.engine300_300.RelationshipR;
import org.eclipse.daanse.xmla.model.record.engine300_300.RelationshipsR;
import org.eclipse.daanse.xmla.model.record.engine300_300.XEventR;
import org.eclipse.daanse.xmla.model.record.execute.ExecuteParameterR;
import org.eclipse.daanse.xmla.model.record.xmla.*;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.NodeList;
Expand Down Expand Up @@ -134,6 +136,38 @@ public static PropertiesR propertiestoProperties(SOAPElement propertiesElement)

}

public static List<ExecuteParameter> parametersToParameters(SOAPElement parametersElement) {

List<ExecuteParameter> parameters = new ArrayList<ExecuteParameter>();

Iterator<Node> nodeIteratorParameterList = parametersElement.getChildElements();
while (nodeIteratorParameterList.hasNext()) {
Node n = nodeIteratorParameterList.next();

if (n instanceof SOAPElement parameterElement) {
Iterator<Node> parameterList = parameterElement.getChildElements();
String name = null;
String value = null;
while (parameterList.hasNext()) {
Node n1 = parameterList.next();
if (n1 instanceof SOAPElement pElement) {
if ("name".equalsIgnoreCase(pElement.getLocalName())) {
name = pElement.getTextContent();
}
if ("value".equalsIgnoreCase(pElement.getLocalName())) {
value = pElement.getTextContent();
}
}
}
if (name != null && value != null) {
parameters.add(new ExecuteParameterR(name, value));
}
}
}
return parameters;

}

private static PropertiesR propertyListToProperties(SOAPElement propertyList) {
PropertiesR properties = new PropertiesR();

Expand Down
Loading
Loading