@Override public void processPropertyDocument(PropertyDocument propertyDocument) { this.countProperties++; PropertyRecord propertyRecord = getPropertyRecord(propertyDocument.getEntityId()); propertyRecord.propertyDocument = propertyDocument; }
@Override public void processPropertyDocument(PropertyDocument propertyDocument) { this.countProperties++; PropertyRecord propertyRecord = getPropertyRecord(propertyDocument .getEntityId()); propertyRecord.propertyDocument = propertyDocument; }
if (DatatypeIdValue.DT_STRING.equals(pd.getDatatype().getIri()) && pd.getLabels().containsKey("en")) { stringProperties.add(pd.getEntityId()); System.out.println("* Found string property " + pd.getEntityId().getId() + " (" + pd.getLabels().get("en") + ")");
if (DatatypeIdValue.DT_STRING.equals(pd.getDatatype().getIri()) && pd.getLabels().containsKey("en")) { stringProperties.add(pd.getEntityId()); System.out.println("* Found string property " + pd.getEntityId().getId() + " (" + pd.getLabels().get("en") + ")");
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() ); }
/** * 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(PropertyDocument o) { return "==PropertyDocument " + o.getEntityId().getIri() + " (r" + o.getRevisionId() + ") ==\n" + "* Datatype: " + o.getDatatype() + toStringForTermedDocument(o) + toStringForStatementDocument(o); }
/** * 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(PropertyDocument o) { return "==PropertyDocument " + o.getEntityId().getIri() + " (r" + o.getRevisionId() + ") ==\n" + "* Datatype: " + o.getDatatype() + toStringForTermedDocument(o) + toStringForStatementDocument(o); }
Resource subject = this.rdfWriter.getUri(document.getEntityId() .getIri()); this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter .getUri(Vocabulary.WB_DIRECT_CLAIM_PROP), Vocabulary .getPropertyUri(document.getEntityId(), PropertyContext.DIRECT)); document.getEntityId(), PropertyContext.STATEMENT)); .getPropertyUri(document.getEntityId(), PropertyContext.VALUE_SIMPLE)); Vocabulary.getPropertyUri(document.getEntityId(), PropertyContext.VALUE)); .getPropertyUri(document.getEntityId(), PropertyContext.QUALIFIER_SIMPLE)); .getPropertyUri(document.getEntityId(), PropertyContext.QUALIFIER)); .getPropertyUri(document.getEntityId(), PropertyContext.REFERENCE_SIMPLE)); .getPropertyUri(document.getEntityId(), PropertyContext.REFERENCE)); .getPropertyUri(document.getEntityId(), PropertyContext.NO_VALUE));
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() ); }
@Override public void processPropertyDocument(PropertyDocument propertyDocument) { PropertyRecord pr = getPropertyRecord(propertyDocument.getEntityId()); pr.label = propertyDocument.findLabel("en");
String data = JsonSerializer.getJsonString(propertyDocument); return (PropertyDocument) this.wbEditingAction.wbEditEntity( propertyDocument.getEntityId().getId(), null, null, null, data, clear, this.editAsBot, propertyDocument.getRevisionId(), summary);
String data = JsonSerializer.getJsonString(propertyDocument); return (PropertyDocument) this.wbEditingAction.wbEditEntity( propertyDocument.getEntityId().getId(), null, null, null, data, clear, this.editAsBot, propertyDocument.getRevisionId(), summary);
/** * 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()); }
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(); }
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(); }