Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g.V().has( 'ArtifactType', 'sLabel', 'ArtifactType' ) | |
.match( | |
__.as( 'at' ).has( 'name' ).filter{ it.get().value('name') ==~ /(?i).*?requirement.*/ }, | |
__.as( 'at' ).out( 'ownedBy' ).as( 'or' ), | |
__.as( 'or' ).in( 'ownedBy' ).hasLabel( 'Container' ).as( 'c' ), | |
__.as( 'or' ).has( 'externalId' ).filter{ | |
it.get().value( 'externalId' ).contains( 'http' ) }.filter{ | |
{ u -> try { headRequest = new URL( u ).openConnection(); headRequest.setConnectTimeout( 1000 ); headRequest.setRequestMethod( "HEAD" ); return headRequest.getResponseCode() in [ 200, 401 ] } catch (e) { return false } }( it.get().value( 'externalId' ) ) }, | |
__.as( 'or' ).out( 'hasType' ).as( 'rt' ) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g.V().match( | |
__.as( 'dngRepoType' ).has( 'RepositoryType', 'name', 'DOORS-NG Repository Type' ), | |
__.as( 'dngRepoType' ).in( 'hasType' ).hasLabel( 'Repository' ).as( 'dngRepo' ), | |
__.as( 'dngRepo' ).in( 'ownedBy' ).hasLabel( 'ArtifactType' ) | |
.filter{ it.get().value('name') ==~ /(?i).*?requirement.*/ }.as( 'dngReqType' ), | |
__.as( 'dngReqType' ).in( 'hasType' ).hasLabel( 'Artifact' ).as( 'dng' ), | |
__.as( 'dng' ).both( 'Relation' ).hasLabel( 'Artifact' ).has( 'type' ).as( 'sysML' ), | |
__.as( 'sysML' ).out( 'hasType' ).hasLabel( 'ArtifactType' ) | |
.filter{ it.get().value('name') ==~ /(?i).*?requirement.*/ }.as( 'sysMLtype' ), | |
__.as( 'sysMLtype' ).out( 'ownedBy' ).as( 'sysMLrepo' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g.E().has( 'Relation', 'container', 'Drone-006' ).bothV().dedup() | |
.where( and( | |
out( 'hasType' ), | |
out( 'ownedBy' ).or( | |
has( 'name', 'DronesFlow' ), | |
has( 'name', 'Drone_MDO_With_Mid_Fid_Aero' ), | |
has( 'name', 'Esteco_Drone03-StructureAndParametrics_a' ) ) ) ) | |
.group().by( out( 'hasType' ).values( 'name' ) ).by( count() ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
userName = { u,t -> userGet = new URL( "http://syndeia.company.com:9000/users/${u}" ).openConnection(); userGet.setRequestProperty( "Accept", "application/json" ); userGet.setRequestProperty( "X-Auth-Token", t ); userGet.getResponseCode(); j = new groovy.json.JsonSlurper().parseText( userGet.getInputStream().getText() ); j.resources.name } | |
signInToken = { -> signInPost = new URL( "http://syndeia.company.com:9000/signIn" ).openConnection(); message = '{ "username": "email@intercax.com", "password": "pass-phrase", "rememberMe": false }'; signInPost.setDoOutput( true ); signInPost.setRequestProperty( "Content-Type", "application/json" ); signInPost.getOutputStream().write( message.getBytes( "UTF-8" ) ); signInPost.getResponseCode(); j = new groovy.json.JsonSlurper().parseText( signInPost.getInputStream().getText() ); j.resources.token } | |
g.E().has( 'Relation', 'container', 'DZSB19' ) | |
.group() | |
.by( values( 'modifiedDate' ) | |
.map{ ( LocalDateTime.parse( it.get(), java.time.format.DateTimeFormatter.IS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g.V().has( 'ArtifactType', 'name', 'Part' ) | |
.match( | |
__.as( 't' ).in( 'hasType' ).as( 'p' ), | |
__.as( 't' ).out( 'ownedBy' ).as( 'r' ), | |
__.as( 'r' ).out( 'hasType' ).filter{ it.get().value( 'name' ).contains( 'Windchill' ) }.as( 'rt' ), | |
__.as( 'p' ).both( 'Relation' ).as( 'o' ), | |
__.as( 'o' ).out( 'hasType' ).filter{ it.get().value( 'name' ) ==~ /(?i).*?((requirement)|(task)).*/ } | |
) | |
.group() | |
.by( select( 'p' ) ).unfold().project( 'part', 'requirements' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reqPriority = { r,e -> reqPost = new URL( "http://some.host.com:9000/external/jira/${r}/artifacts/external/id?includeAttributes=priority" ).openConnection(); reqPost.setRequestProperty( "Content-Type", "application/json" ); reqPost.setRequestProperty( "Accept", "application/json" ); reqPost.setRequestProperty( "Ext-Auth-Token", "SOMETOKEN" ); reqPost.setRequestProperty( "User-Id", "SOMEUSER" ); reqPost.setDoOutput( true ); message = /{ "externalId": "${e}" }/; reqPost.getOutputStream().write( message.getBytes( "UTF-8" ) ); reqPost.getResponseCode(); j = new groovy.json.JsonSlurper().parseText( reqPost.getInputStream().getText() ); j.resources.attributes.priority.get( 'name' ) } | |
g.V().has( 'ArtifactType', 'name', 'Story' ).where( out( 'ownedBy' ).filter{ it -> it.get().value( 'name' ).contains( "Intercax" ) }.out( 'hasType' ).has( 'name', "JIRA Repository Type" ) ).in( 'hasType' ).limit( 1 ).as( 'e' ).out( 'ownedBy' ).out( 'ownedBy' ).as( 'r' ).select( 'r', 'e' ).by( 'sKey' ).by( 'externalId' ).map { it -> re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signInToken = { -> signInPost = new URL( "http://some.host.com:9000/signIn" ).openConnection(); message = '{ "username": "someuser@somehost.com", "password": "my-password", "rememberMe": false }'; signInPost.setDoOutput( true ); signInPost.setRequestProperty( "Content-Type", "application/json" ); signInPost.getOutputStream().write( message.getBytes( "UTF-8" ) ); signInPost.getResponseCode(); j = new groovy.json.JsonSlurper().parseText( signInPost.getInputStream().getText() ); j.resources.token } | |
userName = { u,t -> userGet = new URL( "http://some.host.com:9000/users/${u}" ).openConnection(); userGet.setRequestProperty( "Accept", "application/json" ); userGet.setRequestProperty( "X-Auth-Token", t ); userGet.getResponseCode(); j = new groovy.json.JsonSlurper().parseText( userGet.getInputStream().getText() ); j.resources.name } | |
g.V().limit(1).map { it -> userName( it.get().value( 'modifiedBy' ), signInToken() ) }.find() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signInPost = new URL( "http://some.host.com/login" ).openConnection() | |
message = '{ "username": "email", "password": "somepass", "rememberMe": false }' | |
signInPost.setDoOutput( true ) | |
signInPost.setRequestProperty( "Content-Type", "application/json" ) | |
signInPost.getOutputStream().write( message.getBytes( "UTF-8" ) ) | |
signInPost.getResponseCode() | |
j = new groovy.json.JsonSlurper().parseText( signInPost.getInputStream().getText() ) | |
j.resources.token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.intercax.groovy.jarSniffer | |
import java.util.jar.* | |
/** | |
* @author Lonnie VanZandt fluent version | |
* @author Ivan Krizsan original idea | |
*/ | |
// map of manually-resolved jars by their file names |
NewerOlder