ecologylab.xml.types.scalar
Class ParsedURLType

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.types.scalar.ScalarType<T>
          extended by ecologylab.xml.types.scalar.ReferenceType<ParsedURL>
              extended by ecologylab.xml.types.scalar.ParsedURLType

public class ParsedURLType
extends ReferenceType<ParsedURL>

Type system entry for java.awt.Color. Uses a hex string as initialization.

Author:
andruid

Field Summary
static java.lang.String PRIMARY_URL_DELIM
           
static java.lang.String URL_DELIMS
           
static java.util.regex.Pattern URL_DELIMS_TOKENIZER
           
 
Fields inherited from class ecologylab.xml.types.scalar.ScalarType
DEFAULT_DELIMS, DEFAULT_DELIMS_TOKENIZER, DEFAULT_VALUE, DEFAULT_VALUE_STRING, MINIMAL_DELIM
 
Constructor Summary
ParsedURLType()
          This constructor should only be called once per session, through a static initializer, typically in TypeRegistry.
 
Method Summary
 boolean affordsInterestExpression()
          True if the user should be able to express interest in fields of this type.
 boolean allowDelimitersInTokens()
          When editing, determines whether delimiters can be included in token strings.
 boolean allowNewLines()
           
 boolean composedOfTerms()
          When editing, is the field one that should be part of the Term model?
 java.lang.String delimeters()
           
 java.util.regex.Pattern delimitersTokenizer()
          For editing: these are the valid delimiters for separating tokens that make up a field of this type.
 ParsedURL getInstance(java.lang.String value, java.lang.String[] formatStrings, ScalarUnmarshallingContext scalarUnmarshallingContext)
          Looks for file in value, and creates a ParsedURL with file set if appropriate.
 java.lang.String illegalChars()
          When editing, do not allow the user to include these characters in the resulting value String.
 java.lang.String primaryDelimiter()
          The most basic and fundamental delimiter to use between characters.
 
Methods inherited from class ecologylab.xml.types.scalar.ReferenceType
appendValue, appendValue
 
Methods inherited from class ecologylab.xml.types.scalar.ScalarType
appendValue, appendValue, defaultValueLength, fieldTypeName, getClassName, getInstance, getTypeClass, isDefaultValue, isDefaultValue, isFloatingPoint, isMarshallOnly, isPrimitive, isReference, marshall, needsEscaping, setField, setField, toString
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

URL_DELIMS

public static final java.lang.String URL_DELIMS
See Also:
Constant Field Values

PRIMARY_URL_DELIM

public static final java.lang.String PRIMARY_URL_DELIM
See Also:
Constant Field Values

URL_DELIMS_TOKENIZER

public static final java.util.regex.Pattern URL_DELIMS_TOKENIZER
Constructor Detail

ParsedURLType

public ParsedURLType()
This constructor should only be called once per session, through a static initializer, typically in TypeRegistry.

To get the instance of this type object for use in translations, call TypeRegistry.get("cm.generic.ParsedURL").

Method Detail

getInstance

public ParsedURL getInstance(java.lang.String value,
                             java.lang.String[] formatStrings,
                             ScalarUnmarshallingContext scalarUnmarshallingContext)
Looks for file in value, and creates a ParsedURL with file set if appropriate. Otherwise, calls ParsedURL.getAbsolute().

Specified by:
getInstance in class ScalarType<ParsedURL>
Parameters:
value - String to marshall into a typed instance.
formatStrings - Array of formatting values.
scalarUnmarshallingContext - TODO
See Also:
ScalarType.getInstance(java.lang.String, String[], ScalarUnmarshallingContext)

delimitersTokenizer

public java.util.regex.Pattern delimitersTokenizer()
For editing: these are the valid delimiters for separating tokens that make up a field of this type.

Overrides:
delimitersTokenizer in class ScalarType<ParsedURL>
Returns:

delimeters

public java.lang.String delimeters()
Overrides:
delimeters in class ScalarType<ParsedURL>

allowNewLines

public boolean allowNewLines()
Overrides:
allowNewLines in class ScalarType<ParsedURL>

allowDelimitersInTokens

public boolean allowDelimitersInTokens()
When editing, determines whether delimiters can be included in token strings.

Overrides:
allowDelimitersInTokens in class ScalarType<ParsedURL>
Returns:
true for URLs

illegalChars

public java.lang.String illegalChars()
When editing, do not allow the user to include these characters in the resulting value String.

Overrides:
illegalChars in class ScalarType<ParsedURL>
Returns:

composedOfTerms

public boolean composedOfTerms()
When editing, is the field one that should be part of the Term model?

Overrides:
composedOfTerms in class ScalarType<ParsedURL>
Returns:
false for URLs

affordsInterestExpression

public boolean affordsInterestExpression()
True if the user should be able to express interest in fields of this type.

Overrides:
affordsInterestExpression in class ScalarType<ParsedURL>
Returns:
false for URLs

primaryDelimiter

public java.lang.String primaryDelimiter()
The most basic and fundamental delimiter to use between characters.

Overrides:
primaryDelimiter in class ScalarType<ParsedURL>
Returns:
The URL implementation, here, returns a slash.