use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Node in project osmosis by openstreetmap.
the class PostgreSqlDatasetContext method initialize.
/**
* Initialises the database connection and associated data access objects.
*/
private void initialize() {
if (dbCtx == null) {
ActionDao actionDao;
dbCtx = new DatabaseContext(loginCredentials);
new SchemaVersionValidator(dbCtx, preferences).validateVersion(PostgreSqlVersionConstants.SCHEMA_VERSION);
capabilityChecker = new DatabaseCapabilityChecker(dbCtx);
actionDao = releasableContainer.add(new ActionDao(dbCtx));
userDao = releasableContainer.add(new UserDao(dbCtx, actionDao));
nodeDao = releasableContainer.add(new NodeDao(dbCtx, actionDao));
wayDao = releasableContainer.add(new WayDao(dbCtx, actionDao));
relationDao = releasableContainer.add(new RelationDao(dbCtx, actionDao));
nodeManager = new PostgreSqlEntityManager<Node>(nodeDao, userDao);
wayManager = new PostgreSqlEntityManager<Way>(wayDao, userDao);
relationManager = new PostgreSqlEntityManager<Relation>(relationDao, userDao);
}
initialized = true;
}
use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Node in project osmosis by openstreetmap.
the class NodeMapper method parseRecord.
/**
* {@inheritDoc}
*/
@Override
public Node parseRecord(ResultSet resultSet) {
try {
PGgeometry geom;
Point point;
geom = (PGgeometry) resultSet.getObject("geom");
point = (Point) geom.getGeometry();
return new Node(new CommonEntityData(resultSet.getLong("id"), resultSet.getInt("version"), new Date(resultSet.getTimestamp("tstamp").getTime()), buildUser(resultSet), resultSet.getLong("changeset_id")), point.y, point.x);
} catch (SQLException e) {
throw new OsmosisRuntimeException("Unable to build a node from the current recordset row.", e);
}
}
use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Node in project yakc by manusa.
the class AuthIT method performTokenAuthInNewClient.
@Test
void performTokenAuthInNewClient() throws IOException {
// Given
final Secret secret = retrieveSecretForServiceAccount();
final Configuration configuration = Configuration.builder().server(KC.getConfiguration().getServer()).certificateAuthorityData(secret.getData().get("ca.crt")).token(() -> secret.getData().get("token")).build();
// When
final Node node = new KubernetesClient(configuration).create(CoreV1Api.class).listNode().stream().findFirst().orElse(null);
// Then
assertThat(node).isNotNull().hasFieldOrPropertyWithValue("metadata.name", nodeName);
}
use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Node in project LinkedGeoData by GeoKnow.
the class LGDVocabDefault method createEntity.
@Override
public Entity createEntity(Resource res) {
if (res.toString().startsWith(NODE)) {
String idStr = res.toString().substring(NODE.length());
Long id = Long.parseLong(idStr);
CommonEntityData data = new CommonEntityData(id, 0, new Date(), new OsmUser(0, ""), 0);
return new Node(data, 0.0, 0.0);
}
return null;
}
use of com.marcnuri.yakc.model.io.k8s.api.core.v1.Node in project JavaProgrames by srv-shivam.
the class ReverseKNodes method add.
public void add(int data) {
Node newNode = new Node(data);
if (head == null) {
head = newNode;
tail = newNode;
++length;
} else {
tail.next = newNode;
tail = newNode;
++length;
}
}
Aggregations