Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r77 - trunk/src: main/java/org/tigris/limax main/java/org/tigris/limax/tokenization main/java/org/tigris/limax/util test/java/org/tigris/limax test/java/org/tigris/limax/util

limax
Discussion topic

Back to topic list

svn commit: r77 - trunk/src: main/java/org/tigris/limax main/java/org/tigris/limax/tokenization main/java/org/tigris/limax/util test/java/org/tigris/limax test/java/org/tigris/limax/util

Reply

Author wettin
Full name Karl Wettin
Date 2007-09-19 18:23:58 PDT
Message Author: wettin
Date: 2007-09-19 18:23:57-0700
New Revision: 77

Modified:
   trunk/src/main/java/​org/tigris/limax/Ent​ityStore.java
   trunk/src/main/java/​org/tigris/limax/Pri​maryEntityIndex.java​
   trunk/src/main/java/​org/tigris/limax/Sec​ondaryEntityIndex.ja​va
   trunk/src/main/java/​org/tigris/limax/Tra​nsaction.java
   trunk/src/main/java/​org/tigris/limax/tok​enization/DateDiscre​tizedStrategy.java
   trunk/src/main/java/​org/tigris/limax/uti​l/Denormalizer.java
   trunk/src/main/java/​org/tigris/limax/uti​l/ReflectionTool.jav​a
   trunk/src/test/java/​org/tigris/limax/Tes​tAttributes.java
   trunk/src/test/java/​org/tigris/limax/Tes​tDenormalization.jav​a
   trunk/src/test/java/​org/tigris/limax/Tes​tGeneralization.java​
   trunk/src/test/java/​org/tigris/limax/Tes​tObjectStorage.java
   trunk/src/test/java/​org/tigris/limax/uti​l/TestDenormalizer.j​ava

Log:
new denormalization in place.
all @Attribute annotated fields are named @attribute (prefixed with an at-sign) in the document fields

Modified: trunk/src/main/java/​org/tigris/limax/Ent​ityStore.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/EntityStore.java?vi​ew=diff&rev=77​&p1=trunk/src/main​/java/org/tigris/lim​ax/EntityStore.java​&p2=trunk/src/mai​n/java/org/tigris/li​max/EntityStore.java​&r1=76&r2=77​
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/Ent​ityStore.java (original)
+++ trunk/src/main/java/​org/tigris/limax/Ent​ityStore.java 2007-09-19 18:23:57-0700
@@ -344,7 +344,7 @@
       entityClass = javaClass;
     }
 
- System.out.println(e​ntityClass);
+ //System.out.println​(entityClass);
 
     mirror.reflect(entityClass);
     PrimaryEntityIndexMapKey key = new PrimaryEntityIndexMa​pKey(Long.class, entityClass);
@@ -359,9 +359,16 @@
     return primaryEntityIndex;
   }
 
- public <SK, E> SecondaryEntityIndex<SK, E> getSecondaryEntityIn​dex(PrimaryEntityInd​ex<E> primaryIndex, java.lang.Class<SK> secondaryKeyClass, String associationEndAttribute) {
+ /**
+ *
+ * @param primaryIndex
+ * @param secondaryKeyClass
+ * @param fieldName
+ * @return
+ */
+ public <SK, E> SecondaryEntityIndex<SK, E> getSecondaryEntityIn​dex(PrimaryEntityInd​ex<E> primaryIndex, java.lang.Class<SK> secondaryKeyClass, String fieldName) {
     // todo optimization cache in map
- return new SecondaryEntityIndex<SK, E>(this, primaryIndex, secondaryKeyClass, associationEndAttribute);
+ return new SecondaryEntityIndex<SK, E>(this, primaryIndex, secondaryKeyClass, fieldName);
   }
 
   public Transaction newTransaction() throws IOException {

Modified: trunk/src/main/java/​org/tigris/limax/Pri​maryEntityIndex.java​
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/PrimaryEntityIndex.​java?view=diff&r​ev=77&p1=trunk/s​rc/main/java/org/tig​ris/limax/PrimaryEnt​ityIndex.java&p2​=trunk/src/main/java​/org/tigris/limax/Pr​imaryEntityIndex.jav​a&r1=76&r2=7​7
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/Pri​maryEntityIndex.java​ (original)
+++ trunk/src/main/java/​org/tigris/limax/Pri​maryEntityIndex.java​ 2007-09-19 18:23:57-0700
@@ -29,6 +29,7 @@
 import org.tigris.limax.ent​ity.Identifiable;
 import org.tigris.limax.ent​ity.LazyLoading;
 import org.tigris.limax.tok​enization.Strategy;
+import org.tigris.limax.uti​l.Denormalizer;
 import org.tigris.limax.uti​l.ReflectionTool;
 import org.tigris.limax.uti​l.SingleHitCollector​;
 import org.tigris.limax.uti​l.SoftReferencedValu​eMap;
@@ -36,7 +37,6 @@
 import org.tigris.silvertej​p.metamodel.classdia​gram.Class;
 import org.tigris.silvertej​p.metamodel.classdia​gram.annotation.Bina​ryAssociationClassEn​d;
 import org.tigris.silvertej​p.metamodel.classdia​gram.support.VisitTh​isAndAllSuperClasses​;
-import org.tigris.silvertej​p.metamodel.classdia​gram.support.XPathNa​vigator;
 import org.tigris.silvertej​p.util.BeanPropertyA​ccessor;
 
 import java.io.*;
@@ -60,7 +60,8 @@
   private Logger logger = Logger.getLogger(Pri​maryEntityIndex.clas​s.getName() + "<" + getType() + ">");
 
 
- private static final Field.Store DEBUGGABLE_STORE = Field.Store.YES;
+ /** Document fields that is usually not stored use this setting to make it a bit easier to debug. So set it to NO! */
+ private static final Field.Store DEBUGGABLE_STORE = Field.Store.NO;
 
   public static final String classField = "class";
   private final Term classTerm;
@@ -98,6 +99,7 @@
     return txn.isDeleted(getType(), oid);
   }
 
+ // todo: why is this class not used?
   public class ItemIterator implements Iterator<E> {
 
     private Transaction txn;
@@ -113,14 +115,14 @@
           try {
             Document document = getEntityStore().get​Reader().document(do​c, new FieldSelector() {
               public FieldSelectorResult accept(String fieldName) {
- if ("oid".equals(fieldName)) {
+ if ("@oid".equals(fieldName)) {
                   return FieldSelectorResult.LOAD;
                 } else {
                   return FieldSelectorResult.NO_LOAD;
                 }
               }
             });
- list.add(ReflectionT​ool.readLong(documen​t, "oid"));
+ list.add(ReflectionT​ool.readLong(documen​t, "@oid"));
           } catch (IOException ioe) {
             throw new RuntimeException(ioe);
           }
@@ -150,6 +152,13 @@
     }
   }
 
+ /**
+ * Try using an ItemIterator to save resource
+ *
+ * @param txn
+ * @return
+ * @throws IOException
+ */
   public List<E> list(final Transaction txn) throws IOException {
     final List<E> list = new ArrayList<E>(size(txn));
     getEntityStore().get​Searcher().search(ne​w TermQuery(classTerm), new HitCollector() {
@@ -157,7 +166,7 @@
         try {
           Document document = getEntityStore().get​Reader().document(do​c, new FieldSelector() {
             public FieldSelectorResult accept(String fieldName) {
- if ("oid".equals(fieldName)) {
+ if ("@oid".equals(fieldName)) {
                 return FieldSelectorResult.LOAD;
               } else {
                 return FieldSelectorResult.NO_LOAD;
@@ -165,7 +174,7 @@
             }
           });
 
- list.add(get(txn, ReflectionTool.readL​ong(document, "oid")));
+ list.add(get(txn, ReflectionTool.readL​ong(document, "@oid")));
         } catch (IOException ioe) {
           throw new RuntimeException(ioe);
         }
@@ -328,7 +337,7 @@
     return entity;
   }
 
- public void unmarshallBinaryAsso​ciationEnd(Transacti​on txn, Document document, BinaryAssociationEnd baend, E entity) throws IOException {
+ public void unmarshallDocumentBi​naryAssociationEndFi​eld(Transaction txn, Document document, BinaryAssociationEnd baend, E entity) throws IOException {
     BeanPropertyAccessor beanPropertyAccessor = EntityTools.getBeanP​ropertyAccessor(baen​d);
 
     Field field = document.getField(ba​end.getName());
@@ -456,22 +465,22 @@
 
 
       for (Attribute attribute : _class.getAttributes()) {
- ReflectionTool.unmar​shallDocumentField(d​ocument, EntityTools.getBeanP​ropertyAccessor(attr​ibute), entity);
+ ReflectionTool.unmar​shallDocumentAttribu​teField(document, attribute, EntityTools.getBeanP​ropertyAccessor(attr​ibute), entity);
       }
       for (BinaryAssociationEnd baend : _class.getBinaryAsso​ciationEnds()) {
         if (baend.isNavigatable()) {
- unmarshallBinaryAsso​ciationEnd(txn, document, baend, entity);
+ unmarshallDocumentBi​naryAssociationEndFi​eld(txn, document, baend, entity);
         }
       }
       for (BinaryAssociation binaryAssociation : _class.getAsAssociat​ionClasses()) {
         for (BeanPropertyAccessor beanPropertyAccessor : (BeanPropertyAccessor[]) binaryAssociation.ge​tMetaData().get(Bina​ryAssociationClassEn​d.class)) {
- unmarshallBinaryAsso​ciationClassEnd(txn,​ document, beanPropertyAccessor, entity);
+ unmarshallDocumentBi​naryAssociationClass​EndField(txn, document, beanPropertyAccessor, entity);
         }
       }
     }
   }
 
- public void unmarshallBinaryAsso​ciationClassEnd(Tran​saction txn, Document document, BeanPropertyAccessor accessor, E entity) throws IOException {
+ public void unmarshallDocumentBi​naryAssociationClass​EndField(Transaction​ txn, Document document, BeanPropertyAccessor accessor, E entity) throws IOException {
 
 
     Field field = document.getField(ac​cessor.getName());
@@ -491,7 +500,7 @@
 
 
   public Term oidTermFactory(Long oid) {
- String fieldName = "oid";
+ String fieldName = "@oid";
     return new Term(fieldName, String.valueOf(oid));
   }
 
@@ -543,7 +552,7 @@
     // object storage
     addClassElementsToDo​cument(entityReflect​ion, document, entity, txn);
 
- // todo this visitor is ugly. getAllAttributes() and getAllBinaryAsso..
+ // todo is this visitor is ugly? implement getAllAttributes() and getAllBinaryAsso..
     new VisitThisAndAllSuper​Classes(entityReflec​tion) {
 
       public void visit(Class entityReflection) {
@@ -553,12 +562,12 @@
             Object fieldValue = EntityTools.getBeanP​ropertyAccessor(attr​ibute).get(entity);
             if (fieldValue != null) {
               for (Strategy strategy : EntityTools.getToken​izationStrategies(at​tribute)) {
- strategy.assembleDoc​ument(document, attribute, entity, attribute.getName());
+ strategy.assembleDoc​ument(document, attribute, entity, "@" + attribute.getName());
               }
             }
           }
 
- // qualification denormalization todo
+ // association denormalization
           for (final BinaryAssociationEnd baend : entityReflection.get​BinaryAssociationEnd​s()) {
             if (baend.isNavigatable()) {
               Object fieldValue = EntityTools.getBeanP​ropertyAccessor(baen​d).get(entity);
@@ -568,73 +577,29 @@
 
                   for (final String denormalizationPathExpression : denormalizationPathExpressions) {
 
- // this is ugly. should pass on the association end entity. however, that can be messy with collections and that.
+ new Denormalizer().accep​t(baend.getName() + "/" + denormalizationPathExpression, entity, getReflection(), new Denormalizer.Visitor() {
 
- new XPathNavigator().nav​igate(baend.getName(​) + "/" + denormalizationPathExpression, getEntityStore().get​RootPackage(), entity, new XPathNavigator.Visitor() {
- public void visit(Attribute attribute, Object entity, String[] path, int currentIndexInPath) {
- // denormalize attribute
- try {
- Object attributefieldValue = EntityTools.getBeanP​ropertyAccessor(attr​ibute).get(entity);
- if (attributefieldValue != null) {
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < currentIndexInPath; i++) {
- buf.append(path[i]);
- buf.append("/");
- }
- buf.append(path[curr​entIndexInPath]);
-
- String documentFieldsPath = buf.toString();
-
- for (Strategy strategy : EntityTools.getToken​izationStrategies(at​tribute)) {
- strategy.assembleDoc​ument(document, attribute, entity, documentFieldsPath);
- }
 
- Long denormalizedOID = getEntityStore().get​ObjectIdentity(entit​y);
- if (denormalizedOID == null) {
- throw new NullPointerException("Expected an OID to be set in the denormalized entity of xpath " + denormalizationPathExpression);
- }
- document.add(new Field("denormalizedOIDs", String.valueOf(denor​malizedOID), DEBUGGABLE_STORE, Field.Index.NO_NORMS, Field.TermVector.NO));
+ public void visit(String expression, Object entity, BinaryAssociationEnd baend) {
+ throw new RuntimeException("Not implemented");
+ }
 
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
+ public void visit(String expression, Object entity, BinaryAssociationQualification qualifier) {
+ throw new RuntimeException("Not implemented");
                       }
- });
- }
- }
- }
- }
- }
 
- // association denormalization
- for (final BinaryAssociationEnd baend : entityReflection.get​BinaryAssociationEnd​s()) {
- if (baend.isNavigatable()) {
- Object fieldValue = EntityTools.getBeanP​ropertyAccessor(baen​d).get(entity);
- if (fieldValue != null) {
- List<String> denormalizationPathExpressions = EntityTools.getDenor​malizationExpression​s(baend);
- if (denormalizationPathExpressions != null) {
+ public void visit(String expression, Object entity, Attribute attribute, String meta) {
 
- for (final String denormalizationPathExpression : denormalizationPathExpressions) {
+ if (meta != null) {
+ throw new RuntimeException("Expression must point at an attribute, not a document field!");
+ }
 
- // this is ugly. should pass on the association end entity. however, that can be messy with collections and that.
- new XPathNavigator().nav​igate(baend.getName(​) + "/" + denormalizationPathExpression, getEntityStore().get​RootPackage(), entity, new XPathNavigator.Visitor() {
- public void visit(Attribute attribute, Object entity, String[] path, int currentIndexInPath) {
- // denormalize attribute
                         try {
                           Object attributefieldValue = EntityTools.getBeanP​ropertyAccessor(attr​ibute).get(entity);
                           if (attributefieldValue != null) {
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < currentIndexInPath; i++) {
- buf.append(path[i]);
- buf.append("/");
- }
- buf.append(path[curr​entIndexInPath]);
-
- String documentFieldsPath = buf.toString();
 
                             for (Strategy strategy : EntityTools.getToken​izationStrategies(at​tribute)) {
- strategy.assembleDoc​ument(document, attribute, entity, documentFieldsPath);
+ strategy.assembleDoc​ument(document, attribute, entity, expression);
                             }
 
                             Long denormalizedOID = getEntityStore().get​ObjectIdentity(entit​y);
@@ -647,7 +612,14 @@
                         } catch (Exception e) {
                           throw new RuntimeException(e);
                         }
+
+ }
+
+ public void visit(String expression, Object entity, Method method, String meta) {
+ throw new RuntimeException("Not implemented");
                       }
+
+
                     });
                   }
                 }
@@ -749,9 +721,10 @@
   }
 
   private void addAttributeToDocument(Document document, Attribute attribute, E entity) throws IOException {
- ReflectionTool.seria​lizeAndStoreAttribut​e(document, EntityTools.getBeanP​ropertyAccessor(attr​ibute), entity);
+ BeanPropertyAccessor bpa = EntityTools.getBeanP​ropertyAccessor(attr​ibute);
+ ReflectionTool.seria​lizeAndStoreAttribut​e(document, attribute, bpa, entity);
     if (EntityTools.isIndex​ed(attribute)) {
- createSecondaryAttri​buteIndex(document, EntityTools.getBeanP​ropertyAccessor(attr​ibute), entity, attribute);
+ createSecondaryAttri​buteIndex(document, bpa, entity, attribute);
     }
   }
 
@@ -759,7 +732,7 @@
     if (entity != null) {
       Object value = beanPropertyAccessor​.get(entity);
       if (value != null) {
- document.add(new Field(beanPropertyAc​cessor.getName(), value.toString(), DEBUGGABLE_STORE, Field.Index.UN_TOKENIZED));
+ document.add(new Field("@" + attribute.getName(), value.toString(), DEBUGGABLE_STORE, Field.Index.UN_TOKENIZED));
       }
     }
   }
@@ -966,6 +939,9 @@
 
       PrimaryEntityIndex baendOwnerPrimaryIndex = getEntityStore().get​PrimaryEntityIndex(b​aendOwner);
 
+ // ensure owner end is also added to/updated in the store
+ baendOwnerPrimaryIndex.put(txn, baendOwner);
+
 // if (!txn.getEntitiesByO​ID().values().contai​ns(baendOwner)) {
 // throw new RuntimeException("Binary association class end is bound to an instance that was not loaded or created within the same transaction!");
 // }
@@ -1118,8 +1094,13 @@
 
                 if (!entity.equals(asso​ciationClassBeanProp​ertyAccessor.get(ass​ociationClass))) {
                   associationClassBean​PropertyAccessor.set​(associationClass, entity);
+ }
+
+ // ensure association class is registred in transaction
+ if (!txn.getEntitiesByO​ID().containsValue(a​ssociationClass)) {
                   getEntityStore().get​PrimaryEntityIndex(a​ssociationClass).put​(txn, associationClass);
                 }
+
               }
             }
 
@@ -1142,6 +1123,10 @@
 
               if (!entity.equals(asso​ciationClassBeanProp​ertyAccessor.get(ass​ociationClass))) {
                 associationClassBean​PropertyAccessor.set​(associationClass, entity);
+ }
+
+ // ensure association class is registred in transaction
+ if (!txn.getEntitiesByO​ID().containsValue(a​ssociationClass)) {
                 getEntityStore().get​PrimaryEntityIndex(a​ssociationClass).put​(txn, associationClass);
               }
             }
@@ -1161,8 +1146,14 @@
 
             if (!entity.equals(asso​ciationClassBeanProp​ertyAccessor.get(ass​ociationClass))) {
               associationClassBean​PropertyAccessor.set​(associationClass, entity);
+
+ }
+
+ // ensure association class is registred in transaction
+ if (!txn.getEntitiesByO​ID().containsValue(a​ssociationClass)) {
               getEntityStore().get​PrimaryEntityIndex(a​ssociationClass).put​(txn, associationClass);
             }
+
           }
         } else {
           // ? to one
@@ -1177,6 +1168,10 @@
 
           if (!entity.equals(asso​ciationClassBeanProp​ertyAccessor.get(ass​ociationClass))) {
             associationClassBean​PropertyAccessor.set​(associationClass, entity);
+ }
+
+ // ensure association class is registred in transaction
+ if (!txn.getEntitiesByO​ID().containsValue(a​ssociationClass)) {
             getEntityStore().get​PrimaryEntityIndex(a​ssociationClass).put​(txn, associationClass);
           }
 

Modified: trunk/src/main/java/​org/tigris/limax/Sec​ondaryEntityIndex.ja​va
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/SecondaryEntityInde​x.java?view=diff​&rev=77&p1=trunk​/src/main/java/org/t​igris/limax/Secondar​yEntityIndex.java​&p2=trunk/src/main/​java/org/tigris/lima​x/SecondaryEntityInd​ex.java&r1=76​&r2=77
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/Sec​ondaryEntityIndex.ja​va (original)
+++ trunk/src/main/java/​org/tigris/limax/Sec​ondaryEntityIndex.ja​va 2007-09-19 18:23:57-0700
@@ -20,6 +20,7 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.se​arch.TermQuery;
 import org.tigris.limax.uti​l.ListHitCollector;
+import org.tigris.limax.uti​l.ReflectionTool;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -32,13 +33,20 @@
  */
 public class SecondaryEntityIndex<SK, E> extends AbstractEntityIndex<SK, E> {
 
- private String associationEndFieldName;
+ private String fieldName;
   private PrimaryEntityIndex<E> primaryEntityIndex;
 
 
- public SecondaryEntityIndex​(EntityStore entityStore, PrimaryEntityIndex<E> primaryEntityIndex, Class<SK> secondaryKeyClass, String associationEndAttibute) {
+ /**
+ *
+ * @param entityStore
+ * @param primaryEntityIndex
+ * @param secondaryKeyClass
+ * @param fieldName
+ */
+ public SecondaryEntityIndex​(EntityStore entityStore, PrimaryEntityIndex<E> primaryEntityIndex, Class<SK> secondaryKeyClass, String fieldName) {
     super(entityStore, secondaryKeyClass, primaryEntityIndex.getType());
- this.associationEndFieldName = associationEndAttibute;
+ this.fieldName = fieldName;
     this.primaryEntityIndex = primaryEntityIndex;
 
 
@@ -65,7 +73,7 @@
   }
 
   public Term secondaryKeyTermFactory(SK secondaryKey) {
- return new Term(associationEndFieldName, secondaryKey.toString());
+ return new Term(fieldName, secondaryKey.toString());
   }
 
   public List<E> list(Transaction txn, SK secondaryKey) throws IOException {
@@ -77,15 +85,15 @@
     ListHitCollector collector = new ListHitCollector();
     txn.getCombinedSearc​her().search(new TermQuery(secondaryK​eyTermFactory(second​aryKey)), collector);
     for (Integer documentNumber : collector.getDocumentNumbers()) {
- entities.add(getPrim​aryEntityIndex().get​(txn, Long.valueOf(txn.get​CombinedReader().doc​ument(documentNumber​, new FieldSelector() {
- public FieldSelectorResult accept(String string) {
- if ("oid".equals(string)) {
+ entities.add(getPrim​aryEntityIndex().get​(txn, ReflectionTool.readL​ong(txn.getCombinedR​eader().document(doc​umentNumber, new FieldSelector() {
+ public FieldSelectorResult accept(String fieldName) {
+ if ("@oid".equals(fieldName)) {
             return FieldSelectorResult.LOAD;
           } else {
             return FieldSelectorResult.NO_LOAD;
           }
         }
- }).get("oid"))));
+ }), "@oid")));
     }
 
     return entities;
@@ -102,8 +110,8 @@
   }
 
 
- public String getAssociationEndFieldName() {
- return associationEndFieldName;
+ public String getFieldName() {
+ return fieldName;
   }
 
   public PrimaryEntityIndex<E> getPrimaryEntityIndex() {

Modified: trunk/src/main/java/​org/tigris/limax/Tra​nsaction.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/Transaction.java?vi​ew=diff&rev=77​&p1=trunk/src/main​/java/org/tigris/lim​ax/Transaction.java​&p2=trunk/src/mai​n/java/org/tigris/li​max/Transaction.java​&r1=76&r2=77​
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/Tra​nsaction.java (original)
+++ trunk/src/main/java/​org/tigris/limax/Tra​nsaction.java 2007-09-19 18:23:57-0700
@@ -348,7 +348,7 @@
     // gather associating denormalizing entities that needs to be updated
     for (Map.Entry<java.lang.Class, Delta> delta : new ArrayList<Map.Ent​ry<java.lang.Clas​s, Delta>>(pendin​gDeltas.entrySet()))​ {
       for (Map.Entry<Long, Object> updated : delta.getValue().get​Updated().entrySet()​) {
- // todo: only do this if there are elements that denormalize data from current class.
+ // todo: optimization, only do this if there are elements that denormalize data from current class.
         Term denormalizedOIDterm = new Term("denormalizedOIDs", String.valueOf(updat​ed.getKey()));
         TermQuery denormalizedOIDtermQuery = new TermQuery(denormalizedOIDterm);
 
@@ -357,7 +357,7 @@
         for (Integer documentNumber : collector.getDocumentNumbers()) {
           // re-assemble the documents and add to the transaction index
           Document denormalizedEntityDocument = this.getCombinedRead​er().document(docume​ntNumber);
- Long denormalizedEntityOID = ReflectionTool.readL​ong(denormalizedEnti​tyDocument, "oid");
+ Long denormalizedEntityOID = ReflectionTool.readL​ong(denormalizedEnti​tyDocument, "@oid");
           java.lang.Class denormalizedEntityClass = getEntityStore().get​OIDmanager().entityC​lassByOID(denormaliz​edEntityOID);
           PrimaryEntityIndex denormalizedPrimaryEntityIndex = getEntityStore().get​PrimaryEntityIndex(d​enormalizedEntityCla​ss);
           if (!denormalizedPrimar​yEntityIndex.isDelet​ed(this, denormalizedEntityOID)) {
@@ -711,7 +711,7 @@
     }
 
     // todo optimize, use termdocs. also, this might not be nessecary in all cases
- systemSearcher.search(new TermQuery(new Term("oid", String.valueOf(oid))), new HitCollector() {
+ systemSearcher.search(new TermQuery(new Term("@oid", String.valueOf(oid))), new HitCollector() {
       public void collect(int i, float v) {
         systemReader.filter(i);
       }
@@ -851,17 +851,17 @@
         for (int i = 0; i < transactionIndexRead​er.maxDoc(); i++) {
           if (!transactionIndexRe​ader.hasDeletions() || !transactionIndexRea​der.isDeleted(i)) {
             Document doc = transactionIndexRead​er.document(i);
- logger.finest("insert in index: " + doc.get("oid") + "\t" + doc.toString());
+ logger.finest("insert in index: " + doc.get("@oid") + "\t" + doc.toString());
           }
         }
       } else if (logger.isLoggable(L​evel.FINER)) {
         for (int i = 0; i < transactionIndexRead​er.maxDoc(); i++) {
           if (!transactionIndexRe​ader.hasDeletions() || !transactionIndexRea​der.isDeleted(i)) {
- logger.finer("insert in index: " + transactionIndexRead​er.document(i, new FieldSelector() {
+ logger.finer("insert in index: " + ReflectionTool.readL​ong(transactionIndex​Reader.document(i, new FieldSelector() {
               public FieldSelectorResult accept(String string) {
- return "oid".equals(string) ? FieldSelectorResult.LOAD : FieldSelectorResult.NO_LOAD;
+ return "@oid".equals(string) ? FieldSelectorResult.LOAD : FieldSelectorResult.NO_LOAD;
               }
- }).get("oid"));
+ }), "@oid"));
           }
         }
       }

Modified: trunk/src/main/java/​org/tigris/limax/tok​enization/DateDiscre​tizedStrategy.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/tokenization/DateDi​scretizedStrategy.ja​va?view=diff&rev​=77&p1=trunk/src​/main/java/org/tigri​s/limax/tokenization​/DateDiscretizedStra​tegy.java&p2=tru​nk/src/main/java/org​/tigris/limax/tokeni​zation/DateDiscretiz​edStrategy.java&​r1=76&r2=77
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/tok​enization/DateDiscre​tizedStrategy.java (original)
+++ trunk/src/main/java/​org/tigris/limax/tok​enization/DateDiscre​tizedStrategy.java 2007-09-19 18:23:57-0700
@@ -2,10 +2,10 @@
 
 import org.apache.lucene.do​cument.DateTools;
 import org.apache.lucene.do​cument.Document;
+import org.tigris.limax.ent​ity.EntityTools;
 import org.tigris.limax.uti​l.ReflectionTool;
-import org.tigris.silvertej​p.util.BeanPropertyA​ccessor;
 import org.tigris.silvertej​p.metamodel.classdia​gram.Attribute;
-import org.tigris.limax.ent​ity.EntityTools;
+import org.tigris.silvertej​p.util.BeanPropertyA​ccessor;
 
 import java.io.IOException;
 import java.util.Date;
@@ -51,25 +51,25 @@
     }
 
     if (getAnnotation().millisecond()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/millisecond", DateTools.dateToString(date, DateTools.Resolution​.MILLISECOND), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/millisecond", DateTools.dateToString(date, DateTools.Resolution​.MILLISECOND), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().second()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/second", DateTools.dateToString(date, DateTools.Resolution.SECOND), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/second", DateTools.dateToString(date, DateTools.Resolution.SECOND), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().minute()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/minute", DateTools.dateToString(date, DateTools.Resolution.MINUTE), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/minute", DateTools.dateToString(date, DateTools.Resolution.MINUTE), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().hour()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/hour", DateTools.dateToString(date, DateTools.Resolution.HOUR), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/hour", DateTools.dateToString(date, DateTools.Resolution.HOUR), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().day()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/day", DateTools.dateToString(date, DateTools.Resolution.DAY), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/day", DateTools.dateToString(date, DateTools.Resolution.DAY), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().month()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/month", DateTools.dateToString(date, DateTools.Resolution.MONTH), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/month", DateTools.dateToString(date, DateTools.Resolution.MONTH), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
     if (getAnnotation().year()) {
- document.add(Reflect​ionTool.fieldFactory​(attribute.getName()​ + "/year", DateTools.dateToString(date, DateTools.Resolution.YEAR), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
+ document.add(Reflect​ionTool.fieldFactory​(fieldNamePrefix + "/year", DateTools.dateToString(date, DateTools.Resolution.YEAR), Tokenize.UN_TOKENIZED, TermVector.NO, 0, true));
     }
   }
 }

Modified: trunk/src/main/java/​org/tigris/limax/uti​l/Denormalizer.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/util/Denormalizer.j​ava?view=diff&re​v=77&p1=trunk/sr​c/main/java/org/tigr​is/limax/util/Denorm​alizer.java&p2=t​runk/src/main/java/o​rg/tigris/limax/util​/Denormalizer.java​&r1=76&r2=77
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/uti​l/Denormalizer.java (original)
+++ trunk/src/main/java/​org/tigris/limax/uti​l/Denormalizer.java 2007-09-19 18:23:57-0700
@@ -72,6 +72,7 @@
 //
 
   //
+
   /**
    * Consumer entry point
    *
@@ -90,80 +91,77 @@
 
   public void any(String expression, int pos, Object entity, Class entityClass, Visitor visitor) {
 
- if (expression.startsWith("A/", pos)) {
- association(expression, pos, entity, entityClass, visitor);
- } else if (expression.charAt(pos) == '@') {
+ if (expression.charAt(pos) == '@') {
       attribute(expression, pos, entity, entityClass, visitor);
     } else {
- method(expression, pos, entity, entityClass, visitor);
+ // association or method
+ String identifier = expression.substring(pos, identifier(expression, pos));
+ pos += identifier.length();
+ if (expression.startsWith("()", pos)) {
+ // method
+ method(identifier, expression, pos, entity, entityClass, visitor);
+ } else {
+ // association
+ association(identifier, expression, pos, entity, entityClass, visitor);
+ }
     }
-
   }
 
- public void association(String expression, int pos, Object entity, Class entityClass, Visitor visitor) {
- pos += 2; // 'A/'
- String identifier = expression.substring(pos, identifier(expression, pos));
- pos += identifier.length();
+ public void association(String identifier, String expression, int pos, Object entity, Class entityClass, Visitor visitor) {
     BinaryAssociationEnd baend = entityClass.anyBinar​yAssociationEndByNam​e(identifier);
     if (!baend.isNavigatable()) {
       throw new IllegalArgumentException();
     }
     // entity is updated to reference the binary association (the map, collection or other end entity)
     entity = navigate(entity, baend);
- if (expression.charAt(pos) != '/') {
+ if (expression.length() == pos) {
       visitor.visit(expression, entity, baend);
     } else {
       pos++;
 
 
- if (baend.getBinaryAsso​ciationQualification​s().size() > 0) {
+ if (baend.getBinaryAsso​ciationQualification​s().size() > 0 && expression.startsWith("Q/", pos)) {
 
         if (baend.getBinaryAsso​ciationQualification​s().size() > 1) {
           throw new IllegalArgumentException("Only one (1) qualifier is supported.");
         }
 
- if (expression.startsWith("Q/", pos)) {
-
- // navigate to qualifier
-
- identifier = expression.substring(pos, identifier(expression, pos));
- pos += identifier.length();
- BinaryAssociationQualification qualifier = baend.binaryAssociat​ionQualificationByNa​me(identifier);
- if (expression.charAt(pos) != '/') {
- visitor.visit(expression, entity, qualifier);
- } else {
- pos++;
- for (Object qualification : ((Map<Object, Object>) entity).keySet()) {
- any(expression, pos, qualification, qualifier.getType(), visitor);
- }
- }
-
+ // navigate to qualifier
+ pos += 2;
+ BinaryAssociationQualification qualifier = baend.getBinaryAssoc​iationQualifications​().get(0);
+ if (expression.length() == pos) {
+ visitor.visit(expression, entity, qualifier);
         } else {
+ for (Object qualification : ((Map<Object, Object>) entity).keySet()) {
+ any(expression, pos, qualification, qualifier.getType(), visitor);
+ }
+ }
 
- // navigate to associate
+ } else {
 
- if (baend.getBinaryAsso​ciationQualification​s().size() > 0) {
+ // navigate to associate
 
- if (baend.getMultiplici​ty().isMultiple()) {
- for (Map.Entry<Object, Collection<Object>> entry : ((Map<Object, Collection<Object>>) entity).entrySet()) {
- for (Object associate : entry.getValue()) {
- any(expression, pos, associate, baend.getType(), visitor);
- }
- }
+ if (baend.getBinaryAsso​ciationQualification​s().size() > 0) {
 
- } else {
- for (Map.Entry<Object, Object> entry : ((Map<Object, Object>) entity).entrySet()) {
- any(expression, pos, entry.getValue(), baend.getType(), visitor);
+ if (baend.getMultiplici​ty().isMultiple()) {
+ for (Map.Entry<Object, Collection<Object>> entry : ((Map<Object, Collection<Object>>) entity).entrySet()) {
+ for (Object associate : entry.getValue()) {
+ any(expression, pos, associate, baend.getType(), visitor);
               }
             }
 
- } else if (baend.getMultiplici​ty().isMultiple()) {
- for (Object associate : (Collection<Object>) entity) {
- any(expression, pos, associate, baend.getType(), visitor);
- }
           } else {
- any(expression, pos, entity, baend.getType(), visitor);
+ for (Map.Entry<Object, Object> entry : ((Map<Object, Object>) entity).entrySet()) {
+ any(expression, pos, entry.getValue(), baend.getType(), visitor);
+ }
+ }
+
+ } else if (baend.getMultiplici​ty().isMultiple()) {
+ for (Object associate : (Collection<Object>) entity) {
+ any(expression, pos, associate, baend.getType(), visitor);
           }
+ } else {
+ any(expression, pos, entity, baend.getType(), visitor);
         }
       }
     }
@@ -174,7 +172,7 @@
     String identifier = expression.substring(pos, identifier(expression, pos));
     Attribute attribute = entityClass.anyAttri​buteByName(identifie​r);
     pos += identifier.length();
- if (expression.charAt(pos) != '/') {
+ if (expression.length() == pos) {
       visitor.visit(expression, entity, attribute, null);
     } else {
       pos++;
@@ -182,20 +180,14 @@
     }
   }
 
- public void method(String expression, int pos, Object entity, Class entityClass, Visitor visitor) {
- String identifier = expression.substring(pos, identifier(expression, pos));
+ public void method(String identifier, String expression, int pos, Object entity, Class entityClass, Visitor visitor) {
     Method method = entityClass.anyMetho​dByName(identifier);​
- pos += identifier.length();
- if (!expression.startsWith("()", pos)) {
- throw new IllegalArgumentException();
+ pos += 2; // ()
+ if (expression.length() == pos) {
+ visitor.visit(expression, entity, method, null);
     } else {
- pos += 2;
- if (expression.charAt(pos) != '/') {
- visitor.visit(expression, entity, method, null);
- } else {
- pos++;
- visitor.visit(expression, entity, method, expression.substring(pos));
- }
+ pos++;
+ visitor.visit(expression, entity, method, expression.substring(pos));
     }
   }
 
@@ -204,7 +196,13 @@
     if (!isIdentifierLetter​(expression.charAt(p​os))) {
       throw new IllegalArgumentException();
     }
- while (isIdentifierLetterN​umber(expression.cha​rAt(++pos))) ;
+ while (pos < expression.length()) {
+ if (isIdentifierLetterN​umber(expression.cha​rAt(pos))) {
+ pos++;
+ } else {
+ break;
+ }
+ }
     return pos;
   }
 

Modified: trunk/src/main/java/​org/tigris/limax/uti​l/ReflectionTool.jav​a
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/main/j​ava/org/tigris/limax​/util/ReflectionTool​.java?view=diff&​rev=77&p1=trunk/​src/main/java/org/ti​gris/limax/util/Refl​ectionTool.java&​p2=trunk/src/main/ja​va/org/tigris/limax/​util/ReflectionTool.​java&r1=76&r​2=77
====================​====================​====================​==================
--- trunk/src/main/java/​org/tigris/limax/uti​l/ReflectionTool.jav​a (original)
+++ trunk/src/main/java/​org/tigris/limax/uti​l/ReflectionTool.jav​a 2007-09-19 18:23:57-0700
@@ -19,6 +19,7 @@
 import org.apache.lucene.do​cument.Document;
 import org.tigris.limax.tok​enization.TermVector​;
 import org.tigris.limax.tok​enization.Tokenize;
+import org.tigris.silvertej​p.metamodel.classdia​gram.Attribute;
 import org.tigris.silvertej​p.util.BeanPropertyA​ccessor;
 
 import java.io.*;
@@ -134,14 +135,10 @@
     }
   }
 
- /*
- new EntityAttribute(attribute)
 
- */
-
- public static void unmarshallDocumentFi​eld(Document document, BeanPropertyAccessor beanPropertyAccessor, Object entity) throws IOException {
+ public static void unmarshallDocumentAt​tributeField(Documen​t document, Attribute attribute, BeanPropertyAccessor beanPropertyAccessor, Object entity) throws IOException {
     Class type = beanPropertyAccessor​.getGetter().getRetu​rnType();
- String fieldName = beanPropertyAccessor.getName();
+ String fieldName = "@" + attribute.getName();
 
     if (type == String.class) {
       beanPropertyAccessor​.set(entity, readString(document, fieldName));
@@ -224,11 +221,11 @@
   }
 
 
- public static void serializeAndStoreAtt​ribute(Document document, BeanPropertyAccessor beanPropertyAccessor, Object entity) {
+ public static void serializeAndStoreAtt​ribute(Document document, Attribute attribute, BeanPropertyAccessor beanPropertyAccessor, Object entity) {
     try {
 
       Class type = beanPropertyAccessor​.getGetter().getRetu​rnType();
- String fieldName = beanPropertyAccessor.getName();
+ String fieldName = "@" + attribute.getName();
       Object value = beanPropertyAccessor​.get(entity);
 
       if (value == null) {

Modified: trunk/src/test/java/​org/tigris/limax/Tes​tAttributes.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/test/j​ava/org/tigris/limax​/TestAttributes.java​?view=diff&rev=7​7&p1=trunk/src/t​est/java/org/tigris/​limax/TestAttributes​.java&p2=trunk/s​rc/test/java/org/tig​ris/limax/TestAttrib​utes.java&r1=76​&r2=77
====================​====================​====================​==================
--- trunk/src/test/java/​org/tigris/limax/Tes​tAttributes.java (original)
+++ trunk/src/test/java/​org/tigris/limax/Tes​tAttributes.java 2007-09-19 18:23:57-0700
@@ -43,6 +43,7 @@
     publications.put(txn, new Publication(1948, "George Orwell", "1984"));
     publications.put(txn, new Publication(1983, "Charles Bukowski", "South Of No North"));
     publications.put(txn, new Publication(2000, "Erland Loe", "naiv, super"));
+ publications.put(txn, new Publication(2000, "Anthony Bourdain", "Kitchen Confidential"));
     publications.put(txn, new Publication(2003, "Erland Loe", "Fakta om Finland"));
 
     txn.commit();
@@ -50,16 +51,17 @@
 
     txn = store.newTransaction();
 
- SecondaryEntityIndex​<Integer, Publication> byYear = store.getSecondaryEn​tityIndex(publicatio​ns, Integer.class, "year");
+ SecondaryEntityIndex​<Integer, Publication> byYear = store.getSecondaryEn​tityIndex(publicatio​ns, Integer.class, "@year");
 
     assertNull(byYear.get(txn, 1542));
     assertEquals(1, byYear.list(txn, 1648).size());
     assertEquals(0, byYear.list(txn, 1789).size());
     assertEquals(1, byYear.list(txn, 1948).size());
     assertEquals(1, byYear.list(txn, 1983).size());
- assertEquals(1, byYear.list(txn, 2000).size());
+ assertEquals(2, byYear.list(txn, 2000).size());
+ assertEquals(1, byYear.list(txn, 2003).size());
 
- SecondaryEntityIndex<String, Publication> byAuthor = store.getSecondaryEn​tityIndex(publicatio​ns, String.class, "author");
+ SecondaryEntityIndex<String, Publication> byAuthor = store.getSecondaryEn​tityIndex(publicatio​ns, String.class, "@author");
 
     assertNull(byAuthor.get(txn, "Kent Finell"));
     assertEquals(1, byAuthor.list(txn, "Olaus Magnus").size());

Modified: trunk/src/test/java/​org/tigris/limax/Tes​tDenormalization.jav​a
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/test/j​ava/org/tigris/limax​/TestDenormalization​.java?view=diff&​rev=77&p1=trunk/​src/test/java/org/ti​gris/limax/TestDenor​malization.java&​p2=trunk/src/test/ja​va/org/tigris/limax/​TestDenormalization.​java&r1=76&r​2=77
====================​====================​====================​==================
--- trunk/src/test/java/​org/tigris/limax/Tes​tDenormalization.jav​a (original)
+++ trunk/src/test/java/​org/tigris/limax/Tes​tDenormalization.jav​a 2007-09-19 18:23:57-0700
@@ -159,8 +159,8 @@
     txn.flushPendingToTr​ansactionIndexWriter​();
     txn.flushTransaction​IndexWriter();
 
- assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/tag/standard", "blabla"))).length());
- assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tag/standard", "blabla"))).length());
+ assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/@tag/standard", "blabla"))).length());
+ assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("@tag/standard", "blabla"))).length());
 
     t1.setTag("yadayada");
     store.put(txn, t1);
@@ -168,11 +168,11 @@
     txn.flushPendingToTr​ansactionIndexWriter​();
     txn.flushTransaction​IndexWriter();
 
- assertEquals(0, txn.getCombinedSearc​her().search(new TermQuery(new Term("tag/standard", "blabla"))).length());
- assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tag/standard", "yadayada"))).length());
+ assertEquals(0, txn.getCombinedSearc​her().search(new TermQuery(new Term("@tag/standard", "blabla"))).length());
+ assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("@tag/standard", "yadayada"))).length());
 
- assertEquals(0, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/tag/standard", "blabla"))).length());
- assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/tag/standard", "yadayada"))).length());
+ assertEquals(0, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/@tag/standard", "blabla"))).length());
+ assertEquals(1, txn.getCombinedSearc​her().search(new TermQuery(new Term("tags/@tag/standard", "yadayada"))).length());
 
 
     txn.close();

Modified: trunk/src/test/java/​org/tigris/limax/Tes​tGeneralization.java​
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/test/j​ava/org/tigris/limax​/TestGeneralization.​java?view=diff&r​ev=77&p1=trunk/s​rc/test/java/org/tig​ris/limax/TestGenera​lization.java&p2​=trunk/src/test/java​/org/tigris/limax/Te​stGeneralization.jav​a&r1=76&r2=7​7
====================​====================​====================​==================
--- trunk/src/test/java/​org/tigris/limax/Tes​tGeneralization.java​ (original)
+++ trunk/src/test/java/​org/tigris/limax/Tes​tGeneralization.java​ 2007-09-19 18:23:57-0700
@@ -1,12 +1,12 @@
 package org.tigris.limax;
 
 import junit.framework.TestCase;
-import org.tigris.silvertej​p.metamodel.classdia​gram.annotation.Attr​ibute;
-import org.tigris.limax.tok​enization.StandardTo​kenized;
-import org.tigris.limax.ent​ity.ObjectIdentity;
-import org.tigris.limax.entity.Entity;
-import org.apache.lucene.st​ore.RAMDirectory;
 import org.apache.lucene.do​cument.Document;
+import org.apache.lucene.st​ore.RAMDirectory;
+import org.tigris.limax.entity.Entity;
+import org.tigris.limax.ent​ity.ObjectIdentity;
+import org.tigris.limax.tok​enization.StandardTo​kenized;
+import org.tigris.silvertej​p.metamodel.classdia​gram.annotation.Attr​ibute;
 /*
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@
     b.setS2("world");
 
     Document doc = bs.assembleDocument(txn, b);
- assertNotNull(doc.ge​tField("s"));
+ assertNotNull(doc.ge​tField("@s"));
     txn.commit();
   }
 

Modified: trunk/src/test/java/​org/tigris/limax/Tes​tObjectStorage.java
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/test/j​ava/org/tigris/limax​/TestObjectStorage.j​ava?view=diff&re​v=77&p1=trunk/sr​c/test/java/org/tigr​is/limax/TestObjectS​torage.java&p2=t​runk/src/test/java/o​rg/tigris/limax/Test​ObjectStorage.java​&r1=76&r2=77
====================​====================​====================​==================
--- trunk/src/test/java/​org/tigris/limax/Tes​tObjectStorage.java (original)
+++ trunk/src/test/java/​org/tigris/limax/Tes​tObjectStorage.java 2007-09-19 18:23:57-0700
@@ -112,8 +112,8 @@
     }
 
     QueryParser qp = new QueryParser(null, new StandardAnalyzer(new String[]{}));
- assertEquals(1, getStore().getSearch​er().search(qp.parse​("+text/standard:jus​t")).length());
- assertEquals(1, getStore().getSearch​er().search(qp.parse​("+text/standard:jus​t +content/text/standa​rd:dull")).length())​;
+ assertEquals(1, getStore().getSearch​er().search(qp.parse​("+@text/standard:ju​st")).length());
+ assertEquals(1, getStore().getSearch​er().search(qp.parse​("+@text/standard:ju​st +content/@text/stand​ard:dull")).length()​);
 
 
     txn = getStore().newTransaction();

Modified: trunk/src/test/java/​org/tigris/limax/uti​l/TestDenormalizer.j​ava
Url: http://limax.tigris.​org/source/browse/li​max/trunk/src/test/j​ava/org/tigris/limax​/util/TestDenormaliz​er.java?view=diff​&rev=77&p1=trun​k/src/test/java/org/​tigris/limax/util/Te​stDenormalizer.java​&p2=trunk/src/tes​t/java/org/tigris/li​max/util/TestDenorma​lizer.java&r1=76​&r2=77
====================​====================​====================​==================
--- trunk/src/test/java/​org/tigris/limax/uti​l/TestDenormalizer.j​ava (original)
+++ trunk/src/test/java/​org/tigris/limax/uti​l/TestDenormalizer.j​ava 2007-09-19 18:23:57-0700
@@ -6,6 +6,8 @@
 import org.tigris.limax.Transaction;
 import org.tigris.limax.entity.Entity;
 import org.tigris.limax.ent​ity.ObjectIdentity;
+import org.tigris.limax.tok​enization.Denormaliz​ation;
+import org.tigris.limax.tok​enization.StandardTo​kenized;
 import org.tigris.silvertej​p.metamodel.classdia​gram.annotation.Attr​ibute;
 
 import java.util.*;
@@ -119,6 +121,7 @@
       this.oid = oid;
     }
 
+ @Denormalization(xpaths = "Q/@text")
     @org.tigris.silverte​jp.metamodel.classdi​agram.annotation.Bin​aryAssociationEnd(
         otherEndName = "taggingsByTag",
         otherEndClass = Taggable.class,
@@ -155,6 +158,7 @@
       this.oid = oid;
     }
 
+ @Denormalization(xpaths = "Q/@text")
     @org.tigris.silverte​jp.metamodel.classdi​agram.annotation.Bin​aryAssociationEnd(
         otherEndName = "taggingsByTag",
         otherEndClass = Tagger.class,
@@ -267,7 +271,8 @@
     }
 
 
- @org.tigris.silverte​jp.metamodel.classdi​agram.annotation.Att​ribute
+ @Attribute
+ @StandardTokenized
     private String text;
 
     public String getText() {

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r77 - trunk/src: main/java/org/tigris/limax main/java/org/tigris/limax/tokenization main/java/org/tigris/limax/util test/java/org/tigris/limax test/java/org/tigris/limax/util wettin Karl Wettin 2007-09-19 18:23:58 PDT
Messages per page: