info.sswap.http.representation.json
Class JsonPrefixFactory

java.lang.Object
  extended by info.sswap.http.representation.json.JsonPrefixFactory

public class JsonPrefixFactory
extends java.lang.Object

Builds Prefixes object from its JSON representation

Author:
Blazej Bulka

Constructor Summary
JsonPrefixFactory()
           
 
Method Summary
static Prefixes buildPrefixes(org.json.JSONObject object, java.util.Map<java.lang.String,java.lang.String> overridePrefixes)
          Builds a Prefixes object based on the information contained in the given JSONObject
static Prefixes extractPrefixes(org.json.JSONObject containingObject, java.util.Map<java.lang.String,java.lang.String> overridePrefixes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonPrefixFactory

public JsonPrefixFactory()
Method Detail

extractPrefixes

public static Prefixes extractPrefixes(org.json.JSONObject containingObject,
                                       java.util.Map<java.lang.String,java.lang.String> overridePrefixes)
                                throws org.json.JSONException
Throws:
org.json.JSONException

buildPrefixes

public static Prefixes buildPrefixes(org.json.JSONObject object,
                                     java.util.Map<java.lang.String,java.lang.String> overridePrefixes)
                              throws org.json.JSONException
Builds a Prefixes object based on the information contained in the given JSONObject

Parameters:
object - the JSONObject containing information about the prefixes
Returns:
the built Prefixes object
Throws:
org.json.JSONException - if a syntax error was detected (e.g., one of the values in the JSON object was not a string, although it should contain a namespace URI).


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