Skip to content

Commit 2f1d952

Browse files
author
lucascuevas
committed
add layer id
1 parent 7830b39 commit 2f1d952

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/app/components/transcribe/semantic-text-editor/semantic-text-editor.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ <h5 class="primary-color-text" >{{'semanticForm.emptyMarker' | translate}}</h5>
2222
</div>
2323
</div>
2424
<app-search-semantic-relationship *ngIf="page && renderedMark && renderedMark.mark && selectRelationship"
25-
[layerName]="layer.name"
25+
[layerName]="layer.name"
26+
[layerid]="layer.id"
2627
[mark]="renderedMark.mark"
2728
(createType)="createType($event)"
2829
(schemeComplete)="proccessScheme($event)">

src/app/components/transcribe/semantic/search-semantic-relationship/search-semantic-relationship.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h6 class="primary-color-text text-align center">No hay relaciones a mostrar</h
4848
</div>
4949
<div class="row" *ngIf="semanticItemSelected && mark">
5050
<div class="col-12">
51-
<app-show-relationship-item [semanticItem]="semanticItemSelected" (finished)="handleResponseComponent($event)">
51+
<app-show-relationship-item [layerid]="layerid" [semanticItem]="semanticItemSelected" (finished)="handleResponseComponent($event)">
5252
</app-show-relationship-item>
5353
</div>
5454
</div>

src/app/components/transcribe/semantic/search-semantic-relationship/search-semantic-relationship.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class SearchSemanticRelationshipComponent implements OnInit {
1212
@ViewChild('showRelationshipDetails') showRelationshipDetails;
1313
@Input() public mark = null;
1414
@Input() public layerName = null;
15+
@Input() public layerid = null;
1516
@Input() public schemeType = null;
1617
@Input() public relationship = null
1718
@Input() public enableheader = true

src/app/components/transcribe/semantic/search-semantic-relationship/show-relationship-item/show-relationship-item.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class ShowRelationshipItemComponent implements OnInit {
1717
@Input() public semanticItem = null;
1818
@Input() public onlyShow = false;
1919
@Input() public isPreviousSave = true;
20+
@Input() public layerid = null;
2021
@Input() showheader = true;
2122
@Output() public finished = new EventEmitter<any>();
2223
type:string;
@@ -34,6 +35,7 @@ export class ShowRelationshipItemComponent implements OnInit {
3435
/**el type puede contener url, estamos manejando prefix asi que sanitisamos por las dudas */
3536
this.type = this.semanticItem['@type'];
3637
this.markView = { slug: SemanticUtils.extractTranscriptorSchema(this.semanticItem['@id']),semanticContribution: { text: this.semanticItem, schema_type: this.type } };
38+
3739
if (ontologies) {
3840
if(!SemanticUtils.isUrl(this.type)){
3941
let prefix = SemanticUtils.getPrefix(this.type);
@@ -62,6 +64,7 @@ export class ShowRelationshipItemComponent implements OnInit {
6264
let ontologyInstance = new ontologyClassInstance();
6365
ontologyInstance.ontologyClass = new OntologyClass();
6466
ontologyInstance.ontologyClass.ontology=this.ontology;
67+
ontologyInstance.layerId=this.layerid;
6568
this.type=this.ontology.prefix+':'+this.type;
6669
let e = this.semanticService.generateJsonld(ontologyInstance, this.semanticItem).then(
6770
function (success) {
@@ -71,7 +74,7 @@ export class ShowRelationshipItemComponent implements OnInit {
7174
e.then(
7275
result => {
7376

74-
this.markView = { slug: SemanticUtils.extractTranscriptorSchema(this.semanticItem['@id']),semanticContribution: { text: result['schema:mainEntity'], type: this.type } };
77+
this.markView = { slug: SemanticUtils.extractTranscriptorSchema(this.semanticItem['@id']), semanticContribution: { text: result['transcriptor:mainEntity'], type: this.type } };
7578
this.compacted=result;
7679
this.loadedRelation=true;
7780
return result;

0 commit comments

Comments
 (0)