UNOMI-180 Implement CXS GraphQL API
- Modify the type generation to use "Input" suffix for input types instead of a 
prefix.

Signed-off-by: Serge Huber <shu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/839a5d94
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/839a5d94
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/839a5d94

Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI
Commit: 839a5d94980f00211041e3d43a444dfae1a53331
Parents: 249dd1c
Author: Serge Huber <shu...@apache.org>
Authored: Sun Nov 18 23:50:09 2018 +0100
Committer: Serge Huber <shu...@apache.org>
Committed: Sun Nov 18 23:50:09 2018 +0100

----------------------------------------------------------------------
 graphql/cxs-impl/pom.xml                        |  6 ++
 .../unomi/graphql/CXSDateFilterInput.java       | 32 ---------
 .../java/org/apache/unomi/graphql/CXSEvent.java | 67 -----------------
 .../unomi/graphql/CXSEventConnection.java       | 32 ---------
 .../org/apache/unomi/graphql/CXSEventEdge.java  | 30 --------
 .../apache/unomi/graphql/CXSEventFilter.java    | 32 ---------
 .../unomi/graphql/CXSEventFilterInput.java      | 35 ---------
 .../org/apache/unomi/graphql/CXSEventInput.java | 69 ------------------
 .../unomi/graphql/CXSEventOccurrenceFilter.java | 36 ----------
 .../graphql/CXSEventOccurrenceFilterInput.java  | 35 ---------
 .../unomi/graphql/CXSEventProperties.java       | 35 ---------
 .../unomi/graphql/CXSEventPropertiesFilter.java | 23 ------
 .../org/apache/unomi/graphql/CXSEventType.java  | 63 ----------------
 .../apache/unomi/graphql/CXSEventTypeInput.java | 62 ----------------
 .../unomi/graphql/CXSGeoDistanceInput.java      | 30 --------
 .../unomi/graphql/CXSGeoDistanceUnit.java       | 26 -------
 .../org/apache/unomi/graphql/CXSGeoPoint.java   | 31 --------
 .../apache/unomi/graphql/CXSGeoPointInput.java  | 28 --------
 .../unomi/graphql/CXSGraphQLProvider.java       |  4 +-
 .../org/apache/unomi/graphql/CXSMutation.java   | 22 +++---
 .../apache/unomi/graphql/CXSOrderByInput.java   | 30 --------
 .../unomi/graphql/CXSPropertyTypeInput.java     | 76 --------------------
 .../unomi/graphql/CXSProviderManager.java       |  4 ++
 .../java/org/apache/unomi/graphql/CXSQuery.java | 45 +++++++++++-
 .../org/apache/unomi/graphql/CXSSegment.java    | 32 ---------
 .../unomi/graphql/CXSSegmentCondition.java      | 32 ---------
 .../unomi/graphql/CXSSetPropertyTypeInput.java  | 46 ------------
 .../org/apache/unomi/graphql/CXSSortOrder.java  | 26 -------
 .../java/org/apache/unomi/graphql/CXSView.java  | 26 -------
 .../java/org/apache/unomi/graphql/PageInfo.java | 28 --------
 .../graphql/builders/CXSEventBuilders.java      |  9 ++-
 .../internal/CXSGraphQLProviderImpl.java        | 18 ++++-
 .../internal/CXSProviderManagerImpl.java        | 23 ++++++
 .../propertytypes/CXSFloatPropertyType.java     | 18 ++---
 .../graphql/types/input/CXSDateFilter.java      | 32 +++++++++
 .../graphql/types/input/CXSEventFilter.java     | 35 +++++++++
 .../graphql/types/input/CXSEventInput.java      | 69 ++++++++++++++++++
 .../input/CXSEventOccurrenceFilterInput.java    | 35 +++++++++
 .../graphql/types/input/CXSEventTypeInput.java  | 62 ++++++++++++++++
 .../types/input/CXSGeoDistanceInput.java        | 32 +++++++++
 .../graphql/types/input/CXSGeoPointInput.java   | 28 ++++++++
 .../graphql/types/input/CXSOrderByInput.java    | 31 ++++++++
 .../types/input/CXSPropertyTypeInput.java       | 76 ++++++++++++++++++++
 .../types/input/CXSSegmentFilterInput.java      | 51 +++++++++++++
 .../types/input/CXSSetPropertyTypeInput.java    | 45 ++++++++++++
 .../unomi/graphql/types/output/CXSEvent.java    | 67 +++++++++++++++++
 .../types/output/CXSEventConnection.java        | 32 +++++++++
 .../graphql/types/output/CXSEventEdge.java      | 30 ++++++++
 .../graphql/types/output/CXSEventFilter.java    | 32 +++++++++
 .../types/output/CXSEventOccurrenceFilter.java  | 36 ++++++++++
 .../types/output/CXSEventProperties.java        | 35 +++++++++
 .../types/output/CXSEventPropertiesFilter.java  | 23 ++++++
 .../graphql/types/output/CXSEventType.java      | 63 ++++++++++++++++
 .../types/output/CXSGeoDistanceUnit.java        | 26 +++++++
 .../unomi/graphql/types/output/CXSGeoPoint.java | 31 ++++++++
 .../unomi/graphql/types/output/CXSSegment.java  | 32 +++++++++
 .../types/output/CXSSegmentCondition.java       | 33 +++++++++
 .../types/output/CXSSegmentConnection.java      | 31 ++++++++
 .../graphql/types/output/CXSSegmentEdge.java    | 31 ++++++++
 .../graphql/types/output/CXSSortOrder.java      | 26 +++++++
 .../unomi/graphql/types/output/CXSView.java     | 26 +++++++
 .../unomi/graphql/types/output/PageInfo.java    | 28 ++++++++
 graphql/karaf-feature/pom.xml                   | 19 +++--
 graphql/pom.xml                                 |  6 +-
 64 files changed, 1219 insertions(+), 995 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/pom.xml
----------------------------------------------------------------------
diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml
index 3e29f66..22a1edd 100644
--- a/graphql/cxs-impl/pom.xml
+++ b/graphql/cxs-impl/pom.xml
@@ -73,6 +73,12 @@
             <version>1.7.21</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.unomi</groupId>
+            <artifactId>unomi-api</artifactId>
+            <version>1.3.0-incubating-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java
deleted file mode 100644
index c9e1d07..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_DateFilterInput")
-public class CXSDateFilterInput {
-    @GraphQLField
-    public long after;
-    @GraphQLField
-    public boolean includeAfter;
-    @GraphQLField
-    public long before;
-    @GraphQLField
-    public boolean includeBefore;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java
deleted file mode 100644
index 6e71c28..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_Event")
-public class CXSEvent {
-
-    private String id;
-    private String eventType;
-    private long timeStamp;
-    private String subject;
-    private String object;
-    private CXSEventProperties properties = new CXSEventProperties();
-    private CXSGeoPoint location;
-
-    @GraphQLField
-    public String getId() {
-        return id;
-    }
-
-    @GraphQLField
-    public String getEventType() {
-        return eventType;
-    }
-
-    @GraphQLField
-    public long getTimeStamp() {
-        return timeStamp;
-    }
-
-    @GraphQLField
-    public String getSubject() {
-        return subject;
-    }
-
-    @GraphQLField
-    public String getObject() {
-        return object;
-    }
-
-    @GraphQLField
-    public CXSEventProperties getProperties() {
-        return properties;
-    }
-
-    @GraphQLField
-    public CXSGeoPoint getLocation() {
-        return location;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
deleted file mode 100644
index 7974543..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.List;
-
-@GraphQLName("CXS_EventConnection")
-public class CXSEventConnection {
-
-    @GraphQLField
-    public List<CXSEventEdge> edges;
-    @GraphQLField
-    public PageInfo pageInfo;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
deleted file mode 100644
index 3b81f0a..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_EventEdge")
-public class CXSEventEdge {
-
-    @GraphQLField
-    public CXSEvent node;
-    @GraphQLField
-    public String cursor;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
deleted file mode 100644
index 82a3ebd..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.List;
-
-@GraphQLName("CXS_EventFilter")
-public class CXSEventFilter {
-
-    @GraphQLField
-    public List<CXSEventFilter> andFilters;
-    @GraphQLField
-    public List<CXSEventFilter> orFilters;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
deleted file mode 100644
index 855a6ab..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.List;
-
-@GraphQLName("CXS_EventFilterInput")
-public class CXSEventFilterInput {
-
-    @GraphQLField
-    @GraphQLName("and")
-    public List<CXSEventFilterInput> andFilters;
-
-    @GraphQLField
-    @GraphQLName("or")
-    public List<CXSEventFilterInput> orFilters;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
deleted file mode 100644
index 473953b..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-@GraphQLName("CXS_EventInput")
-public class CXSEventInput {
-    private String id;
-    private String eventType;
-    private long timeStamp;
-    private String subject;
-    private String object;
-    private Map<Object,Object> properties = new LinkedHashMap<>();
-    private CXSGeoPointInput location;
-
-    @GraphQLField
-    public String getId() {
-        return id;
-    }
-
-    @GraphQLField
-    public String getEventType() {
-        return eventType;
-    }
-
-    @GraphQLField
-    public long getTimeStamp() {
-        return timeStamp;
-    }
-
-    @GraphQLField
-    public String getSubject() {
-        return subject;
-    }
-
-    @GraphQLField
-    public String getObject() {
-        return object;
-    }
-
-    public Map<Object, Object> getProperties() {
-        return properties;
-    }
-
-    @GraphQLField
-    public CXSGeoPointInput getLocation() {
-        return location;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
deleted file mode 100644
index 7abd342..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_EventOccurrenceFilter")
-public class CXSEventOccurrenceFilter {
-    @GraphQLField
-    public String eventType;
-    @GraphQLField
-    public String beforeTime;
-    @GraphQLField
-    public String afterTime;
-    @GraphQLField
-    public String betweenTime;
-    @GraphQLField
-    public int count;
-
-    public CXSEventFilter eventFilter;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
deleted file mode 100644
index 1ffaa19..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_EventOccurrenceFilterInput")
-public class CXSEventOccurrenceFilterInput {
-
-    @GraphQLField
-    public String eventId;
-    @GraphQLField
-    public String beforeTime;
-    @GraphQLField
-    public String afterTime;
-    @GraphQLField
-    public String betweenTime;
-    @GraphQLField
-    public int count;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
deleted file mode 100644
index 95c0b1b..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-@GraphQLName("CXS_EventProperties")
-public class CXSEventProperties {
-    @GraphQLField
-    public int nbProperties;
-
-    Map<Object,Object> properties = new LinkedHashMap<>();
-
-    public Map<Object, Object> getProperties() {
-        return properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
deleted file mode 100644
index 45f9101..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_EventPropertiesFilter")
-public class CXSEventPropertiesFilter {
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
deleted file mode 100644
index 2d4c5ae..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@GraphQLName("CXS_EventType")
-public class CXSEventType {
-
-    private String id;
-    private String scope;
-    private String typeName;
-    private List<CXSPropertyType> properties = new ArrayList<>();
-
-    public CXSEventType(@GraphQLName("id") String id,
-                        @GraphQLName("scope") String scope,
-                        @GraphQLName("typeName") String typeName,
-                        @GraphQLName("properties") List<CXSPropertyType> 
properties) {
-        this.id = id;
-        this.scope = scope;
-        this.typeName = typeName;
-        this.properties = properties;
-    }
-
-    @GraphQLField
-    public String getId() {
-        return id;
-    }
-
-    @GraphQLField
-    public String getScope() {
-        return scope;
-    }
-
-    @GraphQLField
-    public String getTypeName() {
-        return typeName;
-    }
-
-    @GraphQLField
-    public List<CXSPropertyType> getProperties() {
-        return properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
deleted file mode 100644
index 06e78f5..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@GraphQLName("CXS_EventTypeInput")
-public class CXSEventTypeInput {
-
-    private String id;
-    private String scope;
-    private String typeName;
-    private List<CXSPropertyTypeInput> properties = new ArrayList<>();
-
-    public CXSEventTypeInput(@GraphQLName("id") String id,
-                             @GraphQLName("scope") String scope,
-                             @GraphQLName("typeName") String typeName,
-                             @GraphQLName("properties") 
List<CXSPropertyTypeInput> properties) {
-        this.id = id;
-        this.scope = scope;
-        this.typeName = typeName;
-        this.properties = properties;
-    }
-
-    @GraphQLField
-    public String getId() {
-        return id;
-    }
-
-    @GraphQLField
-    public String getScope() {
-        return scope;
-    }
-
-    @GraphQLField
-    public String getTypeName() {
-        return typeName;
-    }
-
-    @GraphQLField
-    public List<CXSPropertyTypeInput> getProperties() {
-        return properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
deleted file mode 100644
index bd95070..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_GeoDistanceInput")
-public class CXSGeoDistanceInput {
-    @GraphQLField
-    public CXSGeoPoint center;
-    @GraphQLField
-    public CXSGeoDistanceUnit unit;
-    @GraphQLField
-    public float distance;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
deleted file mode 100644
index ad3f08a..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_GeoDistanceUnit")
-public enum CXSGeoDistanceUnit {
-    METERS,
-    KILOMETERS,
-    MILES
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
deleted file mode 100644
index 703a541..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_GeoPoint")
-public class CXSGeoPoint {
-
-    @GraphQLField
-    public double latitude;
-
-    @GraphQLField
-    public double longitude;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
deleted file mode 100644
index bd402c0..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_GeoPointInput")
-public class CXSGeoPointInput {
-    @GraphQLField
-    public float longitude;
-    @GraphQLField
-    public float latitude;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
index 1636402..f5a62a3 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
@@ -16,11 +16,13 @@
  */
 package org.apache.unomi.graphql;
 
+import org.apache.unomi.graphql.types.output.CXSEventType;
+
 import java.util.Map;
 
 public interface CXSGraphQLProvider {
 
-    Map<String,CXSEventType> getEventTypes();
+    Map<String, CXSEventType> getEventTypes();
     CXSProviderManager getCxsProviderManager();
     void updateGraphQLTypes();
     void setCxsProviderManager(CXSProviderManager cxsProviderManager);

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
index 9732de4..f7cb1e1 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
@@ -20,9 +20,13 @@ import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import graphql.schema.DataFetchingEnvironment;
 import org.apache.unomi.graphql.propertytypes.CXSIdentifierPropertyType;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
 import org.apache.unomi.graphql.propertytypes.CXSStringPropertyType;
+import org.apache.unomi.graphql.types.input.CXSEventInput;
+import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
+import org.apache.unomi.graphql.types.input.CXSPropertyTypeInput;
+import org.apache.unomi.graphql.types.input.CXSSetPropertyTypeInput;
+import org.apache.unomi.graphql.types.output.CXSEventType;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -41,7 +45,7 @@ public class CXSMutation {
 
         CXSEventType cxsEventType = new 
CXSEventType(cxsEventTypeInput.getId(), cxsEventTypeInput.getScope(), 
cxsEventTypeInput.getTypeName(), new ArrayList<>());
         for (CXSPropertyTypeInput propertyTypeInput : 
cxsEventTypeInput.getProperties()) {
-            CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
+            org.apache.unomi.graphql.propertytypes.CXSPropertyType 
propertyType = getPropertyType(propertyTypeInput);
             cxsEventType.getProperties().add(propertyType);
         }
         cxsGraphQLProvider.getEventTypes().put(cxsEventType.getTypeName(), 
cxsEventType);
@@ -58,8 +62,8 @@ public class CXSMutation {
         return 0;
     }
 
-    private CXSPropertyType getPropertyType(CXSPropertyTypeInput 
cxsPropertyTypeInput) {
-        CXSPropertyType propertyType = null;
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType 
getPropertyType(CXSPropertyTypeInput cxsPropertyTypeInput) {
+        org.apache.unomi.graphql.propertytypes.CXSPropertyType propertyType = 
null;
         if (cxsPropertyTypeInput.identifierPropertyTypeInput != null) {
             propertyType = 
getIdentifierPropertyType(cxsPropertyTypeInput.identifierPropertyTypeInput);
         } else if (cxsPropertyTypeInput.stringPropertyTypeInput != null) {
@@ -70,12 +74,12 @@ public class CXSMutation {
         return propertyType;
     }
 
-    private CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput 
cxsSetPropertyTypeInput) {
-        List<CXSPropertyType> setProperties = null;
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType 
getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
+        List<org.apache.unomi.graphql.propertytypes.CXSPropertyType> 
setProperties = null;
         if (cxsSetPropertyTypeInput.getProperties() != null) {
             setProperties = new ArrayList<>();
             for (CXSPropertyTypeInput setProperty : 
cxsSetPropertyTypeInput.getProperties()) {
-                CXSPropertyType subPropertyType = getPropertyType(setProperty);
+                org.apache.unomi.graphql.propertytypes.CXSPropertyType 
subPropertyType = getPropertyType(setProperty);
                 if (subPropertyType != null) {
                     setProperties.add(subPropertyType);
                 }
@@ -92,7 +96,7 @@ public class CXSMutation {
                 setProperties);
     }
 
-    private CXSPropertyType getStringPropertyType(CXSStringPropertyType 
stringPropertyType) {
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType 
getStringPropertyType(CXSStringPropertyType stringPropertyType) {
         return new CXSStringPropertyType(
                 stringPropertyType.getId(),
                 stringPropertyType.getName(),
@@ -106,7 +110,7 @@ public class CXSMutation {
                 );
     }
 
-    private CXSPropertyType 
getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType 
getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
         return new CXSIdentifierPropertyType(
                 identifierPropertyType.getId(),
                 identifierPropertyType.getName(),

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
deleted file mode 100644
index dbe63c0..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_OrderByInput")
-public class CXSOrderByInput {
-
-    @GraphQLField
-    public String fieldName;
-
-    @GraphQLField
-    public CXSSortOrder sortOrder;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
deleted file mode 100644
index 5662123..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.propertytypes.*;
-
-@GraphQLName("CXS_PropertyTypeInput")
-public class CXSPropertyTypeInput {
-
-    public CXSPropertyTypeInput(
-            @GraphQLName("identifier") CXSIdentifierPropertyType 
identifierPropertyTypeInput,
-            @GraphQLName("string") CXSStringPropertyType 
stringPropertyTypeInput,
-            @GraphQLName("int") CXSIntPropertyType integerPropertyTypeInput,
-            @GraphQLName("float") CXSFloatPropertyType floatPropertyTypeInput,
-            @GraphQLName("date") CXSDatePropertyType datePropertyTypeInput,
-            @GraphQLName("boolean") CXSBooleanPropertyType 
booleanPropertyTypeInput,
-            @GraphQLName("geopoint") CXSGeoPointPropertyType 
geoPointPropertyTypeInput,
-            @GraphQLName("set") CXSSetPropertyTypeInput setPropertyTypeInput) {
-        this.identifierPropertyTypeInput = identifierPropertyTypeInput;
-        this.stringPropertyTypeInput = stringPropertyTypeInput;
-        this.integerPropertyTypeInput = integerPropertyTypeInput;
-        this.floatPropertyTypeInput = floatPropertyTypeInput;
-        this.datePropertyTypeInput = datePropertyTypeInput;
-        this.booleanPropertyTypeInput = booleanPropertyTypeInput;
-        this.geoPointPropertyTypeInput = geoPointPropertyTypeInput;
-        this.setPropertyTypeInput = setPropertyTypeInput;
-    }
-
-    @GraphQLField
-    @GraphQLName("identifier")
-    public CXSIdentifierPropertyType identifierPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("string")
-    public CXSStringPropertyType stringPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("int")
-    public CXSIntPropertyType integerPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("float")
-    public CXSFloatPropertyType floatPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("date")
-    public CXSDatePropertyType datePropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("boolean")
-    public CXSBooleanPropertyType booleanPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("geopoint")
-    public CXSGeoPointPropertyType geoPointPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("set")
-    public CXSSetPropertyTypeInput setPropertyTypeInput;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
index 18c7533..66d4d93 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
@@ -16,8 +16,12 @@
  */
 package org.apache.unomi.graphql;
 
+import org.apache.unomi.api.services.SegmentService;
+
 public interface CXSProviderManager {
 
     void refreshProviders();
 
+    SegmentService getSegmentService();
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
index 7b548a9..728bb38 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
@@ -19,6 +19,14 @@ package org.apache.unomi.graphql;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import graphql.schema.DataFetchingEnvironment;
+import org.apache.unomi.api.conditions.Condition;
+import org.apache.unomi.api.query.Query;
+import org.apache.unomi.api.segments.Segment;
+import org.apache.unomi.api.services.SegmentService;
+import org.apache.unomi.graphql.types.input.CXSEventFilter;
+import org.apache.unomi.graphql.types.input.CXSOrderByInput;
+import org.apache.unomi.graphql.types.input.CXSSegmentFilterInput;
+import org.apache.unomi.graphql.types.output.*;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -43,7 +51,7 @@ public class CXSQuery {
     }
 
     @GraphQLField
-    public CXSEventConnection findEvents(@GraphQLName("filter") 
CXSEventFilterInput filter,
+    public CXSEventConnection findEvents(@GraphQLName("filter") CXSEventFilter 
filter,
                                          @GraphQLName("orderBy") 
CXSOrderByInput orderBy,
                                          DataFetchingEnvironment env) {
         env.getArgument("first");
@@ -52,7 +60,40 @@ public class CXSQuery {
     }
 
     @GraphQLField
+    public CXSSegmentConnection findSegments(@GraphQLName("filter") 
CXSSegmentFilterInput filter,
+                                             @GraphQLName("orderBy") 
CXSOrderByInput orderBy,
+                                             DataFetchingEnvironment env) {
+        SegmentService segmentService = 
cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+        Query query = new Query();
+        segmentService.getSegmentMetadatas(query);
+        return new CXSSegmentConnection();
+    }
+
+    @GraphQLField
     public CXSSegment getSegment(@GraphQLName("segmentId") String segmentId) {
-        return new CXSSegment();
+        SegmentService segmentService = 
cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+        Segment segment = segmentService.getSegmentDefinition(segmentId);
+        if (segment == null) {
+            return null;
+        }
+        CXSSegment cxsSegment = new CXSSegment();
+        cxsSegment.id = segment.getItemId();
+        cxsSegment.name = segment.getMetadata().getName();
+        CXSView cxsView = new CXSView();
+        cxsView.name = segment.getScope();
+        cxsSegment.view = cxsView;
+        cxsSegment.condition = getSegmentCondition(segment.getCondition());
+        return cxsSegment;
+    }
+
+    private CXSSegmentCondition getSegmentCondition(Condition 
segmentRootCondition) {
+        if (segmentRootCondition == null) {
+            return null;
+        }
+        // @todo translate the conditions into something that the CXS spec can 
work with.
+
+        // we probably have to scan the tree to find any event conditions and 
seperate them
+        // from the profile property conditions (what about session conditions 
?)
+        return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
deleted file mode 100644
index 4d81f90..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_Segment")
-public class CXSSegment {
-    @GraphQLField
-    public String id;
-    @GraphQLField
-    public CXSView view;
-    @GraphQLField
-    public String name;
-    @GraphQLField
-    public CXSSegmentCondition condition;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
deleted file mode 100644
index 37d3311..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-import java.util.List;
-
-@GraphQLName("CXS_SegmentCondition")
-public class CXSSegmentCondition {
-    @GraphQLField
-    public CXSProfilePropertiesFilter profilePropertiesFilter;
-    @GraphQLField
-    public List<String> grantedConsents;
-    @GraphQLField
-    public CXSEventOccurrenceFilter eventOccurrenceFilter;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
deleted file mode 100644
index 52d1101..0000000
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
-
-import java.util.List;
-
-@GraphQLName("CXS_SetPropertyTypeInput")
-public class CXSSetPropertyTypeInput extends CXSPropertyType {
-
-    private List<CXSPropertyTypeInput> properties;
-
-    public CXSSetPropertyTypeInput(@GraphQLName("id") String id,
-                                   @GraphQLName("name") String name,
-                                   @GraphQLName("minOccurrences") Integer 
minOccurrences,
-                                   @GraphQLName("maxOccurrences") Integer 
maxOccurrences,
-                                   @GraphQLName("tags") List<String> tags,
-                                   @GraphQLName("systemTags") List<String> 
systemTags,
-                                   @GraphQLName("personalData") Boolean 
personalData,
-                                   @GraphQLName("properties") 
List<CXSPropertyTypeInput> properties) {
-        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, 
personalData);
-        this.properties = properties;
-    }
-
-    @GraphQLField
-    public List<CXSPropertyTypeInput> getProperties() {
-        return properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
deleted file mode 100644
index 0fbad2c..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_SortOrder")
-public enum CXSSortOrder {
-    ASC,
-    DESC,
-    UNSPECIFIED
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
deleted file mode 100644
index 5ee0066..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-import graphql.annotations.annotationTypes.GraphQLName;
-
-@GraphQLName("CXS_view")
-public class CXSView {
-    @GraphQLField
-    public String name;
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
deleted file mode 100644
index a49d774..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.unomi.graphql;
-
-import graphql.annotations.annotationTypes.GraphQLField;
-
-public class PageInfo {
-
-    @GraphQLField
-    public boolean hasPreviousPage;
-    @GraphQLField
-    public boolean hasNextPage;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
index ff2a27e..8c616d4 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
@@ -19,8 +19,13 @@ package org.apache.unomi.graphql.builders;
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
-import org.apache.unomi.graphql.*;
 import org.apache.unomi.graphql.propertytypes.*;
+import org.apache.unomi.graphql.types.input.CXSEventInput;
+import org.apache.unomi.graphql.types.input.CXSEventOccurrenceFilterInput;
+import org.apache.unomi.graphql.types.output.CXSEvent;
+import org.apache.unomi.graphql.types.output.CXSEventProperties;
+import org.apache.unomi.graphql.types.output.CXSEventType;
+import org.apache.unomi.graphql.types.output.PageInfo;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -36,7 +41,7 @@ public class CXSEventBuilders implements CXSBuilder {
 
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
-    private Map<String,CXSEventType> eventTypes;
+    private Map<String, CXSEventType> eventTypes;
     private Map<String,GraphQLType> typeRegistry;
 
     public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent,

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
index 5880731..e5dc6ba 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
@@ -22,9 +22,19 @@ import graphql.schema.*;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
-import org.apache.unomi.graphql.*;
+import org.apache.unomi.graphql.CXSGraphQLProvider;
+import org.apache.unomi.graphql.CXSMutation;
+import org.apache.unomi.graphql.CXSProviderManager;
+import org.apache.unomi.graphql.CXSQuery;
 import org.apache.unomi.graphql.builders.CXSEventBuilders;
 import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
+import org.apache.unomi.graphql.types.input.CXSDateFilter;
+import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
+import org.apache.unomi.graphql.types.input.CXSGeoDistanceInput;
+import org.apache.unomi.graphql.types.input.CXSOrderByInput;
+import org.apache.unomi.graphql.types.output.CXSEventType;
+import org.apache.unomi.graphql.types.output.CXSGeoPoint;
+import org.apache.unomi.graphql.types.output.PageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,11 +56,13 @@ public class CXSGraphQLProviderImpl implements 
CXSGraphQLProvider, GraphQLQueryP
     private CXSEventBuilders cxsEventBuilders;
     private Map<String,GraphQLType> typeRegistry;
 
-    private Map<String,CXSEventType> eventTypes = new TreeMap<>();
+    private Map<String, CXSEventType> eventTypes = new TreeMap<>();
 
     public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent 
annotationsComponent) {
         this.annotationsComponent = annotationsComponent;
         container = annotationsComponent.createContainer();
+        container.setInputPrefix("");
+        container.setInputSuffix("Input");
         typeRegistry = container.getTypeRegistry();
         cxsEventBuilders = new CXSEventBuilders(annotationsComponent, 
container, eventTypes);
         updateGraphQLTypes();
@@ -74,7 +86,7 @@ public class CXSGraphQLProviderImpl implements 
CXSGraphQLProvider, GraphQLQueryP
         typeRegistry.put("CXS_EventType", 
annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class,
 container));
 
         typeRegistry.put("CXS_GeoDistanceInput", 
annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class,
 container));
-        typeRegistry.put("CXS_DateFilterInput", 
annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class,
 container));
+        typeRegistry.put("CXS_DateFilterInput", 
annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilter.class,
 container));
         typeRegistry.put("CXS_EventTypeInput", 
annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class,
 container));
         typeRegistry.put("CXS_OrderByInput", 
annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class,
 container));
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
index 99d9d1f..cd7c56f 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
@@ -17,9 +17,11 @@
 package org.apache.unomi.graphql.internal;
 
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
+import graphql.annotations.processor.retrievers.GraphQLFieldRetriever;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
+import org.apache.unomi.api.services.SegmentService;
 import org.apache.unomi.graphql.CXSGraphQLProvider;
 import org.apache.unomi.graphql.CXSProviderManager;
 import org.osgi.framework.BundleContext;
@@ -40,6 +42,9 @@ public class CXSProviderManagerImpl implements 
CXSProviderManager {
 
     private CXSGraphQLProvider cxsGraphQLProvider;
     private GraphQLAnnotationsComponent annotationsComponent;
+    private GraphQLFieldRetriever graphQLFieldRetriever;
+    private SegmentService segmentService;
+
     private ServiceRegistration<?> providerSR;
     private BundleContext bundleContext;
 
@@ -48,6 +53,24 @@ public class CXSProviderManagerImpl implements 
CXSProviderManager {
         this.annotationsComponent = annotationsComponent;
     }
 
+    @Reference
+    public void setGraphQLFieldRetriever(GraphQLFieldRetriever 
graphQLFieldRetriever) {
+        this.graphQLFieldRetriever = graphQLFieldRetriever;
+        if (graphQLFieldRetriever != null) {
+            graphQLFieldRetriever.setAlwaysPrettify(true);
+        }
+    }
+
+    @Reference
+    public void setSegmentService(SegmentService segmentService) {
+        this.segmentService = segmentService;
+    }
+
+    @Override
+    public SegmentService getSegmentService() {
+        return segmentService;
+    }
+
     @Activate
     void activate(
             ComponentContext componentContext,

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
index abd46b4..e53b28b 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
@@ -24,9 +24,9 @@ import java.util.List;
 @GraphQLName("CXS_FloatPropertyType")
 public class CXSFloatPropertyType extends CXSPropertyType {
 
-    private Float minValue;
-    private Float maxValue;
-    private Float defaultValue;
+    private Double minValue;
+    private Double maxValue;
+    private Double defaultValue;
 
     public CXSFloatPropertyType(@GraphQLName("id") String id,
                                 @GraphQLName("name") String name,
@@ -35,9 +35,9 @@ public class CXSFloatPropertyType extends CXSPropertyType {
                                 @GraphQLName("tags") List<String> tags,
                                 @GraphQLName("systemTags") List<String> 
systemTags,
                                 @GraphQLName("personalData") Boolean 
personalData,
-                                @GraphQLName("minValue") Float minValue,
-                                @GraphQLName("maxValue") Float maxValue,
-                                @GraphQLName("defaultValue") Float 
defaultValue) {
+                                @GraphQLName("minValue") Double minValue,
+                                @GraphQLName("maxValue") Double maxValue,
+                                @GraphQLName("defaultValue") Double 
defaultValue) {
         super(id, name, minOccurrences, maxOccurrences, tags, systemTags, 
personalData);
         this.minValue = minValue;
         this.maxValue = maxValue;
@@ -45,17 +45,17 @@ public class CXSFloatPropertyType extends CXSPropertyType {
     }
 
     @GraphQLField
-    public Float getMinValue() {
+    public Double getMinValue() {
         return minValue;
     }
 
     @GraphQLField
-    public Float getMaxValue() {
+    public Double getMaxValue() {
         return maxValue;
     }
 
     @GraphQLField
-    public Float getDefaultValue() {
+    public Double getDefaultValue() {
         return defaultValue;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
new file mode 100644
index 0000000..0a48393
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+@GraphQLName("CXS_DateFilter")
+public class CXSDateFilter {
+    @GraphQLField
+    public long after;
+    @GraphQLField
+    public boolean includeAfter;
+    @GraphQLField
+    public long before;
+    @GraphQLField
+    public boolean includeBefore;
+}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
new file mode 100644
index 0000000..b699672
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+import java.util.List;
+
+@GraphQLName("CXS_EventFilter")
+public class CXSEventFilter {
+
+    @GraphQLField
+    @GraphQLName("and")
+    public List<CXSEventFilter> andFilters;
+
+    @GraphQLField
+    @GraphQLName("or")
+    public List<CXSEventFilter> orFilters;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
new file mode 100644
index 0000000..2a076cd
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+@GraphQLName("CXS_Event")
+public class CXSEventInput {
+    private String id;
+    private String eventType;
+    private long timeStamp;
+    private String subject;
+    private String object;
+    private Map<Object,Object> properties = new LinkedHashMap<>();
+    private CXSGeoPointInput location;
+
+    @GraphQLField
+    public String getId() {
+        return id;
+    }
+
+    @GraphQLField
+    public String getEventType() {
+        return eventType;
+    }
+
+    @GraphQLField
+    public long getTimeStamp() {
+        return timeStamp;
+    }
+
+    @GraphQLField
+    public String getSubject() {
+        return subject;
+    }
+
+    @GraphQLField
+    public String getObject() {
+        return object;
+    }
+
+    public Map<Object, Object> getProperties() {
+        return properties;
+    }
+
+    @GraphQLField
+    public CXSGeoPointInput getLocation() {
+        return location;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
new file mode 100644
index 0000000..ee74489
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+@GraphQLName("CXS_EventOccurrenceFilter")
+public class CXSEventOccurrenceFilterInput {
+
+    @GraphQLField
+    public String eventId;
+    @GraphQLField
+    public String beforeTime;
+    @GraphQLField
+    public String afterTime;
+    @GraphQLField
+    public String betweenTime;
+    @GraphQLField
+    public int count;
+}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
new file mode 100644
index 0000000..5f94aff
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@GraphQLName("CXS_EventType")
+public class CXSEventTypeInput {
+
+    private String id;
+    private String scope;
+    private String typeName;
+    private List<CXSPropertyTypeInput> properties = new ArrayList<>();
+
+    public CXSEventTypeInput(@GraphQLName("id") String id,
+                             @GraphQLName("scope") String scope,
+                             @GraphQLName("typeName") String typeName,
+                             @GraphQLName("properties") 
List<CXSPropertyTypeInput> properties) {
+        this.id = id;
+        this.scope = scope;
+        this.typeName = typeName;
+        this.properties = properties;
+    }
+
+    @GraphQLField
+    public String getId() {
+        return id;
+    }
+
+    @GraphQLField
+    public String getScope() {
+        return scope;
+    }
+
+    @GraphQLField
+    public String getTypeName() {
+        return typeName;
+    }
+
+    @GraphQLField
+    public List<CXSPropertyTypeInput> getProperties() {
+        return properties;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
----------------------------------------------------------------------
diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
new file mode 100644
index 0000000..7b8352a
--- /dev/null
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql.types.input;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.types.output.CXSGeoDistanceUnit;
+import org.apache.unomi.graphql.types.output.CXSGeoPoint;
+
+@GraphQLName("CXS_GeoDistance")
+public class CXSGeoDistanceInput {
+    @GraphQLField
+    public CXSGeoPoint center;
+    @GraphQLField
+    public CXSGeoDistanceUnit unit;
+    @GraphQLField
+    public Double distance;
+}


Reply via email to