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(org.codehaus.jettison.json.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.
 RelatedTopicModel getTopic()
          Accesses a single-valued facet.
 List<RelatedTopicModel> 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<RelatedTopicModel> values)
          Sets the values of a multiple-valued facet.
 FacetValue put(Object value)
          Convenience method to put a *simple* value in a single-valued facet.
 FacetValue put(RelatedTopicModel value)
          Puts a value in a single-valued facet.
 FacetValue putRef(long refTopicId)
          Puts a by-ID topic reference in a single-valued facet.
 FacetValue putRef(String refTopicUri)
          Puts a by-URI topic reference in a single-valued facet.
 
Methods inherited from class de.deepamehta.core.model.ChildTopicsModel
add, 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, put, putRef, putRef, remove, 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(org.codehaus.jettison.json.JSONObject obj)
Method Detail

getTopic

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


getTopics

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


put

public FacetValue put(RelatedTopicModel 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.


putRef

public FacetValue putRef(long refTopicId)
Puts a by-ID topic reference in a single-valued facet.


putRef

public FacetValue putRef(String refTopicUri)
Puts a by-URI topic reference in a single-valued facet.


put

public FacetValue put(List<RelatedTopicModel> values)
Sets the values of 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 © 2015. All Rights Reserved.