ML text index and search

Expose properties via DD
Remove more old indexer code

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4592 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-12-13 11:52:41 +00:00
parent 7f8c678bd5
commit 82cfe2d806
59 changed files with 1745 additions and 637 deletions

View File

@@ -18,6 +18,8 @@ package org.alfresco.repo.dictionary;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import org.alfresco.service.cmr.dictionary.AspectDefinition;
@@ -285,5 +287,50 @@ public class DictionaryComponent implements DictionaryService
{
return dictionaryDAO.getAssociation(associationName);
}
/*
* (non-Javadoc)
* @see org.alfresco.service.cmr.dictionary.DictionaryService#getAllProperties(org.alfresco.service.namespace.QName)
*/
public Collection<QName> getAllProperties(QName dataType)
{
Collection<QName> aspects = new HashSet<QName>(64);
for (QName model : getAllModels())
{
aspects.addAll(getProperties(model, dataType));
}
return aspects;
}
/*
* (non-Javadoc)
* @see org.alfresco.service.cmr.dictionary.DictionaryService#getAllProperties(org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName)
*/
public Collection<QName> getProperties(QName model, QName dataType)
{
Collection<PropertyDefinition> propDefs = dictionaryDAO.getProperties(model, dataType);
HashSet<QName> props = new HashSet<QName>(propDefs.size());
for(PropertyDefinition def : propDefs)
{
props.add(def.getName());
}
return props;
}
public Collection<QName> getProperties(QName model)
{
Collection<PropertyDefinition> propDefs = dictionaryDAO.getProperties(model);
HashSet<QName> props = new HashSet<QName>(propDefs.size());
for(PropertyDefinition def : propDefs)
{
props.add(def.getName());
}
return props;
}
}