http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java new file mode 100644 index 0000000..772abb8 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java @@ -0,0 +1,28 @@ +/* + * 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_GeoPoint") +public class CXSGeoPointInput { + @GraphQLField + public Double longitude; + @GraphQLField + public Double latitude; +}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java new file mode 100644 index 0000000..3ee5e1c --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java @@ -0,0 +1,31 @@ +/* + * 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.CXSSortOrder; + +@GraphQLName("CXS_OrderBy") +public class CXSOrderByInput { + + @GraphQLField + public String fieldName; + + @GraphQLField + public CXSSortOrder sortOrder; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java new file mode 100644 index 0000000..9917ca3 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java @@ -0,0 +1,76 @@ +/* + * 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.propertytypes.*; + +@GraphQLName("CXS_PropertyType") +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java new file mode 100644 index 0000000..95bbc9d --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java @@ -0,0 +1,51 @@ +/* + * 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_SegmentFilter") +public class CXSSegmentFilterInput { + + @GraphQLField + @GraphQLName("and") + public List<CXSSegmentFilterInput> andFilters; + + @GraphQLField + @GraphQLName("or") + public List<CXSSegmentFilterInput> orFilters; + + @GraphQLField + @GraphQLName("view_equals") + public String viewEquals; + + @GraphQLField + @GraphQLName("view_regexp") + public String viewRegexp; + + @GraphQLField + @GraphQLName("name_equals") + public String nameEquals; + + @GraphQLField + @GraphQLName("name_regexp") + public String nameRegexp; + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java new file mode 100644 index 0000000..ba762f9 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java @@ -0,0 +1,45 @@ +/* + * 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_SetPropertyType") +public class CXSSetPropertyTypeInput extends org.apache.unomi.graphql.propertytypes.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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java new file mode 100644 index 0000000..738ef7e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java @@ -0,0 +1,67 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java new file mode 100644 index 0000000..5852b8d --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java new file mode 100644 index 0000000..1be39a6 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java @@ -0,0 +1,30 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java new file mode 100644 index 0000000..9d26663 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java new file mode 100644 index 0000000..7fac676 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java @@ -0,0 +1,36 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java new file mode 100644 index 0000000..7431cf9 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java new file mode 100644 index 0000000..9580a51 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java @@ -0,0 +1,23 @@ +/* + * 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.output; + +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CXS_EventPropertiesFilter") +public class CXSEventPropertiesFilter { +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java new file mode 100644 index 0000000..38a7d4e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java @@ -0,0 +1,63 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java new file mode 100644 index 0000000..8be9aee --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java @@ -0,0 +1,26 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java new file mode 100644 index 0000000..12e3e0a --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java @@ -0,0 +1,31 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java new file mode 100644 index 0000000..5f64798 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java new file mode 100644 index 0000000..eca9f90 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java @@ -0,0 +1,33 @@ +/* + * 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.output; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +import org.apache.unomi.graphql.CXSProfilePropertiesFilter; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java new file mode 100644 index 0000000..09fe699 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java @@ -0,0 +1,31 @@ +/* + * 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.output; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; + +import java.util.List; + +@GraphQLName("CXS_SegmentConnection") +public class CXSSegmentConnection { + @GraphQLField + public List<CXSSegmentEdge> edges; + @GraphQLField + public PageInfo pageInfo; + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java new file mode 100644 index 0000000..f45b872 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java @@ -0,0 +1,31 @@ +/* + * 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.output; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CXS_SegmentEdge") +public class CXSSegmentEdge { + + @GraphQLField + public CXSSegment edge; + + @GraphQLField + public String cursor; + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java new file mode 100644 index 0000000..34d8c11 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java @@ -0,0 +1,26 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java new file mode 100644 index 0000000..a8e3616 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java @@ -0,0 +1,26 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java ---------------------------------------------------------------------- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java new file mode 100644 index 0000000..7242a87 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java @@ -0,0 +1,28 @@ +/* + * 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.output; + +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/e2f4e0df/graphql/karaf-feature/pom.xml ---------------------------------------------------------------------- diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index c61df57..3179638 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -35,17 +35,17 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> - <version>2.8.4</version> + <version>2.8.6</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>2.8.4</version> + <version>2.8.6</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.8.4</version> + <version>2.8.6</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> @@ -65,8 +65,19 @@ <dependency> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> - <version>4.5.1</version> + <version>4.7.1</version> </dependency> + <dependency> + <groupId>com.graphql-java</groupId> + <artifactId>java-dataloader</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>org.reactivestreams</groupId> + <artifactId>reactive-streams</artifactId> + <version>1.0.2</version> + </dependency> + <dependency> <groupId>com.graphql-java</groupId> http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/pom.xml ---------------------------------------------------------------------- diff --git a/graphql/pom.xml b/graphql/pom.xml index ea476f6..25d0e3f 100644 --- a/graphql/pom.xml +++ b/graphql/pom.xml @@ -31,9 +31,9 @@ <packaging>pom</packaging> <properties> - <graphql.java.servlet.version>4.7.0</graphql.java.servlet.version> - <graphql.java.version>6.0</graphql.java.version> - <graphql.java.annotations.version>5.1</graphql.java.annotations.version> + <graphql.java.servlet.version>5.0.1</graphql.java.servlet.version> + <graphql.java.version>8.0</graphql.java.version> + <graphql.java.annotations.version>6.1</graphql.java.annotations.version> </properties> <modules>