com.batavia.xbrl.instance
Interface Fraction

All Superinterfaces:
java.lang.Comparable, ComparablePart, Fact, IdHolder, IdKeeper, InstanceElement, Item, java.io.Serializable, org.relaxng.datatype.ValidationContext, XbrlElement, XmlElement, XmlParticle
All Known Subinterfaces:
DimensionalFractionItem

public interface Fraction
extends Item

Special type of Item.

These items do not have a data type with simplecontent but a datatype with complex content. The items themselves do have two parts. A numerator and denominator.

Copyright 2006 J2R BV, The Netherlands.

Part of Licensed Materials.

www.batavia-xbrl.com

Author:
Ron van Ardenne

Method Summary
 void addChild(com.batavia.jdom.Element aChild)
          This method is for initialization from jdom.
 FractionDenominator createFractionDenominator()
          create a fraction denominator
 FractionNumerator createFractionNumerator()
          create a fraction numerator
 FractionDenominator getDenominator()
           
 java.lang.String getFormattedContent()
          represent the item with the following format: numerator/denominator
 FractionNumerator getNumerator()
           
 java.lang.String getStringValue()
          Gets the two parts and create a string from them.
 com.sun.msv.datatype.xsd.XSDatatype getTypeForDenominator()
          get the type for the given partName.
 com.sun.msv.datatype.xsd.XSDatatype getTypeForNumerator()
          get the type for the given partName.
 void setDenominator(FractionDenominator denominator)
           
 void setNumerator(FractionNumerator numerator)
           
 boolean validate()
          Get the Type from the DTS and ask it to validate this Items' value.
 
Methods inherited from interface com.batavia.xbrl.instance.Item
calculatePrecisionToUse, getContext, getContextRef, getDecimals, getFormattedContent, getFormattedValue, getInferredPrecision, getNil, getPrecision, getPrecisionToUse, getUnit, getUnitRef, isDuplicateExceptParent, isNumeric, overrulePrecisionToUse, resetUnit, setContextRef, setDecimals, setNil, setPrecision, setUnitRef, validate, validateValue
 
Methods inherited from interface com.batavia.xbrl.instance.Fact
createAttribute, createFootnote, createId, getConcept, getFactCompareIdentifier, getFootnotes, getId, getLabel, getType, getXbrlInstanceRoot, isDuplicate, isInferred, isRendered, requestExtraSibblings, setId, setInferred, setRendered, setXbrlInstanceRoot
 
Methods inherited from interface com.batavia.xbrl.instance.InstanceElement
createChildElement, getAllowedSubstitutions, getChildren, getMyDiscoverableTaxonomySet, getXbrlRoot
 
Methods inherited from interface com.batavia.xbrl.XbrlElement
addChild, fromXbrl, getXbrlElementNameSpace, removeChild, toXbrlStream, toXbrlString
 
Methods inherited from interface com.batavia.xml.XmlElement
addAttribute, addChild, addChildren, addComment, addMessage, addNameSpace, clearMessages, fromXml, getAttribute, getAttribute, getAttributeSet, getChild, getChildren, getChildren, getDefaultNameSpace, getDocumentHref, getErrorMessage, getFullyQualifiedNameValue, getMappedChildren, getMessages, getName, getNameSpace, getNameSpacePrefixes, getNameSpaces, getPointedElement, getValidXmlBase, getValue, getXmlElementNameSpace, getXmlRoot, isValid, moveChild, removeAttribute, removeChild, resolvePointedValue, resolvePointedXmlParticle, setAttributeValue, setChildren, setDocumentHref, setErrorMessage, setInit, setName, setTargetNameSpace, setValue, toXml, toXml, toXmlStream, toXmlString, toXstringBuffer
 
Methods inherited from interface com.batavia.xml.XmlParticle
destroy, getBaseUri, getParent, getPrefix, getTargetNameSpace, isBoolean, isNumber, p_equal, resolveNamespacePrefix, setParent, toXstring
 
Methods inherited from interface com.batavia.xml.ComparablePart
c_equal, identical, s_equal, u_equal, v_equal, x_equal
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.relaxng.datatype.ValidationContext
isNotation, isUnparsedEntity
 
Methods inherited from interface com.batavia.xml.IdKeeper
addIdHolder, getHolder, removeIdHolder
 

Method Detail

getTypeForNumerator

com.sun.msv.datatype.xsd.XSDatatype getTypeForNumerator()
get the type for the given partName. The part resides in a fraction and has meaning within that fraction. The fraction can get the type from its root


getTypeForDenominator

com.sun.msv.datatype.xsd.XSDatatype getTypeForDenominator()
get the type for the given partName. The part resides in a fraction and has meaning within that fraction. The fraction can get the type from its root


getStringValue

java.lang.String getStringValue()
Gets the two parts and create a string from them.

See Also:
XmlElementImpl.getValue()

getFormattedContent

java.lang.String getFormattedContent()
represent the item with the following format: numerator/denominator

Specified by:
getFormattedContent in interface Item
Returns:
String with formatted content

addChild

void addChild(com.batavia.jdom.Element aChild)
This method is for initialization from jdom. This class handles children of the type(s): numerator and denominators SubClasses should override and implement the way they want to handle their children. If they have no specific intrest in a child then the super should be called to handle the child.

Parameters:
aChild -

getDenominator

FractionDenominator getDenominator()
Returns:
Returns the denominator.

setDenominator

void setDenominator(FractionDenominator denominator)
Parameters:
denominator - The denominator to set.

getNumerator

FractionNumerator getNumerator()
Returns:
Returns the numerator.

setNumerator

void setNumerator(FractionNumerator numerator)
Parameters:
numerator - The numerator to set.

validate

boolean validate()
Get the Type from the DTS and ask it to validate this Items' value. Check if this instance is valid according to the XBRL spec.


createFractionNumerator

FractionNumerator createFractionNumerator()
create a fraction numerator

Returns:

createFractionDenominator

FractionDenominator createFractionDenominator()
create a fraction denominator

Returns: