Skip to end of metadata
Go to start of metadata
JavaDoc - Search

class method strict clean

Example


com.ontotext.kim.client.query
Class AtomExpr

java.lang.Object
  extended by com.ontotext.kim.client.query.KeywordExpr
      extended by com.ontotext.kim.client.query.AtomExpr
All Implemented Interfaces:
Serializable

public class AtomExpr
extends KeywordExpr

A keyword pattern atom expression.

See Also:
Serialized Form

Field Summary
static String BODY_LABEL
           
static int PRIORITY
           
 
Fields inherited from class com.ontotext.kim.client.query.KeywordExpr
PRIORITY_BOTTOM, PRIORITY_TOP
 
Constructor Summary
AtomExpr(String statement)
          Parses a query statement into a atom expression.
AtomExpr(String keywordPattern, String docFeature)
          Creates a new keyword pattern atom.
AtomExpr(String keywordPattern, String docFeature, String featurePath)
          Creates a new keyword pattern atom.
 
Method Summary
 String cleanKeywordPattern(String content)
           
 boolean containsOnlyBodyTerms()
           
 boolean equals(Object obj)
           
 void exportTo(IKeywordExporter exporter)
          Exports the expression to a desired format.
 String getDocField()
           
 String getFeaturePath()
          The feature path is an optional XPath 1.0 expression that specifies a document section in the tree of document sections.
 String getKeywordPattern()
           
 int getPriority()
           
 int hashCode()
           
 boolean isPhrase()
          whether the atom keyword is a phrase.
 boolean isTermGroup()
           
 void setPhrase(boolean isPhrase)
           
 void setTermGroup(boolean termGroup)
           
 
Methods inherited from class com.ontotext.kim.client.query.KeywordExpr
And, Or, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIORITY

public static final int PRIORITY
See Also:
Constant Field Values

BODY_LABEL

public static final String BODY_LABEL
See Also:
Constant Field Values
Constructor Detail

AtomExpr

public AtomExpr(String keywordPattern,
                String docFeature)
         throws KIMQueryException
Creates a new keyword pattern atom.

Parameters:
keywordPattern - the pattern that matches the accepted keywords. If it contains whitespace, it is considered a phrase which should be matched exactly. Otherwise the wildcards *, meaning any 0 or more characters, and ?, meaning any single character are accepted.
docFeature - the feature, in which the keyword should be
Throws:
KIMQueryException - if the pattern contains whitespace.

AtomExpr

public AtomExpr(String keywordPattern,
                String docFeature,
                String featurePath)
         throws KIMQueryException
Creates a new keyword pattern atom.

Parameters:
keywordPattern - the pattern that matches the accepted keywords. If it contains whitespace, it is considered a phrase which should be matched exactly. Otherwise the wildcards *, meaning any 0 or more characters, and ?, meaning any single character are accepted.
docFeature - the feature, in which the keyword should be
featurePath - see getFeaturePath
Throws:
KIMQueryException - if the pattern contains whitespace.

AtomExpr

public AtomExpr(String statement)
         throws KIMQueryException
Parses a query statement into a atom expression.

Parameters:
statement -
Throws:
KIMQueryException - if the pattern contains whitespace.
Method Detail

exportTo

public void exportTo(IKeywordExporter exporter)
              throws KIMQueryException
Description copied from class: KeywordExpr
Exports the expression to a desired format. This method should call the appropriate processing method of the given exporter.

Specified by:
exportTo in class KeywordExpr
Parameters:
exporter - An implementation that should handle the expression with a suitable processing method.
Throws:
KIMQueryException

getDocField

public String getDocField()

getKeywordPattern

public String getKeywordPattern()

getFeaturePath

public String getFeaturePath()
The feature path is an optional XPath 1.0 expression that specifies a document section in the tree of document sections. XPath is a generic tree navigation language, usually used on XML. For more information on XPath, see http://en.wikipedia.org/wiki/Xpath. It is up to the document repository implementation to interpret the name of the tags and attributes in the expression. Use of complex XPath expressions is discouraged and probably will not be supported by the document repository. Example: //Section[@id="Examples"]/Section[@id="Example 1"] means search for the keyword pattern inside a section, called Example 1, which should reside within a section called Examples.

Returns:
the featurePath, a valid XPath expression or null

getPriority

public int getPriority()
Specified by:
getPriority in class KeywordExpr
Returns:
the value of the priority of the root operation of this expression. Higher value means higher priority.

isPhrase

public boolean isPhrase()
whether the atom keyword is a phrase.

Phrase atoms will be matched only verbatim in the text and the other atoms will be considered patterns. Even single token atoms will be considered phrases if they dob't contain wildcards i.e. they will must exactly matched.

Returns:
whether the atom keyword is a phrase.

setPhrase

public void setPhrase(boolean isPhrase)

setTermGroup

public void setTermGroup(boolean termGroup)

isTermGroup

public boolean isTermGroup()

cleanKeywordPattern

public String cleanKeywordPattern(String content)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

containsOnlyBodyTerms

public boolean containsOnlyBodyTerms()
Specified by:
containsOnlyBodyTerms in class KeywordExpr

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.