MCPcopy Index your code
hub / github.com/ddf-project/DDF / initialize

Method initialize

core/src/main/java/io/ddf/DDF.java:169–198  ·  view source on GitHub ↗

Initialization to be done after constructor assignments, such as setting of the all-important DDFManager.

(DDFManager manager, Object data, Class<?>[]
          typeSpecs, String namespace, String name,
                            Schema schema)

Source from the content-addressed store, hash-verified

167 * Initialization to be done after constructor assignments, such as setting of the all-important DDFManager.
168 */
169 protected void initialize(DDFManager manager, Object data, Class<?>[]
170 typeSpecs, String namespace, String name,
171 Schema schema) throws DDFException {
172 Schema.validateSchema(schema);
173 this.setManager(manager); // this must be done first in case later stuff needs a manager
174
175 if (typeSpecs != null) {
176 this.getRepresentationHandler().set(data, typeSpecs);
177 }
178
179 this.getSchemaHandler().setSchema(schema);
180 if(schema!= null && schema.getTableName() == null) {
181 String tableName = this.getSchemaHandler().newTableName();
182 schema.setTableName(tableName);
183 }
184
185 if (Strings.isNullOrEmpty(namespace)) namespace = this.getManager().getNamespace();
186 this.setNamespace(namespace);
187
188 manager.setDDFUUID(this, UUID.randomUUID());
189
190 if(!Strings.isNullOrEmpty(name)) manager.setDDFName(this, name);
191
192 // Facades
193 this.ML = new MLFacade(this, this.getMLSupporter());
194 this.VIEWS = new ViewsFacade(this, this.getViewHandler());
195 this.Transform = new TransformFacade(this, this.getTransformationHandler());
196 this.R = new RFacade(this, this.getAggregationHandler());
197 this.mCreatedTime = new Date();
198 }
199
200 /**
201 *

Callers 2

DDFMethod · 0.95
BasicDDFMethod · 0.45

Calls 15

validateSchemaMethod · 0.95
setManagerMethod · 0.95
getSchemaHandlerMethod · 0.95
getManagerMethod · 0.95
setNamespaceMethod · 0.95
getMLSupporterMethod · 0.95
getViewHandlerMethod · 0.95
getAggregationHandlerMethod · 0.95
setTableNameMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected