Search in sources :

Example 26 with Classification

use of net.geoprism.registry.model.Classification in project geoprism-registry by terraframe.

the class ListTypeTest method setUpInReq.

@Request
private static void setUpInReq() {
    type = ClassificationType.apply(ClassificationTypeTest.createMock());
    Classification root = Classification.newInstance(type);
    root.setCode(CODE);
    root.setDisplayLabel(new LocalizedValue("Test Classification"));
    root.apply(null);
    testClassification = (AttributeClassificationType) AttributeType.factory("testClassification", new LocalizedValue("testClassificationLocalName"), new LocalizedValue("testClassificationLocalDescrip"), AttributeClassificationType.TYPE, false, false, false);
    testClassification.setClassificationType(type.getCode());
    testClassification.setRootTerm(root.toTerm());
    ServerGeoObjectType got = ServerGeoObjectType.get(USATestData.STATE.getCode());
    testClassification = (AttributeClassificationType) got.createAttributeType(testClassification.toJSON().toString());
    testTerm = (AttributeTermType) AttributeType.factory("testTerm", new LocalizedValue("testTermLocalName"), new LocalizedValue("testTermLocalDescrip"), AttributeTermType.TYPE, false, false, false);
    testTerm = (AttributeTermType) got.createAttributeType(testTerm.toJSON().toString());
    USATestData.COLORADO.setDefaultValue(testClassification.getName(), CODE);
}
Also used : LocalizedValue(org.commongeoregistry.adapter.dataaccess.LocalizedValue) ServerGeoObjectType(net.geoprism.registry.model.ServerGeoObjectType) Classification(net.geoprism.registry.model.Classification) Request(com.runwaysdk.session.Request)

Example 27 with Classification

use of net.geoprism.registry.model.Classification in project geoprism-registry by terraframe.

the class XMLImporterTest method classSetUp.

@Request
@BeforeClass
public static void classSetUp() {
    type = ClassificationType.apply(ClassificationTypeTest.createMock());
    Classification root = Classification.newInstance(type);
    root.setCode(ROOT_CODE);
    root.setDisplayLabel(new LocalizedValue("Test Classification"));
    root.apply(null);
}
Also used : LocalizedValue(org.commongeoregistry.adapter.dataaccess.LocalizedValue) Classification(net.geoprism.registry.model.Classification) BeforeClass(org.junit.BeforeClass) Request(com.runwaysdk.session.Request)

Aggregations

Classification (net.geoprism.registry.model.Classification)27 Request (com.runwaysdk.session.Request)19 ClassificationType (net.geoprism.registry.model.ClassificationType)14 LocalizedValue (org.commongeoregistry.adapter.dataaccess.LocalizedValue)9 AttributeClassificationType (org.commongeoregistry.adapter.metadata.AttributeClassificationType)8 AttributeTermType (org.commongeoregistry.adapter.metadata.AttributeTermType)8 Classifier (net.geoprism.ontology.Classifier)7 AttributeType (org.commongeoregistry.adapter.metadata.AttributeType)7 Term (org.commongeoregistry.adapter.Term)6 AbstractClassification (com.runwaysdk.system.AbstractClassification)5 ServerGeoObjectType (net.geoprism.registry.model.ServerGeoObjectType)5 JsonObject (com.google.gson.JsonObject)4 EdgeObject (com.runwaysdk.business.graph.EdgeObject)4 GraphObject (com.runwaysdk.business.graph.GraphObject)4 VertexObject (com.runwaysdk.business.graph.VertexObject)4 LineString (com.vividsolutions.jts.geom.LineString)4 MultiLineString (com.vividsolutions.jts.geom.MultiLineString)4 Test (org.junit.Test)4 JsonArray (com.google.gson.JsonArray)3 MdClassificationDAOIF (com.runwaysdk.dataaccess.MdClassificationDAOIF)3