/** * Copy constructor. */ public DatatypeIdImpl(DatatypeIdValue other) { this.iri = other.getIri(); }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(DatatypeIdValue o) { return o.getIri(); }
/** * Copy constructor. */ public DatatypeIdImpl(DatatypeIdValue other) { this.iri = other.getIri(); }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(DatatypeIdValue o) { return o.getIri(); }
/** * 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(DatatypeIdValue o) { return o.getIri().hashCode(); }
/** * 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(DatatypeIdValue o) { return o.getIri().hashCode(); }
/** * Returns true if the parameters are two {@link DatatypeIdValue} 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 equalsDatatypeIdValue(DatatypeIdValue o1, Object o2) { if (o2 == null) { return false; } if (o2 == o1) { return true; } return o2 instanceof DatatypeIdValue && o1.getIri().equals(((DatatypeIdValue) o2).getIri()); }
/** * Returns true if the parameters are two {@link DatatypeIdValue} 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 equalsDatatypeIdValue(DatatypeIdValue o1, Object o2) { if (o2 == null) { return false; } if (o2 == o1) { return true; } return o2 instanceof DatatypeIdValue && o1.getIri().equals(((DatatypeIdValue) o2).getIri()); }
/** * Copies a {@link DatatypeIdValue}. * * @param object * object to copy * @return copied object */ public DatatypeIdValue copy(DatatypeIdValue object) { return dataObjectFactory.getDatatypeIdValue(object.getIri()); }
/** * Copies a {@link DatatypeIdValue}. * * @param object * object to copy * @return copied object */ public DatatypeIdValue copy(DatatypeIdValue object) { return dataObjectFactory.getDatatypeIdValue(object.getIri()); }
for (EntityDocument ed : results.values()) { PropertyDocument pd = (PropertyDocument) ed; if (DatatypeIdValue.DT_STRING.equals(pd.getDatatype().getIri()) && pd.getLabels().containsKey("en")) { stringProperties.add(pd.getEntityId());
for (EntityDocument ed : results.values()) { PropertyDocument pd = (PropertyDocument) ed; if (DatatypeIdValue.DT_STRING.equals(pd.getDatatype().getIri()) && pd.getLabels().containsKey("en")) { stringProperties.add(pd.getEntityId());
.getDatatype().getIri(); this.datatypes.put(entry.getKey(), datatype); logger.info("Fetched type information for property "
public void writePropertyDocument(PropertyDocument document) throws RDFHandlerException { propertyTypes.setPropertyType(document.getPropertyId(), document .getDatatype().getIri()); if (!hasTask(RdfSerializer.TASK_PROPERTIES)) { return; } String propertyUri = document.getEntityId().getIri(); Resource subject = this.rdfWriter.getUri(propertyUri); this.rdfWriter.writeTripleValueObject(subject, RdfWriter.RDF_TYPE, RdfWriter.WB_PROPERTY); writeDocumentTerms(subject, document); if (hasTask(RdfSerializer.TASK_DATATYPES)) { this.rdfWriter.writeTripleValueObject(subject, RdfWriter.WB_PROPERTY_TYPE, this.rdfWriter.getUri(document.getDatatype().getIri())); } if (hasTask(RdfSerializer.TASK_STATEMENTS)) { writeStatements(subject, document); } this.snakRdfConverter.writeAuxiliaryTriples(); this.owlDeclarationBuffer.writePropertyDeclarations(this.rdfWriter, hasTask(RdfSerializer.TASK_STATEMENTS), hasTask(RdfSerializer.TASK_SIMPLE_STATEMENTS)); this.referenceRdfConverter.writeReferences(); }
public void writePropertyDocument(PropertyDocument document) throws RDFHandlerException { propertyRegister.setPropertyType(document.getEntityId(), document .getDatatype().getIri()); if (!hasTask(RdfSerializer.TASK_PROPERTIES)) { return; } String propertyUri = document.getEntityId().getIri(); Resource subject = this.rdfWriter.getUri(propertyUri); this.rdfWriter.writeTripleValueObject(subject, RdfWriter.RDF_TYPE, RdfWriter.WB_PROPERTY); writeDocumentTerms(subject, document); if (hasTask(RdfSerializer.TASK_DATATYPES)) { this.rdfWriter.writeTripleValueObject(subject, RdfWriter.WB_PROPERTY_TYPE, this.rdfWriter.getUri(document.getDatatype().getIri())); } if (hasTask(RdfSerializer.TASK_STATEMENTS)) { writeStatements(subject, document); } if (hasTask(RdfSerializer.TASK_PROPERTY_LINKS)) { writeInterPropertyLinks(document); } this.snakRdfConverter.writeAuxiliaryTriples(); this.owlDeclarationBuffer.writePropertyDeclarations(this.rdfWriter, hasTask(RdfSerializer.TASK_STATEMENTS), hasTask(RdfSerializer.TASK_SIMPLE_STATEMENTS)); this.referenceRdfConverter.writeReferences(); }