public Message( Element element, String text ) { this( text ); this.node = element; this.context = DOMUtil.getContext( element ); }
public static String getSimpleElementText( final Element node, final String name ) { final Element namedElement = getFirstElement( node, name ); if ( namedElement == null ) { return null; } return getSimpleElementText( namedElement ); }
final Element names = DOMUtil.getFirstElement( root, "names" ); String shortLabel = null; String fullName = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); fullName = DOMUtil.getFullName( names ); final Element xrefElement = DOMUtil.getFirstElement( root, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { final Element experimentListElement = DOMUtil.getFirstElement( root, "experimentList" ); final Element annotationElement = DOMUtil.getFirstElement( root, "attributeList" ); Collection annotations = null; Collection expressedInAnnotations = null; final Element participantsList = DOMUtil.getFirstElement( root, "participantList" ); final NodeList allParticipants = participantsList.getElementsByTagName( "proteinParticipant" ); final int participantCount = allParticipants.getLength(); Element proteinRefElement = DOMUtil.getFirstElement( participantElement, "proteinInteractorRef" ); final Element proteinElement = DOMUtil.getFirstElement( participantElement, "proteinInteractor" ); if ( proteinElement != null ) { final Element roleElement = DOMUtil.getFirstElement( participantElement, "role" ); String role = null;
Element xrefElement = DOMUtil.getFirstElement( (Element) element, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { Element descriptionElement = DOMUtil.getFirstElement( (Element) element, "featureDescription" ); if ( descriptionElement != null ) { Element descriptionNameElement = DOMUtil.getFirstElement( descriptionElement, "names" ); descriptionShortLabel = DOMUtil.getShortLabel( descriptionNameElement ); descriptionFullName = DOMUtil.getFullName( descriptionNameElement ); Element typeXrefElement = DOMUtil.getFirstElement( descriptionElement, "xref" ); if ( typeXrefElement != null ) { XrefTag typeXref = XrefParser.processPrimaryRef( typeXrefElement ); Element detectionElement = DOMUtil.getFirstElement( (Element) element, "featureDetection" ); FeatureDetectionTag featureDetection = null; if ( detectionElement != null ) { Element detectionXrefElement = DOMUtil.getFirstElement( detectionElement, "xref" ); XrefTag detectionXref = XrefParser.processPrimaryRef( detectionXrefElement ); Element locationElement = DOMUtil.getFirstElement( (Element) element, "location" ); LocationTag location = LocationParser.process( locationElement );
/** * @param entry */ public Collection process( final Element entry ) { final Element interactionList = DOMUtil.getFirstElement( entry, "interactionList" ); final NodeList someInteractions = interactionList.getElementsByTagName( "interaction" ); final int count = someInteractions.getLength(); final Collection interactions = new ArrayList( count ); for ( int i = 0; i < count; i++ ) { final Element interactionNode = (Element) someInteractions.item( i ); final InteractionParser interaction = new InteractionParser( experimentList, participantList, interactionNode ); InteractionTag interactionTag = interaction.process(); if ( interactionTag != null ) { interactions.add( interactionTag ); } } // interactions return interactions; } }
final Element names = DOMUtil.getFirstElement( element, "names" ); String shortLabel = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); final Element cellTypeXref = DOMUtil.getFirstElement( element, "xref" );
/** * @param names * * @return */ public static String getFullName( final Element names ) { return getSimpleElementText( names, "fullName" ); }
} else { Collection c = DOMUtil.getDirectElementsByTagName( parent, featureIdentificationElement.getNodeName() ); parent.insertBefore( locationElement, (Node) c.iterator().next() );
final Element names = DOMUtil.getFirstElement( root, "names" ); String shortLabel = null; String fullName = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); fullName = DOMUtil.getFullName( names ); final Element xrefElement = DOMUtil.getFirstElement( root, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { final Element experimentListElement = DOMUtil.getFirstElement( root, "experimentList" ); final Element annotationElement = DOMUtil.getFirstElement( root, "attributeList" ); Collection annotations = null; Collection expressedInAnnotations = null; final Element participantsList = DOMUtil.getFirstElement( root, "participantList" ); final NodeList allParticipants = participantsList.getElementsByTagName( "proteinParticipant" ); final int participantCount = allParticipants.getLength(); Element proteinRefElement = DOMUtil.getFirstElement( participantElement, "proteinInteractorRef" ); final Element proteinElement = DOMUtil.getFirstElement( participantElement, "proteinInteractor" ); if ( proteinElement != null ) { final Element roleElement = DOMUtil.getFirstElement( participantElement, "role" ); String role = null;
Element xrefElement = DOMUtil.getFirstElement( (Element) element, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { Element descriptionElement = DOMUtil.getFirstElement( (Element) element, "featureDescription" ); if ( descriptionElement != null ) { Element descriptionNameElement = DOMUtil.getFirstElement( descriptionElement, "names" ); descriptionShortLabel = DOMUtil.getShortLabel( descriptionNameElement ); descriptionFullName = DOMUtil.getFullName( descriptionNameElement ); Element typeXrefElement = DOMUtil.getFirstElement( descriptionElement, "xref" ); if ( typeXrefElement != null ) { XrefTag typeXref = XrefParser.processPrimaryRef( typeXrefElement ); Element detectionElement = DOMUtil.getFirstElement( (Element) element, "featureDetection" ); FeatureDetectionTag featureDetection = null; if ( detectionElement != null ) { Element detectionXrefElement = DOMUtil.getFirstElement( detectionElement, "xref" ); XrefTag detectionXref = XrefParser.processPrimaryRef( detectionXrefElement ); Element locationElement = DOMUtil.getFirstElement( (Element) element, "location" ); LocationTag location = LocationParser.process( locationElement );
/** * @param entry */ public Collection process( final Element entry ) { final Element interactionList = DOMUtil.getFirstElement( entry, "interactionList" ); final NodeList someInteractions = interactionList.getElementsByTagName( "interaction" ); final int count = someInteractions.getLength(); final Collection interactions = new ArrayList( count ); for ( int i = 0; i < count; i++ ) { final Element interactionNode = (Element) someInteractions.item( i ); final InteractionParser interaction = new InteractionParser( experimentList, participantList, interactionNode ); InteractionTag interactionTag = interaction.process(); if ( interactionTag != null ) { interactions.add( interactionTag ); } } // interactions return interactions; } }
final Element names = DOMUtil.getFirstElement( element, "names" ); String shortLabel = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); final Element cellTypeXref = DOMUtil.getFirstElement( element, "xref" );
/** * @param names * * @return */ public static String getShortLabel( final Element names ) { return getSimpleElementText( names, "shortLabel" ); }
} else { Collection c = DOMUtil.getDirectElementsByTagName( parent, featureIdentificationElement.getNodeName() ); parent.insertBefore( locationElement, (Node) c.iterator().next() );
final Element names = DOMUtil.getFirstElement( root, "names" ); String shortLabel = null; String fullName = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); fullName = DOMUtil.getFullName( names ); final Element xrefElement = DOMUtil.getFirstElement( root, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { final Element experimentListElement = DOMUtil.getFirstElement( root, "experimentList" ); final Element annotationElement = DOMUtil.getFirstElement( root, "attributeList" ); Collection annotations = null; Collection expressedInAnnotations = null; final Element participantsList = DOMUtil.getFirstElement( root, "participantList" ); final NodeList allParticipants = participantsList.getElementsByTagName( "proteinParticipant" ); final int participantCount = allParticipants.getLength(); Element proteinRefElement = DOMUtil.getFirstElement( participantElement, "proteinInteractorRef" ); final Element proteinElement = DOMUtil.getFirstElement( participantElement, "proteinInteractor" ); if ( proteinElement != null ) { final Element roleElement = DOMUtil.getFirstElement( participantElement, "role" ); String role = null;
Element xrefElement = DOMUtil.getFirstElement( (Element) element, "xref" ); Collection xrefs = null; if ( xrefElement != null ) { Element descriptionElement = DOMUtil.getFirstElement( (Element) element, "featureDescription" ); if ( descriptionElement != null ) { Element descriptionNameElement = DOMUtil.getFirstElement( descriptionElement, "names" ); descriptionShortLabel = DOMUtil.getShortLabel( descriptionNameElement ); descriptionFullName = DOMUtil.getFullName( descriptionNameElement ); Element typeXrefElement = DOMUtil.getFirstElement( descriptionElement, "xref" ); if ( typeXrefElement != null ) { XrefTag typeXref = XrefParser.processPrimaryRef( typeXrefElement ); Element detectionElement = DOMUtil.getFirstElement( (Element) element, "featureDetection" ); FeatureDetectionTag featureDetection = null; if ( detectionElement != null ) { Element detectionXrefElement = DOMUtil.getFirstElement( detectionElement, "xref" ); XrefTag detectionXref = XrefParser.processPrimaryRef( detectionXrefElement ); Element locationElement = DOMUtil.getFirstElement( (Element) element, "location" ); LocationTag location = LocationParser.process( locationElement );
/** * @param entry */ public Collection process( final Element entry ) { final Element interactionList = DOMUtil.getFirstElement( entry, "interactionList" ); final NodeList someInteractions = interactionList.getElementsByTagName( "interaction" ); final int count = someInteractions.getLength(); final Collection interactions = new ArrayList( count ); for ( int i = 0; i < count; i++ ) { final Element interactionNode = (Element) someInteractions.item( i ); final InteractionParser interaction = new InteractionParser( experimentList, participantList, interactionNode ); InteractionTag interactionTag = interaction.process(); if ( interactionTag != null ) { interactions.add( interactionTag ); } } // interactions return interactions; } }
final Element names = DOMUtil.getFirstElement( element, "names" ); String shortLabel = null; if ( names != null ) { shortLabel = DOMUtil.getShortLabel( names ); final Element cellTypeXref = DOMUtil.getFirstElement( element, "xref" );
public static String getSimpleElementText( final Element node, final String name ) { final Element namedElement = getFirstElement( node, name ); if ( namedElement == null ) { return null; } return getSimpleElementText( namedElement ); }
/** * @param names * * @return */ public static String getFullName( final Element names ) { return getSimpleElementText( names, "fullName" ); }