Skip to content

Commit

Permalink
Use a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Apr 19, 2016
1 parent fbf48b2 commit 20703b0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ public static boolean isBNodeIRI(String iri) {
return skolomizedBNodes && iri.startsWith(bNodeLabelStart) ;
}

private static final String URI_PREFIX_FIXUP = "::";

// These two must be in-step.
/** Function applied to undefined prefixes to convert to a URI string */
public static final Function<String,String> fixupPrefixes = (x) -> "::"+x ;
public static final Function<String,String> fixupPrefixes = (x) -> URI_PREFIX_FIXUP.concat(x) ;

/** Function to test for undefined prefix URIs*/
public static final Predicate<String> testFixupedPrefixURI = (x) -> x.startsWith("::") ;
public static final Predicate<String> testFixupedPrefixURI = (x) -> x.startsWith(URI_PREFIX_FIXUP) ;

/** Test whether a IRI is a ARQ-encoded blank node. */
public static boolean isPrefixIRI(String iri) {
Expand Down

0 comments on commit 20703b0

Please sign in to comment.