blob: 2bbaa5d83d3122b975ec090c8867a2508d52acf0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/**
* Copyright (c) 2013-2014 Angelo ZERR.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation
*/
package org.eclipse.wst.json.core.internal.modelhandler;
import org.eclipse.wst.json.core.internal.document.JSONModelImpl;
import org.eclipse.wst.json.core.internal.encoding.JSONDocumentLoader;
import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
import org.eclipse.wst.sse.core.internal.model.AbstractModelLoader;
import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
/**
* JSON Model loader.
*/
public class JSONModelLoader extends AbstractModelLoader {
public JSONModelLoader() {
super();
}
@Override
public IStructuredModel newModel() {
return new JSONModelImpl();
}
@Override
public IModelLoader newInstance() {
return new JSONModelLoader();
}
@Override
public IDocumentLoader getDocumentLoader() {
if (documentLoaderInstance == null) {
documentLoaderInstance = new JSONDocumentLoader();
}
return documentLoaderInstance;
}
}
|