use of org.whole.lang.commons.model.Resolver in project whole by wholeplatform.
the class ArtifactsWorkspaceUtils method getContents.
public static IEntity getContents(FileArtifact fileArtifact, String persistenceKitId) {
IBindingManager bindings = BindingManagerFactory.instance.createBindingManager();
bindPath(fileArtifact, bindings, false);
IFile file = (IFile) bindings.wGetValue("file");
final IPersistenceProvider pp = new IFilePersistenceProvider(file);
final Resolver resolver = CommonsEntityFactory.instance.createResolver();
final Content fragment = CommonsEntityAdapterFactory.createStageUpFragment(ArtifactsEntityDescriptorEnum.Content, resolver);
try {
fragment.wSet(0, ReflectionFactory.getPersistenceKit(persistenceKitId).readModel(pp));
} catch (Exception e) {
}
return fragment;
}
Aggregations