diff options
Diffstat (limited to 'aai-core/src/main/java/org/onap/aai/introspection/Loader.java')
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/introspection/Loader.java | 149 |
1 files changed, 75 insertions, 74 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/introspection/Loader.java b/aai-core/src/main/java/org/onap/aai/introspection/Loader.java index cae4cbb7..1da041dc 100644 --- a/aai-core/src/main/java/org/onap/aai/introspection/Loader.java +++ b/aai-core/src/main/java/org/onap/aai/introspection/Loader.java @@ -17,98 +17,99 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.introspection; +import java.util.Map; +import java.util.Set; + import org.onap.aai.introspection.exceptions.AAIUnknownObjectException; import org.onap.aai.introspection.exceptions.AAIUnmarshallingException; import org.onap.aai.restcore.MediaType; import org.onap.aai.setup.SchemaVersion; -import java.util.Map; -import java.util.Set; - public abstract class Loader { - private final SchemaVersion version; - private final ModelType modelType; - - /** - * Instantiates a new loader. - * - * @param version the version - * @param modelType the model type - */ - public Loader (SchemaVersion version, ModelType modelType) { - this.version = version; - this.modelType = modelType; - } + private final SchemaVersion version; + private final ModelType modelType; - /** - * Process. - * - * @param version the version - */ - protected abstract void process(SchemaVersion version); + /** + * Instantiates a new loader. + * + * @param version the version + * @param modelType the model type + */ + public Loader(SchemaVersion version, ModelType modelType) { + this.version = version; + this.modelType = modelType; + } - /** - * Object from name. - * - * @param name the name - * @return the object - * @throws AAIUnknownObjectException - */ - public abstract Object objectFromName(String name) throws AAIUnknownObjectException; + /** + * Process. + * + * @param version the version + */ + protected abstract void process(SchemaVersion version); - /** - * Introspector from name. - * - * @param name the name - * @return the introspector - * @throws AAIUnknownObjectException - */ - public abstract Introspector introspectorFromName(String name) throws AAIUnknownObjectException; + /** + * Object from name. + * + * @param name the name + * @return the object + * @throws AAIUnknownObjectException + */ + public abstract Object objectFromName(String name) throws AAIUnknownObjectException; - /** - * Unmarshal. - * - * @param type the type - * @param json the json - * @param mediaType the media type - * @return the introspector - */ - public abstract Introspector unmarshal(String type, String json, MediaType mediaType) throws AAIUnmarshallingException; + /** + * Introspector from name. + * + * @param name the name + * @return the introspector + * @throws AAIUnknownObjectException + */ + public abstract Introspector introspectorFromName(String name) throws AAIUnknownObjectException; - /** - * Unmarshal. - * - * @param type the type - * @param json the json - * @return the introspector - */ - public Introspector unmarshal(String type, String json) throws AAIUnmarshallingException { - return unmarshal(type, json, MediaType.APPLICATION_JSON_TYPE); - } + /** + * Unmarshal. + * + * @param type the type + * @param json the json + * @param mediaType the media type + * @return the introspector + */ + public abstract Introspector unmarshal(String type, String json, MediaType mediaType) + throws AAIUnmarshallingException; + /** + * Unmarshal. + * + * @param type the type + * @param json the json + * @return the introspector + */ + public Introspector unmarshal(String type, String json) throws AAIUnmarshallingException { + return unmarshal(type, json, MediaType.APPLICATION_JSON_TYPE); + } - /** - * Gets the model type. - * - * @return the model type - */ - public ModelType getModelType() { - return this.modelType; - } + /** + * Gets the model type. + * + * @return the model type + */ + public ModelType getModelType() { + return this.modelType; + } - /** - * Gets the version. - * - * @return the version - */ - public SchemaVersion getVersion() { - return this.version; - } + /** + * Gets the version. + * + * @return the version + */ + public SchemaVersion getVersion() { + return this.version; + } - public abstract Map<String, Introspector> getAllObjects(); + public abstract Map<String, Introspector> getAllObjects(); public abstract Set<String> getNamedPropNodes(); } |