/** * Returns the result of {@link #getBooleanValue(Literal, boolean) getBooleanValue((Literal)value, * fallback)} in case the supplied value is a literal, returns the fallback value otherwise. */ public static boolean getBooleanValue(Value v, boolean fallback) { if (v instanceof Literal) { return getBooleanValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getByteValue(Literal, byte) getByteValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static byte getByteValue(Value v, byte fallback) { if (v instanceof Literal) { return getByteValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getShortValue(Literal, short) getShortValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static short getShortValue(Value v, short fallback) { if (v instanceof Literal) { return getShortValue((Literal)v, fallback); } else { return fallback; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof Model) { Model model = (Model)o; return Models.isomorphic(this, model); } return false; }
/** * Returns the result of {@link #getLabel(Literal, String) getLabel((Literal)v, fallback} in case the * supplied value is a literal, returns the fallback value otherwise. */ public static String getLabel(Value v, String fallback) { return v instanceof Literal ? getLabel((Literal)v, fallback) : fallback; }
public PatternIterator(Iterator<S> iter, Value subj, Value pred, Value obj, Value... contexts) { this.filteredIter = iter; this.subj = subj; this.pred = pred; this.obj = obj; this.contexts = notNull(contexts); }
private static boolean isSubsetInternal(Model model1, Model model2) { // try to create a full blank node mapping return matchModels(model1, model2); }
/** * Returns the result of {@link #getIntValue(Literal, int) getIntValue((Literal)value, fallback)} in case * the supplied value is a literal, returns the fallback value otherwise. */ public static int getIntValue(Value v, int fallback) { if (v instanceof Literal) { return getIntValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getLongValue(Literal, long) getLongValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static long getLongValue(Value v, long fallback) { if (v instanceof Literal) { return getLongValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getFloatValue(Literal, float) getFloatValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static float getFloatValue(Value v, float fallback) { if (v instanceof Literal) { return getFloatValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getDoubleValue(Literal, double) getDoubleValue((Literal)value, fallback)} * in case the supplied value is a literal, returns the fallback value otherwise. */ public static double getDoubleValue(Value v, double fallback) { if (v instanceof Literal) { return getDoubleValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getDecimalValue(Literal, BigDecimal) getDecimalValue((Literal)value, * fallback)} in case the supplied value is a literal, returns the fallback value otherwise. */ public static BigDecimal getDecimalValue(Value v, BigDecimal fallback) { if (v instanceof Literal) { return getDecimalValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getIntegerValue(Literal, BigInteger) getIntegerValue((Literal)value, * fallback)} in case the supplied value is a literal, returns the fallback value otherwise. */ public static BigInteger getIntegerValue(Value v, BigInteger fallback) { if (v instanceof Literal) { return getIntegerValue((Literal)v, fallback); } else { return fallback; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof Model) { Model model = (Model)o; return Models.isomorphic(this, model); } return false; }
/** * Returns the result of {@link #getBooleanValue(Literal, boolean) getBooleanValue((Literal)value, * fallback)} in case the supplied value is a literal, returns the fallback value otherwise. */ public static boolean getBooleanValue(Value v, boolean fallback) { if (v instanceof Literal) { return getBooleanValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getLabel(Literal, String) getLabel((Literal)v, fallback} in case the * supplied value is a literal, returns the fallback value otherwise. */ public static String getLabel(Value v, String fallback) { return v instanceof Literal ? getLabel((Literal)v, fallback) : fallback; }
/** * Returns the result of {@link #getByteValue(Literal, byte) getByteValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static byte getByteValue(Value v, byte fallback) { if (v instanceof Literal) { return getByteValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getShortValue(Literal, short) getShortValue((Literal)value, fallback)} in * case the supplied value is a literal, returns the fallback value otherwise. */ public static short getShortValue(Value v, short fallback) { if (v instanceof Literal) { return getShortValue((Literal)v, fallback); } else { return fallback; } }
public PatternIterator(Iterator<S> iter, Value subj, Value pred, Value obj, Value... contexts) { this.filteredIter = iter; this.subj = subj; this.pred = pred; this.obj = obj; this.contexts = notNull(contexts); }
private static boolean isSubsetInternal(Model model1, Model model2) { // try to create a full blank node mapping return matchModels(model1, model2); }