Skip to content

Commit d07f935

Browse files
committed
Normlize line endings
1 parent bf382e4 commit d07f935

File tree

106 files changed

+6990
-6990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+6990
-6990
lines changed

src/main/java/org/culturegraph/mf/stream/source/OpenerFactory.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.source;
17-
18-
import org.culturegraph.mf.util.ResourceUtil;
19-
import org.culturegraph.mf.util.reflection.ObjectFactory;
20-
21-
/**
22-
* Builds {@link Opener}s
23-
*
24-
* @author Markus Michael Geipel
25-
*
26-
*/
27-
public final class OpenerFactory extends ObjectFactory<Opener> {
28-
public static final String POPERTIES_LOCATION = "metastream-openers.properties";
29-
30-
public OpenerFactory() {
31-
super();
32-
loadClassesFromMap(ResourceUtil.loadProperties(POPERTIES_LOCATION), Opener.class);
33-
}
34-
}
16+
package org.culturegraph.mf.stream.source;
17+
18+
import org.culturegraph.mf.util.ResourceUtil;
19+
import org.culturegraph.mf.util.reflection.ObjectFactory;
20+
21+
/**
22+
* Builds {@link Opener}s
23+
*
24+
* @author Markus Michael Geipel
25+
*
26+
*/
27+
public final class OpenerFactory extends ObjectFactory<Opener> {
28+
public static final String POPERTIES_LOCATION = "metastream-openers.properties";
29+
30+
public OpenerFactory() {
31+
super();
32+
loadClassesFromMap(ResourceUtil.loadProperties(POPERTIES_LOCATION), Opener.class);
33+
}
34+
}

src/main/java/org/culturegraph/mf/stream/source/ResourceOpener.java

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,63 +13,63 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.source;
17-
18-
import java.io.FileNotFoundException;
19-
import java.io.Reader;
20-
import java.io.UnsupportedEncodingException;
21-
22-
import org.culturegraph.mf.exceptions.MetafactureException;
23-
import org.culturegraph.mf.framework.DefaultObjectPipe;
24-
import org.culturegraph.mf.framework.ObjectReceiver;
25-
import org.culturegraph.mf.framework.annotations.Description;
26-
import org.culturegraph.mf.framework.annotations.In;
27-
import org.culturegraph.mf.framework.annotations.Out;
28-
import org.culturegraph.mf.util.ResourceUtil;
29-
30-
31-
32-
/**
33-
* Opens a resource or file and passes a reader for it to the receiver.
34-
*
35-
* @author Christoph Böhme
36-
*
37-
*/
38-
@Description("Opens a resource.")
39-
@In(String.class)
40-
@Out(java.io.Reader.class)
41-
public final class ResourceOpener
42-
extends DefaultObjectPipe<String, ObjectReceiver<Reader>> implements Opener{
43-
44-
private String encoding = "UTF-8";
45-
46-
/**
47-
* Returns the encoding used to open the resource.
48-
*
49-
* @return current default setting
50-
*/
51-
public String getEncoding() {
52-
return encoding;
53-
}
54-
55-
/**
56-
* Sets the encoding used to open the resource.
57-
*
58-
* @param encoding new encoding
59-
*/
60-
public void setEncoding(final String encoding) {
61-
this.encoding = encoding;
62-
}
63-
64-
@Override
65-
public void process(final String file) {
66-
try {
67-
getReceiver().process(ResourceUtil.getReader(file, encoding));
68-
} catch (FileNotFoundException e) {
69-
throw new MetafactureException(e);
70-
} catch (UnsupportedEncodingException e) {
71-
throw new MetafactureException(e);
72-
}
73-
}
74-
75-
}
16+
package org.culturegraph.mf.stream.source;
17+
18+
import java.io.FileNotFoundException;
19+
import java.io.Reader;
20+
import java.io.UnsupportedEncodingException;
21+
22+
import org.culturegraph.mf.exceptions.MetafactureException;
23+
import org.culturegraph.mf.framework.DefaultObjectPipe;
24+
import org.culturegraph.mf.framework.ObjectReceiver;
25+
import org.culturegraph.mf.framework.annotations.Description;
26+
import org.culturegraph.mf.framework.annotations.In;
27+
import org.culturegraph.mf.framework.annotations.Out;
28+
import org.culturegraph.mf.util.ResourceUtil;
29+
30+
31+
32+
/**
33+
* Opens a resource or file and passes a reader for it to the receiver.
34+
*
35+
* @author Christoph Böhme
36+
*
37+
*/
38+
@Description("Opens a resource.")
39+
@In(String.class)
40+
@Out(java.io.Reader.class)
41+
public final class ResourceOpener
42+
extends DefaultObjectPipe<String, ObjectReceiver<Reader>> implements Opener{
43+
44+
private String encoding = "UTF-8";
45+
46+
/**
47+
* Returns the encoding used to open the resource.
48+
*
49+
* @return current default setting
50+
*/
51+
public String getEncoding() {
52+
return encoding;
53+
}
54+
55+
/**
56+
* Sets the encoding used to open the resource.
57+
*
58+
* @param encoding new encoding
59+
*/
60+
public void setEncoding(final String encoding) {
61+
this.encoding = encoding;
62+
}
63+
64+
@Override
65+
public void process(final String file) {
66+
try {
67+
getReceiver().process(ResourceUtil.getReader(file, encoding));
68+
} catch (FileNotFoundException e) {
69+
throw new MetafactureException(e);
70+
} catch (UnsupportedEncodingException e) {
71+
throw new MetafactureException(e);
72+
}
73+
}
74+
75+
}

src/main/java/org/culturegraph/mf/stream/source/StdInOpener.java

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,42 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.source;
17-
18-
import java.io.BufferedReader;
19-
import java.io.InputStreamReader;
20-
import java.io.UnsupportedEncodingException;
21-
22-
import org.culturegraph.mf.framework.DefaultObjectPipe;
23-
import org.culturegraph.mf.framework.ObjectReceiver;
24-
import org.culturegraph.mf.framework.annotations.Description;
25-
import org.culturegraph.mf.framework.annotations.In;
26-
import org.culturegraph.mf.framework.annotations.Out;
27-
28-
29-
/**
30-
* Helper class to open stdin
31-
*
32-
* @author Markus Michael Geipel
33-
*
34-
*/
35-
@Description("Opens a file.")
36-
@In(String.class)
37-
@Out(java.io.Reader.class)
38-
public final class StdInOpener extends DefaultObjectPipe<Object, ObjectReceiver<java.io.Reader>> {
39-
40-
@Override
41-
public void process(final Object notUsed) {
42-
if (notUsed == null) {
43-
BufferedReader stdin;
44-
try {
45-
stdin = new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
46-
} catch (UnsupportedEncodingException e) {
47-
throw new IllegalStateException("UTF-8 not supported", e);
48-
}
49-
getReceiver().process(stdin);
50-
} else {
51-
throw new IllegalArgumentException("Parameter not used. Must be null");
52-
}
53-
}
54-
}
16+
package org.culturegraph.mf.stream.source;
17+
18+
import java.io.BufferedReader;
19+
import java.io.InputStreamReader;
20+
import java.io.UnsupportedEncodingException;
21+
22+
import org.culturegraph.mf.framework.DefaultObjectPipe;
23+
import org.culturegraph.mf.framework.ObjectReceiver;
24+
import org.culturegraph.mf.framework.annotations.Description;
25+
import org.culturegraph.mf.framework.annotations.In;
26+
import org.culturegraph.mf.framework.annotations.Out;
27+
28+
29+
/**
30+
* Helper class to open stdin
31+
*
32+
* @author Markus Michael Geipel
33+
*
34+
*/
35+
@Description("Opens a file.")
36+
@In(String.class)
37+
@Out(java.io.Reader.class)
38+
public final class StdInOpener extends DefaultObjectPipe<Object, ObjectReceiver<java.io.Reader>> {
39+
40+
@Override
41+
public void process(final Object notUsed) {
42+
if (notUsed == null) {
43+
BufferedReader stdin;
44+
try {
45+
stdin = new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
46+
} catch (UnsupportedEncodingException e) {
47+
throw new IllegalStateException("UTF-8 not supported", e);
48+
}
49+
getReceiver().process(stdin);
50+
} else {
51+
throw new IllegalArgumentException("Parameter not used. Must be null");
52+
}
53+
}
54+
}

src/main/java/org/culturegraph/mf/stream/source/StringReader.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.source;
17-
18-
import java.io.Reader;
19-
20-
import org.culturegraph.mf.framework.DefaultObjectPipe;
21-
import org.culturegraph.mf.framework.ObjectReceiver;
22-
import org.culturegraph.mf.framework.annotations.Description;
23-
import org.culturegraph.mf.framework.annotations.In;
24-
import org.culturegraph.mf.framework.annotations.Out;
25-
26-
27-
/**
28-
* Creates a reader for the supplied string and sends it to the receiver.
29-
*
30-
* @author Christoph Böhme
31-
*
32-
*/
33-
@Description("Creates a reader for the supplied string and sends it to the receiver")
34-
@In(String.class)
35-
@Out(java.io.Reader.class)
36-
public final class StringReader
37-
extends DefaultObjectPipe<String, ObjectReceiver<Reader>> {
38-
39-
@Override
40-
public void process(final String str) {
41-
getReceiver().process(new java.io.StringReader(str));
42-
}
43-
44-
}
16+
package org.culturegraph.mf.stream.source;
17+
18+
import java.io.Reader;
19+
20+
import org.culturegraph.mf.framework.DefaultObjectPipe;
21+
import org.culturegraph.mf.framework.ObjectReceiver;
22+
import org.culturegraph.mf.framework.annotations.Description;
23+
import org.culturegraph.mf.framework.annotations.In;
24+
import org.culturegraph.mf.framework.annotations.Out;
25+
26+
27+
/**
28+
* Creates a reader for the supplied string and sends it to the receiver.
29+
*
30+
* @author Christoph Böhme
31+
*
32+
*/
33+
@Description("Creates a reader for the supplied string and sends it to the receiver")
34+
@In(String.class)
35+
@Out(java.io.Reader.class)
36+
public final class StringReader
37+
extends DefaultObjectPipe<String, ObjectReceiver<Reader>> {
38+
39+
@Override
40+
public void process(final String str) {
41+
getReceiver().process(new java.io.StringReader(str));
42+
}
43+
44+
}

src/main/java/org/culturegraph/mf/stream/source/StringSender.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.source;
17-
18-
import org.culturegraph.mf.framework.DefaultObjectPipe;
19-
import org.culturegraph.mf.framework.ObjectReceiver;
20-
21-
22-
/**
23-
* Helper class to start a pipe with a {@link String}
24-
*
25-
* @author Markus Michael Geipel
26-
*/
27-
public final class StringSender extends DefaultObjectPipe<Object, ObjectReceiver<String>>{
28-
29-
private final String string;
30-
31-
public StringSender(final String string) {
32-
this.string = string;
33-
}
34-
35-
@Override
36-
public void process(final Object notUsed) {
37-
if(notUsed==null){
38-
getReceiver().process(string);
39-
}else{
40-
throw new IllegalArgumentException("Parameter not used. Must be null");
41-
}
42-
}
43-
44-
}
16+
package org.culturegraph.mf.stream.source;
17+
18+
import org.culturegraph.mf.framework.DefaultObjectPipe;
19+
import org.culturegraph.mf.framework.ObjectReceiver;
20+
21+
22+
/**
23+
* Helper class to start a pipe with a {@link String}
24+
*
25+
* @author Markus Michael Geipel
26+
*/
27+
public final class StringSender extends DefaultObjectPipe<Object, ObjectReceiver<String>>{
28+
29+
private final String string;
30+
31+
public StringSender(final String string) {
32+
this.string = string;
33+
}
34+
35+
@Override
36+
public void process(final Object notUsed) {
37+
if(notUsed==null){
38+
getReceiver().process(string);
39+
}else{
40+
throw new IllegalArgumentException("Parameter not used. Must be null");
41+
}
42+
}
43+
44+
}

0 commit comments

Comments
 (0)