|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Created by IntelliJ IDEA. User: rpandey Date: Feb 14, 2003 Time: 5:15:20 PM To change this template use Options | File Templates.
Field Summary | |
static java.lang.String |
ATTRIBUTE_ID
String representation of the "thesaurus" attribute name "id". |
static java.lang.String |
ATTRIBUTE_SRC
String representation of the "thesaurus" attribute name "src". |
static java.lang.String |
ATTRIBUTE_TYPE
String representation of the "thesaurus" attribute name "type". |
static java.lang.String |
CLASS_NAME_SUFFIX
String representation of the thesaurus class name suffix. |
static java.lang.String |
ELEMENT_NAME_THESAURI
String representation of a name used in xml configurations |
static java.lang.String |
ELEMENT_NAME_THESAURUS
String representation of a name used in xml configurations |
static java.lang.String |
PACKAGE_QUALNAME
String representation of the thesarus package name (including trailing separator "."). |
Fields inherited from interface fr.gouv.culture.sdx.thesaurus.Thesaurus |
NAMESPACE_URI, RELATION_BROADER_TERM, RELATION_BROADER_TERMS, RELATION_EQUIVALENT_TERM, RELATION_NARROWER_TERM, RELATION_PARTIAL_EQIUVALENCE, RELATION_RELATED_TERM, RELATION_SCOPE_NOTE, RELATION_USE, RELATION_USED_FOR |
Fields inherited from interface fr.gouv.culture.sdx.documentbase.DocumentBase |
ELEMENT_NAME_DOCUMENT_BASE, ELEMENT_NAME_DOCUMENT_BASES |
Method Summary | |
void |
addConcept(Concept concept)
Adds a document. |
void |
addConcepts(Concept[] concepts)
Adds a group of documents. |
void |
build(org.xml.sax.InputSource source)
Builds a thesaurus from a SAX input source. |
void |
build(java.lang.String url)
Builds a thesaurus from a File. |
void |
deleteConcept(Concept concept)
Remove a document. |
void |
deleteConcepts(Concept[] concepts)
Remove a group of documents. |
Results |
expandQuery(Query query)
Expands a query returning the results of the expanded query |
Results |
expandQuery(Query query,
java.lang.String fieldName)
Expands a query returning the results of the expanded query |
Results |
expandQuery(Query query,
java.lang.String fieldName,
int[] relations,
int depth)
Expands a query returning the results of the expanded query |
Results |
expandQuery(Query query,
java.lang.String fieldName,
int[] relations,
int depth,
java.lang.String[] langs)
Expands a query returning the results of the expanded query |
Results |
expandQuery(Query query,
java.lang.String fieldName,
int relation,
int depth)
Expands a query returning the results of the expanded query |
Concept[] |
filterByLangs(Concept[] concepts,
java.lang.String[] langs)
Filters concepts by a list of languages |
Concept |
getConceptById(java.lang.String id)
Returns a document using its id. |
Concept |
getConceptByName(java.lang.String name)
Returns a document using its name. |
int |
getDefaultDepth()
Return's the default depth for searching relations |
int[] |
getDefaultRelations()
Return's the default set of relation int's for searching relations |
java.lang.String |
getId()
Returns the id for this thesaurus |
Concept[] |
getRelations(Concept concept)
Return's related concepts |
Concept[] |
getRelations(Concept[] concepts)
Returns related concepts |
Concept[] |
getRelations(Concept[] concepts,
int[] relations,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(Concept[] concepts,
int[] relations,
int depth,
java.lang.String[] langs)
|
Concept[] |
getRelations(Concept[] concepts,
int relation,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(Concept[] concepts,
int relation,
int depth,
java.lang.String[] langs)
|
Concept[] |
getRelations(Concept concept,
int[] relations,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(Concept concept,
int[] relations,
int depth,
java.lang.String[] langs)
|
Concept[] |
getRelations(Concept concept,
int relation,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(Concept concept,
int relation,
int depth,
java.lang.String[] langs)
|
Concept[] |
getRelations(java.lang.String searchTerm,
Concept[] concepts,
int[] relations,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(java.lang.String searchTerm,
Concept[] concepts,
int relation,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(java.lang.String searchTerm,
Concept concept,
int[] relations,
int depth)
Finds concepts for matching relations at a given depth |
Concept[] |
getRelations(java.lang.String searchTerm,
Concept concept,
int relation,
int depth)
Finds concepts for matching relations at a given depth |
void |
init()
Initializes the document base. |
void |
load()
Loads a thesaurus in memory (later). |
void |
save()
Saves the contents. |
Concept[] |
search(java.lang.String term)
Searches for concepts. |
void |
setProperties(java.util.Hashtable props)
Sets the properties object for the implementing class. |
long |
size()
Returns the number of terms in the thesaurus. |
void |
unload()
Unloads the memory representation of the thesaurus (later). |
Methods inherited from interface fr.gouv.culture.sdx.thesaurus.Thesaurus |
compile |
Methods inherited from interface org.apache.cocoon.xml.XMLizable |
toSAX |
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable |
configure |
Methods inherited from interface fr.gouv.culture.sdx.documentbase.DocumentBase |
creationDate, delete, delete, getDefaultRepository, getDocument, getDocument, getDocument, getDocument, getIndexationPipeline, getMimeType, getOAIHarvester, getOAIRepository, getRepository, index, index, isDefault, lastModificationDate, setId |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
Methods inherited from interface org.apache.avalon.framework.component.Composable |
compose |
Methods inherited from interface org.apache.avalon.framework.context.Contextualizable |
contextualize |
Methods inherited from interface fr.gouv.culture.sdx.search.Searchable |
getIndex |
Field Detail |
public static final java.lang.String ELEMENT_NAME_THESAURI
public static final java.lang.String ELEMENT_NAME_THESAURUS
public static final java.lang.String ATTRIBUTE_SRC
public static final java.lang.String PACKAGE_QUALNAME
public static final java.lang.String CLASS_NAME_SUFFIX
public static final java.lang.String ATTRIBUTE_ID
public static final java.lang.String ATTRIBUTE_TYPE
Method Detail |
public java.lang.String getId()
getId
in interface DocumentBase
public void init() throws SDXException, org.apache.avalon.framework.configuration.ConfigurationException
DocumentBase
This method must be called after the logger has been set and the configuration done.
init
in interface DocumentBase
SDXException
org.apache.avalon.framework.configuration.ConfigurationException
public void setProperties(java.util.Hashtable props)
DocumentBase
setProperties
in interface DocumentBase
props
- The desired properties objectpublic void build(java.lang.String url) throws SDXException, org.apache.avalon.framework.configuration.ConfigurationException
url
- The url to the file containing the thesaurus.
SDXException
org.apache.avalon.framework.configuration.ConfigurationException
public void build(org.xml.sax.InputSource source) throws SDXException
source
- The SAX input source where the thesaurus is.
SDXException
public long size()
public void save()
public void load()
public void unload()
public void addConcept(Concept concept) throws SDXException
concept
- The document to add.
SDXException
public void addConcepts(Concept[] concepts) throws SDXException
concepts
- The documents to add.
SDXException
public void deleteConcept(Concept concept) throws SDXException
concept
- The document.
SDXException
public void deleteConcepts(Concept[] concepts) throws SDXException
concepts
- The documents.
SDXException
public Concept[] search(java.lang.String term) throws SDXException
term
- The concept term.
SDXException
public Concept getConceptByName(java.lang.String name) throws SDXException
name
- The document's name.
SDXException
public Concept getConceptById(java.lang.String id) throws SDXException
id
- The document's id.
SDXException
public Results expandQuery(Query query) throws SDXException
query
- The query object which should be expanded using this thesaurus
SDXException
public Results expandQuery(Query query, java.lang.String fieldName) throws SDXException
query
- The query object which should be expanded using this thesaurusfieldName
- The name of field on which expansion should take place
SDXException
public Results expandQuery(Query query, java.lang.String fieldName, int relation, int depth) throws SDXException
query
- The query object which should be expanded using this thesaurusfieldName
- The name of field on which expansion should take placerelation
- The relation type, for finding terms which should be used to expand the querydepth
- The depth to which a relation should be followed, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Results expandQuery(Query query, java.lang.String fieldName, int[] relations, int depth) throws SDXException
query
- The query object which should be expanded using this thesaurusfieldName
- The name of field on which expansion should take placerelations
- The relation types, for finding terms which should be used to expand the querydepth
- The depth to which a relation should be followed, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc. * @return A results object of the executed expanded query
SDXException
public Results expandQuery(Query query, java.lang.String fieldName, int[] relations, int depth, java.lang.String[] langs) throws SDXException
query
- The query object which should be expanded using this thesaurusfieldName
- The name of field on which expansion should take placerelations
- The relation types, for finding terms which should be used to expand the querydepth
- The depth to which a relation should be followed, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc. * @return A results object of the executed expanded query
SDXException
public Concept[] getRelations(Concept concept, int relation, int depth) throws SDXException
concept
- The concept from which relations should be usedrelation
- The relation type to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(Concept[] concepts, int[] relations, int depth) throws SDXException
concepts
- The concepts from which relations should be usedrelations
- The relation types to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(Concept concept, int[] relations, int depth) throws SDXException
concept
- The concept from which relations should be usedrelations
- The relation types to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(Concept[] concepts, int relation, int depth) throws SDXException
concepts
- The concepts from which relations should be usedrelation
- The relation type to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(java.lang.String searchTerm, Concept[] concepts, int relation, int depth) throws SDXException
searchTerm
- The search term which was used to find the provided conceptsconcepts
- The concepts from which relations should be usedrelation
- The relation type to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(java.lang.String searchTerm, Concept[] concepts, int[] relations, int depth) throws SDXException
searchTerm
- The search term which was used to find the provided conceptsconcepts
- The concepts from which relations should be usedrelations
- The relation types to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(java.lang.String searchTerm, Concept concept, int relation, int depth) throws SDXException
searchTerm
- The search term which was used to find the provided conceptconcept
- The concept from which relations should be usedrelation
- The relation type to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(java.lang.String searchTerm, Concept concept, int[] relations, int depth) throws SDXException
searchTerm
- The search term which was used to find the provided conceptsconcept
- The concepts from which relations should be usedrelations
- The relation types to search for with a conceptdepth
- The depth to which a relation should be evaluated, 0 finds the relation withing the matching concept
1, finds the relation within concept for the matching relation found by the "0 case", etc.
SDXException
public Concept[] getRelations(Concept concept, int[] relations, int depth, java.lang.String[] langs) throws SDXException
SDXException
public Concept[] getRelations(Concept[] concepts, int[] relations, int depth, java.lang.String[] langs) throws SDXException
SDXException
public Concept[] getRelations(Concept concept, int relation, int depth, java.lang.String[] langs) throws SDXException
SDXException
public Concept[] getRelations(Concept[] concepts, int relation, int depth, java.lang.String[] langs) throws SDXException
SDXException
public Concept[] getRelations(Concept[] concepts) throws SDXException
concepts
- The concepts for which relations are desired
SDXException
public Concept[] getRelations(Concept concept) throws SDXException
concept
- The concept for which relations are desired
SDXException
public int getDefaultDepth()
public int[] getDefaultRelations()
public Concept[] filterByLangs(Concept[] concepts, java.lang.String[] langs)
concepts
- List of concepts for filteringlangs
- List of langauages (in xml:lang format) which are desired
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |