public static MetadataFactory createMF(DatabaseStore events, Schema schema, boolean useSchema) { MetadataFactory mf = new MetadataFactory(events.getCurrentDatabase().getName(), events.getCurrentDatabase().getVersion(), schema==null?"undefined":schema.getName(), events.getCurrentDatabase().getMetadataStore().getDatatypes(), new Properties(), null); //$NON-NLS-1$ Map<String, String> nss = events.getNameSpaces(); for (String key:nss.keySet()) { mf.addNamespace(key, nss.get(key)); } if (useSchema && schema != null) { mf.setSchema(schema); } return mf; }
public static MetadataFactory createMF(DatabaseStore events, Schema schema, boolean useSchema, Properties modelProperties) { MetadataFactory mf = new MetadataFactory(events.getCurrentDatabase().getName(), events.getCurrentDatabase().getVersion(), schema==null?"undefined":schema.getName(), events.getCurrentDatabase().getMetadataStore().getDatatypes(), modelProperties, null); //$NON-NLS-1$ Map<String, String> nss = events.getNameSpaces(); for (String key:nss.keySet()) { mf.addNamespace(key, nss.get(key)); } if (useSchema && schema != null) { mf.setSchema(schema); } return mf; }
public static MetadataFactory createMF(DatabaseStore events, Schema schema, boolean useSchema, Properties modelProperties) { MetadataFactory mf = new MetadataFactory(events.getCurrentDatabase().getName(), events.getCurrentDatabase().getVersion(), schema==null?"undefined":schema.getName(), events.getCurrentDatabase().getMetadataStore().getDatatypes(), modelProperties, null); //$NON-NLS-1$ Map<String, String> nss = events.getNameSpaces(); for (String key:nss.keySet()) { mf.addNamespace(key, nss.get(key)); } if (useSchema && schema != null) { mf.setSchema(schema); } return mf; }
@Test public void testKeyResolve() { MetadataFactory mf = new MetadataFactory("x", 1, "foo", getDataTypes(), new Properties(), null); mf.addNamespace("x", "http://x"); assertEquals("{http://x}z", MetadataFactory.resolvePropertyKey(mf, "x:z")); assertEquals("y:z", MetadataFactory.resolvePropertyKey(mf, "y:z")); }
Map<String, String> colNs = store.getNameSpaces(); for (String key:colNs.keySet()) { factory.addNamespace(key, colNs.get(key));
Map<String, String> colNs = store.getNameSpaces(); for (String key:colNs.keySet()) { factory.addNamespace(key, colNs.get(key));
Map<String, String> colNs = store.getNameSpaces(); for (String key:colNs.keySet()) { factory.addNamespace(key, colNs.get(key));