org.openanzo.common.rdb.layout
Class NodeType

java.lang.Object
  extended by org.openanzo.common.rdb.layout.NodeType

public class NodeType
extends java.lang.Object

Provides allocation and conversion between RDF Node types and ids used by the node centric layout to reference them. Supports the various RDF Node types and subtypes: URI, LITERAL, Blank, Language and Datatype. Intended to be an internal component of the node layout package.

Author:
Joe Betz
See Also:
CompositeNodeLayout

Field Summary
static NodeType BLANK
          Blank node type
static int BLANK_TYPE
          Blank node type mask
static java.lang.String blankSequence
          Sequence name for blank nodes
static NodeType DATATYPE
          Datatype node type
static int DATATYPE_TYPE
          Datatype node type mask
static java.lang.String datatypeSequence
          Sequence name for datatype strings
static NodeType LANGUAGE
          Language node type
static int LANGUAGE_TYPE
          Language node type mask
static java.lang.String languageSequence
          Sequence name for language strings
static NodeType LITERAL
          Literal node type
static int LITERAL_TYPE
          Literal node type mask
static java.lang.String literalSequence
          Sequence name for literals
static NodeType LONG_LITERAL
          Long Literal node type
static int LONG_LITERAL_TYPE
          Long Literal node type mask
static NodeType LONG_URI
          Long URI node type
static int LONG_URI_TYPE
          Long URI node type mask
static NodeType LONG_XML
          Long XML node type
static int LONG_XML_TYPE
          Long XML node type mask
static java.lang.String longLiteralSequence
          Sequence name for long literals
static java.lang.String longUriSequence
          Sequence name for long URIS
static java.lang.String longXmlSequence
          Sequence name for long XML literals
static java.lang.String sequencePrefix
          Prefix for the names of the sequences
static int typeCount
          Number of types
static NodeType URI
          URI node type
static int URI_TYPE
          URI node type mask
static java.lang.String uriSequence
          Sequence name for URIs
static NodeType XML
          XML node type
static int XML_TYPE
          XML node type mask
static java.lang.String xmlSequence
          Sequence name for XML literals
 
Method Summary
static NodeType getById(long id)
          Get the NodeType for the given node ID
static NodeType getLongLayout(org.openrdf.model.Value n)
          Get the long NodeType for this Value
 java.lang.String getName(java.lang.String containerName)
          Get a table name consisting of the suffix appended to the end of the container name
 int getRange()
          Get the id of NodeType out of the 16 possible type ids
static NodeType getShortLayout(org.openrdf.model.Value n)
          Get the regular NodeType for this Value
 java.lang.String getSuffix()
          Get the suffix which is appended to the end of the container name to generate the table name for this type
static long getTypeId(long id)
          Get the type id for the given node ID
 long getTypeMask()
          The typeMake for this nodeType
 java.lang.String getValue()
          Get the string representation of NodeType
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sequencePrefix

public static final java.lang.String sequencePrefix
Prefix for the names of the sequences

See Also:
Constant Field Values

blankSequence

public static final java.lang.String blankSequence
Sequence name for blank nodes

See Also:
Constant Field Values

uriSequence

public static final java.lang.String uriSequence
Sequence name for URIs

See Also:
Constant Field Values

literalSequence

public static final java.lang.String literalSequence
Sequence name for literals

See Also:
Constant Field Values

xmlSequence

public static final java.lang.String xmlSequence
Sequence name for XML literals

See Also:
Constant Field Values

longLiteralSequence

public static final java.lang.String longLiteralSequence
Sequence name for long literals

See Also:
Constant Field Values

longXmlSequence

public static final java.lang.String longXmlSequence
Sequence name for long XML literals

See Also:
Constant Field Values

longUriSequence

public static final java.lang.String longUriSequence
Sequence name for long URIS

See Also:
Constant Field Values

datatypeSequence

public static final java.lang.String datatypeSequence
Sequence name for datatype strings

See Also:
Constant Field Values

languageSequence

public static final java.lang.String languageSequence
Sequence name for language strings

See Also:
Constant Field Values

typeCount

public static final int typeCount
Number of types

See Also:
Constant Field Values

BLANK_TYPE

public static final int BLANK_TYPE
Blank node type mask

See Also:
Constant Field Values

URI_TYPE

public static final int URI_TYPE
URI node type mask

See Also:
Constant Field Values

LITERAL_TYPE

public static final int LITERAL_TYPE
Literal node type mask

See Also:
Constant Field Values

XML_TYPE

public static final int XML_TYPE
XML node type mask

See Also:
Constant Field Values

LONG_LITERAL_TYPE

public static final int LONG_LITERAL_TYPE
Long Literal node type mask

See Also:
Constant Field Values

LONG_XML_TYPE

public static final int LONG_XML_TYPE
Long XML node type mask

See Also:
Constant Field Values

LONG_URI_TYPE

public static final int LONG_URI_TYPE
Long URI node type mask

See Also:
Constant Field Values

DATATYPE_TYPE

public static final int DATATYPE_TYPE
Datatype node type mask

See Also:
Constant Field Values

LANGUAGE_TYPE

public static final int LANGUAGE_TYPE
Language node type mask

See Also:
Constant Field Values

BLANK

public static final NodeType BLANK
Blank node type


URI

public static final NodeType URI
URI node type


LITERAL

public static final NodeType LITERAL
Literal node type


XML

public static final NodeType XML
XML node type


LONG_LITERAL

public static final NodeType LONG_LITERAL
Long Literal node type


LONG_XML

public static final NodeType LONG_XML
Long XML node type


LONG_URI

public static final NodeType LONG_URI
Long URI node type


DATATYPE

public static final NodeType DATATYPE
Datatype node type


LANGUAGE

public static final NodeType LANGUAGE
Language node type

Method Detail

getTypeId

public static long getTypeId(long id)
Get the type id for the given node ID

Parameters:
id - node ID to lookup
Returns:
type ID for given node ID

getById

public static NodeType getById(long id)
Get the NodeType for the given node ID

Parameters:
id - node ID
Returns:
NodeType for the given node ID

getShortLayout

public static NodeType getShortLayout(org.openrdf.model.Value n)
Get the regular NodeType for this Value

Parameters:
n - value for which to retrieve NodeType
Returns:
the regular NodeType for this Value

getLongLayout

public static NodeType getLongLayout(org.openrdf.model.Value n)
Get the long NodeType for this Value

Parameters:
n - value for which to retrieve NodeType
Returns:
the long NodeType for this Value

getValue

public java.lang.String getValue()
Get the string representation of NodeType

Returns:
the string representation of NodeType

getSuffix

public java.lang.String getSuffix()
Get the suffix which is appended to the end of the container name to generate the table name for this type

Returns:
suffix which is appended to the end of the container name to generate the table name for this type

getName

public java.lang.String getName(java.lang.String containerName)
Get a table name consisting of the suffix appended to the end of the container name

Parameters:
containerName - name of container
Returns:
a table name consisting of the suffix appended to the end of the container name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRange

public int getRange()
Get the id of NodeType out of the 16 possible type ids

Returns:
the id of NodeType out of the 16 possible type ids

getTypeMask

public long getTypeMask()
The typeMake for this nodeType

Returns:
the typeMake for this nodeType


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.