XBRL Terminology


Example:

<element ref=”ifrs:NatureOfClassOfProvision” minOccurs=”0″ maxOccurs=”3″/>

metadata

metadata is data about data (literally, since it is composed of Greek word meta and Latin term data, both meaning ‘information’); in XBRL it could be explained as a computer understandable information about business concepts; the accounting term Asset is very meaningful to a persons familiar with financial reporting, but has no meaning to a computer until it is told how to interpret it; these definitions appear in schemas and are enriched by linkbases (which inform computers about the relationships between elements and between the elements and other resources); together schemas and linkbases constitute taxonomies;

minOccurs attribute

the minOccurs attribute appears in XBRL mainly on element references in tuples; it indicates the minimum number of an element’s occurrences on the tuple; its value must be a positive integer and the default is “1″;

Example:

<element ref=”ifrs:NatureOfClassOfProvision” minOccurs=”0″ maxOccurs=”3″/>

name attribute

a name attribute appears on the definitions of elements and attributes and assigns them with a unique name; it begins with a letter (or one of the punctuation characters from a specific set) and continues with letters, digits, hyphens, underscores, colons, or full ss which together are known as name characters; they must not begin with he string ‘xml’ (upper or lower case in any combination), since it is reserved for the XML standardization and specification;

namespace

an XML namespace is a collection of names, identified by a URI reference, which are used in XML documents as element types and attribute names; XML namespaces differ from the “namespaces” conventionally used in computing disciplines in that the XML version has an internal structure and is not, mathematically speaking, a set; the XML namespace attribute (xmlns) is placed in the start tag of an element (typically the root element e.g. or) and possesses the following syntax – xmlns:prefix=”namespaceURI”;

Examples:

xmlns=”http://www.w3.org/2001/XMLSchema&#8221;

xmlns:xbrli=”http://www.xbrl.org/2003/instance&#8221;

xmlns:link=”http://www.xbrl.org/2003/linkbase&#8221;

xmlns:xlink=”http://www.w3.org/1999/xlink&#8221;

xmlns:ifrs=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15&#8243;

xmlns:ifrs-typ=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15/types&#8221;

targetNamespace=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15&#8243;

non-numeric item

a non-numeric item is an item that is not a numeric item, e.g. dates;

numeric item

a numeric item is an item whose content is derived by restriction of XML Schema types decimal, float or double, or has complex content derived by the restriction of the XBRL defined type fractionItemType; reported in an instance document it needs the reference to a unit;

parent-child relation

a parent-child relation concerns an arcrole value on the presentationArc element which is “http://www.xbrl.org/2003/arcrole/parent-child&#8221;; it is used to express hierarchical relations between concepts that appear in paper form business reports and stem from financial and accounting principles, rules and regulations;

period element

in XBRL, the term period relates to instant or duration time; in business reporting, financial facts are reported either “as of” a particular date (for example in Balance Sheet) or “for period” (i.e. for the time between two specified dates of which one begins the period and the other ends it); the period element constrains the instant or interval time for reference by an item element in instance documents; different periods are carried by different contexts; to reflect the business reporting idea of instant and duration, the period element may carry either a single instant element or a sequence of startDate and endDate elements or an element forever; the first three elements’ content must be a date TimeType (yyyy-mm-dd:Thh:mm:ss) or dateType (yyyy-mm-dd) while the last one is empty;

<xbrli:period>

<xbrli:startDate>2005-01-31</xbrli:startDate>

<xbrli:endDate>2005-12-31</xbrli:endDate>

</xbrli:period>

<xbrli:period>

<xbrli:instant>2005-12-31</xbrli:instant>

</xbrli:period>

periodType attribute

a periodType attribute appears on element elements in schemas; it must be used on items; it may be assigned one of the two values “instant” and “duration”; the first one indicates that the element, when used in an XBRL instance, must always be associated with a context in which the period is instant (that is, at the point of time); the later means that this period in instance documents must be expressed either using a sequence of startDate and endDate elements or an element forever;

precision attribute

a precision attribute appears on numeric items (facts) in instance documents; it conveys the arithmetic precision of a measurement and, therefore, the utility of that measurement to further calculations; it must be an integer or possess the value “INF” meaning that the number expressed is the exact value of the fact; the precision attribute must not occur together with the decimals attribute on the same fact element;

prefix

when declaring namespaces, they may be associated with prefixes which are used to qualify references to any schema components belonging to that namespace; prefixes, that precede names of elements, attributes and some of their predefined values, provide an indication of where to find definitions of these properties;

presentation linkbase

a presentation linkbase is a linkbase that contains hierarchical presentation relationships between concepts defined in the schemas it refers to; it includes extended links that contain locators of elements and arcs reflecting parent-child relations between them;

presentationArc element

the presentationArc is an XLink arc element; it is used in presentation linkbases to define hierarchical relations between concepts in terms of their appearance in business reports; one standard arcrole value defined for this element is “http://www.xbrl.org/2003/arcrole/parent-child&#8221;.

Example:

<presentationArc   xlink:type=”arc”   xlink:arcrole=”http://www.xbrl.org/2003/arcrole/parent-child&#8221;

xlink:from=”ifrs_Assets”   xlink:to=”ifrs_AssetsCurrent”   order=”1″ use=”optional”/>

reference element

a reference element appears on referenceLink extended links; it is intended to enable taxonomies to ground the definitions of concepts in authoritative statements in published business, financial and accounting literature; it should provide the information necessary to find the reference materials that are relevant to understanding appropriate usage of the concept being defined, but does not include the reference materials themselves; the reference element carries an arcrole attribute that describes the type of reference being defined (presentation, measurement, definition, etc…); it also contains a set of elements called parts (from their substitutionGroup which is “link:part”); because the structure of reference materials may differ, taxonomy creators are allowed to define their own parts; however, there is a predefined universal set of parts available (http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd and http://www.xbrl.org/2004/ref-2004-08-10.xsd);

Examples:

<reference xlink:type=”resource”   xlink:role=”http://www.xbrl.org/2003/role/presentationRef&#8221;

xlink:label=”CashFlowsFromUsedInOperationsTotal_ref”>

<ref:Name>IAS</ref:Name>

<ref:Number>7</ref:Number>

<ref:Paragraph>14</ref:Paragraph>

</reference>

<reference xlink:type=”resource”   xlink:role=”http://www.xbrl.org/2003/role/measurementRef&#8221;

xlink:label=”CashFlowsFromUsedInOperationsTotal_ref”>

<ref:Name>IAS</ref:Name>

<ref:Number>7</ref:Number;>

<ref:Paragraph>18</ref:Paragraph>

<ref:Subparagraph>a</ref:Subparagraph&>

</reference>

reference linkbase

a reference linkbase is intended to contain relationships between concepts and references to authoritative statements in the published business, financial and accounting literature that give meaning to the concepts; it includes extended links referenceLink that contain locators of elements defined in schema, reference elements describing resources and arcs presenting concept-reference relations between them;

referenceArc element

a referenceArc is an XLink arc element; it connects concepts with reference resources; one standard arcrole value for this element is “http://www.xbrl.org/2003/arcrole/concept-reference&#8221;;

Example:

<referenceArc

xlink:type=”arc”

xlink:arcrole=”http://www.xbrl.org/2003/arcrole/concept-reference&#8221;

xlink:from=”AssetsTotalLocator” xlink:to=”AssetsTotal_LabelLocator” />

requires-element relation

a requires-element relation concerns arcrole value on a definitionArc element which is “http://www.xbrl.org/2003/arcrole/requires-element&#8221;; it is used to indicate elements required in business reports i.e. concepts that must appear in instance documents;

role attribute

a role is an XLink attribute that describes the meaning of resources within the context of a link; it may be used on extended- and simple- type elements as well as locators and resources; the value of role must be an absolute URI;

root element

a root element is the  level element fulfilling the role of a container for a larger whole; in XBRL such elements could be schema, xbrl and linkbase;

schema document

a schema document contains definitions of concepts; together with linkbases which refer to it, it constitutes a taxonomy; a schema document should specify a target namespace; its root element is schema;

schema element

a schema element is the root element of schema document; it opens and closes every taxonomy schema; it specifies the target namespace and may assign prefixes to other namespaces used;

Example:

<schema   xmlns=http://www.w3.org/2001/XMLSchema   xmlns:xbrli=http://www.xbrl.org/2003/instance   xmlns:link=”http://www.xbrl.org/2003/linkbase&#8221;

xmlns:xlink=”http://www.w3.org/1999/xlink&#8221;

xmlns:ifrs=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15&#8243;

xmlns:ifrs-typ=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15/types&#8221;

targetNamespace=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15&#8243;

elementFormDefault=”qualified”

attributeFormDefault=”unqualified”>

<!– content – definitions –>

</schema>

schemaLocation attribute

a schemaLocation attribute is used in four circumstances:

* on an xbrl element in instance documents to provide indicators to the application regarding the location of schema documents against which the instance was created;

* on a linkbase element in linkbases to indicate the application the location of schema documents;

* (optional) on an import element in schema documents to provide hints to the application regarding the location of schema documents that the author warrants; there it supplies the required components for the namespace identified by the namespace attribute;

* (required) on an include element in schema documents it contains a URI reference which must identify a schema document; the effect is to compose a final effective schema by merging the declarations and definitions of the including and included schemas;

Example:

<xbrl   xsi:schemaLocation=”http://xbrl.iasb.org/int/fr/ifrs/2005-05-15/proof

Proof-ifrs-2005-05-15.xsd”>

schemaRef element

a schemaRef element must appear in every instance document as a child of an xbrl element before other parts of an instance; it specifies the taxonomy schemas an instance belongs to.

segment element

a segment element appears on an entity element in a context definition; it is an optional container for additional tags defined by the instance preparer; it is intended to identify the business segment more completely in cases where the entity identifier is insufficient; in general, the content of a segment will be specific to the purpose of the XBRL instance; this element must not appear empty;

Example:

<segment>

<my:stateProvince>MI</my:stateProvince>

</segment>

scenario element

a scenario is an optional element that appears in instance documents; it allows for additional information to be included in instances; the preparer of an instance defines the tags used to describe the information; this information shall enclose in particular the type of data reported (for example actual, budgeted, restated, pro forma, …)

‘shell’ schema

a ‘shell’ schema is produced by the ITMM tool; it refers to the IFRS Taxonomy by importing its schema and user-selected linkbases;

similar-tuples relation

a similar-tuples relation concerns arcrole value on definitionArc element which is “http://www.xbrl.org/2003/arcrole/similar-tuples&#8221;; it represents relationships between tuple concepts that have equivalent definitions; for example, this kind of relationship would be appropriate to use between two different tuple concepts that are both designed to describe mailing addresses;

substitutionGroup attribute

a substitutionGroup attribute appears on elements’ definitions in schemas; XBRL defines two basic substitution groups: items and tuples; its purpose is to indicate which type you can substitute with the actual definition;

summation-item relation

a summation-item relation concerns arcrole value on a calculationArc element which is “http://www.xbrl.org/2003/arcrole/summation-item&#8221;; it represents relationships only between concepts that are in the item substitutionGroup and whose type is numeric (e.g. monetary or decimal); the weight attribute defines the algebraic sign of the operation;

tag

mark-up languages such as XBRL use tags to describe data; for example <Asset>1000</Asset> – the word Asset together with the brackets “<” and “>” is called a tag; there are opening tags: <…> and closing tags: </…>.

taxonomy

taxonomy in general means a catalogue or a set of rules for classification; in XBRL, a taxonomy is a dictionary, containing computer-readable definitions of business reporting terms as well relationships between them and links connecting them to human-readable resources (metadata); a typical taxonomy consists of a schema (or schemas) and linkbases; a set of taxonomies that can be discovered from one entry point schema is called DTS;

taxonomy extension

taxonomy extensions add concepts and modify the relationships among the concepts in the base taxonomies that they extend; they are created to support specialised reporting requirements in specific accounting jurisdictions, in specific industries, or for specific companies; taxonomy extensions consist of a set of taxonomy schemas and/or linkbases that augment a DTS that includes the base taxonomies.

to attribute

to is a XLink attribute and appears on arcs; its value must be equal to the value of a label attribute of at least one locator or resource on the same extended link as the arc element itself; its value must be an XML NCName (i.e. it must begin with a letter or an underscore);

tuple

a “tuple” is one of two standard values of the substitutionGroup attribute on element element in an XBRL schema; elements possessing this value are often referred to as tuples; according to the XBRL Specification, tuples associate facts that cannot be independently understood and their meaning depends on their relationship to other elements; an example of such a set of facts is a payroll row which consists of the name of the employee, his/her position and salary; each of these elements does not have full meaning without being associated with the others; tuples are commonly used to express tables with known headings and an unknown number of rows; tuples do not carry any human-readable content; instead, they contain other elements; in XML, elements that contain other elements are said to have complex types; additionally, tuples do not possess any content other than their various elements so their complexContent restricts anyType only to the elements referred to; a tuple definition may also contain information on the number of minimum and maximum occurrences of elements possessed as well as their sequence;

<element name=”ifrs_ElementReclassified” substitutionGroup=”xbrli:tuple”>

<complexType>

<complexContent>

<restriction base=”anyType”>

<sequence>

<element ref=”ifrs:DescriptionOfElementReclassification”

minOccurs=”0″ maxOccurs=”1″/>

<element ref=”ifrs:CodeOfElementReclassification”

minOccurs=”0″ maxOccurs=”1″/>

<element ref=”ifrs:FinancialImpactOfReclassification”

minOccurs=”0″ maxOccurs=”1″/>

</sequence>

</restriction>

<attribute name=”id” type=”ID” use=”optional”/>

</complexContent>

</complexType>

</element>

type attribute

a type attribute may or must appear on different elements; from an XBRL perspective, the most important type attribute appears on concepts definitions in schema which indicate the data types of the described items; XBRL item types were derived from XML data types; the most common types used in financial reporting taxonomies are stringItemType that may contain any string of characters, monetaryItemType that is used in concepts for which there is a need to specify a currency and decimalItemType which is carried by other numeric items; taxonomy creators may create their own types as necessary to express financial information by extending or restricting the available XBRL or XML predefined types; a type attribute must also appear on XLink simple- and extended- links (in particular on schemaRef and linkbaseRef elements);

unit element

a unit is an element that appears in instance documents and specifies the units in which numeric items (that refer to its required id attribute using unitRef attribute) have been measured; it may define simple units using a measure element and complex units providing divide element and its subelements (unitNumerator and unitDenominator); there are several constraints imposed on this element, its children and their content; for example monetary concepts must refer to ISO 4217 currency codes;

Example              Explanation

<unit id=”U-GBP”>

<measure xmlns:ISO4217=”http://www.xbrl.org/2003/iso4217″&gt; ISO4217:GBP</measure>

</unit>                 Currency, UK Pounds

<unit id=”percent”>

<measure>xbrli:pure</measure>

</unit>                 Pure number (%, number of employees)

<unit id=”u1″>

<measure>xbrli:shares</measure>

</unit>                 Number of shares

<unit id=”u6″>

<divide>

<unitNumerator>

<measure>ISO4217:EUR</measure>

</unitNumerator>

<unitDenominator>

<measure>xbrli:shares</measure>

</unitDenominator>

</divide>

</unit>                 EPS (Earnings Per Share) in Euros per share

URI reference

URI stands for Uniform Resource Identifier and is a compact string of characters used for identifying an abstract or physical resource; it appears in absolute or relative form; URI references are not allowed to contain characters such as all non-ASCII characters and excluded characters listed in IETF RFC 2396, except for number sign (#) and percent sign (%) and the square brackets; example: http://www.iasb.org/xbrl;

use attribute

use is an optional attribute that appears on arcs; its two possible values are “optional” and “prohibited”; “optional” is a default value (that is the value that the attribute is assigned when it is not specified) and represents a relationship that may participate in the network of relations defined in a DTS; “prohibited” indicates that the relationship does not exist; the use attribute is used by taxonomy extension creators to prohibit and override relations defined in linkbases of the base taxonomy;

versioning

the term versioning in XBRL relates to issues and problems that occur when implementing changes to an existing taxonomy; any changes to a taxonomy may particularly affect extensions that are based on it; versioning aims to help applications and people involved in taxonomy building and instance creation to tack these changes; first set of requirements concerning this issue was released by XBRL International on 1 October 2002; the second edition called the Taxonomy Life Cycle is at the stage of Internal Working Draft;

weight attribute

weight is a required attribute on calculationArc elements; it must have a non-zero decimal value; for summation-item arcs, the weight attribute indicates the multiplier to be applied to a numeric item value (content) when accumulating numeric values from item elements to summation elements; a value of “1.0″ means that 1.0 times the numeric value of the item is applied to the parent item; a weight of “-1.0″ means that 1.0 times the numeric value is subtracted from the summation item; there are also rules that are applied to the calculation of elements possessing opposite balance attribute values (‘credit’ and ‘debit’);

XBRL

XBRL stands for eXtensible Business Reporting Language; it is an XML dialect developed for business and financial reporting purposes by a non-profit consortium XBRL International which has members from 400 companies and institutions that represent finance and IT sector organizations from all over the world; learn more from our Fundamentals of XBRL section or visit the XBRL International website;

xbrl element

an xbrl element is usually the root element of instance documents; in files, it serves as a container of data in XBRL format; first and foremost it contains an element that refers to the schema (schemaRef), provides contextual information (context and unit) for included facts and may provide them with footnotes (footnoteLink);

XBRL Specification

an XBRL Specification defines the rules and fundamentals of the language; it is designed to communicate information to IT professionals who develop applications and tools intended to be XBRL compatible and to a lesser extent is assists taxonomy creators; to find out more and obtain the latest version of the XBRL Specification visit XBRL International website;

XLink

XLink (XML Linking Language) is a language for creating hyperlinks in XML documents; it works in a similar way to the <a> element and its href attribute in HTML; to get access to its features there should be an XLink namespace declared usually at the  of the document (“http://www.w3.org/1999/xlink&#8221;);

XML

XML stands for Extensible Markup Language; it was developed by W3C (World Wide Web Consortium) to describe and carry data by allowing users to define their own tags (in contrast to HTML where the tags are predefined); this data (tags) is characterized using a Document Type Definition (DTD) or XML Schema which are self-descriptive;

xmlns attribute

an xmlns attribute is used to declare namespaces and their prefixes; in XBRL it is usually used on root or  level elements (schema, linkbase, xbrl);

XML Schema

an XML Schema defines the structure and the content of the XML documents that refer to it, by defining, in particular, the elements and attributes and providing information about their type and possible content;

XPath

XPath was developed to help finding information in XML documents; it is mainly used in XSLT to navigate over elements and attributes; XPath provides a set of functions that allows specific actions to be performed on XML data;

XPointer

XPointer supports XLink by providing solutions to locate specific fragments of the XML document; its full name is XML Pointing Language; XBRL uses two specific XPointer schemes: the element pointer (works by counting) and the shorthand pointer(works by referencing to an id);

XSLT

XSLT stands for eXtensible Stylesheet Language Transformations and has been developed to facilitate conversions of XML documents into other XML documents or into other formats (e.g. XHTML); to perform these transformations, XSLT uses XPath expressions;

About these ads

Java Notes-3


    • You need a boolean in the if condition.
    • An overriding method only needs to declare that it can throw a subset of the exceptions the overriden method can throw. Having no throws clause in the overriding method is OK.
    • Normal execution will not resume if an exception is uncaught by a method. The exception will propagate up the invocation stack until some method handles it. If no one handles it then the that thread will terminate.
    • The expression (a = b) does not compare the variables a and b, but rather assigns the value of b to the variable a. The result of the expression is the value being assigned. Since a and b are boolean variables, the value returned by the expression is also boolean. This allows the expressions to be used as the condition for an if-statement.
    • “if-clause and the else-clause can have empty statements. Empty statement ( ie. just ; ) is a valid statement.
      But this is illegal :
      if (true) else;
      because the if part doesn’t contain any valid statement. ( A statement cannot start with an else!)
      So, the following is valid.
      if(true) if(false);
      because if(false); is a valid statement.

Java™ Application Development on Linux® – Free 599 Page eBook

Enterprise Java Virtualization:

Understanding the TCO Implications

InfoWorld’s Java IDE Comparison Strategy Guide:

Java Essential Training

Apache Jakarta Commons: Reusable Java™ Components

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

  • Read the questions carefully. This is very important. Questions are easy but you need to read them carefully.
  • The type of the switch expression (ie. in switch( i ), the type of i )must be char, byte, short, or int, or a compile-time error occurs.
  • The body of a switch statement must be a block. Any statement immediately contained by the block may be labeled with one or more case or default labels. These labels are said to be associated with the switch statement, as are the values of the constant expressions in the case labels.
  • “Every case constant expression associated with a switch statement must be assignable to the type of the switch
    Expression. ie. if the switch expression is of type byte then all the case constants must fit in a byte.(eg. you can’t you 200 as a case value)”
  • No two of the case constant expressions associated with a switch statement may have the same value.
  • At most, one default label may be associated with the same switch statement.
  • “public class TestClass
    {
    public static void main(String args[])
    {
    Exception e = null;
    throw e;
    }
    }”
    You are throwing an exception and there is no try catch block or a throws clause. So it will not compile. If you do that (ie. either put a try catch block or declare a throws clause) then at run time it will throw a null pointer exception as e is null.
    A method that throws an exception either must declare it in throws clause or put the code that throws the exception in try/catch block.
  • Every case constant expression in a switch block must be assignable to the type of switch expression. Meaning :
    “byte by = 10;
    switch(by)
    {
    200 : //some code;
    300 : //some code;
    }
    This will not compile as 300 is not assignable to ‘by ‘ which can only hold values from -128 to 127.

    The use of break keyword is not mandatory, and without it the control will simply fall through the labels of the switch statement.
  • “A break without a label breaks the current loop (ie. no iterations any more) and a break with a label tries to pass the control to the given label.
    ‘Tries to’ means that if the break is in a try block and the try block has a finally clause associated with it then it will be executed.”
  • U can apply a label to any block but not like loop: int x=0;
  • “This is the hierarchy:
    java.lang.Object
    |
    +–java.lang.Throwable
    |
    +–java.lang.Exception, java.lang.Error
  • So the method can even give Throwable ( but not Object !) in throws statement”
  • With a try, either of (multiple) catch and (only one) finally or both can occur. finally must occur only in the end. A try MUST be followed by atleast a catch or finally.
  • The break statement is to break out of any loop completely. So the current iteration and any other remaining iterations of the loop will not happen. Control is transferred to the first statement below the loop.
  • Name of the file is not passes in the args
  • if finally is throwing an Null pointer exception which is RuntimeException so there is no need to handle it or declare it in the throws clause.
  • It is not possible to break out of an if statement. But if the if statement is placed within a labeled block or a switch statement or a loop construct, the usage of break in option 3 would be valid.
  • for (int i=5; i=0; i–) { }
    uses ‘=’ instead of ‘==’ for condition which is invalid. The loop condition must be of type boolean
  • int j=5;
    for(int i=0, j+=5; i uses ‘j +=5′. Now, this statement is preceeded by ‘int i=0,’ and that means we are trying to declare variable j . But it is already declared before the for loop. If we remove the int in the initialization part and declare i before the loop then it will work.But if we remove the statement int j = 5; it will not work because compiler will try to do j = j+5 and you can’t use the variable before it is initialized. Although the compiler gives a message ‘Invalid declaration’ for j += 5 but it really means the above mentioned thing.
  • “int i, j;
    for (j=10; iThrowable – > Exception -> MyException.”
  • You can declare anything that is a Throwable or a subclass of Throwable, in the throws clause.
  • “while (false) { x=3; } in a compile-time error because the statement x=3; is not reachable;
    but the superficially similar case:
    if (false) { x=3; }
    does not result in a compile-time error. An optimizing compiler may realize that the statement x=3; will never be executed and may choose to omit the code for that statement from the generated class file, but the statement x=3; is not regarded as “”unreachable”" in the technical sense .
    The rationale for this differing treatment is to allow programmers to define “”flag variables”" such as:
  • static final boolean DEBUG = false;
  • and then write code such as:
    if (DEBUG) { x=3; }
    The idea is that it should be possible to change the value of DEBUG from false to true or from true to false and then compile the code correctly with no other changes to the program text. This ability to “”conditionally compile”" has a significant impact on, and relationship to, binary compatibility . If a set of classes that use such a “”flag”" variable are compiled and conditional code is omitted, it does not suffice later to distribute just a new version of the class or interface that contains the definition of the flag. A change to the value of a flag is, therefore, not binary compatible with preexisting binaries.
  • This is valid : for( int i = 0; i< 0; i++) x = 3; but this is not : for( int i = 0; false; i++) x = 3;
  • “The Exception that is thrown in the last, gets thrown by the method.
    So, When no exception or any exception is thrown at line 1, the control goes to finally or some catch block. Now, even if the catch blocks throw some exception, the control goes to finally. The finally block throws CloneNotSupportedException, so the whole method ends up throwing CloneNotSupportedException.”
  • “All the arrays are initialized to contain the default values of their type. This means,
    int[] iA = new int[10]; will contain 10 ints having 0.
    Object[] oA = new Object[10]; will contain 10 object references pointing to null.
    boolean[] bA = new boolean[10] will contain 10 booleans of value ‘false’.
    So, as bA[0] is false, the if condition fails and str remains 111.”
  • “If no args are given a Zero length string array is received in the main method. So, there is no NullPointerException on accessing args even if no args are given.
    Indexing in java starts from zero. so the last element will be at args.length -1.”
  • Runnable r=new Thread(); is allowed since Thread implements runnable interface
  • To make a class abstract, you only need to mark it as abstract as in option4. You don’t neccessorily need to put an abstract method.
  • java and classname are not part of the args array.
  • String is not a keyword , it’s a normal Class
  • “You cannot have two methods with the same name in one class.
    Also, even if you put one sayHello() method in other class which is a subclass of this class, it won’t compile because you cannot override/hide a static method with a non static method and vice versa.”
  • Objects are created from class definitions that implement abstractions. The objects that are created are concrete realizations of those abstractions.
  • “Note that Arrays are Objects (ie. cA instanceof Object is true) so are passed by reference. So in m1() the change in cA[1] done by m2() is reflected everywhere the array is used.
    c is a primitive type and is passed by value. In method m2() the passed parameter c is different than instance variable ‘c’ as local variable hides the instance variable. So instance member ‘c’ keeps it’s default (i.e 0) value.
  • Note that both equals() and hashcode() methods can be overridden by the programmer so you can’t say how they work.
  • “public class TestClass
    {
    public static void main(String args[ ] )
    {
    Object a, b, c ;
    a = new String(“”A”");
    b = new String(“”B”");
    c = a;
    a = b;
    System.out.println(“”"”+c);
    }
    }”
    “The variables a, b and c contain references to actual objects. Assigning to a refrence only changes the refrence value, and not the object pointed to by it. So, when c = a is executed c starts pointing to the string object containing A. and when a = b is executed, a starts pointing to the string object containing B but the object containing A still remains same and c still points to it. So the program prints A and not B.
  • For the class that does not define toString() method, the inherited toString() method ( from java.lang.Object) is called. This method returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of :
    getClass().getName() + ‘@’ + Integer.toHexString(hashCode())
  • But in this case, String class overrides the toString() method that returns the actual string.
  • “Theoratically, java supports Pass by Value for everything ( ie. primitives as well as Objects).
    . Primitives are always passed by value.
    . Object “”references”" are passed by value. So it looks like the object is passed by reference but actually it’s the value of the reference that is passed.
  • A crude example:
    Object o1 = new Object(); //say, the object is stored at memory location 15000. So o1 actually contains 15000.
  • now, when you call someMethod(o1); the value 15000 is passed.
  • Inside the method someMethod
    someMethod( Object localVar)
    {
    ……localVar contains 15000 so, whatever method you call or modication you do to this varibale, it is done on the original object. But when you try to change it’s value, for eg. make it null, it then contains 000000 (say). But the original variable o1 still contains 15000 so it still points to the same object.
    }
  • In the above question, the local variable is what is changed the original variable ie.someInt remains unchanged.
  • “The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
  • getClass().getName() + ‘@’ + Integer.toHexString(hashCode())”
  • There no unsigned keyword in java!
  • “Java implements abstractions using classes that have properties and behavior. Behavior is dictated by the operations of the abstraction. In Java the operations are defined in classes using methods.
  • “All member fields (static and non-static) are initialized to their default values.
    Default values are: objects are initilized to null (String is also an object), numeric types to 0 (or 0.0 ) and boolean to false.
  • Note that if no argument is passed the args parameter is NOT null but a valid non-null string array of length zero.
  • “As the question says, “”…an instance of the class is not needed…”", the method has to be static.
    Also, as the question does not say that other packages should not have access to the method so public or protected is also correct. But it is better to choose option 2 as it is most appropriate.
    Also as you are asked to select only 1 option,it is better to select option 2 other wise you can select other options also.”
  • “Non-static inner classes can contain final static fields (but not methods).
    Anonymous classes cannot have explict constructors, since they have no names.
  • A static inner class is also known as A Top Level Nested class. So,there are two types of Top level classes. One, that is a standard class and other an inner class which is static. Eg.
    public class A //This is a standard Top Level class.
    {
  • class X
    {
    static final int j = 10; //compiles fine!
    }
    public static class B //This is also a Top Level class (but nested!)
    {
    }
    }
    You can create objects of B with having objects of A. Eg. A.B b = new A.B();
  • Members in outer instances are directly accessible using simple names. There is no restriction that member variables in inner classes must be final.
    Nested classes define distinct types from the enclosing class, and the instanceof operator does not take of the outer instance into consideration.”
  • Altough nonsensical, an empty file is a valid source file. A source file can contain optional package declaration, any number of import statments and any number of class and interface definitions.(only one class/interface in a file can be public though.)
  • An instance member belongs to a single instance, not the class as a whole. An instance member is a member variable or a member method that belongs to a specific object instance. All non-static members are instance members.
  • “The following is a valid code…
  • abstract class SomeClass { public abstract void m1(); }
    public class TestClass
    {
    public static SomeClass getSomeClass() //note static
    {
    return new SomeClass()
    {
    public void m1() { }
    };
    }
    }
  • Another important point to note here is : Contrary to common belief, Anonymous class declared/defined/instantiated in a static method is NOT static. In fact, you can verify it by doing: javap TestClass$1

    Other interesting FAQs related Posts on Java, you may like:

    Java Notes – 1 (clean-clouds.com)

    Java Notes – 2 (clean-clouds.com)

    Java Notes – 3 (clean-clouds.com)

    Java Notes -4 (clean-clouds.com)

    Java Notes -5 (clean-clouds.com)

    Java Notes -6 (clean-clouds.com)

    Frequently Asked Questions in Java Part- 1 (clean-clouds.com)

    Frequently Asked Questions in Java Part- 2 (clean-clouds.com)

    Frequently Asked Questions in Java Part-3 (clean-clouds.com)

    Frequently Asked Questions in Java Part-4 (clean-clouds.com)

    Frequently Asked Questions in Java Part-5 (clean-clouds.com)

    Frequently Asked Questions in Java Part-6 (clean-clouds.com)

    Frequently Asked Questions in Java Part-7 (clean-clouds.com)

    Frequently Asked Questions in Java Part-8 (clean-clouds.com)

    Frequently Asked Questions in Java Part-9 (clean-clouds.com)

    Frequently Asked Questions in Java Part-10 (clean-clouds.com)

    Frequently Asked Questions in Java Part-11 (clean-clouds.com)

    Frequently Asked Questions in Java Part-12 (clean-clouds.com)

    Frequently Asked Questions in Java Part-13 (clean-clouds.com)

    Frequently Asked Questions in Java Part-14 (clean-clouds.com)

Single Sign-On for Java and Web Applications

Bulletproof Java Code: A Practical Strategy for Developing Functional, Reliable, and Secure Java Code

Transforming a Generic Java IDE to Your Application Specific IDE:

The Java Virtual Appliance—No OS Required

BEA WebLogic® Operations Control: Application Virtualization for Enterprise Java

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

XBRL Pattern Processing


Proposed XBRL Processing with COYOTE API

Patterns Identified in Xbrl Processing

We have processed the instance documents according to 2 patterns till now which are given below:

1)      Label Values

2)      Schedules

  1. Fact Values according to Domain Members(Payment Experience Summary)
  2. Combinations of Fact values and Domain Members’ labels

We have found one other pattern of output in the Financial Statements and that is “Pivot Table” Like Structure.

Above all thing were done before the understanding of XBRLS and fortunately we were not wrong in identifying patterns.

Now after the basic understanding of the XBRLS, we have some clear way to move further.

According to XBRLS

According to XBRLS there are Meta-patterns,

A meta-pattern is a design pattern. The structure of each part of a business report is not unique, but rather follows a design pattern, which offers a standard solution. Once the pattern is recognized for a problem category, we know the approach to come up with a design solution.

Let’s emphasize on the statement

The structure of each part of a business report is not unique, but rather follows a design pattern, which offers a standard solution.

According to my understanding it suggests that in a report (In our case let’s consider it as TAB-Trade Payments) each part (in our case widget-Payment Information or Payment Experience Summary or Account Placed for Collection) is not unique but it will have a standard solution and that is perfectly alright according to our understanding as well.

It means that there can be multiple use cases (Output patterns) and for each unique pattern there will be a different processing and that is perfectly fine.

If we can identify the existing patterns used in current output then we can have different processing for each of them and it will be more maintainable solution. If in future any new pattern is added then we can have different processing for that and our old processing will not be affected by that.

If we can create one general data structure which will be used for the different kind of pattern processing then at least we will be having generic data structure and that won’t be affected in future. Now after creating the generic data structure we can separate the pattern processing and let’s assume we have a separate data structure ready for all patterns individually and that will freeze processing until now and thus we will be having 2 things ready

  1. Generic data structure which will hold the data after processing the instance documents.
  2. Widget blocks for output according to pattern will be ready from pattern processing.

XBRL Processing Flow

XBRL Pattern Processing

XBRL Pattern Processing

Generic Output Data Structure

Till now we have used 3 patterns in our processing and those are:

1)      Label Values

2)      Schedule Pattern

3)      Record Pattern

4)      And in financial statements, it seems as it has Hierarchical pattern.

Generic Output Data Structure can be a combination of the following structures according to patterns.

Label Value Pattern Key XBRLDto object has 2 properties1)Label

2)ValueObject(Contains the value of the label, Context information and any information required)Schedule Pattern KeySchedule Object  has 3 properties1)Row headers

2)Column Headers

3)Data Object  has property

3.1) DataRowObjects have

3.1.1) ValueObject(Contains the value of the label, Context information

And  any information required)Record Pattern KeyRecord Object  has 3 properties1)Row headers

2)Column Headers

3)Data Object  has property

3.1) DataRowObjects have

3.1.1) ValueObject(Contains the value of the label, Context information

And  any information required)Hierarchical Pattern KeyHierarchical Object  has 3 properties1)Row headers

2)Column Headers

3)Data Object  has 1 property

3.1) DataRowObject have

3.1.1) ValueObject(Contains the value of the label, Context information

And  any information required)

Issues and Solution

How to identify patterns that is a different issue and can be discussed in detail for efficient outcome but if we can identify specific patterns and have different processing for that then it will be more maintainable and easy for us to handle different kind of scenario.

As of now we have identified 3 patterns and if we have the information regarding patterns used then we will have more efficient handling of those patterns and that way we will not have to change processing much.

1)    How to Identify Patterns?

Let’s relate a thing we all know and that is the structure of DataCube and the custom processing we have done.

In the DataCube cliff has identified the schedules (Hypercubes) available in the given documentSet and then processed things accordingly.

He has identified schedules with the use of regular expression on labels with

public String m_scheduleSuffixRegularExpression = “^.* \\[Schedule\\]$”;

and created DataCube.

In our custom processing we are doing following things:

  1. We identify the Abstracts available and then find the Schedules (I would love to mention here that we are not using any specific searching criteria to find schedules but we have found it according to the structure available in all presentation linkbase)
  2. After we find the schedule we have identified whether it is a case of Payment Experience Summary(Where single Dimension is available) or it is a case of Account Placed For Collection(Where multi Dimension is available) or it is a case of Financial Statement(Balance Sheet)(Where Balance Sheet [Hierarchy] abstract item is available). So we have 3 identifiers for patterns as of now in custom processing.
    1. Single Dimension
    2. Multi Dimension
    3. Hierarchy Abstract Element
  3. For Label-Value case we have observed that those are direct child of abstract and not abstract.

So from above what I understand is 2nd case can be easily identified since we will have Schedules (Hypercubes) if we assume we are using DataCubes. Now For Label and Values we need to make some space in the DataCube Structure if we can and that will solve all issues as far as the current instance files available.

2) Code should not be using any XBRL related stuff outside the XPU [XBRL processing Utilities], if we get any Coyote of XPU code to the Pattern processing then that would be leakage of concerns

For pattern processing we need the Coyote and so we need to use it there. I don’t know whether I am correct in interpreting the issue. We can discuss on this issue.

3)

The “Schedule” meta pattern is a container which is used by all other meta-patterns. The table holds all other portions of the pattern. A Schedule may contain a Hierarchy pattern, a Calculation pattern or a Movement pattern.

So, Schedule can be represented in different ways as we have in Trade payments Tab for the widget “Payment Experience Summary (Single Dimension)” and “Account placed for collection (Record Pattern –Multiple Dimension)” so we can identify the difference between these two by identifying number of dimension.

And Hierarchy pattern in the case of financial statement is contained in the Schedule Pattern and till now whatever use cases we are having, we have been able to separate the processing for them but we can’t be sure for this thing. And multiple use cases can be there.

4) Rules Processing

Pattern Processor should take care of the rules suggested by the Eugene

Benefits

  • After processing instance file we will get output data structure that will serve as input for pattern processing will be fixed once and for all and so we will be out from the issue of processing instance file. (this structure can be a issue to discuss and once fixed, must not be touched again)
  • For different patterns there will be separate processing so we can maintain the pattern processing easily and we can also add new patterns easily without much effort and it will not affect the current processing as well.
  • We will have an output data structure which will be a combination of data structures coming out from specific patterns (As shown in Figure) and that will be the data which we need and need to display.

Please provide your input and concerns for this specific approach. I have found this much easier but we can discuss it to make more efficient and help ourselves in a big way.

Please discuss this approach and if all concerned persons are agreed then we can move forward in the same direction.

1)   How to Identify Patterns?

Let’s relate a thing we all know and that is the structure of DataCube and the custom processing we have done.

In the DataCube cliff has identified the schedules (Hypercubes) available in the given documentSet and then processed things accordingly.

He has identified schedules with the use of regular expression on labels with

public String m_scheduleSuffixRegularExpression = “^.* \\[Schedule\\]$”;

and created DataCube.

In our custom processing we are doing following things:

  1. We identify the Abstracts available and then find the Schedules (I would love to mention here that we are not using any specific searching criteria to find schedules but we have found it according to the structure available in all presentation linkbase)
  2. After we find the schedule we have identified whether it is a case of Payment Experience Summary(Where single Dimension is available) or it is a case of Account Placed For Collection(Where multi Dimension is available) or it is a case of Financial Statement(Balance Sheet)(Where Balance Sheet [Hierarchy] abstract item is available). So we have 3 identifiers for patterns as of now in custom processing.
    1. Single Dimension
    2. Multi Dimension
    3. Hierarchy Abstract Element
  3. For Label-Value case we have observed that those are direct child of abstract and not abstract.

So from above what I understand is 2nd case can be easily identified since we will have Schedules (Hypercubes) if we assume we are using DataCubes. Now For Label and Values we need to make some space in the DataCube Structure if we can and that will solve all issues as far as the current instance files available.

2) Code should not be using any XBRL related stuff outside the XPU [XBRL processing Utilities], if we get any Coyote of XPU code to the Pattern processing then that would be leakage of concerns

For pattern processing we need the Coyote and so we need to use it there. I don’t know whether I am correct in interpreting the issue. We can discuss on this issue.

3)

The “Schedule” meta pattern is a container which is used by all other meta-patterns. The table holds all other portions of the pattern. A Schedule may contain a Hierarchy pattern, a Calculation pattern or a Movement pattern.

So, Schedule can be represented in different ways as we have in Trade payments Tab for the widget “Payment Experience Summary (Single Dimension)” and “Account placed for collection (Record Pattern –Multiple Dimension)” so we can identify the difference between these two by identifying number of dimension.

And Hierarchy pattern in the case of financial statement is contained in the Schedule Pattern and till now whatever use cases we are having, we have been able to separate the processing for them but we can’t be sure for this thing. And multiple use cases can be there.

4) Rules Processing

Pattern Processor should take care of the rules suggested by the Eugene.