-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring, add converter instantiation
- Loading branch information
Showing
10 changed files
with
148 additions
and
84 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
src/main/java/org/ld4l/bib2lod/clean/marcxml/MarcxmlCleaner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package org.ld4l.bib2lod.clean.marcxml; | ||
|
||
import org.ld4l.bib2lod.clean.BaseCleaner; | ||
import org.ld4l.bib2lod.configuration.Configuration; | ||
|
||
public class MarcxmlCleaner extends BaseCleaner { | ||
|
||
public MarcxmlCleaner() { | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/org/ld4l/bib2lod/conversion/BaseConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.ld4l.bib2lod.conversion; | ||
|
||
import java.io.File; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.ld4l.bib2lod.configuration.Configuration; | ||
|
||
// TODO Does this do anything? If not, remove | ||
public abstract class BaseConverter implements Converter { | ||
|
||
private static final Logger LOGGER = | ||
LogManager.getLogger(BaseConverter.class); | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
.../bib2lod/conversion/MarcxmlToLd4lRdf.java → ...g/ld4l/bib2lod/conversion/BaseRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
src/main/java/org/ld4l/bib2lod/conversion/BaseRecordConverter.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.ld4l.bib2lod.conversion; | ||
|
||
import java.io.File; | ||
|
||
public interface Converter { | ||
|
||
public String convertFile(String text); | ||
|
||
public String convertFile(File file); | ||
|
||
// public String convertRecord(Record record); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.ld4l.bib2lod.conversion; | ||
|
||
public interface Record { | ||
|
||
} |
25 changes: 12 additions & 13 deletions
25
...l/bib2lod/conversion/RecordConverter.java → ...d/conversion/to_rdf/MarcxmlToLd4lRdf.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
package org.ld4l.bib2lod.conversion; | ||
package org.ld4l.bib2lod.conversion.to_rdf; | ||
|
||
import java.io.File; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.ld4l.bib2lod.configuration.Configuration; | ||
import org.ld4l.bib2lod.conversion.BaseConverter; | ||
|
||
public class MarcxmlToLd4lRdf extends BaseConverter { | ||
|
||
// TODO figure out whether we need an interface and/or base class | ||
public class RecordConverter { | ||
|
||
private static final Logger LOGGER = | ||
LogManager.getLogger(RecordConverter.class); | ||
|
||
|
||
public RecordConverter(Configuration config) { | ||
// from config, get cleaner, parser, converters and instantiate all | ||
|
||
} | ||
LogManager.getLogger(MarcxmlToLd4lRdf.class); | ||
|
||
@Override | ||
public String convertFile(File file) { | ||
// TODO Auto-generated method stub | ||
|
||
// Loop through records. For each: clean, parse, and loop through | ||
// converters to convert | ||
// TODO Do we need a Record implementation? | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public String convertFile(String text) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters