/** * Returns a hash code for the given object. * * @see java.lang.Object#hashCode() * @param o * the object to create a hash for * @return the hash code of the object */ public static int hashCode(PropertyDocument o) { int result; result = hashCodeForTermedDocument(o); result = prime * result + o.getStatementGroups().hashCode(); result = prime * result + o.getDatatype().hashCode(); return result; }
/** * Returns a hash code for the given object. * * @see java.lang.Object#hashCode() * @param o * the object to create a hash for * @return the hash code of the object */ public static int hashCode(PropertyDocument o) { int result; result = hashCodeForTermedDocument(o); result = prime * result + o.getStatementGroups().hashCode(); result = prime * result + o.getDatatype().hashCode(); return result; }
/** * Returns true if the parameters are two {@link PropertyDocument} objects * with exactly the same data. It does not matter if they are different * implementations of the interface as long as their content is the same. * * @param o1 * the first object to compare * @param o2 * the second object to compare * @return true if both objects are equal */ public static boolean equalsPropertyDocument(PropertyDocument o1, Object o2) { if (o2 == o1) { return true; } if (!(o2 instanceof PropertyDocument)) { return false; } PropertyDocument other = (PropertyDocument) o2; // Note: property id already compared by equalsTermedDocument() return equalsTermedDocument(o1, other) && o1.getDatatype().equals(other.getDatatype()) && o1.getStatementGroups().equals(other.getStatementGroups()); }
/** * Returns true if the parameters are two {@link PropertyDocument} objects * with exactly the same data. It does not matter if they are different * implementations of the interface as long as their content is the same. * * @param o1 * the first object to compare * @param o2 * the second object to compare * @return true if both objects are equal */ public static boolean equalsPropertyDocument(PropertyDocument o1, Object o2) { if (o2 == o1) { return true; } if (!(o2 instanceof PropertyDocument)) { return false; } PropertyDocument other = (PropertyDocument) o2; // Note: property id already compared by equalsTermedDocument() return equalsTermedDocument(o1, other) && o1.getDatatype().equals(other.getDatatype()) && o1.getStatementGroups().equals(other.getStatementGroups()); }
.getStatementGroups()) { if (!sg.getProperty().getId().equals(this.uriPatternPropertyId)) { continue;
public PropertyDocument filter(PropertyDocument property) { return dataObjectFactory.getPropertyDocument( property.getEntityId(), filterMonoLingualTextValues(property.getLabels().values()), filterMonoLingualTextValues(property.getDescriptions().values()), filterMonoLingualTextValues(flatten(property.getAliases().values())), filterStatementGroups(property.getStatementGroups()), property.getDatatype(), property.getRevisionId() ); }
public PropertyDocument filter(PropertyDocument property) { return dataObjectFactory.getPropertyDocument( property.getEntityId(), filterMonoLingualTextValues(property.getLabels().values()), filterMonoLingualTextValues(property.getDescriptions().values()), filterMonoLingualTextValues(flatten(property.getAliases().values())), filterStatementGroups(property.getStatementGroups()), property.getDatatype(), property.getRevisionId() ); }
/** * Copies a {@link PropertyDocument}. * * @param object * object to copy * @return copied object */ public PropertyDocument copy(PropertyDocument object) { return dataObjectFactory.getPropertyDocument( copy(object.getEntityId()), copyMonoLingualTextValues(object.getLabels().values()), copyMonoLingualTextValues(object.getDescriptions().values()), copyAliasMap(object.getAliases()), copyStatementGroups(object.getStatementGroups()), copy(object.getDatatype()), object.getRevisionId()); }
/** * Copies a {@link PropertyDocument}. * * @param object * object to copy * @return copied object */ public PropertyDocument copy(PropertyDocument object) { return dataObjectFactory.getPropertyDocument( copy(object.getEntityId()), copyMonoLingualTextValues(object.getLabels().values()), copyMonoLingualTextValues(object.getDescriptions().values()), copyAliasMap(object.getAliases()), copyStatementGroups(object.getStatementGroups()), copy(object.getDatatype()), object.getRevisionId()); }