vgritsenko 2004/03/15 05:46:30
Modified: java/src/org/apache/xindice/core MetaSystemCollection.java Log: initialize meta SysSymbols collection with built-in symbols (previously, wrong built-in symbols where used). do we need meta for system collection at all? Revision Changes Path 1.13 +41 -14 xml-xindice/java/src/org/apache/xindice/core/MetaSystemCollection.java Index: MetaSystemCollection.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/MetaSystemCollection.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- MetaSystemCollection.java 8 Feb 2004 02:51:06 -0000 1.12 +++ MetaSystemCollection.java 15 Mar 2004 13:46:30 -0000 1.13 @@ -44,21 +44,42 @@ public static final String COLLECTION_META_DATA = "_META_DATA_"; private static String METACOL_DEFINITION + // Meta System Collection = "<collection name=\"" + METACOL + "\">" - // Meta System Collections - + " <collections>" - // Meta Collections - + " <collection name=\"" + METAS + "\" compressed=\"true\">" - + " <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" />" - + " <collections>" - // Add Meta collections for System collections to avoid eternal loop during initialization - + SystemCollection.getDefinition() - + " </collections>" - + " </collection>" - + " </collections>" + + " <collections>" + // Meta Collections + + " <collection name=\"" + METAS + "\" compressed=\"true\">" + + " <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" />" + + " <collections>" + // Add Meta collections for System collections to avoid eternal loop during initialization + + " <collection name=\"" + SystemCollection.SYSCOL + "\">" + + " <collections>" + // Meta for Symbol Tables Collection + + " <collection name=\"" + SystemCollection.SYMBOLS + "\" compressed=\"true\">" + + " <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" />" + + " <symbols>" + + " <symbol name=\"meta\" nsuri=\"http://apache.org/xindice/metadata\" id=\"0\" />" + + " <symbol name=\"xmlns\" nsuri=\"http://www.w3.org/2000/xmlns/\" id=\"1\" />" + + " <symbol name=\"system\" nsuri=\"http://apache.org/xindice/metadata\" id=\"2\" />" + + " <symbol name=\"type\" id=\"3\" />" + + " <symbol name=\"attr\" nsuri=\"http://apache.org/xindice/metadata\" id=\"4\" />" + + " <symbol name=\"name\" id=\"5\" />" + + " <symbol name=\"value\" id=\"6\" />" + + " </symbols>" + + " </collection>" + // System Configuration Collection + + " <collection name=\"" + SystemCollection.CONFIGS + "\" compressed=\"false\">" + + " <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" />" + + " </collection>" + + " </collections>" + + " </collection>" + + " </collections>" + + " </collection>" + + " </collections>" + "</collection>"; private String dbCanonicalName; + // private String sysCanonicalName; public MetaSystemCollection(Database db) { @@ -66,6 +87,7 @@ // Set the canonical names dbCanonicalName = db.getCanonicalName(); + // sysCanonicalName = db.getSystemCollection().getCanonicalName(); } public void init() throws DBException { @@ -98,10 +120,15 @@ return null; } - // this is a meta collection + // this is the meta collection if (path.startsWith(getCanonicalName())) { return null; } + + // this is the system collection + // if (path.startsWith(sysCanonicalName)) { + // return null; + // } Collection current = getCollection(METAS); StringTokenizer st = new StringTokenizer(path.substring(dbCanonicalName.length()), "/");