org.myskua.sac.client
Class SacUtils

java.lang.Object
  extended by org.myskua.sac.client.SacUtils

public class SacUtils
extends java.lang.Object

Class implementing static utility methods that might be useful to a variety of SacClient implementations.


Constructor Summary
SacUtils()
           
 
Method Summary
static java.lang.String getValidClaimMimeTypes()
          Returns a comma-separated list of the allowed mime-types for claims, suitable for use in error messages.
static java.lang.String getValidResultsMimeTypes()
          Returns a comma-separated list of the allowed mime-types for SPARQL query results, * suitable for use in error messages.
static boolean validClaimMimeType(java.lang.String metadataType)
          Checks that the supplied mime-type is an allowed one for claims.
static boolean validResultsMimeType(java.lang.String metadataType)
          Checks that the supplied mime-type is an allowed one for SPARQL query results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SacUtils

public SacUtils()
Method Detail

validClaimMimeType

public static boolean validClaimMimeType(java.lang.String metadataType)
Checks that the supplied mime-type is an allowed one for claims.

Parameters:
metadataType - The mime-type to be checked
Returns:
Returns true if mime-type is allowed, false otherwise

getValidClaimMimeTypes

public static java.lang.String getValidClaimMimeTypes()
Returns a comma-separated list of the allowed mime-types for claims, suitable for use in error messages.

Returns:
String containing the allowed mime-types for claims.

validResultsMimeType

public static boolean validResultsMimeType(java.lang.String metadataType)
Checks that the supplied mime-type is an allowed one for SPARQL query results. Note that not all kinds of query can return all kinds of result, so this test is not completely reliable for checking that a particular query can return results formatted according to a particular mime-type.

Parameters:
metadataType - The mime-type to be checked
Returns:
Returns true if mime-type is allowed, false otherwise

getValidResultsMimeTypes

public static java.lang.String getValidResultsMimeTypes()
Returns a comma-separated list of the allowed mime-types for SPARQL query results, * suitable for use in error messages.

Returns:
String containing the allowed mime-types for query results.