congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Projection.getFieldInclusion
Code IndexAdd Tabnine to your IDE (free)

How to use
getFieldInclusion
method
in
com.redhat.lightblue.query.Projection

Best Java code snippets using com.redhat.lightblue.query.Projection.getFieldInclusion (Showing top 14 results out of 315)

origin: org.esbtools.lightblue-notification-hook/lightblue-notification-hook

private boolean isProjected(Path field,Projection p) {
  switch(p.getFieldInclusion(field)) {
  case explicit_inclusion:
  case implicit_inclusion:return true;
  default: return false;
  }
}
origin: com.redhat.lightblue/metadata

/**
 * Returns true if field inclusion is explicit.
 *
 * @param field the path to check
 * @return
 */
private boolean isProjected(Path field) {
  LOGGER.debug("Checking if {} is explicitly projected", field);
  for (Projection p : projections) {
    Projection.Inclusion inc=p.getFieldInclusion(field);
    if(inc==Projection.Inclusion.explicit_inclusion)
      return true;
  }
  return false;
}
origin: com.redhat.lightblue/lightblue-core-query-api

/**
 * Determines if the field is included in this projection
 *
 * @param field The absolute name of the field
 *
 * If the field name contains array indexes, they are converted to '*'
 * before evaluation.
 */
public Inclusion getFieldInclusion(Path field) {
  LOGGER.debug("Checking if {} is projected", field);
  Inclusion ret=getFieldInclusion(field, Path.EMPTY);
  LOGGER.debug("Inclusion {}={}",field,ret);
  return ret;
}
origin: lightblue-platform/lightblue-core

/**
 * Determines if the field is included in this projection
 *
 * @param field The absolute name of the field
 *
 * If the field name contains array indexes, they are converted to '*'
 * before evaluation.
 */
public Inclusion getFieldInclusion(Path field) {
  LOGGER.debug("Checking if {} is projected", field);
  Inclusion ret=getFieldInclusion(field, Path.EMPTY);
  LOGGER.debug("Inclusion {}={}",field,ret);
  return ret;
}
origin: com.redhat.lightblue/lightblue-core-query-api

/**
 * Determine if the field is explicitly included/excluded, implicitly
 * included, or the projection does not decide on the field.
 */
public Inclusion getFieldInclusion(Path field, Path ctx) {
  Path mfield = toMask(field);
  ctx = toMask(ctx);
  if (this instanceof FieldProjection) {
    return getFieldInclusion(mfield, (FieldProjection) this, ctx);
  } else if (this instanceof ArrayProjection) {
    return getFieldInclusion(mfield, (ArrayProjection) this, ctx);
  } else if (this instanceof ProjectionList) {
    return getFieldInclusion(mfield, (ProjectionList) this, ctx);
  }
  return Inclusion.undecided;
}
origin: com.redhat.lightblue/lightblue-core-metadata

/**
 * Returns true if field inclusion is explicit.
 *
 * @param field the path to check
 * @return
 */
private boolean isProjected(Path field) {
  LOGGER.debug("Checking if {} is explicitly projected", field);
  for (Projection p : projections) {
    Projection.Inclusion inc = p.getFieldInclusion(field);
    if (inc == Projection.Inclusion.explicit_inclusion) {
      LOGGER.debug("{} is explicitly projected by {}", field, p);
      return true;
    } else {
      LOGGER.debug("{} is not projected by {}", field,p);
    }
  }
  return false;
}
origin: lightblue-platform/lightblue-core

/**
 * Determine if the field is explicitly included/excluded, implicitly
 * included, or the projection does not decide on the field.
 */
public Inclusion getFieldInclusion(Path field, Path ctx) {
  Path mfield = toMask(field);
  ctx = toMask(ctx);
  if (this instanceof FieldProjection) {
    return getFieldInclusion(mfield, (FieldProjection) this, ctx);
  } else if (this instanceof ArrayProjection) {
    return getFieldInclusion(mfield, (ArrayProjection) this, ctx);
  } else if (this instanceof ProjectionList) {
    return getFieldInclusion(mfield, (ProjectionList) this, ctx);
  }
  return Inclusion.undecided;
}
origin: lightblue-platform/lightblue-core

/**
 * Returns true if field inclusion is explicit.
 *
 * @param field the path to check
 * @return
 */
private boolean isProjected(Path field) {
  LOGGER.debug("Checking if {} is explicitly projected", field);
  for (Projection p : projections) {
    Projection.Inclusion inc = p.getFieldInclusion(field);
    if (inc == Projection.Inclusion.explicit_inclusion) {
      LOGGER.debug("{} is explicitly projected by {}", field, p);
      return true;
    } else {
      LOGGER.debug("{} is not projected by {}", field,p);
    }
  }
  return false;
}
origin: com.redhat.lightblue/lightblue-core-query-api

Inclusion ret = itemsItr.previous().getFieldInclusion(field, context);
if (ret != Inclusion.undecided) {
origin: lightblue-platform/lightblue-core

Inclusion ret = itemsItr.previous().getFieldInclusion(field, context);
if (ret != Inclusion.undecided) {
origin: com.redhat.lightblue/lightblue-core-query-api

private Inclusion getFieldInclusion(Path field, ArrayProjection p, Path context) {
  Path absField = new Path(context, toMask(p.getField()));
  LOGGER.debug("Checking if array projection on {} projects {}", absField, field);
  Inclusion inc = isFieldIncluded(field, absField, p.isInclude(), false);
  Inclusion inc2 = p.getProject().getFieldInclusion(field, new Path(absField, Path.ANYPATH));
  Inclusion ret;
  if (inc == Inclusion.explicit_inclusion || inc2 == Inclusion.explicit_inclusion) {
    ret = Inclusion.explicit_inclusion;
  } else if (inc == Inclusion.implicit_inclusion || inc2 == Inclusion.implicit_inclusion) {
    ret = Inclusion.implicit_inclusion;
  } else if (inc == Inclusion.explicit_exclusion || inc2 == Inclusion.explicit_exclusion) {
    ret = Inclusion.explicit_exclusion;
  } else if (inc == Inclusion.implicit_exclusion || inc2 == Inclusion.implicit_exclusion) {
    ret = Inclusion.implicit_exclusion;
  } else {
    ret = Inclusion.undecided;
  }
  LOGGER.debug("array projection on {} projects {}: {}", absField, field, ret);
  return ret;
}
origin: com.redhat.lightblue/lightblue-core-query-api

ctx = toMask(ctx);
if (this instanceof FieldProjection) {
  switch (getFieldInclusion(mfield, (FieldProjection) this, ctx)) {
    case implicit_inclusion:
    case explicit_inclusion:
  if (getFieldInclusion(mfield, (ArrayProjection) this, ctx) == Inclusion.undecided) {
    LOGGER.debug("whether to include {} is Undecided, checking projection query", mfield);
    Path absField = new Path(ctx, toMask(((ArrayQueryMatchProjection) this).getField()));
  return getFieldInclusion(mfield, (ArrayProjection) this, ctx) != Inclusion.undecided;
} else if (this instanceof ProjectionList) {
  for (Projection x : ((ProjectionList) this).getItems()) {
origin: lightblue-platform/lightblue-core

private Inclusion getFieldInclusion(Path field, ArrayProjection p, Path context) {
  Path absField = new Path(context, toMask(p.getField()));
  LOGGER.debug("Checking if array projection on {} projects {}", absField, field);
  Inclusion inc = isFieldIncluded(field, absField, p.isInclude(), false);
  Inclusion inc2 = p.getProject().getFieldInclusion(field, new Path(absField, Path.ANYPATH));
  Inclusion ret;
  if (inc == Inclusion.explicit_inclusion || inc2 == Inclusion.explicit_inclusion) {
    ret = Inclusion.explicit_inclusion;
  } else if (inc == Inclusion.implicit_inclusion || inc2 == Inclusion.implicit_inclusion) {
    ret = Inclusion.implicit_inclusion;
  } else if (inc == Inclusion.explicit_exclusion || inc2 == Inclusion.explicit_exclusion) {
    ret = Inclusion.explicit_exclusion;
  } else if (inc == Inclusion.implicit_exclusion || inc2 == Inclusion.implicit_exclusion) {
    ret = Inclusion.implicit_exclusion;
  } else {
    ret = Inclusion.undecided;
  }
  LOGGER.debug("array projection on {} projects {}: {}", absField, field, ret);
  return ret;
}
origin: lightblue-platform/lightblue-core

ctx = toMask(ctx);
if (this instanceof FieldProjection) {
  switch (getFieldInclusion(mfield, (FieldProjection) this, ctx)) {
    case implicit_inclusion:
    case explicit_inclusion:
  if (getFieldInclusion(mfield, (ArrayProjection) this, ctx) == Inclusion.undecided) {
    LOGGER.debug("whether to include {} is Undecided, checking projection query", mfield);
    Path absField = new Path(ctx, toMask(((ArrayQueryMatchProjection) this).getField()));
  return getFieldInclusion(mfield, (ArrayProjection) this, ctx) != Inclusion.undecided;
} else if (this instanceof ProjectionList) {
  for (Projection x : ((ProjectionList) this).getItems()) {
com.redhat.lightblue.queryProjectiongetFieldInclusion

Javadoc

Determines if the field is included in this projection

Popular methods of Projection

  • fromJson
  • toJson
  • isFieldRequiredToEvaluateProjection
    Returns true if the field is needed to evaluate the projection
  • add
    Adds two projections and returns a new projection containing both. Any projection can be null. If th
  • toString
  • fieldAncestorOfPattern
    If the field is an ancestor of the pattern, and if inclusion is true, returns true. Otherwise, retur
  • fieldMatchesPattern
    Returns whether to include/exclude the field based on whether the field matches the pattern
  • impliedInclusion
    Returns if the field should be included based on the recursive pattern.
  • isFieldIncluded
    Returns if the field should be included based on the pattern given.
  • toMask
    If a path includes array indexes, change the indexes into ANY

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JList (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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