View Javadoc

1   /*
2    * Copyright 2006 - 2012 Christina Bohk and Roland Ewald
3    *  
4    * Licensed under the Apache License, Version 2.0 (the "License"); 
5    * you may not use this file except in compliance with the License. 
6    * You may obtain a copy of the License at 
7    *  
8    *  http://www.apache.org/licenses/LICENSE-2.0
9    *  
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13   * See the License for the specific language governing permissions and 
14   * limitations under the License. 
15   */
16  package p3j.pppm;
17  
18  import org.jamesii.core.data.model.read.plugintype.IMIMEType;
19  import org.jamesii.core.model.Model;
20  import org.jamesii.core.model.symbolic.ISymbolicModel;
21  import org.jamesii.core.model.symbolic.convert.IDocument;
22  
23  /**
24   * Implementation of {@link ISymbolicModel} that wraps {@link ProjectionModel}.
25   * To be extended in the future.
26   * 
27   * 
28   * @author Christina Bohk
29   * @author Roland Ewald
30   * 
31   */
32  public class SymbolicProjectionModel extends Model implements
33      ISymbolicModel<IProjectionModel> {
34  
35  	/** Serialization ID. */
36  	private static final long serialVersionUID = -3240252207880062231L;
37  
38  	/** The actual {@link IProjectionModel}. */
39  	private IProjectionModel projModel;
40  
41  	/**
42  	 * Instantiates a new symbolic projection model.
43  	 * 
44  	 * @param pModel
45  	 *          the actual projection model
46  	 */
47  	public SymbolicProjectionModel(ProjectionModel pModel) {
48  		projModel = pModel;
49  	}
50  
51  	@Override
52  	public IProjectionModel getAsDataStructure() {
53  		return projModel;
54  	}
55  
56  	@Override
57  	public boolean setFromDataStructure(IProjectionModel model) {
58  		projModel = model;
59  		return true;
60  	}
61  
62  	@Override
63  	public IDocument<?> getAsDocument(Class<? extends IDocument<?>> targetFormat) {
64  		return null;
65  	}
66  
67  	@Override
68  	public boolean setFromDocument(IDocument<?> model) {
69  		return false;
70  	}
71  
72  	@Override
73  	public void removeSource() {
74  	}
75  
76  	@Override
77  	public void setSource(String src, IMIMEType mime) {
78  	}
79  
80  	@Override
81  	public boolean isSourceAvailable() {
82  		return false;
83  	}
84  
85  	@Override
86  	public String getSource() {
87  		return null;
88  	}
89  
90  	@Override
91  	public IMIMEType getSourceMimeType() {
92  		return null;
93  	}
94  }