File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/org/culturegraph/mf/stream/pipe Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,27 @@ public final class RdfMacroPipe extends DefaultStreamPipe<StreamReceiver> {
38
38
public static final String RDF_REFERENCE = "~rdf:resource" ;
39
39
public static final String RDF_ABOUT = "~rdf:about" ;
40
40
public static final String XML_LANG = "~xml:lang" ;
41
+ private String autoAddedSubject = "" ;
41
42
43
+ public void setAutoAddedSubject (final String autoAddedSubject ) {
44
+ this .autoAddedSubject = autoAddedSubject ;
45
+ }
46
+
47
+
42
48
@ Override
43
49
public void startRecord (final String identifier ) {
44
50
getReceiver ().startRecord (identifier );
51
+ if (!autoAddedSubject .isEmpty ()){
52
+ getReceiver ().startEntity (autoAddedSubject );
53
+ getReceiver ().literal (RDF_ABOUT , identifier );
54
+ }
45
55
}
46
56
47
57
@ Override
48
58
public void endRecord () {
59
+ if (!autoAddedSubject .isEmpty ()){
60
+ getReceiver ().endEntity ();
61
+ }
49
62
getReceiver ().endRecord ();
50
63
}
51
64
You can’t perform that action at this time.
0 commit comments