CreateGraphMLXmlDocument ( Boolean bIncludeAllStatistics ) { AssertValid(); GraphMLXmlDocument oGraphMLXmlDocument = new GraphMLXmlDocument(true); NodeXLGraphMLUtil.DefineVertexCustomMenuGraphMLAttributes( oGraphMLXmlDocument); NodeXLGraphMLUtil.DefineEdgeRelationshipGraphMLAttribute( oGraphMLXmlDocument); if (bIncludeAllStatistics) { oGraphMLXmlDocument.DefineGraphMLAttributes(false, "int", FriendsID, "Friends", SubscriptionsID, "People Subscribed To", SubscribersID, "Subscribers", VideosWatchedID, "Videos Watched", VideosUploadedID, "Videos Uploaded" ); oGraphMLXmlDocument.DefineVertexStringGraphMLAttributes( JoinedDateUtcID, "Joined YouTube Date (UTC)"); NodeXLGraphMLUtil.DefineVertexImageFileGraphMLAttribute( oGraphMLXmlDocument); } return(oGraphMLXmlDocument); }
CreateGraphMLXmlDocument ( WhatToInclude eWhatToInclude ) { AssertValid(); GraphMLXmlDocument oGraphMLXmlDocument = new GraphMLXmlDocument(false); NodeXLGraphMLUtil.DefineEdgeRelationshipGraphMLAttribute( oGraphMLXmlDocument); if (WhatToIncludeFlagIsSet(eWhatToInclude, WhatToInclude.SharedCategoryEdges)) { oGraphMLXmlDocument.DefineEdgeStringGraphMLAttributes( SharedCategoryID, "Shared Category"); } if (WhatToIncludeFlagIsSet(eWhatToInclude, WhatToInclude.SharedCommenterEdges)) { oGraphMLXmlDocument.DefineEdgeStringGraphMLAttributes( SharedCommenterID, "Shared Commenter"); } if (WhatToIncludeFlagIsSet(eWhatToInclude, WhatToInclude.SharedVideoResponderEdges)) { oGraphMLXmlDocument.DefineEdgeStringGraphMLAttributes( SharedVideoResponderID, "Shared Video Responder"); } oGraphMLXmlDocument.DefineVertexStringGraphMLAttributes( TitleID, "Title", AuthorID, "Author", CreatedDateUtcID, "Created Date (UTC)" ); oGraphMLXmlDocument.DefineGraphMLAttribute(false, RatingID, "Rating", "double", null); oGraphMLXmlDocument.DefineGraphMLAttributes(false, "int", ViewsID, "Views", FavoritedID, "Favorited", CommentsID, "Comments" ); NodeXLGraphMLUtil.DefineVertexImageFileGraphMLAttribute( oGraphMLXmlDocument); NodeXLGraphMLUtil.DefineVertexCustomMenuGraphMLAttributes( oGraphMLXmlDocument); return(oGraphMLXmlDocument); }
DefineVertexStatisticsGraphMLAttributes ( GraphMLXmlDocument graphMLXmlDocument ) { Debug.Assert(graphMLXmlDocument != null); graphMLXmlDocument.DefineGraphMLAttributes(false, "int", VertexFollowedID, "Followed", VertexFollowersID, "Followers", VertexStatusesID, "Tweets", VertexFavoritesID, "Favorites", VertexUtcOffsetID, "Time Zone UTC Offset (Seconds)" ); graphMLXmlDocument.DefineVertexStringGraphMLAttributes( VertexDescriptionID, "Description", VertexLocationID, "Location", VertexUrlID, "Web", VertexTimeZoneID, "Time Zone", VertexJoinedDateUtcID, "Joined Twitter Date (UTC)" ); }