Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/237#discussion_r143049693 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/functions/OWLTime.java --- @@ -0,0 +1,147 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rya.api.functions; + +import org.openrdf.model.URI; +import org.openrdf.model.ValueFactory; +import org.openrdf.model.impl.ValueFactoryImpl; + +/** + * Constants for OWL-Time primitives in the OWL-Time namespace. + * + */ +public class OWLTime { + + /** + * Indicates namespace of OWL-Time ontology + */ + public static final String NAMESPACE = "http://www.w3.org/2006/time#"; + /** + * Seconds class of type DurationDescription in OWL-Time ontology + */ + public static final URI SECONDS_URI; + /** + * Minutes class of type DurationDescription in OWL-Time ontology + */ + public static final URI MINUTES_URI; + /** + * Hours class of type DurationDescription in OWL-Time ontology + */ + public static final URI HOURS_URI; + /** + * Days class of type DurationDescription in OWL-Time ontology + */ + public static final URI DAYS_URI; + /** + * Weeks class of type DurationDescription in OWL-Time ontology + */ + public static final URI WEEKS_URI; + /** + * Months class of type DurationDescription in OWL-Time ontology + */ + public static final URI MONTHS_URI; + /** + * Years class of type DurationDescription in OWL-Time ontology + */ + public static final URI YEARS_URI; + + public static boolean isValidDurationType(URI duration) { --- End diff -- This method could also be on the Duration enumeration. Or just get and if it doesn't find a value for the provided URI, then it is implicitly not a valid Duration type.
---