Tabnine Logo
PropertyIsLike.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.deegree.filter.comparison.PropertyIsLike
constructor

Best Java code snippets using org.deegree.filter.comparison.PropertyIsLike.<init> (Showing top 6 results out of 315)

origin: deegree/deegree3

private static PropertyIsLike parsePropertyIsLikeOperator( XMLStreamReader xmlStream )
            throws XMLStreamException {
  // this is a deegree extension over Filter 1.1.0 spec.
  boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true );
  String wildCard = getRequiredAttributeValue( xmlStream, "wildCard" );
  String singleChar = getRequiredAttributeValue( xmlStream, "singleChar" );
  String escapeChar = getRequiredAttributeValue( xmlStream, "escapeChar" );
  nextElement( xmlStream );
  ValueReference propName = parsePropertyName( xmlStream, false );
  nextElement( xmlStream );
  if ( !"Literal".equals( xmlStream.getLocalName() ) ) {
    String message = "FilterEncoding 1.1.0 does not allow other than Literal elements as second expression in PropertyIsLike filters!";
    throw new XMLStreamException( message );
  }
  Literal<?> literal = parseLiteral( xmlStream );
  nextElement( xmlStream );
  return new PropertyIsLike( propName, literal, wildCard, singleChar, escapeChar, matchCase, null );
}
origin: deegree/deegree3

private PropertyIsLike buildIsLike( Expression propName, Expression literal, boolean matchCase )
            throws UnmappableException {
  if ( !( propName instanceof ValueReference ) || !( literal instanceof Literal ) ) {
    String msg = "Can not map filter. Multi-valued columns can only be compared to literals.";
    throw new UnmappableException( msg );
  }
  String wildCard = "*";
  String singleChar = "?";
  String escapeChar = "\\";
  String s = ( (Literal<?>) literal ).getValue().toString();
  s = StringUtils.replaceAll( s, escapeChar, escapeChar + escapeChar );
  s = StringUtils.replaceAll( s, singleChar, escapeChar + singleChar );
  s = StringUtils.replaceAll( s, wildCard, escapeChar + wildCard );
  Literal<PrimitiveValue> escapedLiteral = new Literal<PrimitiveValue>( new PrimitiveValue( s ), null );
  return new PropertyIsLike( (ValueReference) propName, escapedLiteral, wildCard, singleChar, escapeChar,
                matchCase, null );
}
origin: deegree/deegree3

private static PropertyIsLike parsePropertyIsLikeOperator( XMLStreamReader xmlStream )
            throws XMLStreamException {
  // this is a deegree extension over Filter 1.0.0
  boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true );
  String wildCard = getRequiredAttributeValue( xmlStream, "wildCard" );
  String singleChar = getRequiredAttributeValue( xmlStream, "singleChar" );
  String escapeChar = getRequiredAttributeValue( xmlStream, "escape" );
  nextElement( xmlStream );
  ValueReference propName = parsePropertyName( xmlStream );
  nextElement( xmlStream );
  Literal<?> literal = parseLiteral( xmlStream );
  nextElement( xmlStream );
  return new PropertyIsLike( propName, literal, wildCard, singleChar, escapeChar, matchCase, null );
}
origin: deegree/deegree3

private static PropertyIsLike parsePropertyIsLikeOperator( XMLStreamReader xmlStream )
            throws XMLStreamException {
  // this is a deegree extension over Filter 2.0.0 spec. (TODO should this be null, if not present?)
  Boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true );
  // this is a deegree extension over Filter 2.0.0 spec. (TODO should this be null, if not present?)
  MatchAction matchAction = null;
  String s = XMLStreamUtils.getAttributeValue( xmlStream, "matchAction" );
  if ( s != null ) {
    matchAction = parseMatchAction( xmlStream, s );
  }
  String wildCard = getRequiredAttributeValue( xmlStream, "wildCard" );
  String singleChar = getRequiredAttributeValue( xmlStream, "singleChar" );
  String escapeChar = getRequiredAttributeValue( xmlStream, "escapeChar" );
  nextElement( xmlStream );
  Expression value = parseExpression( xmlStream );
  nextElement( xmlStream );
  Expression pattern = parseExpression( xmlStream );
  nextElement( xmlStream );
  return new PropertyIsLike( value, pattern, wildCard, singleChar, escapeChar, matchCase, matchAction );
}
origin: deegree/deegree3

case PROPERTY_IS_LIKE:
  PropertyIsLike pil = (PropertyIsLike) o;
  return new PropertyIsLike( exs[0], exs[1], pil.getWildCard(), pil.getSingleChar(), pil.getEscapeChar(),
                o.isMatchCase(), o.getMatchAction() );
case PROPERTY_IS_NIL:
origin: deegree/deegree3

case PROPERTY_IS_LIKE:
  PropertyIsLike pil = (PropertyIsLike) op;
  return new PropertyIsLike( copy( pil.getExpression() ), copyExpression( pil.getPattern(), values ),
                pil.getWildCard(), pil.getSingleChar(), pil.getEscapeChar(),
                pil.isMatchCase(), pil.getMatchAction() );
org.deegree.filter.comparisonPropertyIsLike<init>

Popular methods of PropertyIsLike

  • getEscapeChar
  • getExpression
  • getPattern
  • getSingleChar
  • getWildCard
  • isMatchCase
  • getMatchAction
  • getPrimitiveValues
  • matches
    Checks if a given String matches a pattern that is a sequence of: * standard characters * wildca

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now