/** * Returns the Xml-ID of this element. This ID is unique within the report-definition, but is not a internal * object-instance ID but a user-defined string. * * @return the element id. */ public String getId() { return (String) getAttribute( AttributeNames.Xml.NAMESPACE, AttributeNames.Xml.ID ); }
continue; target.setAttribute( namespace, name, getAttribute( namespace, name ), false );
for ( int j = 0; j < attributeNames.length; j++ ) { final String name = attributeNames[j]; final Object value = element.getAttribute( namespace, name ); if ( value == null ) { continue;
for ( int j = 0; j < attributeNames.length; j++ ) { final String name = attributeNames[j]; final Object value = element.getAttribute( namespace, name ); if ( value == null ) { continue;
public ElementType getElementType() { if ( elementType == null ) { final Object maybeElementType = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.ELEMENT_TYPE ); if ( maybeElementType instanceof ElementType ) { this.elementType = (ElementType) maybeElementType; } else { this.elementType = LegacyType.INSTANCE; } } return elementType; }
/** * Returns the name of the Element. The name of the Element is never null. * * @return the name. */ public String getName() { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME ); if ( o != null ) { return String.valueOf( o ); } return ""; }
public ResourceKey getContentBase() { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.CONTENT_BASE ); if ( o instanceof ResourceKey ) { return (ResourceKey) o; } if ( parent != null ) { return parent.getContentBase(); } return null; }
/** * Returns the resource-key of the file that defined this element. This method may return null if the whole report was * created in memory. * * @return the the definition source. */ public ResourceKey getDefinitionSource() { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.SOURCE ); if ( o instanceof ResourceKey ) { return (ResourceKey) o; } if ( parent != null ) { return parent.getDefinitionSource(); } return null; }
public void testElementAttributeCopyOnWrite2() { final Element e = new Element(); final Element clone = e.clone(); clone.setAttribute( "namespace", "name", "value" ); assertNull( e.getAttribute( "namespace", "name" ) ); }
public void testElementAttributeCopyOnWrite() { final Element e = new Element(); final Element clone = e.clone(); e.setAttribute( "namespace", "name", "value" ); assertNull( clone.getAttribute( "namespace", "name" ) ); }
final Object attValue = element.getAttribute( attributeMetaData.getNameSpace(), attributeMetaData.getName() ); if ( attValue == null ) { continue;