http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Event.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Event.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Event.java
deleted file mode 100644
index 0e735c3..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Event.java
+++ /dev/null
@@ -1,324 +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.oasis_open.contextserver.api;
-
-import org.oasis_open.contextserver.api.actions.ActionPostExecutor;
-
-import javax.xml.bind.annotation.XmlTransient;
-import java.util.*;
-
-/**
- * An event that can be processed and evaluated by the context server. Events 
can be triggered by clients following user actions or can also be issued 
internally in the context
- * server in response to another event. Conceptually, an event can be seen as 
a sentence, the event's type being the verb, the source the subject and the 
target the object.
- *
- * Source and target can be any unomi item but are not limited to them. In 
particular, as long as they can be described using properties and unomi’s 
type mechanism and can be
- * processed either natively or via extension plugins, source and target can 
represent just about anything.
- */
-public class Event extends Item implements TimestampedItem {
-
-    private static final long serialVersionUID = -1096874942838593575L;
-    /**
-     * The Event ITEM_TYPE.
-     *
-     * @see Item for a discussion of ITEM_TYPE
-     */
-    public static final String ITEM_TYPE = "event";
-    /**
-     * A constant for the name of the attribute that can be used to retrieve 
the current HTTP request.
-     */
-    public static final String HTTP_REQUEST_ATTRIBUTE = "http_request";
-    /**
-     * A constant for the name of the attribute that can be used to retrieve 
the current HTTP response.
-     */
-    public static final String HTTP_RESPONSE_ATTRIBUTE = "http_response";
-
-    private String eventType;
-    private String sessionId = null;
-    private String profileId = null;
-    private Date timeStamp;
-    private Map<String, Object> properties;
-
-    private transient Profile profile;
-    private transient Session session;
-    private transient List<ActionPostExecutor> actionPostExecutors;
-
-    private String scope;
-
-    private Item source;
-    private Item target;
-
-    private transient boolean persistent = true;
-
-    private transient Map<String, Object> attributes = new LinkedHashMap<>();
-
-    /**
-     * Instantiates a new Event.
-     */
-    public Event() {
-    }
-
-    /**
-     * Instantiates a new Event.
-     *
-     * @param eventType the event type identifier
-     * @param session   the session associated with the event
-     * @param profile   the profile associated with the event
-     * @param scope     the scope from which the event is issued
-     * @param source    the source of the event
-     * @param target    the target of the event if any
-     * @param timestamp the timestamp associated with the event if provided
-     */
-    public Event(String eventType, Session session, Profile profile, String 
scope, Item source, Item target, Date timestamp) {
-        super(UUID.randomUUID().toString());
-        this.eventType = eventType;
-        this.profile = profile;
-        this.session = session;
-        this.profileId = profile.getItemId();
-        this.scope = scope;
-        this.source = source;
-        this.target = target;
-
-        if (session != null) {
-            this.sessionId = session.getItemId();
-        }
-        this.timeStamp = timestamp;
-
-        this.properties = new HashMap<String, Object>();
-
-        actionPostExecutors = new ArrayList<>();
-    }
-
-    /**
-     * Instantiates a new Event.
-     *
-     * @param eventType  the event type identifier
-     * @param session    the session associated with the event
-     * @param profile    the profile associated with the event
-     * @param scope      the scope from which the event is issued
-     * @param source     the source of the event
-     * @param target     the target of the event if any
-     * @param timestamp  the timestamp associated with the event if provided
-     * @param properties the properties for this event if any
-     */
-    public Event(String eventType, Session session, Profile profile, String 
scope, Item source, Item target, Map<String, Object> properties, Date 
timestamp) {
-        this(eventType, session, profile, scope, source, target, timestamp);
-        if (properties != null) {
-            this.properties = properties;
-        }
-    }
-
-    /**
-     * Retrieves the session identifier if available.
-     *
-     * @return the session identifier or {@code null} if unavailable
-     */
-    public String getSessionId() {
-        return sessionId;
-    }
-
-    /**
-     * Retrieves the profile identifier of the Profile associated with this 
event
-     *
-     * @return the profile id
-     */
-    public String getProfileId() {
-        return profileId;
-    }
-
-    /**
-     * Sets the profile id.
-     *
-     * @param profileId the profile id
-     */
-    public void setProfileId(String profileId) {
-        this.profileId = profileId;
-    }
-
-    /**
-     * Retrieves the event type.
-     *
-     * @return the event type
-     */
-    public String getEventType() {
-        return eventType;
-    }
-
-    public Date getTimeStamp() {
-        return timeStamp;
-    }
-
-    /**
-     * Retrieves the profile.
-     *
-     * @return the profile
-     */
-    @XmlTransient
-    public Profile getProfile() {
-        return profile;
-    }
-
-    /**
-     * Sets the profile.
-     *
-     * @param profile the profile
-     */
-    public void setProfile(Profile profile) {
-        this.profile = profile;
-    }
-
-    /**
-     * Retrieves the session.
-     *
-     * @return the session
-     */
-    @XmlTransient
-    public Session getSession() {
-        return session;
-    }
-
-    /**
-     * Sets the session.
-     *
-     * @param session the session
-     */
-    public void setSession(Session session) {
-        this.session = session;
-    }
-
-    /**
-     * Determines whether this Event needs to be persisted to the context 
server or not. Events that don't participate in building the user profile don't 
usually need to be
-     * persisted.
-     *
-     * @return {@code true} if this Event needs to be persisted, {@code false} 
otherwise
-     */
-    @XmlTransient
-    public boolean isPersistent() {
-        return persistent;
-    }
-
-    /**
-     * Specifies if this Event needs to be persisted.
-     *
-     * @param persistent {@code true} if this Event needs to be persisted, 
{@code false} otherwise
-     */
-    public void setPersistent(boolean persistent) {
-        this.persistent = persistent;
-    }
-
-    /**
-     * Retrieves the attributes. Attributes are not serializable, and can be 
used to provide additional contextual objects such as HTTP request or response 
objects, etc...
-     *
-     * @return the attributes
-     */
-    @XmlTransient
-    public Map<String, Object> getAttributes() {
-        return attributes;
-    }
-
-    /**
-     * Sets the property identified by the provided name to the specified 
value.
-     *
-     * @param name  the name of the property to be set
-     * @param value the value of the property
-     */
-    public void setProperty(String name, Object value) {
-        properties.put(name, value);
-    }
-
-    /**
-     * Retrieves the value of the property identified by the specified name.
-     *
-     * @param name the name of the property to be retrieved
-     * @return the value of the property identified by the specified name
-     */
-    public Object getProperty(String name) {
-        return properties.get(name);
-    }
-
-    /**
-     * Retrieves the properties.
-     *
-     * @return the properties
-     */
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-    public String getScope() {
-        return scope;
-    }
-
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-
-    /**
-     * Retrieves the source.
-     *
-     * @return the source
-     */
-    public Item getSource() {
-        return source;
-    }
-
-    /**
-     * Sets the source.
-     *
-     * @param source the source
-     */
-    public void setSource(Item source) {
-        this.source = source;
-    }
-
-    /**
-     * Retrieves the target.
-     *
-     * @return the target
-     */
-    public Item getTarget() {
-        return target;
-    }
-
-    /**
-     * Sets the target.
-     *
-     * @param target the target
-     */
-    public void setTarget(Item target) {
-        this.target = target;
-    }
-
-    /**
-     * Retrieves the action post executors for this event, if extra actions 
need to be executed after all Rule-triggered actions have been processed
-     *
-     * @return the action post executors
-     */
-    @XmlTransient
-    public List<ActionPostExecutor> getActionPostExecutors() {
-        return actionPostExecutors;
-    }
-
-    /**
-     * Sets the action post executors.
-     *
-     * @param actionPostExecutors the action post executors
-     */
-    public void setActionPostExecutors(List<ActionPostExecutor> 
actionPostExecutors) {
-        this.actionPostExecutors = actionPostExecutors;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/EventInfo.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/EventInfo.java 
b/api/src/main/java/org/oasis_open/contextserver/api/EventInfo.java
deleted file mode 100644
index 9e965ea..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/EventInfo.java
+++ /dev/null
@@ -1,49 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Created by loom on 10.09.15.
- */
-@XmlRootElement
-public class EventInfo {
-
-    private String name;
-    private Long occurences;
-
-    public EventInfo() {
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Long getOccurences() {
-        return occurences;
-    }
-
-    public void setOccurences(Long occurences) {
-        this.occurences = occurences;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/EventProperty.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/EventProperty.java 
b/api/src/main/java/org/oasis_open/contextserver/api/EventProperty.java
deleted file mode 100644
index a609b24..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/EventProperty.java
+++ /dev/null
@@ -1,100 +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.oasis_open.contextserver.api;
-
-import java.io.Serializable;
-
-/**
- * An event property.
- *
- * @author Sergiy Shyrkov
- */
-public class EventProperty implements Serializable {
-
-    private static final long serialVersionUID = -6727761503135013816L;
-
-    private String id;
-
-    private String valueType = "string";
-
-    /**
-     * Initializes an instance of this class.
-     */
-    public EventProperty() {
-        super();
-    }
-
-    /**
-     * Initializes an instance of an event property with the string value type.
-     *
-     * @param id the event property id
-     */
-    public EventProperty(String id) {
-        this(id, null);
-    }
-
-    /**
-     * Initializes an instance of this class.
-     *
-     * @param id   the event property id
-     * @param type the type of the value for this property
-     */
-    public EventProperty(String id, String type) {
-        this();
-        this.id = id;
-        if (type != null) {
-            this.valueType = type;
-        }
-    }
-
-    /**
-     * Retrieves the identifier for this EventProperty.
-     *
-     * @return the identifier for this EventProperty
-     */
-    public String getId() {
-        return id;
-    }
-
-    /**
-     * Retrieves the type.
-     *
-     * @return the value type
-     */
-    public String getValueType() {
-        return valueType;
-    }
-
-    /**
-     * Sets the identifier.
-     *
-     * @param id the id
-     */
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     * Sets the value type.
-     *
-     * @param type the type
-     */
-    public void setValueType(String type) {
-        this.valueType = type;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/EventSource.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/EventSource.java 
b/api/src/main/java/org/oasis_open/contextserver/api/EventSource.java
deleted file mode 100644
index e5267ee..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/EventSource.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.oasis_open.contextserver.api;
-
-/**
- * TODO: REMOVE
- */
-public class EventSource {
-    private String scope;
-    private String id;
-    private String path;
-    private String type;
-
-    public EventSource() {
-    }
-
-    public String getScope() {
-        return scope;
-    }
-
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/EventTarget.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/EventTarget.java 
b/api/src/main/java/org/oasis_open/contextserver/api/EventTarget.java
deleted file mode 100644
index 389e5eb..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/EventTarget.java
+++ /dev/null
@@ -1,72 +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.oasis_open.contextserver.api;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * TODO: REMOVE
- */
-public class EventTarget implements Serializable {
-    private static final long serialVersionUID = 6370790894348364803L;
-    private String id;
-    private String type;
-    private Map<String, Object> properties;
-
-    public EventTarget() {
-    }
-
-    public EventTarget(String id, String type) {
-        this.id = id;
-        this.type = type;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(Map<String, Object> properties) {
-        this.properties = properties;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder("EventTarget{");
-        sb.append("id='").append(id).append('\'');
-        sb.append(", type='").append(type).append('\'');
-        sb.append('}');
-        return sb.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/EventsCollectorRequest.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/EventsCollectorRequest.java
 
b/api/src/main/java/org/oasis_open/contextserver/api/EventsCollectorRequest.java
deleted file mode 100644
index c8a0baf..0000000
--- 
a/api/src/main/java/org/oasis_open/contextserver/api/EventsCollectorRequest.java
+++ /dev/null
@@ -1,40 +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.oasis_open.contextserver.api;
-
-import java.util.List;
-
-/**
- * A request for events to be processed.
- */
-public class EventsCollectorRequest {
-    private List<Event> events;
-
-    /**
-     * Retrieves the events to be processed.
-     *
-     * @return the events to be processed
-     */
-    public List<Event> getEvents() {
-        return events;
-    }
-
-    public void setEvents(List<Event> events) {
-        this.events = events;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Item.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Item.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Item.java
deleted file mode 100644
index 5baf2d7..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Item.java
+++ /dev/null
@@ -1,114 +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.oasis_open.contextserver.api;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Serializable;
-
-/**
- * A context server tracked entity. All tracked entities need to extend this 
class so as to provide the minimal information the context server needs to be 
able to track such
- * entities and operate on them. Items are persisted according to their type 
(structure) and identifier (identity). Of note, all Item subclasses 
<strong>must</strong> define a
- * public String constant named {@code ITEM_TYPE} that is used to identify the 
type of a specific Item via {@link #getItemType}. It is therefore important that
- * {@code ITEM_TYPE} be unique across all persisted type of Items. Similarly, 
since Items are persisted according to their type, an Item's identifier must be 
unique among
- * Items of the same type.
- * <p/>
- * Additionally, Items are also gathered by scope allowing the context server 
to group together related Items (usually pertaining to a given site being 
analyzed,
- * though scopes could span across sites depending on the desired analysis 
granularity). Scopes allow clients accessing the context server to filter data. 
The context server
- * defines a built-in scope ({@link Metadata#SYSTEM_SCOPE}) that clients can 
use to share data across scopes.
- */
-public abstract class Item implements Serializable {
-    private static final Logger logger = 
LoggerFactory.getLogger(Item.class.getName());
-
-    private static final long serialVersionUID = 7446061538573517071L;
-    protected String itemId;
-    protected String itemType;
-    protected String scope;
-
-    public Item() {
-        try {
-            this.itemType = (String) 
this.getClass().getField("ITEM_TYPE").get(null);
-        } catch (IllegalAccessException | NoSuchFieldException e) {
-            logger.error("Item implementations must provide a public String 
constant named ITEM_TYPE to uniquely identify this Item for the persistence 
service.", e);
-        }
-    }
-
-    public Item(String itemId) {
-        this();
-        this.itemId = itemId;
-    }
-
-
-    /**
-     * Retrieves the Item's identifier used to uniquely identify this Item 
when persisted or when referred to. An Item's identifier must be unique among 
Items with the same type.
-     *
-     * @return a String representation of the identifier, no particular format 
is prescribed as long as it is guaranteed unique for this particular Item.
-     */
-    public String getItemId() {
-        return itemId;
-    }
-
-    public void setItemId(String itemId) {
-        this.itemId = itemId;
-    }
-
-    /**
-     * Retrieves the Item's type used to assert metadata and structure common 
to Items of this type, notably for persistence purposes. The Item's type 
<strong>must</strong>
-     * match the value defined by the implementation's {@code ITEM_TYPE} 
public constant.
-     *
-     * @return a String representation of this Item's type, must equal the 
{@code ITEM_TYPE} value
-     */
-    public String getItemType() {
-        return itemType;
-    }
-
-    public void setItemType(String itemType) {
-        this.itemType = itemType;
-    }
-
-    /**
-     * Retrieves the Item's scope.
-     *
-     * @return the Item's scope name
-     */
-    public String getScope() {
-        return scope;
-    }
-
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        Item item = (Item) o;
-
-        if (itemId != null ? !itemId.equals(item.itemId) : item.itemId != 
null) return false;
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return itemId != null ? itemId.hashCode() : 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Metadata.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Metadata.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Metadata.java
deleted file mode 100644
index 4dc03e9..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Metadata.java
+++ /dev/null
@@ -1,262 +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.oasis_open.contextserver.api;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * A class providing information about context server entities.
- *
- * @see MetadataItem
- */
-public class Metadata implements Comparable<Metadata> {
-
-    /**
-     * Default scope, gathers default entities and can also be used to share 
entities across scopes.
-     */
-    public static final String SYSTEM_SCOPE = "systemscope";
-    private String id;
-    private String name;
-    private String description;
-    private String scope;
-    private Set<String> tags = new LinkedHashSet<>();
-    private boolean enabled = true;
-    private boolean missingPlugins = false;
-    private boolean hidden = false;
-    private boolean readOnly = false;
-
-    /**
-     * Instantiates a new Metadata.
-     */
-    public Metadata() {
-    }
-
-    /**
-     * Instantiates a new Metadata with the specified identifier.
-     *
-     * @param id the identifier for this Metadata
-     */
-    public Metadata(String id) {
-        this.id = id;
-    }
-
-    /**
-     * Instantiates a new Metadata with the provided information.
-     *
-     * @param scope       the scope for this Metadata
-     * @param id          the identifier of the associated {@link Item}
-     * @param name        the name
-     * @param description the description
-     */
-    public Metadata(String scope, String id, String name, String description) {
-        this.scope = scope;
-        this.id = id;
-        this.name = name;
-        this.description = description;
-    }
-
-    /**
-     * Sets the id.
-     *
-     * @param id the id
-     */
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     * Retrieves the identifier for the entity associated with this Metadata
-     *
-     * @return the identifier
-     */
-    public String getId() {
-        return id;
-    }
-
-    /**
-     * Retrieves the name.
-     *
-     * @return the name
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the name.
-     *
-     * @param name the name
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Retrieves the description.
-     *
-     * @return the description
-     */
-    public String getDescription() {
-        return description;
-    }
-
-    /**
-     * Sets the description.
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    /**
-     * Retrieves the scope for the entity associated with this Metadata
-     *
-     * @return the scope for the entity associated with this Metadata
-     * @see Item Item for a deeper discussion of scopes
-     */
-    public String getScope() {
-        return scope;
-    }
-
-    /**
-     * Sets the scope.
-     *
-     * @param scope the scope
-     */
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-
-    /**
-     * Retrieves a set of {@link Tag} names associated with this Metadata
-     *
-     * @return a set of {@link Tag} names associated with this Metadata
-     */
-    public Set<String> getTags() {
-        return tags;
-    }
-
-    /**
-     * Sets the tags.
-     *
-     * @param tagIDs the tag i ds
-     */
-    public void setTags(Set<String> tagIDs) {
-        this.tags = tagIDs;
-    }
-
-    /**
-     * Whether the associated entity is considered active by the context 
server, in particular to check if rules need to be created / triggered
-     *
-     * @return {@code true} if the associated entity is enabled, {@code false} 
otherwise
-     */
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    /**
-     * Specifies whether the associated entity should be active or not.
-     *
-     * @param enabled {@code true} if the associated entity is enabled, {@code 
false} otherwise
-     */
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-
-    /**
-     * Whether the associated entity is waiting on additional plugins to 
become available to be able to properly perform its function.
-     *
-     * @return {@code true} if plugins are missing, {@code false} otherwise
-     */
-    public boolean isMissingPlugins() {
-        return missingPlugins;
-    }
-
-    /**
-     * Specifies whether the associated entity is waiting on additional 
plugins to become available.
-     *
-     * @param missingPlugins {@code true} if plugins are missing, {@code 
false} otherwise
-     */
-    public void setMissingPlugins(boolean missingPlugins) {
-        this.missingPlugins = missingPlugins;
-    }
-
-    /**
-     * Whether the associated entity is considered for internal purposes only 
and should therefore be hidden to accessing UIs.
-     *
-     * @return {@code true} if the associated entity needs to be hidden, 
{@code false} otherwise
-     */
-    public boolean isHidden() {
-        return hidden;
-    }
-
-    /**
-     * Specifies whether the associated entity is hidden.
-     *
-     * @param hidden {@code true} if the associated entity needs to be hidden, 
{@code false} otherwise
-     */
-    public void setHidden(boolean hidden) {
-        this.hidden = hidden;
-    }
-
-    /**
-     * Whether the associated entity can be accessed but not modified.
-     *
-     * @return {@code true} if the associated entity can be accessed but not 
modified, {@code false} otherwise
-     */
-    public boolean isReadOnly() {
-        return readOnly;
-    }
-
-    /**
-     * Specifies whether the associated entity should be only accessed and not 
modified.
-     *
-     * @param readOnly {@code true} if the associated entity can be accessed 
but not modified, {@code false} otherwise
-     */
-    public void setReadOnly(boolean readOnly) {
-        this.readOnly = readOnly;
-    }
-
-    public int compareTo(Metadata o) {
-        return getId().compareTo(o.getId());
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        Metadata metadata = (Metadata) o;
-
-        if (!id.equals(metadata.id)) return false;
-        if (scope != null ? !scope.equals(metadata.scope) : metadata.scope != 
null) return false;
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        int result = id.hashCode();
-        result = 31 * result + (scope != null ? scope.hashCode() : 0);
-        return result;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/MetadataItem.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/MetadataItem.java 
b/api/src/main/java/org/oasis_open/contextserver/api/MetadataItem.java
deleted file mode 100644
index f07860a..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/MetadataItem.java
+++ /dev/null
@@ -1,58 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-/**
- * A superclass for all {@link Item}s that bear {@link Metadata}.
- */
-public abstract class MetadataItem extends Item {
-    private static final long serialVersionUID = -2459510107927663510L;
-    protected Metadata metadata;
-
-    public MetadataItem() {
-    }
-
-    public MetadataItem(Metadata metadata) {
-        super(metadata.getId());
-        this.metadata = metadata;
-    }
-
-    /**
-     * Retrieves the associated Metadata.
-     *
-     * @return the associated Metadata
-     */
-    @XmlElement(name = "metadata")
-    public Metadata getMetadata() {
-        return metadata;
-    }
-
-    public void setMetadata(Metadata metadata) {
-        this.itemId = metadata.getId();
-        this.metadata = metadata;
-    }
-
-    @XmlTransient
-    public String getScope() {
-        return metadata.getScope();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Parameter.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Parameter.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Parameter.java
deleted file mode 100644
index 79384bf..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Parameter.java
+++ /dev/null
@@ -1,61 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * A representation of a condition parameter, to be used in the segment 
building UI to either select parameters from a
- * choicelist or to enter a specific value.
- */
-@XmlRootElement
-public class Parameter {
-
-    String id;
-    String type;
-    boolean multivalued = false;
-    String choiceListInitializerFilter;
-    String defaultValue = null;
-
-    public Parameter() {
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public boolean isMultivalued() {
-        return multivalued;
-    }
-
-    public String getChoiceListInitializerFilter() {
-        return choiceListInitializerFilter;
-    }
-
-    public String getDefaultValue() {
-        return defaultValue;
-    }
-
-    public void setDefaultValue(String defaultValue) {
-        this.defaultValue = defaultValue;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PartialList.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PartialList.java 
b/api/src/main/java/org/oasis_open/contextserver/api/PartialList.java
deleted file mode 100644
index 0428ded..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/PartialList.java
+++ /dev/null
@@ -1,144 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A list of elements representing a limited view of a larger list, starting 
from a given element (offset from the first) and showing only a given number of 
elements, instead of
- * showing all of them. This is useful to retrieve "pages" of large element 
collections.
- *
- * @param <T> the generic type of contained elements
- */
-@XmlRootElement
-public class PartialList<T> implements Serializable {
-
-    private static final long serialVersionUID = 2661946814840468260L;
-    private List<T> list;
-    private long offset;
-    private long pageSize;
-    private long totalSize;
-
-    /**
-     * Instantiates a new PartialList.
-     */
-    public PartialList() {
-        list = new ArrayList<>();
-        offset = 0;
-        pageSize = 0;
-        totalSize = 0;
-    }
-
-    /**
-     * Instantiates a new PartialList.
-     *
-     * @param list      the limited view into the bigger List this PartialList 
is representing
-     * @param offset    the offset of the first element in the view
-     * @param pageSize  the number of elements this PartialList contains
-     * @param totalSize the total size of elements in the original List
-     */
-    public PartialList(List<T> list, long offset, long pageSize, long 
totalSize) {
-        this.list = list;
-        this.offset = offset;
-        this.pageSize = pageSize;
-        this.totalSize = totalSize;
-    }
-
-    /**
-     * Retrieves the limited list view.
-     *
-     * @return a List of the {@code size} elements starting from the {@code 
offset}-th one from the original, larger list
-     */
-    public List<T> getList() {
-        return list;
-    }
-
-    /**
-     * Sets the view list.
-     *
-     * @param list the view list into the bigger List this PartialList is 
representing
-     */
-    public void setList(List<T> list) {
-        this.list = list;
-    }
-
-    /**
-     * Retrieves the offset of the first element of the view.
-     *
-     * @return the offset of the first element of the view
-     */
-    public long getOffset() {
-        return offset;
-    }
-
-    public void setOffset(long offset) {
-        this.offset = offset;
-    }
-
-    /**
-     * Retrieves the number of elements this PartialList contains.
-     *
-     * @return the number of elements this PartialList contains
-     */
-    public long getPageSize() {
-        return pageSize;
-    }
-
-    public void setPageSize(long pageSize) {
-        this.pageSize = pageSize;
-    }
-
-    /**
-     * Retrieves the total size of elements in the original List.
-     *
-     * @return the total size of elements in the original List
-     */
-    public long getTotalSize() {
-        return totalSize;
-    }
-
-    public void setTotalSize(long totalSize) {
-        this.totalSize = totalSize;
-    }
-
-    /**
-     * Retrieves the size of this PartialList. Should equal {@link 
#getPageSize()}.
-     *
-     * @return the size of this PartialList
-     */
-    @XmlTransient
-    public int size() {
-        return list.size();
-    }
-
-    /**
-     * Retrieves the element at the specified index
-     *
-     * @param index the index of the element to retrieve
-     * @return the element at the specified index
-     */
-    @XmlTransient
-    public T get(int index) {
-        return list.get(index);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Persona.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Persona.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Persona.java
deleted file mode 100644
index 7e7210b..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Persona.java
+++ /dev/null
@@ -1,37 +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.oasis_open.contextserver.api;
-
-/**
- * A persona is a "virtual" profile used to represent categories of profiles, 
and may also be used to test how a personalized experience would look like 
using this virtual profile.
- * A persona can define predefined properties and sessions. Persona definition 
make it possible to “emulate” a certain type of profile, e.g : US visitor, 
non-US visitor, etc.
- */
-public class Persona extends Profile {
-
-    private static final long serialVersionUID = -1239061113528609426L;
-    public static final String ITEM_TYPE = "persona";
-
-    public Persona() {
-        super();
-    }
-
-    public Persona(String personaId) {
-        super(personaId);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PersonaSession.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PersonaSession.java 
b/api/src/main/java/org/oasis_open/contextserver/api/PersonaSession.java
deleted file mode 100644
index 9f12b99..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/PersonaSession.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.oasis_open.contextserver.api;
-
-import java.util.Date;
-
-/**
- * A Persona session.
- */
-public class PersonaSession extends Session {
-    private static final long serialVersionUID = -1499107289607498852L;
-    public static final String ITEM_TYPE = "personaSession";
-
-    public PersonaSession() {
-    }
-
-    public PersonaSession(String itemId, Profile profile, Date timeStamp) {
-        super(itemId, profile, timeStamp, Metadata.SYSTEM_SCOPE);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PersonaWithSessions.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PersonaWithSessions.java 
b/api/src/main/java/org/oasis_open/contextserver/api/PersonaWithSessions.java
deleted file mode 100644
index 0d8045a..0000000
--- 
a/api/src/main/java/org/oasis_open/contextserver/api/PersonaWithSessions.java
+++ /dev/null
@@ -1,59 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlTransient;
-import java.util.List;
-
-/**
- * A convenience object gathering a {@link Persona} and its associated {@link 
PersonaSession}s.
- */
-public class PersonaWithSessions {
-    private Persona persona;
-
-    private List<PersonaSession> sessions;
-
-    public PersonaWithSessions() {
-    }
-
-    public PersonaWithSessions(Persona persona, List<PersonaSession> sessions) 
{
-        this.persona = persona;
-        this.sessions = sessions;
-    }
-
-    public Persona getPersona() {
-        return persona;
-    }
-
-    public void setPersona(Persona persona) {
-        this.persona = persona;
-    }
-
-    public List<PersonaSession> getSessions() {
-        return sessions;
-    }
-
-    public void setSessions(List<PersonaSession> sessions) {
-        this.sessions = sessions;
-    }
-
-    @XmlTransient
-    public PersonaSession getLastSession() {
-        return sessions.get(0);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PluginType.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/PluginType.java 
b/api/src/main/java/org/oasis_open/contextserver/api/PluginType.java
deleted file mode 100644
index c084492..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/PluginType.java
+++ /dev/null
@@ -1,39 +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.oasis_open.contextserver.api;
-
-/**
- * The interface for unomi plugins.
- */
-public interface PluginType {
-
-    /**
-     * Retrieves the plugin identifier, corresponding to the identifier of the 
OSGi bundle implementing the plugin.
-     *
-     * @return the plugin identifier, corresponding to the identifier of the 
OSGi bundle implementing the plugin
-     */
-    long getPluginId();
-
-    /**
-     * Associates this plugin with its associated OSGi bundle identifier.
-     *
-     * @param pluginId the OSGi bundle identifier associated with this plugin
-     */
-    void setPluginId(long pluginId);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Profile.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Profile.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Profile.java
deleted file mode 100644
index 98624d2..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Profile.java
+++ /dev/null
@@ -1,202 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlTransient;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * A user profile gathering all known information about a given user as well 
as segments it is part of and scores.
- * <p/>
- * Contrary to other unomi {@link Item}s, profiles are not part of a scope 
since we want to be able to track the associated user across applications. For 
this reason, data
- * collected for a given profile in a specific scope is still available to any 
scoped item that accesses the profile information.
- * <p/>
- * It is interesting to note that there is not necessarily a one to one 
mapping between users and profiles as users can be captured across applications 
and different observation
- * contexts. As identifying information might not be available in all contexts 
in which data is collected, resolving profiles to a single physical user can 
become complex because
- * physical users are not observed directly. Rather, their portrait is 
progressively patched together and made clearer as unomi captures more and more 
traces of their actions.
- * Unomi will merge related profiles as soon as collected data permits 
positive association between distinct profiles, usually as a result of the user 
performing some identifying
- * action in a context where the user hadn’t already been positively 
identified.
- *
- * @see org.oasis_open.contextserver.api.segments.Segment
- */
-public class Profile extends Item {
-
-    private static final long serialVersionUID = -7409439322939712238L;
-
-    /**
-     * The Profile ITEM_TYPE
-     *
-     * @see Item for a discussion of ITEM_TYPE
-     */
-    public static final String ITEM_TYPE = "profile";
-
-    private Map<String, Object> properties = new HashMap<String, Object>();
-
-    private Map<String, Object> systemProperties = new HashMap<String, 
Object>();
-
-    private Set<String> segments = new HashSet<String>();
-
-    private Map<String, Integer> scores;
-
-    private String mergedWith;
-
-    /**
-     * Instantiates a new Profile.
-     */
-    public Profile() {
-    }
-
-    /**
-     * Instantiates a new Profile with the specified identifier.
-     *
-     * @param profileId the profile identifier
-     */
-    public Profile(String profileId) {
-        super(profileId);
-    }
-
-    /**
-     * Sets the property identified by the specified name to the specified 
value. If a property with that name already exists, replaces its value, 
otherwise adds the new
-     * property with the specified name and value.
-     *
-     * @param name  the name of the property to set
-     * @param value the value of the property
-     */
-    public void setProperty(String name, Object value) {
-        properties.put(name, value);
-    }
-
-    /**
-     * Retrieves the property identified by the specified name.
-     *
-     * @param name the name of the property to retrieve
-     * @return the value of the specified property or {@code null} if no such 
property exists
-     */
-    public Object getProperty(String name) {
-        return properties.get(name);
-    }
-
-    /**
-     * Retrieves a Map of all property name - value pairs for this profile.
-     *
-     * @return a Map of all property name - value pairs for this profile
-     */
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-    /**
-     * Sets the property name - value pairs for this profile.
-     *
-     * @param properties a Map containing the property name - value pairs for 
this profile
-     */
-    public void setProperties(Map<String, Object> properties) {
-        this.properties = properties;
-    }
-
-    /**
-     * Retrieves a Map of system property name - value pairs for this profile. 
System properties can be used by implementations to store non-user visible 
properties needed for
-     * internal purposes.
-     *
-     * @return a Map of system property name - value pairs for this profile
-     */
-    public Map<String, Object> getSystemProperties() {
-        return systemProperties;
-    }
-
-    /**
-     * Specifies the system property name - value pairs for this profile.
-     *
-     * @param systemProperties a Map of system property name - value pairs for 
this profile
-     */
-    public void setSystemProperties(Map<String, Object> systemProperties) {
-        this.systemProperties = systemProperties;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * Note that Profiles are always in the shared system scope ({@link 
Metadata#SYSTEM_SCOPE}).
-     */
-    @XmlTransient
-    public String getScope() {
-        return Metadata.SYSTEM_SCOPE;
-    }
-
-    /**
-     * Retrieves the identifiers of the segments this profile is a member of.
-     *
-     * @return the identifiers of the segments this profile is a member of
-     */
-    public Set<String> getSegments() {
-        return segments;
-    }
-
-    /**
-     * Sets the identifiers of the segments this profile is a member of.
-     *
-     * TODO: should be removed from the API
-     *
-     * @param segments the segments
-     */
-    public void setSegments(Set<String> segments) {
-        this.segments = segments;
-    }
-
-    /**
-     * Retrieves the identifier of the profile this profile is merged with if 
any.
-     *
-     * @return the identifier of the profile this profile is merged with if 
any, {@code null} otherwise
-     */
-    public String getMergedWith() {
-        return mergedWith;
-    }
-
-    /**
-     * TODO: should be removed from the API
-     */
-    public void setMergedWith(String mergedWith) {
-        this.mergedWith = mergedWith;
-    }
-
-    /**
-     * Retrieves the scores associated to this profile.
-     *
-     * @return the scores associated to this profile as a Map of {@link 
org.oasis_open.contextserver.api.segments.Scoring} identifier - score pairs
-     */
-    public Map<String, Integer> getScores() {
-        return scores;
-    }
-
-    /**
-     * TODO: should be removed from the API
-     */
-    public void setScores(Map<String, Integer> scores) {
-        this.scores = scores;
-    }
-
-    @Override
-    public String toString() {
-        return new StringBuilder(512).append("{id: 
\"").append(getItemId()).append("\", segments: ")
-                .append(getSegments()).append(", scores: 
").append(getScores()).append(", properties: ")
-                .append(getProperties()).append("}").toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyExecutor.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyExecutor.java
 
b/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyExecutor.java
deleted file mode 100644
index ad47871..0000000
--- 
a/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyExecutor.java
+++ /dev/null
@@ -1,37 +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.oasis_open.contextserver.api;
-
-import java.util.List;
-
-/**
- * A strategy algorithm to merge profile properties such as "adding integers", 
"using oldest value", "using most recent value", "merging lists", etc...
- */
-public interface PropertyMergeStrategyExecutor {
-    /**
-     * Merges the value of the property identified by the specified name and 
type from the specified profiles into the specified target profile.
-     *
-     * @param propertyName    the name of the property to be merged
-     * @param propertyType    the type of the property to be merged
-     * @param profilesToMerge a List of profiles to merge
-     * @param targetProfile   the target profile into which the specified 
profiles will be merged
-     * @return {@code true} if the target profile was successfully modified as 
the result of the merge, {@code false} otherwise
-     */
-    boolean mergeProperty(String propertyName, PropertyType propertyType, 
List<Profile> profilesToMerge, Profile targetProfile);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyType.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyType.java
 
b/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyType.java
deleted file mode 100644
index bda2bae..0000000
--- 
a/api/src/main/java/org/oasis_open/contextserver/api/PropertyMergeStrategyType.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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlTransient;
-
-/**
- * A unomi plugin that defines a new property merge strategy.
- */
-public class PropertyMergeStrategyType implements PluginType {
-
-    private String id;
-    private String filter;
-
-    private long pluginId;
-
-    /**
-     * Retrieves the identifier for this PropertyMergeStrategyType.
-     *
-     * @return the identifier for this PropertyMergeStrategyType
-     */
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     * Retrieves the OSGi filter used to identify the implementation 
associated with this PropertyMergeStrategyType. Filters take the following form:
-     * {@code (propertyMergeStrategyExecutorId=&lt;id&gt;)} where {@code id} 
corresponds to the value of the {@code propertyMergeStrategyExecutorId} service 
property in the
-     * Blueprint service definition for this PropertyMergeStrategyType.
-     *
-     * @return the filter string used to identify the implementation 
associated with this PropertyMergeStrategyType
-     */
-    public String getFilter() {
-        return filter;
-    }
-
-    public void setFilter(String filter) {
-        this.filter = filter;
-    }
-
-    @XmlTransient
-    public long getPluginId() {
-        return pluginId;
-    }
-
-    public void setPluginId(long pluginId) {
-        this.pluginId = pluginId;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/PropertyType.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/oasis_open/contextserver/api/PropertyType.java 
b/api/src/main/java/org/oasis_open/contextserver/api/PropertyType.java
deleted file mode 100644
index 14b5c0d..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/PropertyType.java
+++ /dev/null
@@ -1,336 +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.oasis_open.contextserver.api;
-
-import org.oasis_open.contextserver.api.query.DateRange;
-import org.oasis_open.contextserver.api.query.IpRange;
-import org.oasis_open.contextserver.api.query.NumericRange;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-import java.util.*;
-
-/**
- * A user-defined profile or session property, specifying how possible values 
are constrained, if the value is multi-valued (a vector of values as opposed to 
a scalar value).
- */
-public class PropertyType extends MetadataItem {
-    /**
-     * The PropertyType ITEM_TYPE.
-     *
-     * @see Item for a discussion of ITEM_TYPE
-     */
-    public static final String ITEM_TYPE = "propertyType";
-
-    private String target;
-    private String valueTypeId;
-    private ValueType valueType;
-    private String defaultValue;
-    private List<DateRange> dateRanges = new ArrayList<>();
-    private List<NumericRange> numericRanges = new ArrayList<>();
-    private List<IpRange> ipRanges = new ArrayList<>();
-    private Set<String> automaticMappingsFrom;
-    private double rank;
-    private String mergeStrategy;
-    private Set<Tag> tags = new TreeSet<Tag>();
-    private Set<String> tagIds = new LinkedHashSet<String>();
-    private boolean multivalued;
-    private boolean protekted = false;
-
-    /**
-     * Instantiates a new Property type.
-     */
-    public PropertyType() {
-    }
-
-    /**
-     * Instantiates a new Property type with the specified Metadata.
-     *
-     * @param metadata the metadata associated with the specified metadata
-     */
-    public PropertyType(Metadata metadata) {
-        super(metadata);
-    }
-
-    /**
-     * Retrieves the target for this property type, indicating the type of 
elements this property type is defined for. For example, for property types 
attached to profiles, {@code
-     * target} would be {@code "profiles"}.
-     *
-     * TODO: deprecated?
-     *
-     * @return the target for this property type
-     */
-    public String getTarget() {
-        return target;
-    }
-
-    /**
-     * Sets the target for this property type.
-     *
-     * TODO: deprecated?
-     *
-     * @param target the target for this property type, indicating the type of 
elements this property type is defined for
-     */
-    public void setTarget(String target) {
-        this.target = target;
-    }
-
-    /**
-     * Retrieves the identifier of the value type constraining values for 
properties using this PropertyType.
-     *
-     * @return the value type identifier associated with values defined by 
this PropertyType
-     * @see ValueType
-     */
-    @XmlElement(name = "type")
-    public String getValueTypeId() {
-        return valueTypeId;
-    }
-
-    /**
-     * Sets the value type identifier.
-     *
-     * @param valueTypeId the value type identifier
-     */
-    public void setValueTypeId(String valueTypeId) {
-        this.valueTypeId = valueTypeId;
-    }
-
-    /**
-     * Retrieves the value type associated with values defined for properties 
using this PropertyType.
-     *
-     * @return the value type associated with values defined for properties 
using this PropertyType
-     */
-    @XmlTransient
-    public ValueType getValueType() {
-        return valueType;
-    }
-
-    /**
-     * Sets the value type.
-     *
-     * @param valueType the value type associated with values defined for 
properties using this PropertyType
-     */
-    public void setValueType(ValueType valueType) {
-        this.valueType = valueType;
-    }
-
-    /**
-     * Retrieves the tags used by this PropertyType.
-     *
-     * @return the tags used by this PropertyType
-     */
-    @XmlTransient
-    public Set<Tag> getTags() {
-        return tags;
-    }
-
-    /**
-     * Sets the tags used by this PropertyType.
-     *
-     * @param tags the tags used by this PropertyType
-     */
-    public void setTags(Set<Tag> tags) {
-        this.tags = tags;
-    }
-
-    /**
-     * Retrieves the identifiers of the tags used by this PropertyType.
-     *
-     * @return the identifiers of the tags used by this PropertyType
-     */
-    @XmlElement(name = "tags")
-    public Set<String> getTagIds() {
-        return tagIds;
-    }
-
-    /**
-     * Sets the identifiers of the tags used by this PropertyType.
-     *
-     * @param tagIds the identifiers of the tags used by this PropertyType
-     */
-    public void setTagIds(Set<String> tagIds) {
-        this.tagIds = tagIds;
-    }
-
-    /**
-     * Retrieves the default value defined for property using this 
PropertyType.
-     *
-     * @return the default value defined for property using this PropertyType
-     */
-    public String getDefaultValue() {
-        return defaultValue;
-    }
-
-    /**
-     * Sets the default value that properties using this PropertyType will use 
if no value is specified explicitly.
-     *
-     * @param defaultValue the default value that properties using this 
PropertyType will use if no value is specified explicitly
-     */
-    public void setDefaultValue(String defaultValue) {
-        this.defaultValue = defaultValue;
-    }
-
-    /**
-     * Retrieves the set of JCR properties from which properties of this type 
would be automatically initialized from.
-     *
-     * TODO: remove from API?
-     *
-     * @return the name of JCR properties properties of this type would be 
automatically initialized from
-     */
-    public Set<String> getAutomaticMappingsFrom() {
-        return automaticMappingsFrom;
-    }
-
-    /**
-     * Specifies the set of JCR properties from which properties of this type 
would be automatically initialized from.
-     * TODO: remove from API?
-     *
-     * @param automaticMappingsFrom the set of JCR properties from which 
properties of this type would be automatically initialized from
-     */
-    public void setAutomaticMappingsFrom(Set<String> automaticMappingsFrom) {
-        this.automaticMappingsFrom = automaticMappingsFrom;
-    }
-
-    /**
-     * Retrieves the rank of this PropertyType for ordering purpose.
-     *
-     * @return the rank of this PropertyType for ordering purpose
-     */
-    public double getRank() {
-        return rank;
-    }
-
-    /**
-     * Specifies the rank of this PropertyType for ordering purpose.
-     *
-     * @param rank the rank of this PropertyType for ordering purpose
-     */
-    public void setRank(double rank) {
-        this.rank = rank;
-    }
-
-    /**
-     * Retrieves the identifier of the {@link PropertyMergeStrategyType} to be 
used in case profiles with properties using this PropertyType are being merged.
-     *
-     * @return the identifier of the {@link PropertyMergeStrategyType} to be 
used in case profiles with properties using this PropertyType are being merged
-     */
-    public String getMergeStrategy() {
-        return mergeStrategy;
-    }
-
-    /**
-     * Sets the identifier of the {@link PropertyMergeStrategyType} to be used 
in case profiles with properties using this PropertyType are being merged
-     *
-     * @param mergeStrategy the identifier of the {@link 
PropertyMergeStrategyType} to be used in case profiles with properties using 
this PropertyType are being merged
-     */
-    public void setMergeStrategy(String mergeStrategy) {
-        this.mergeStrategy = mergeStrategy;
-    }
-
-    /**
-     * Retrieves the date ranges.
-     *
-     * @return the date ranges
-     */
-    public List<DateRange> getDateRanges() {
-        return dateRanges;
-    }
-
-    /**
-     * Sets the date ranges.
-     *
-     * @param dateRanges the date ranges
-     */
-    public void setDateRanges(List<DateRange> dateRanges) {
-        this.dateRanges = dateRanges;
-    }
-
-    /**
-     * Retrieves the numeric ranges.
-     *
-     * @return the numeric ranges
-     */
-    public List<NumericRange> getNumericRanges() {
-        return numericRanges;
-    }
-
-    /**
-     * Sets the numeric ranges.
-     *
-     * @param numericRanges the numeric ranges
-     */
-    public void setNumericRanges(List<NumericRange> numericRanges) {
-        this.numericRanges = numericRanges;
-    }
-
-    /**
-     * Retrieves the ip ranges.
-     *
-     * @return the ip ranges
-     */
-    public List<IpRange> getIpRanges() {
-        return ipRanges;
-    }
-
-    /**
-     * Sets the ip ranges.
-     *
-     * @param ipRanges the ip ranges
-     */
-    public void setIpRanges(List<IpRange> ipRanges) {
-        this.ipRanges = ipRanges;
-    }
-
-    /**
-     * Whether properties using this property type are multi-valued.
-     *
-     * @return {@code true} if properties of this type should be multi-valued, 
{@code false} otherwise
-     */
-    public boolean isMultivalued() {
-        return multivalued;
-    }
-
-    /**
-     * Specifies whether properties using this property type are multi-valued.
-     *
-     * @param multivalued {@code true} if properties of this type should be 
multi-valued, {@code false} otherwise
-     */
-    public void setMultivalued(boolean multivalued) {
-        this.multivalued = multivalued;
-    }
-
-    /**
-     * Whether properties with this type are marked as protected. Protected 
properties can be displayed but their value cannot be changed.
-     *
-     * TODO: rename to readOnly?
-     *
-     * @return {@code true} if properties of this type are protected, {@code 
false} otherwise
-     */
-    public boolean isProtected() {
-        return protekted;
-    }
-
-    /**
-     * Specifies whether properties with this type are marked as protected.
-     *
-     * @param protekted {@code true} if properties of this type are protected, 
{@code false} otherwise
-     */
-    public void setProtected(boolean protekted) {
-        this.protekted = protekted;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/ServerInfo.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/ServerInfo.java 
b/api/src/main/java/org/oasis_open/contextserver/api/ServerInfo.java
deleted file mode 100644
index aad93c6..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/ServerInfo.java
+++ /dev/null
@@ -1,70 +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.oasis_open.contextserver.api;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by loom on 10.09.15.
- */
-@XmlRootElement
-public class ServerInfo {
-
-    private String serverIdentifier;
-    private String serverVersion;
-
-    private List<EventInfo> eventTypes;
-    private Map<String,String> capabilities;
-
-    public ServerInfo() {
-    }
-
-    public String getServerIdentifier() {
-        return serverIdentifier;
-    }
-
-    public void setServerIdentifier(String serverIdentifier) {
-        this.serverIdentifier = serverIdentifier;
-    }
-
-    public String getServerVersion() {
-        return serverVersion;
-    }
-
-    public void setServerVersion(String serverVersion) {
-        this.serverVersion = serverVersion;
-    }
-
-    public List<EventInfo> getEventTypes() {
-        return eventTypes;
-    }
-
-    public void setEventTypes(List<EventInfo> eventTypes) {
-        this.eventTypes = eventTypes;
-    }
-
-    public Map<String, String> getCapabilities() {
-        return capabilities;
-    }
-
-    public void setCapabilities(Map<String, String> capabilities) {
-        this.capabilities = capabilities;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc1d1520/api/src/main/java/org/oasis_open/contextserver/api/Session.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/oasis_open/contextserver/api/Session.java 
b/api/src/main/java/org/oasis_open/contextserver/api/Session.java
deleted file mode 100644
index 6435990..0000000
--- a/api/src/main/java/org/oasis_open/contextserver/api/Session.java
+++ /dev/null
@@ -1,229 +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.oasis_open.contextserver.api;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A time-bounded interaction between a user (via their associated {@link 
Profile}) and a unomi-enabled application. A session represents a sequence of 
operations the user
- * performed during its duration. In the context of web applications, sessions 
are usually linked to HTTP sessions.
- */
-public class Session extends Item implements TimestampedItem {
-
-    private static final long serialVersionUID = 4628640198281687336L;
-
-    /**
-     * The Session ITEM_TYPE.
-     *
-     * @see Item for a discussion of ITEM_TYPE
-     */
-    public static final String ITEM_TYPE = "session";
-
-    private String profileId;
-
-    private Profile profile;
-
-    private Map<String, Object> properties = new HashMap<>();
-
-    private Map<String, Object> systemProperties = new HashMap<>();
-
-    private Date timeStamp;
-
-    private String scope;
-
-    private Date lastEventDate;
-
-    private int size = 0;
-
-    private int duration = 0;
-
-    /**
-     * Instantiates a new Session.
-     */
-    public Session() {
-    }
-
-    /**
-     * Instantiates a new Session.
-     *
-     * @param itemId    the identifier for this Session
-     * @param profile   the associated {@link Profile}
-     * @param timeStamp the time stamp
-     * @param scope     the scope
-     */
-    public Session(String itemId, Profile profile, Date timeStamp, String 
scope) {
-        super(itemId);
-        this.profile = profile;
-        this.profileId = profile.getItemId();
-        this.timeStamp = timeStamp;
-        this.scope = scope;
-    }
-
-    /**
-     * Retrieves the identifier of the associated Profile.
-     *
-     * @return the identifier of the associated Profile
-     */
-    public String getProfileId() {
-        return profileId;
-    }
-
-    /**
-     * Retrieves the associated Profile.
-     *
-     * @return the associated profile
-     */
-    public Profile getProfile() {
-        return profile;
-    }
-
-    /**
-     * Sets the associated Profile.
-     *
-     * @param profile the associated Profile
-     */
-    public void setProfile(Profile profile) {
-        this.profileId = profile.getItemId();
-        this.profile = profile;
-    }
-
-    /**
-     * Sets the property identified by the specified name to the specified 
value. If a property with that name already exists, replaces its value, 
otherwise adds the new
-     * property with the specified name and value.
-     *
-     * @param name  the name of the property to set
-     * @param value the value of the property
-     */
-    public void setProperty(String name, Object value) {
-        properties.put(name, value);
-    }
-
-    /**
-     * Retrieves the property identified by the specified name.
-     *
-     * @param name the name of the property to retrieve
-     * @return the value of the specified property or {@code null} if no such 
property exists
-     */
-    public Object getProperty(String name) {
-        return properties.get(name);
-    }
-
-    /**
-     * Retrieves a Map of all property name - value pairs.
-     *
-     * @return a Map of all property name - value pairs
-     */
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-    /**
-     * Sets the property name - value pairs.
-     *
-     * @param properties a Map containing the property name - value pairs
-     */
-    public void setProperties(Map<String, Object> properties) {
-        this.properties = properties;
-    }
-
-    /**
-     * Retrieves a Map of system property name - value pairs. System 
properties can be used by implementations to store non-user visible properties 
needed for
-     * internal purposes.
-     *
-     * @return a Map of system property name - value pairs
-     */
-    public Map<String, Object> getSystemProperties() {
-        return systemProperties;
-    }
-
-    /**
-     * Specifies the system property name - value pairs.
-     *
-     * @param systemProperties a Map of system property name - value pairs
-     */
-    public void setSystemProperties(Map<String, Object> systemProperties) {
-        this.systemProperties = systemProperties;
-    }
-
-    /**
-     * Retrieves the session creation timestamp.
-     *
-     * @return the session creation timestamp
-     */
-    public Date getTimeStamp() {
-        return timeStamp;
-    }
-
-    /**
-     * Retrieves the last event date.
-     *
-     * @return the last event date
-     */
-    public Date getLastEventDate() {
-        return lastEventDate;
-    }
-
-    /**
-     * Sets the last event date.
-     *
-     * @param lastEventDate the last event date
-     */
-    public void setLastEventDate(Date lastEventDate) {
-        this.lastEventDate = lastEventDate;
-        if (lastEventDate != null) {
-            duration = (int) (lastEventDate.getTime() - timeStamp.getTime());
-        }
-    }
-
-    /**
-     * Retrieves the duration.
-     *
-     * @return the duration
-     */
-    public int getDuration() {
-        return duration;
-    }
-
-    /**
-     * Retrieves the size.
-     *
-     * @return the size
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * Sets the size.
-     *
-     * @param size the size
-     */
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    public String getScope() {
-        return scope;
-    }
-
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-}

Reply via email to