public MetadataFactory(String vdbName, Object vdbVersion, String schemaName, Map<String, Datatype> runtimeTypes, Properties modelProperties, String rawMetadata) { this.vdbName = vdbName; this.vdbVersion = vdbVersion.toString(); this.dataTypes = Collections.unmodifiableMap(runtimeTypes); this.schema.setName(schemaName); long msb = longHash(vdbName, 0); try { //if this is just an int, we'll use the old style hash int val = Integer.parseInt(this.vdbVersion); msb = 31*msb + val; } catch (NumberFormatException e) { msb = 31*msb + vdbVersion.hashCode(); } msb = longHash(schemaName, msb); this.idPrefix = "tid:" + hex(msb, 12); //$NON-NLS-1$ setUUID(this.schema); if (modelProperties != null) { for (Map.Entry<Object, Object> entry : modelProperties.entrySet()) { if (entry.getKey() instanceof String && entry.getValue() instanceof String) { this.schema.setProperty(resolvePropertyKey(this, (String) entry.getKey()), (String) entry.getValue()); } } PropertiesUtils.setBeanProperties(this, modelProperties, "importer"); //$NON-NLS-1$ } this.modelProperties = modelProperties; this.rawMetadata = rawMetadata; }
/** * Create a physical model with default settings. */ public static Schema createPhysicalModel(String name, MetadataStore metadataStore) { Schema schema = new Schema(); schema.setName(name); metadataStore.addSchema(schema); return schema; }
/** * Create a virtual model with default settings. */ public static Schema createVirtualModel(String name, MetadataStore metadataStore) { Schema schema = new Schema(); schema.setName(name); schema.setPhysical(false); metadataStore.addSchema(schema); return schema; }
name = id(null); schema = new Schema(); schema.setName(name); schema.setPhysical(physical); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
for (ModelMetaData m:modelMetaDatas.values()) { Schema schema = new Schema(); schema.setName(m.getName()); schema.setAnnotation(m.getDescription()); schema.setVisible(m.isVisible());
name = id(Boolean.TRUE); schema = new Schema(); schema.setName(name); schema.setPhysical(physical); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
name = id(Boolean.TRUE); schema = new Schema(); schema.setName(name); schema.setPhysical(physical); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
Table t = TestDDLParser.helpParse(table, "SchemaA").getSchema().getTable("G1"); Schema schema = new Schema(); schema.setName("SchemaA"); schema.addTable(t); schema.addServer(s);