forked from UCDenver-ccp/datasource
-
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.
Added handling for non-normalized (no URI) and erroneous identifiers
Instead of being excluded from the output RDF they are now cataloged as either NonNormalizedIdentifierRecords or ErroneousIdentifierRecords.
- Loading branch information
1 parent
eca2ca9
commit f85466a
Showing
8 changed files
with
771 additions
and
270 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.../main/java/edu/ucdenver/ccp/datasource/identifiers/ProbableErrorDataSourceIdentifier.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
34 changes: 34 additions & 0 deletions
34
...rs/src/main/java/edu/ucdenver/ccp/datasource/identifiers/UnknownDataSourceIdentifier.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
72 changes: 72 additions & 0 deletions
72
.../src/main/java/edu/ucdenver/ccp/datasource/rdfizer/rdf/ice/ErroneousIdentifierRecord.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,72 @@ | ||
package edu.ucdenver.ccp.datasource.rdfizer.rdf.ice; | ||
|
||
/* | ||
* #%L | ||
* Colorado Computational Pharmacology's datasource | ||
* project | ||
* %% | ||
* Copyright (C) 2012 - 2016 Regents of the University of Colorado | ||
* %% | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the Regents of the University of Colorado nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software without | ||
* specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
* OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* #L% | ||
*/ | ||
|
||
import edu.ucdenver.ccp.datasource.fileparsers.Record; | ||
import edu.ucdenver.ccp.datasource.fileparsers.RecordField; | ||
import edu.ucdenver.ccp.datasource.identifiers.DataSource; | ||
|
||
@Record(dataSource = DataSource.KABOB) | ||
public class ErroneousIdentifierRecord { | ||
|
||
@RecordField | ||
private final String identifier; | ||
|
||
@RecordField | ||
private final String datasource; | ||
|
||
@RecordField | ||
private final String comment; | ||
|
||
public ErroneousIdentifierRecord(String identifier, String datasource, String comment) { | ||
super(); | ||
this.identifier = identifier; | ||
this.datasource = datasource; | ||
this.comment = comment; | ||
} | ||
|
||
public String getIdentifier() { | ||
return identifier; | ||
} | ||
|
||
public String getDatasource() { | ||
return datasource; | ||
} | ||
|
||
public String getComment() { | ||
return comment; | ||
} | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
.../main/java/edu/ucdenver/ccp/datasource/rdfizer/rdf/ice/NonNormalizedIdentifierRecord.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,64 @@ | ||
package edu.ucdenver.ccp.datasource.rdfizer.rdf.ice; | ||
|
||
/* | ||
* #%L | ||
* Colorado Computational Pharmacology's datasource | ||
* project | ||
* %% | ||
* Copyright (C) 2012 - 2016 Regents of the University of Colorado | ||
* %% | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the Regents of the University of Colorado nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software without | ||
* specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
* OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* #L% | ||
*/ | ||
|
||
import edu.ucdenver.ccp.datasource.fileparsers.Record; | ||
import edu.ucdenver.ccp.datasource.fileparsers.RecordField; | ||
import edu.ucdenver.ccp.datasource.identifiers.DataSource; | ||
|
||
@Record(dataSource = DataSource.KABOB) | ||
public class NonNormalizedIdentifierRecord { | ||
|
||
@RecordField | ||
private final String identifier; | ||
|
||
@RecordField | ||
private final String datasource; | ||
|
||
public NonNormalizedIdentifierRecord(String identifier, String datasource) { | ||
super(); | ||
this.identifier = identifier; | ||
this.datasource = datasource; | ||
} | ||
|
||
public String getIdentifier() { | ||
return identifier; | ||
} | ||
|
||
public String getDatasource() { | ||
return datasource; | ||
} | ||
|
||
} |
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
Oops, something went wrong.