コード例 #1
0
 /**
  * Creates a project from scratch. A gml workspace is created internally with the project as root
  * feature.
  */
 public static TuhhWspmProject create(final URL context, final IFeatureProviderFactory factory)
     throws GMLSchemaException {
   final GMLWorkspace projectWorkspace =
       FeatureFactory.createGMLWorkspace(QN_TYPE, context, factory);
   final Feature rootFeature = projectWorkspace.getRootFeature();
   return (TuhhWspmProject) rootFeature;
 }
コード例 #2
0
 private IProfileFeature createProfileFeature() {
   try {
     final GMLWorkspace workspace =
         FeatureFactory.createGMLWorkspace(
             IProfileFeature.FEATURE_PROFILE, null, GmlSerializer.DEFAULT_FACTORY);
     return (IProfileFeature) workspace.getRootFeature();
   } catch (final GMLSchemaException e) {
     // will not happen
     e.printStackTrace();
     return null;
   }
 }