Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Mar 31, 2013
1 parent 6cf7a04 commit 01387e8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/main/java/gedcom2sem/gedsem/Transform.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

public class Transform
{

/**
* Converts a file with extension ged into a semantic document. Files with rules are used to replace
* the initial triplyfied gedcom tags. Additional semantic documents enrich the gedcom source.
Expand Down
70 changes: 51 additions & 19 deletions src/test/java/gedcom2sem/BatchExamples.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,48 @@

public class BatchExamples
{
private static final String TEST = "src/test/resources/";
/** built in resources */
private static final String MAIN = "src/main/resources/";
private static final String QUERY_DIR = "src/main/resources/reports/";
private static final String RULES = "src/main/resources/rules/";

/** See {@link Convert#main} */
/** Examples of input / configuration files */
private static final String TEST = "src/test/resources/";

/**
* Converts a file with extension ged into semantic statements. The gedcom tags are simply turned
* into predicates and type values.
*
* @throws GedcomParserException
* @throws IOException
* @throws FileNotFoundException
*/
@Test
public void convertTTL() throws FileNotFoundException, IOException, GedcomParserException
{
Convert.main(RULES + "basic.rules", RULES + "additional.rules", //
MAIN + "prefixes.ttl", TEST + "geoMashup.rules", //
TEST + "kennedy.ged", "target/kennedy.ttl");
Convert.main(//
MAIN + "prefixes.ttl", //
MAIN + "rules/basic.rules", //
MAIN + "rules/additional.rules", //
TEST + "geoMashup.rules", //
TEST + "kennedy.ged", //
"target/kennedy.ttl");
}

/** See {@link Transform#main} */
/**
* Converts a file with extension ged into a semantic document. Files with rules are used to replace
* the initial triplyfied gedcom tags. Additional semantic documents enrich the gedcom source.
*
* @throws GedcomParserException
* @throws IOException
* @throws FileNotFoundException
*/
@Test
public void transform() throws FileNotFoundException, IOException, GedcomParserException
{
// TODO fix blind nodes caused by INDI records not in a FAM record
// these are typically authors of the gedcom or SOUR entities
// TODO multiply birth/marriage for other event types (after review)
Transform.main(MAIN + "prefixes.ttl", //
Transform.main(//
MAIN + "prefixes.ttl", //
TEST + "geoMashup.rules", // causes blind nodes for not handled types of events
MAIN + "rules/foaf.rules", //
MAIN + "rules/bio/child.rules",//
Expand All @@ -55,50 +75,62 @@ public void transform() throws FileNotFoundException, IOException, GedcomParserE
MAIN + "rules/provenance/publisher.rules", //
MAIN + "rules/provenance/modified.rules", //
// I/O
TEST + "kennedy.ged", "target/kennedy2.ttl");
TEST + "kennedy.ged", //
"target/kennedy2.ttl");
}

@Test
public void prepareMashup() throws Exception
{
Select.main(TEST + "kennedy.ttl", TEST + "geoNamesCache.ttl", //
QUERY_DIR + "mashup.arq", "target/mashup.txt");
Select.main(//
TEST + "kennedy.ttl", //
TEST + "geoNamesCache.ttl", //
MAIN + "reports/mashup.arq", //
"target/mashup.txt");
}

@Test
public void prepareMashupWithFolder() throws Exception
{
Select.main(TEST, QUERY_DIR + "mashup.arq", "target/mashup.tsv");
Select.main(TEST, //
MAIN + "reports/mashup.arq", //
"target/mashup.tsv");
}

@Test
public void toHtml() throws Exception
{
Select.main(TEST + "kennedy.ttl", MAIN + "result-to-html.xsl", QUERY_DIR + "CountEventsPerPlace.arq", "target/report.html");
Select.main(TEST + "kennedy.ttl", //
MAIN + "result-to-html.xsl", //
MAIN + "reports/CountEventsPerPlace.arq", //
"target/report.html");
}

@Test
public void migrations() throws Exception
{
KmlGenerator.main(TEST + "kennedy.ttl", TEST + "geoNamesCache.ttl",//
MAIN + "kml-by-birth.properties", QUERY_DIR + "places-by-birth.arq", "target/places1.kml");
KmlGenerator.main(TEST + "kennedy.ttl", //
TEST + "geoNamesCache.ttl",//
MAIN + "kml-by-birth.properties", //
MAIN + "reports/places-by-birth.arq", //
"target/places1.kml");
}

@Test
public void migrationsWithFolder() throws Exception
{
KmlGenerator.main(MAIN + "kml-by-birth.properties", TEST, QUERY_DIR + "places-by-birth.arq", "target/birthPlaces.kml");
KmlGenerator.main(MAIN + "kml-by-birth.properties", TEST, MAIN + "reports/places-by-birth.arq", "target/birthPlaces.kml");
}

@Test
public void birthPlacesFirstStep() throws Exception
{
Select.main(TEST, QUERY_DIR + "places-by-birth.arq", "target/birthPlaces.txt");
Select.main(TEST, MAIN + "reports/places-by-birth.arq", "target/birthPlaces.txt");
}

@Test
public void mariagePlacesFirstStep() throws Exception
{
Select.main(TEST, QUERY_DIR + "places-by-birth.arq", "target/marrigaePlaces.txt");
Select.main(TEST, MAIN + "reports/places-by-birth.arq", "target/marrigaePlaces.txt");
}
}
Binary file modified wiki-images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions wiki-images/overview/overview.graphml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ for custom queries<y:LabelModel>
<y:Geometry height="70.59238897951627" width="137.58056640625" x="60.99967484024779" y="171.03671464488093"/>
<y:Fill color="#EBF6CB" color2="#99CC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.0" horizontalTextPosition="right" iconTextGap="4" image="2" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="84.8251953125" x="4.0" y="4.0">foafBio.rules</y:NodeLabel>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.0" horizontalTextPosition="right" iconTextGap="4" image="2" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="128.7802734375" x="4.0" y="4.0">foaf.rules; bio/*.rules</y:NodeLabel>
</y:GenericNode>
</data>
</node>
Expand All @@ -267,7 +267,7 @@ for custom queries<y:LabelModel>
<y:Geometry height="70.59238897951627" width="137.58056640625" x="9.89139298213746" y="219.6248419398625"/>
<y:Fill color="#EBF6CB" color2="#99CC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.0" horizontalTextPosition="right" iconTextGap="4" image="2" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="106.9248046875" x="4.0" y="4.0">provenance.rules</y:NodeLabel>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.0" horizontalTextPosition="right" iconTextGap="4" image="2" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="116.98828125" x="4.0" y="4.0">provenance/*.rules</y:NodeLabel>
</y:GenericNode>
</data>
</node>
Expand Down

0 comments on commit 01387e8

Please sign in to comment.