de.deepamehta.plugins.facets.model
Class FacetValue

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.model.ChildTopicsModel
      extended by de.deepamehta.plugins.facets.model.FacetValue
All Implemented Interfaces:
Iterable<String>

public class FacetValue
extends ChildTopicsModel

A facet value as used in update facet calls. Used for both, single-valued facets and multiple-valued facets.


Field Summary
private  String childTypeUri
           
 
Constructor Summary
FacetValue(JSONObject obj)
           
FacetValue(String childTypeUri)
           
 
Method Summary
 FacetValue addDeletionRef(long refTopicId)
          Adds a by-ID topic deletion reference to a multiple-valued facet.
 FacetValue addRef(long refTopicId)
          Adds a by-ID topic reference to a multiple-valued facet.
 FacetValue addRef(String refTopicUri)
          Adds a by-URI topic reference to a multiple-valued facet.
 TopicModel getTopic()
          Accesses a single-valued facet.
 List<TopicModel> getTopics()
          Accesses a multiple-valued facet.
 FacetValue put(ChildTopicsModel value)
          Convenience method to put a *composite* value in a single-valued facet.
 FacetValue put(List<TopicModel> values)
          Adds all the values to a multiple-valued facet.
 FacetValue put(Object value)
          Convenience method to put a *simple* value in a single-valued facet.
 FacetValue put(TopicModel value)
          Puts a value in a single-valued facet.
 
Methods inherited from class de.deepamehta.core.model.ChildTopicsModel
add, addDeletionRef, addRef, addRef, clone, get, getBoolean, getBoolean, getChildTopicsModel, getChildTopicsModel, getDouble, getDouble, getInt, getInt, getLong, getLong, getObject, getObject, getString, getString, getTopic, getTopic, getTopics, getTopics, has, iterator, put, put, put, put, putRef, putRef, remove, size, throwInvalidAccess, toJSON, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

childTypeUri

private String childTypeUri
Constructor Detail

FacetValue

public FacetValue(String childTypeUri)

FacetValue

public FacetValue(JSONObject obj)
Method Detail

getTopic

public TopicModel getTopic()
Accesses a single-valued facet.


getTopics

public List<TopicModel> getTopics()
Accesses a multiple-valued facet.


put

public FacetValue put(TopicModel value)
Puts a value in a single-valued facet.


put

public FacetValue put(Object value)
Convenience method to put a *simple* value in a single-valued facet.


put

public FacetValue put(ChildTopicsModel value)
Convenience method to put a *composite* value in a single-valued facet.


put

public FacetValue put(List<TopicModel> values)
Adds all the values to a multiple-valued facet.


addRef

public FacetValue addRef(long refTopicId)
Adds a by-ID topic reference to a multiple-valued facet.


addRef

public FacetValue addRef(String refTopicUri)
Adds a by-URI topic reference to a multiple-valued facet.


addDeletionRef

public FacetValue addDeletionRef(long refTopicId)
Adds a by-ID topic deletion reference to a multiple-valued facet.



Copyright © 2014. All Rights Reserved.