info.sswap.ontologies.data.api
Enum DataFactory.Open

java.lang.Object
  extended by java.lang.Enum<DataFactory.Open>
      extended by info.sswap.ontologies.data.api.DataFactory.Open
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DataFactory.Open>
Enclosing class:
DataFactory

public static enum DataFactory.Open
extends java.lang.Enum<DataFactory.Open>

Directives on how to open data elements for reading and writing.


Enum Constant Summary
AUTO
          Attempt to open for literal data; if there is no data:literalData property on the individual, then attempt to open the individual resource itself for reading/writing.
LITERAL
          Attempt to open for literal data only; throw on failure (no data:literalData property on the individual)
RESOURCE
          Attempt to open for resource data only; throw on failure (an anonymous node or non-URL URI)
 
Method Summary
static DataFactory.Open valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DataFactory.Open[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTO

public static final DataFactory.Open AUTO
Attempt to open for literal data; if there is no data:literalData property on the individual, then attempt to open the individual resource itself for reading/writing. (an anonymous individuals or individuals with non-URL URI may be opened, but they will need an accessor for a successful read/write). Resources used for reading only are never changed; resources used for reading that do not belong to the upper ontology type data:DataFormat always succeed immediately on a trivial read of empty data. Resources used for writing may be changed to type data:DataFormat with the addition of the literal data property data:literalData if and only if required for a successful write. This is suitable for reading or writing to a data source or sink such as SSWAPSubject or SSWAPObject.


LITERAL

public static final DataFactory.Open LITERAL
Attempt to open for literal data only; throw on failure (no data:literalData property on the individual)


RESOURCE

public static final DataFactory.Open RESOURCE
Attempt to open for resource data only; throw on failure (an anonymous node or non-URL URI)

Method Detail

values

public static DataFactory.Open[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DataFactory.Open c : DataFactory.Open.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DataFactory.Open valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.