Fix broken build

This commit is contained in:
jamesagnew 2015-07-08 22:27:49 -04:00
parent 3bfecb27a8
commit d5b99c2c10
13 changed files with 19 additions and 50 deletions

View File

@ -283,7 +283,7 @@ public abstract class BaseRuntimeDeclaredChildDefinition extends BaseRuntimeChil
} }
} }
private final static class ListAccessor implements IAccessor { private static final class ListAccessor implements IAccessor {
private final Method myAccessorMethod; private final Method myAccessorMethod;
private ListAccessor(Method theAccessor) { private ListAccessor(Method theAccessor) {

View File

@ -89,7 +89,7 @@ public abstract class BaseRuntimeElementDefinition<T extends IBase> {
} }
/** /**
* Returns null if none * @return Returns null if none
*/ */
public RuntimeChildDeclaredExtensionDefinition getDeclaredExtension(String theExtensionUrl) { public RuntimeChildDeclaredExtensionDefinition getDeclaredExtension(String theExtensionUrl) {
return myUrlToExtension.get(theExtensionUrl); return myUrlToExtension.get(theExtensionUrl);
@ -166,7 +166,7 @@ public abstract class BaseRuntimeElementDefinition<T extends IBase> {
/** /**
* Invoked prior to use to perform any initialization and make object * Invoked prior to use to perform any initialization and make object
* mutable * mutable.
* @param theContext TODO * @param theContext TODO
*/ */
void sealAndInitialize(FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) { void sealAndInitialize(FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {
@ -197,22 +197,22 @@ public abstract class BaseRuntimeElementDefinition<T extends IBase> {
public enum ChildTypeEnum { public enum ChildTypeEnum {
COMPOSITE_DATATYPE, PRIMITIVE_DATATYPE, RESOURCE, RESOURCE_REF, RESOURCE_BLOCK, COMPOSITE_DATATYPE, PRIMITIVE_DATATYPE, RESOURCE, RESOURCE_REF, RESOURCE_BLOCK,
/** /**
* HAPI style * HAPI style.
*/ */
PRIMITIVE_XHTML, PRIMITIVE_XHTML,
UNDECL_EXT, EXTENSION_DECLARED, UNDECL_EXT, EXTENSION_DECLARED,
/** /**
* HAPI structure style * HAPI structure style.
*/ */
CONTAINED_RESOURCES, CONTAINED_RESOURCES,
ID_DATATYPE, ID_DATATYPE,
/** /**
* HL7.org structure style * HL7.org structure style.
*/ */
CONTAINED_RESOURCE_LIST, CONTAINED_RESOURCE_LIST,
/** /**
* HL7.org style * HL7.org style.
*/ */
PRIMITIVE_XHTML_HL7ORG PRIMITIVE_XHTML_HL7ORG

View File

@ -22,7 +22,7 @@ package ca.uhn.fhir.context;
/** /**
* Non-checked exception indicating that HAPI was unable to initialize due to * Non-checked exception indicating that HAPI was unable to initialize due to
* a detected configuration problem * a detected configuration problem.
*/ */
public class ConfigurationException extends RuntimeException { public class ConfigurationException extends RuntimeException {

View File

@ -1,33 +0,0 @@
package ca.uhn.fhir.rest.server;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.servlet.ServletException;
public class ConfigurationException extends ServletException {
public ConfigurationException(String theString) {
super(theString);
}
private static final long serialVersionUID = 1L;
}

View File

@ -48,6 +48,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.ProvidedResourceScanner; import ca.uhn.fhir.context.ProvidedResourceScanner;
import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition;

View File

@ -10,6 +10,7 @@ import org.eclipse.jetty.servlet.ServletHolder;
import org.junit.After; import org.junit.After;
import org.junit.Test; import org.junit.Test;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Binary; import ca.uhn.fhir.model.dstu.resource.Binary;

View File

@ -964,7 +964,7 @@ public class Composition extends DomainResource {
/** /**
* A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type. * A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type.
*/ */
@Child(name = "class_", type = {CodeableConcept.class}, order=3, min=0, max=1) @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=1)
@Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type." ) @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type." )
protected CodeableConcept class_; protected CodeableConcept class_;

View File

@ -801,7 +801,7 @@ public class DocumentReference extends DomainResource {
/** /**
* A categorization for the type of document. The class is an abstraction from the type specifying the high-level kind of document (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow) at a macro level. * A categorization for the type of document. The class is an abstraction from the type specifying the high-level kind of document (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow) at a macro level.
*/ */
@Child(name = "class_", type = {CodeableConcept.class}, order=4, min=0, max=1) @Child(name = "class", type = {CodeableConcept.class}, order=4, min=0, max=1)
@Description(shortDefinition="Categorization of document", formalDefinition="A categorization for the type of document. The class is an abstraction from the type specifying the high-level kind of document (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow) at a macro level." ) @Description(shortDefinition="Categorization of document", formalDefinition="A categorization for the type of document. The class is an abstraction from the type specifying the high-level kind of document (e.g., Report, Summary, Images, Treatment Plan, Patient Preferences, Workflow) at a macro level." )
protected CodeableConcept class_; protected CodeableConcept class_;

View File

@ -1615,7 +1615,7 @@ public class Encounter extends DomainResource {
/** /**
* inpatient | outpatient | ambulatory | emergency +. * inpatient | outpatient | ambulatory | emergency +.
*/ */
@Child(name = "class_", type = {CodeType.class}, order=3, min=0, max=1) @Child(name = "class", type = {CodeType.class}, order=3, min=0, max=1)
@Description(shortDefinition="inpatient | outpatient | ambulatory | emergency +", formalDefinition="inpatient | outpatient | ambulatory | emergency +." ) @Description(shortDefinition="inpatient | outpatient | ambulatory | emergency +", formalDefinition="inpatient | outpatient | ambulatory | emergency +." )
protected Enumeration<EncounterClass> class_; protected Enumeration<EncounterClass> class_;

View File

@ -945,7 +945,7 @@ public class Medication extends DomainResource {
/** /**
* Information that only applies to packages (not products). * Information that only applies to packages (not products).
*/ */
@Child(name = "package_", type = {}, order=6, min=0, max=1) @Child(name = "package", type = {}, order=6, min=0, max=1)
@Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." ) @Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." )
protected MedicationPackageComponent package_; protected MedicationPackageComponent package_;

View File

@ -1021,7 +1021,7 @@ public class StructureDefinition extends DomainResource {
/** /**
* Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. * Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.
*/ */
@Child(name = "abstract_", type = {BooleanType.class}, order=18, min=1, max=1) @Child(name = "abstract", type = {BooleanType.class}, order=18, min=1, max=1)
@Description(shortDefinition="Whether the structure is abstract", formalDefinition="Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type." ) @Description(shortDefinition="Whether the structure is abstract", formalDefinition="Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type." )
protected BooleanType abstract_; protected BooleanType abstract_;

View File

@ -195,9 +195,9 @@ public class ServerConformanceProviderHl7OrgDstu2Test {
assertEquals(DiagnosticReport.SP_SUBJECT, res.getSearchParam().get(0).getName()); assertEquals(DiagnosticReport.SP_SUBJECT, res.getSearchParam().get(0).getName());
assertEquals("identifier", res.getSearchParam().get(0).getChain().get(0).getValue()); assertEquals("identifier", res.getSearchParam().get(0).getChain().get(0).getValue());
assertEquals(DiagnosticReport.SP_CODE, res.getSearchParam().get(2).getName()); assertEquals(DiagnosticReport.SP_CODE, res.getSearchParam().get(1).getName());
assertEquals(DiagnosticReport.SP_DATE, res.getSearchParam().get(1).getName()); assertEquals(DiagnosticReport.SP_DATE, res.getSearchParam().get(2).getName());
assertEquals(1, res.getSearchInclude().size()); assertEquals(1, res.getSearchInclude().size());
assertEquals("DiagnosticReport.result", res.getSearchInclude().get(0).getValue()); assertEquals("DiagnosticReport.result", res.getSearchInclude().get(0).getValue());

View File

@ -40,7 +40,7 @@ public class StructureDefinitionValidatorTest {
StructureDefinitionValidator val = new StructureDefinitionValidator(ourCtx); StructureDefinitionValidator val = new StructureDefinitionValidator(ourCtx);
List<ValidationMessage> output = val.validate(input, EncodingEnum.JSON, Patient.class); List<ValidationMessage> output = val.validate(input, EncodingEnum.JSON, Patient.class);
assertEquals(output.toString(), 1, output.size()); assertEquals(output.toString(), 1, output.size());
assertThat(output.toString(), containsString("/foo Element is unknown")); assertThat(output.get(0).toXML(), stringContainsInOrder("/foo", "Element is unknown"));
} }
@Test @Test
@ -65,6 +65,6 @@ public class StructureDefinitionValidatorTest {
StructureDefinitionValidator val = new StructureDefinitionValidator(ourCtx); StructureDefinitionValidator val = new StructureDefinitionValidator(ourCtx);
List<ValidationMessage> output = val.validate(input, EncodingEnum.XML, Patient.class); List<ValidationMessage> output = val.validate(input, EncodingEnum.XML, Patient.class);
assertEquals(output.toString(), 1, output.size()); assertEquals(output.toString(), 1, output.size());
assertThat(output.toString(), containsString("/f:Patient/f:foo Element is unknown")); assertThat(output.get(0).toXML(), stringContainsInOrder("/f:Patient/f:foo", "Element is unknown"));
} }
} }