Loading histream-core/src/main/java/de/sekmi/histream/DateTimeAccuracy.java +3 −1 Original line number Diff line number Diff line Loading @@ -193,7 +193,8 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy> * [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] * @param str ISO 8601 string * @return date time with accuracy as derived from parse * @throws IllegalArgumentException for unparsable string * @throws ParseException for unparsable string * @throws IllegalArgumentException unparsable string (old unchecked exception) */ public static DateTimeAccuracy parsePartialIso8601(String str)throws ParseException{ if( str.length() < 4 )throw new ParseException("Need at least 4 characters for year: "+str, str.length()); Loading @@ -206,6 +207,7 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy> }else if( str.charAt(4) != '-' ){ throw new ParseException("Expected YYYY-MM", 4); } // TODO replace IllegalArgumentException with ParseException!! // parse month int month = Integer.parseInt(str.substring(5, 7)); if( str.length() == 7 ){ // specified to accuracy of months Loading histream-core/src/main/java/de/sekmi/histream/ontology/Concept.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public interface Concept { * <p> * The part relationship is different from the narrower relationship * in the sense that {@link #getNarrower()} will point to more specific concepts while * {@link #getParts()} will divide the concept in the sense of a whole/part relationship. * {@link #getParts(boolean)} will divide the concept in the sense of a whole/part relationship. * @param inherited whether to return parts which are inherited from broader concepts. * @return concepts which are part of this concept, or {@code null} if this concept cannot be divided. * @throws OntologyException for ontology errors Loading Loading
histream-core/src/main/java/de/sekmi/histream/DateTimeAccuracy.java +3 −1 Original line number Diff line number Diff line Loading @@ -193,7 +193,8 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy> * [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] * @param str ISO 8601 string * @return date time with accuracy as derived from parse * @throws IllegalArgumentException for unparsable string * @throws ParseException for unparsable string * @throws IllegalArgumentException unparsable string (old unchecked exception) */ public static DateTimeAccuracy parsePartialIso8601(String str)throws ParseException{ if( str.length() < 4 )throw new ParseException("Need at least 4 characters for year: "+str, str.length()); Loading @@ -206,6 +207,7 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy> }else if( str.charAt(4) != '-' ){ throw new ParseException("Expected YYYY-MM", 4); } // TODO replace IllegalArgumentException with ParseException!! // parse month int month = Integer.parseInt(str.substring(5, 7)); if( str.length() == 7 ){ // specified to accuracy of months Loading
histream-core/src/main/java/de/sekmi/histream/ontology/Concept.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public interface Concept { * <p> * The part relationship is different from the narrower relationship * in the sense that {@link #getNarrower()} will point to more specific concepts while * {@link #getParts()} will divide the concept in the sense of a whole/part relationship. * {@link #getParts(boolean)} will divide the concept in the sense of a whole/part relationship. * @param inherited whether to return parts which are inherited from broader concepts. * @return concepts which are part of this concept, or {@code null} if this concept cannot be divided. * @throws OntologyException for ontology errors Loading