|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.newsml.toolkit.conformance.Util
Convenient static utility methods for NewsML conformance tests.
Many of the methods in this class depend on the Gnu Regexp Java library.
Field Summary | |
static String |
DATE_REGEXP
Regular expression to validate an ISO 8601 date. |
static String |
URL_REGEXP
Regular expression to validate RFC 1738 URL syntax. |
static String |
URN_REGEXP
Regular expression to validate RFC 2141 URN syntax. |
Constructor Summary | |
Util()
|
Method Summary | |
static boolean |
isDuidRef(String ref)
Test whether a string matches Duid reference syntax. |
static boolean |
isHttpUrl(String url)
Test whether a string matches HTTP URL syntax. |
static boolean |
isISODate(String s)
Test whether a string is an ISO 8601 date (NewsML subset). |
static boolean |
isISOLang(String s)
Test whether a string matches IETF RFC 1766 language syntax. |
static boolean |
isNewsMLUrn(String urn)
Test whether a string matches NewsML URN syntax. |
static boolean |
isUrl(String url)
Test whether a string matches general URL syntax. |
static boolean |
isUrn(String urn)
Test whether a string matches general URN syntax. |
static boolean |
matches(String regexp,
String data)
Match a string against a regular expression. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DATE_REGEXP
This matches only the NewsML subset of the Basic Format.
public static final String URL_REGEXP
public static final String URN_REGEXP
Constructor Detail |
public Util()
Method Detail |
public static boolean matches(String regexp, String data)
regexp
- The regular expression, in Perl5 syntax.data
- The string to match.public static boolean isISODate(String s)
public static boolean isISOLang(String s)
public static boolean isDuidRef(String ref)
public static boolean isNewsMLUrn(String urn)
public static boolean isHttpUrl(String url)
public static boolean isUrl(String url)
public static boolean isUrn(String urn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |