Skip to content

Commit

Permalink
Create xml package
Browse files Browse the repository at this point in the history
The `xml` package contains modules for working with xml data.
  • Loading branch information
cboehme committed Dec 25, 2016
1 parent 8852fd4 commit 47956d4
Show file tree
Hide file tree
Showing 24 changed files with 21 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.culturegraph.mf.test.reader;

import org.culturegraph.mf.stream.converter.xml.CGXmlHandler;
import org.culturegraph.mf.xml.CGXmlHandler;

/**
* Reads and decodes a <i>Culturegraph XML</i> document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.culturegraph.mf.framework.StreamReceiver;
import org.culturegraph.mf.framework.XmlPipe;
import org.culturegraph.mf.stream.converter.xml.XmlDecoder;
import org.culturegraph.mf.xml.XmlDecoder;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Copyright 2016 Christoph Böhme
* Copyright 2013, 2014 Deutsche Nationalbibliothek
*
* Licensed under the Apache License, Version 2.0 the "License";
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import org.culturegraph.mf.framework.FluxCommand;
import org.culturegraph.mf.framework.FormatException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.sink;
package org.culturegraph.mf.xml;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.sink;
package org.culturegraph.mf.xml;

/**
* This interface declares methods for setting variables used by all record
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import java.io.IOException;
import java.net.URL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import java.io.IOException;
import java.io.Reader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.pipe;
package org.culturegraph.mf.xml;

import java.util.HashSet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.sink;
package org.culturegraph.mf.xml;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/flux-commands.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ decode-mab org.culturegraph.mf.stream.converter.bib.MabDecoder
decode-formeta org.culturegraph.mf.formeta.FormetaDecoder
decode-csv org.culturegraph.mf.stream.converter.CsvDecoder
decode-marc21 org.culturegraph.mf.stream.converter.bib.Marc21Decoder
decode-xml org.culturegraph.mf.stream.converter.xml.XmlDecoder
decode-xml org.culturegraph.mf.xml.XmlDecoder
decode-string org.culturegraph.mf.strings.StringDecoder
regex-decode org.culturegraph.mf.strings.RegexDecoder

read-beacon org.culturegraph.mf.stream.converter.BeaconReader

# XML-Handler:
handle-cg-xml org.culturegraph.mf.stream.converter.xml.CGXmlHandler
handle-generic-xml org.culturegraph.mf.stream.converter.xml.GenericXmlHandler
handle-cg-xml org.culturegraph.mf.xml.CGXmlHandler
handle-generic-xml org.culturegraph.mf.xml.GenericXmlHandler
handle-marcxml org.culturegraph.mf.stream.converter.xml.MarcXmlHandler
handle-picaxml org.culturegraph.mf.stream.converter.xml.PicaXmlHandler
handle-mabxml org.culturegraph.mf.stream.converter.xml.AlephMabXmlHandler
Expand All @@ -72,7 +72,7 @@ from-jdom-document org.culturegraph.mf.stream.converter.JDomDocumentToStream
write org.culturegraph.mf.io.ObjectWriter
write-triples org.culturegraph.mf.triples.TripleWriter
write-triple-objects org.culturegraph.mf.triples.TripleObjectWriter
write-xml-files org.culturegraph.mf.stream.sink.XmlFilenameWriter
write-xml-files org.culturegraph.mf.xml.XmlFilenameWriter
write-files org.culturegraph.mf.io.ObjectFileWriter
print org.culturegraph.mf.io.ObjectStdoutWriter

Expand All @@ -96,7 +96,7 @@ wait-for-inputs org.culturegraph.mf.flowcontrol.CloseSuppressor
defer-stream org.culturegraph.mf.flowcontrol.StreamDeferrer
xml-tee org.culturegraph.mf.plumbing.XmlTee

stream-to-xml org.culturegraph.mf.stream.converter.xml.SimpleXmlEncoder
stream-to-xml org.culturegraph.mf.xml.SimpleXmlEncoder
rdf-macros org.culturegraph.mf.stream.pipe.RdfMacroPipe

batch-log org.culturegraph.mf.stream.pipe.StreamBatchLogger
Expand Down Expand Up @@ -129,7 +129,7 @@ catch-stream-exception org.culturegraph.mf.flowcontrol.StreamExceptionCatcher
normalize-unicode-string org.culturegraph.mf.strings.UnicodeNormalizer
normalize-unicode-stream org.culturegraph.mf.strings.StreamUnicodeNormalizer
split-lines org.culturegraph.mf.strings.LineSplitter
split-xml-elements org.culturegraph.mf.stream.pipe.XmlElementSplitter
split-xml-elements org.culturegraph.mf.xml.XmlElementSplitter

morph org.culturegraph.mf.metamorph.Metamorph
filter org.culturegraph.mf.metamorph.Filter
Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/culturegraph/mf/io/RecordReaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.io.StringReader;

import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.io.RecordReader;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.lang.ref.WeakReference;

import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.triples.AbstractTripleSort;
import org.junit.Before;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.culturegraph.mf.framework.StandardEventNames;
import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.framework.objects.Triple.ObjectType;
import org.culturegraph.mf.triples.StreamToTriples;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.culturegraph.mf.framework.StreamReceiver;
import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.framework.objects.Triple.ObjectType;
import org.culturegraph.mf.triples.TripleCollect;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.triples.TripleFilter;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.framework.objects.Triple.ObjectType;
import org.culturegraph.mf.triples.TripleObjectRetriever;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.nio.file.Paths;

import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.triples.TripleObjectWriter;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.framework.objects.Triple;
import org.culturegraph.mf.framework.objects.Triple.ObjectType;
import org.culturegraph.mf.triples.TripleReader;
import org.culturegraph.mf.triples.TripleWriter;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Copyright 2016 Christoph Böhme
* Copyright 2013, 2014 Deutsche Nationalbibliothek
*
* Licensed under the Apache License, Version 2.0 the "License";
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.verify;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.verify;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.converter.xml;
package org.culturegraph.mf.xml;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.pipe;
package org.culturegraph.mf.xml;

import static org.mockito.Mockito.inOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.culturegraph.mf.stream.sink;
package org.culturegraph.mf.xml;

import static org.junit.Assert.assertEquals;

Expand Down

0 comments on commit 47956d4

Please sign in to comment.