info.sswap.http.rest
Class MakeEntity

java.lang.Object
  extended by info.sswap.http.rest.RESTBase
      extended by info.sswap.http.rest.MakeEntity

public abstract class MakeEntity
extends RESTBase

A base class for all classes that create SSWAPEntities (e.g., MakeSubject and MakeObject). It contains a method that initializes the common parts of all entities and their surrounding source model (e.g., namespace prefixes, imports and properties).

Author:
Blazej Bulka

Constructor Summary
MakeEntity()
           
 
Method Summary
protected
<T extends info.sswap.api.model.SSWAPIndividual>
info.sswap.api.model.SSWAPDocument
doMakeEntity(java.lang.String jsonData, java.lang.Class<T> entityClass, java.util.Map<java.lang.String,java.lang.String> prefixOverride)
          Creates the entity based on the JSON data.
 
Methods inherited from class info.sswap.http.rest.RESTBase
checkForUndefinedNS, clearLastForwardInTesting, displayDescription, displayJSONSchema, extractPrefixOverride, forward, getDescriptionResource, getJSONSchemaResource, getLastForwardInTesting, needsForwarding, rebuildPrefixOverrideQueryString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakeEntity

public MakeEntity()
Method Detail

doMakeEntity

protected <T extends info.sswap.api.model.SSWAPIndividual> info.sswap.api.model.SSWAPDocument doMakeEntity(java.lang.String jsonData,
                                                                                                           java.lang.Class<T> entityClass,
                                                                                                           java.util.Map<java.lang.String,java.lang.String> prefixOverride)
Creates the entity based on the JSON data.

Parameters:
jsonData - the JSON data describing the entity
entityClass - the entity class to be created (e.g., SSWAPSubject or SSWAPObject)
Returns:
the created entity
Throws:
java.lang.IllegalArgumentException


Copyright (c) 2010, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.