org.apache.commons.lang3.NotImplementedException Java Examples

The following examples show how to use org.apache.commons.lang3.NotImplementedException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ValueSetExpanderSimple.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
private void excludeCodes(ConceptSetComponent inc, List<ValueSetExpansionParameterComponent> params) throws TerminologyServiceException {
	  ValueSet cs = context.fetchCodeSystem(inc.getSystem().toString());
	  if (cs == null)
	  	throw new TerminologyServiceException("unable to find value set "+inc.getSystem().toString());
    if (inc.getConcept().size() == 0 && inc.getFilter().size() == 0) {
      // special case - add all the code system
//      for (ConceptDefinitionComponent def : cs.getDefine().getConcept()) {
//!!!!        addCodeAndDescendents(inc.getSystem(), def);
//      }
    }
      

	  for (ConceptReferenceComponent c : inc.getConcept()) {
	  	// we don't need to check whether the codes are valid here- they can't have gotten into this list if they aren't valid
	  	map.remove(key(inc.getSystem(), c.getCode()));
	  }
	  if (inc.getFilter().size() > 0)
	  	throw new NotImplementedException("not done yet");
  }
 
Example #2
Source File: SetPropertyCommand.java    From canon-sdk-java with MIT License 6 votes vote down vote up
@Override
protected R runInternal() throws InterruptedException {
    /*
     * Implementation to simplify set values so less duplicate code in runInternal() for set commands.
     *
     * This implementation might not fit for all set, if it is the case then sub-class should override runInternal().
     */
    final EdsdkLibrary.EdsBaseRef targetRef = getTargetRefInternal();

    if (nativeEnum != null) {
        CanonFactory.propertySetLogic().setPropertyData(targetRef, propertyID, nativeEnum);
        return null;
    }

    if (value != null) {
        CanonFactory.propertySetLogic().setPropertyDataAdvanced(targetRef, propertyID, value);
        return null;
    }

    // well not sure there is much to do or change
    throw new NotImplementedException("that's a pity...");
}
 
Example #3
Source File: ValueSetExpanderSimple.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
private void excludeCodes(ConceptSetComponent exc, List<ValueSetExpansionParameterComponent> params) throws TerminologyServiceException {
  if (exc.hasSystem() && exc.getConcept().size() == 0 && exc.getFilter().size() == 0) {
    excludeSystems.add(exc.getSystem());
  }

  if (exc.hasValueSet())
    throw new Error("Processing Value set references in exclude is not yet done");
  // importValueSet(imp.getValue(), params, profile);

  CodeSystem cs = context.fetchCodeSystem(exc.getSystem());
  if ((cs == null || cs.getContent() != CodeSystemContentMode.COMPLETE) && context.supportsSystem(exc.getSystem())) {
    excludeCodes(context.expandVS(exc, false), params);
    return;
  }

  for (ConceptReferenceComponent c : exc.getConcept()) {
    excludeCode(exc.getSystem(), c.getCode());
  }

  if (exc.getFilter().size() > 0)
    throw new NotImplementedException("not done yet");
}
 
Example #4
Source File: ValidationTestSuite.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
  IResourceValidator val = TestingUtilities.context(version).newValidator();
  List<ValidationMessage> valerrors = new ArrayList<ValidationMessage>();
  if (item instanceof Resource) {
    val.validate(appContext, valerrors, (Resource) item, url);
    boolean ok = true;
    for (ValidationMessage v : valerrors)
      ok = ok && v.getLevel().isError();
    return ok;
  }
  throw new NotImplementedException("Not done yet (IGPublisherHostServices.conformsToProfile), when item is element");
}
 
Example #5
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null);
}
 
Example #6
Source File: AccessPriorityList.java    From bartworks with MIT License 5 votes vote down vote up
@Override
    public boolean remove(Object o) {
//        Object p;
//        for (Iterator it = this.iterator(); it.hasNext(); o.equals(p)){
//            p = it.next();
//        }
        throw new NotImplementedException("");
    }
 
Example #7
Source File: TeamsActivityHandlerTests.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Override
public CompletableFuture<Void> deleteActivity(
    TurnContext context,
    ConversationReference reference
) {
    CompletableFuture<Void> result = new CompletableFuture<>();
    result.completeExceptionally(new NotImplementedException("deleteActivity"));
    return result;
}
 
Example #8
Source File: ToolsHelper.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
private void generateSnapshots(String[] args) throws IOException, FHIRException {
	if (args.length == 1) {
		System.out.println("tools.jar snapshot-maker [source] -defn [definitions]");
		System.out.println("");
		System.out.println("Generates a snapshot from a differential. The nominated profile must have a single struture that has a differential");
		System.out.println("");
		System.out.println("source - the profile to generate the snapshot for. Maybe a file name, or a URL reference to a server running FHIR RESTful API");
		System.out.println("definitions - filename for local copy of the validation.zip file");			
	}
	String address = args[1];
	String definitions = args[3];

	SimpleWorkerContext context = SimpleWorkerContext.fromDefinitions(getDefinitions(definitions));

	//    if (address.startsWith("http:") || address.startsWith("http:")) {
	//    	// this is on a restful interface
	//    	String[] parts = address.split("\\/Profile\\/");
	//    	if (parts.length != 2)
	//    		throw new FHIRException("Unable to understand address of profile");
	//    	StructureDefinition profile = context.fetchResource(StructureDefinition.class, parts[1]);
	//    	ProfileUtilities utils = new ProfileUtilities(context);
	//    	StructureDefinition base = utils.getProfile(profile, profile.getBase());
	//    	if (base == null)
	//    		throw new FHIRException("Unable to resolve profile "+profile.getBase());
	//    	utils.generateSnapshot(base, profile, address, profile.getName(), null, null);
	//    	// client.update(StructureDefinition.class, profile, parts[1]);
	//    } else {
	throw new NotImplementedException("generating snapshots not done yet (address = "+address+")");
	//    }
}
 
Example #9
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null);
}
 
Example #10
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null);
}
 
Example #11
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(ContactPoint c1, ContactPoint c2, Object profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we insist on system
 return matches(c1.getSystemElement(), c2.getSystemElement(), null) && matches(c1.getValue(), c2.getValue(), null);
}
 
Example #12
Source File: SnapShotGenerationTests.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
  IResourceValidator val = TestingUtilities.context().newValidator();
  List<ValidationMessage> valerrors = new ArrayList<ValidationMessage>();
  if (item instanceof Resource) {
    val.validate(appContext, valerrors, (Resource) item, url);
    boolean ok = true;
    for (ValidationMessage v : valerrors)
      ok = ok && v.getLevel().isError();
    return ok;
  }
  throw new NotImplementedException("Not done yet (IGPublisherHostServices.SnapShotGenerationTestsContext), when item is element");
}
 
Example #13
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(ContactPoint c1, ContactPoint c2, Object profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we insist on system
 return matches(c1.getSystemElement(), c2.getSystemElement(), null) && matches(c1.getValue(), c2.getValue(), null);
}
 
Example #14
Source File: MemoryConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
protected <T> CompletableFuture<T> notImplemented(String message) {
    CompletableFuture<T> result = new CompletableFuture<>();
    result.completeExceptionally(
        new NotImplementedException(message)
    );
    return result;
}
 
Example #15
Source File: TeamsActivityHandlerTests.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Override
public CompletableFuture<ResourceResponse> updateActivity(
    TurnContext context,
    Activity activity
) {
    CompletableFuture<ResourceResponse> result = new CompletableFuture<>();
    result.completeExceptionally(new NotImplementedException("updateActivity"));
    return result;
}
 
Example #16
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null);
}
 
Example #17
Source File: QuestionnaireBuilder.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
private void addExtensionQuestions(StructureDefinition profile, QuestionnaireItemComponent group, ElementDefinition element, String path, String url, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { 
  // if this a  profiled extension, then we add it
	if (!Utilities.noString(url)) {
		StructureDefinition ed =  context.fetchResource(StructureDefinition.class, url);
		if (ed != null) {
      if (answerGroups.size() > 0)
        throw new NotImplementedException("Debug this");
			buildQuestion(group, profile, ed.getSnapshot().getElement().get(0), path+".extension["+url+"]", answerGroups);
    }
  }
}
 
Example #18
Source File: DefaultRetriever.java    From freeacs with MIT License 5 votes vote down vote up
@Override
public Report<?> generateReport(
    PeriodType periodType,
    Date start,
    Date end,
    List<Unittype> unittypes,
    List<Profile> profiles,
    Group group)
    throws SQLException, IOException {
  throw new NotImplementedException("The report is not implemented correctly.");
}
 
Example #19
Source File: ToolsHelper.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
private void generateSnapshots(String[] args) throws IOException, FHIRException {
		if (args.length == 1) {
			System.out.println("tools.jar snapshot-maker [source] -defn [definitions]");
			System.out.println("");
			System.out.println("Generates a snapshot from a differential. The nominated profile must have a single struture that has a differential");
			System.out.println("");
			System.out.println("source - the profile to generate the snapshot for. Maybe a file name, or a URL reference to a server running FHIR RESTful API");
			System.out.println("definitions - filename for local copy of the validation.zip file");			
		}
	  String address = args[1];
	  String definitions = args[3];
	  
    SimpleWorkerContext context = SimpleWorkerContext.fromDefinitions(getDefinitions(definitions));

//    if (address.startsWith("http:") || address.startsWith("http:")) {
//    	// this is on a restful interface
//    	String[] parts = address.split("\\/Profile\\/");
//    	if (parts.length != 2)
//    		throw new FHIRException("Unable to understand address of profile");
//    	StructureDefinition profile = context.fetchResource(StructureDefinition.class, parts[1]);
//    	ProfileUtilities utils = new ProfileUtilities(context);
//    	StructureDefinition base = utils.getProfile(profile, profile.getBase());
//    	if (base == null)
//    		throw new FHIRException("Unable to resolve profile "+profile.getBase());
//    	utils.generateSnapshot(base, profile, address, profile.getName(), null, null);
//    	// client.update(StructureDefinition.class, profile, parts[1]);
//    } else {
    	throw new NotImplementedException("generating snapshots not done yet (address = "+address+")");
//    }
	}
 
Example #20
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(ContactPoint c1, ContactPoint c2, Object profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we insist on system
 return matches(c1.getSystemElement(), c2.getSystemElement(), null) && matches(c1.getValue(), c2.getValue(), null);
}
 
Example #21
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null);
}
 
Example #22
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(ContactPoint c1, ContactPoint c2, Object profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we insist on system
 return matches(c1.getSystemElement(), c2.getSystemElement(), null) && matches(c1.getValue(), c2.getValue(), null);
}
 
Example #23
Source File: ToolsHelper.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
private void generateSnapshots(String[] args) throws IOException, FHIRException {
	if (args.length == 1) {
		System.out.println("tools.jar snapshot-maker [source] -defn [definitions]");
		System.out.println("");
		System.out.println("Generates a snapshot from a differential. The nominated profile must have a single struture that has a differential");
		System.out.println("");
		System.out.println("source - the profile to generate the snapshot for. Maybe a file name, or a URL reference to a server running FHIR RESTful API");
		System.out.println("definitions - filename for local copy of the validation.zip file");			
	}
	String address = args[1];
	String definitions = args[3];

	SimpleWorkerContext context = SimpleWorkerContext.fromDefinitions(getDefinitions(definitions));

	//    if (address.startsWith("http:") || address.startsWith("http:")) {
	//    	// this is on a restful interface
	//    	String[] parts = address.split("\\/Profile\\/");
	//    	if (parts.length != 2)
	//    		throw new FHIRException("Unable to understand address of profile");
	//    	StructureDefinition profile = context.fetchResource(StructureDefinition.class, parts[1]);
	//    	ProfileUtilities utils = new ProfileUtilities(context);
	//    	StructureDefinition base = utils.getProfile(profile, profile.getBase());
	//    	if (base == null)
	//    		throw new FHIRException("Unable to resolve profile "+profile.getBase());
	//    	utils.generateSnapshot(base, profile, address, profile.getName(), null, null);
	//    	// client.update(StructureDefinition.class, profile, parts[1]);
	//    } else {
	throw new NotImplementedException("generating snapshots not done yet (address = "+address+")");
	//    }
}
 
Example #24
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null);
}
 
Example #25
Source File: Comparison.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) {
 if (profile != null) 
 	throw new NotImplementedException("Not Implemented Yet");

 // in the absence of a profile, we ignore version
 return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null);
}
 
Example #26
Source File: TeamsActivityHandlerTests.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Override
public CompletableFuture<ResourceResponse[]> sendActivities(
    TurnContext context,
    List<Activity> activities
) {
    CompletableFuture<ResourceResponse[]> result = new CompletableFuture<>();
    result.completeExceptionally(new NotImplementedException("sendActivities"));
    return result;
}
 
Example #27
Source File: NarrativeGenerator.java    From org.hl7.fhir.core with Apache License 2.0 4 votes vote down vote up
private void renderLeaf(ResourceWrapper res, BaseWrapper ew, ElementDefinition defn, XhtmlNode x, boolean title, boolean showCodeDetails, Map<String, String> displayHints) throws FHIRException, UnsupportedEncodingException, IOException {
  if (ew == null)
    return;

  Base e = ew.getBase();

  if (e instanceof StringType)
    x.addText(((StringType) e).getValue());
  else if (e instanceof CodeType)
    x.addText(((CodeType) e).getValue());
  else if (e instanceof IdType)
    x.addText(((IdType) e).getValue());
  else if (e instanceof Extension)
    x.addText("Extensions: Todo");
  else if (e instanceof InstantType)
    x.addText(((InstantType) e).toHumanDisplay());
  else if (e instanceof DateTimeType)
    x.addText(((DateTimeType) e).toHumanDisplay());
  else if (e instanceof Base64BinaryType)
    x.addText(new Base64().encodeAsString(((Base64BinaryType) e).getValue()));
  else if (e instanceof org.hl7.fhir.dstu2.model.DateType)
    x.addText(((org.hl7.fhir.dstu2.model.DateType) e).toHumanDisplay());
  else if (e instanceof Enumeration) {
    Object ev = ((Enumeration<?>) e).getValue();
	x.addText(ev == null ? "" : ev.toString()); // todo: look up a display name if there is one
  } else if (e instanceof BooleanType)
    x.addText(((BooleanType) e).getValue().toString());
  else if (e instanceof CodeableConcept) {
    renderCodeableConcept((CodeableConcept) e, x, showCodeDetails);
  } else if (e instanceof Coding) {
    renderCoding((Coding) e, x, showCodeDetails);
  } else if (e instanceof Annotation) {
    renderAnnotation((Annotation) e, x);
  } else if (e instanceof Identifier) {
    renderIdentifier((Identifier) e, x);
  } else if (e instanceof org.hl7.fhir.dstu2.model.IntegerType) {
    x.addText(Integer.toString(((org.hl7.fhir.dstu2.model.IntegerType) e).getValue()));
  } else if (e instanceof org.hl7.fhir.dstu2.model.DecimalType) {
    x.addText(((org.hl7.fhir.dstu2.model.DecimalType) e).getValue().toString());
  } else if (e instanceof HumanName) {
    renderHumanName((HumanName) e, x);
  } else if (e instanceof SampledData) {
    renderSampledData((SampledData) e, x);
  } else if (e instanceof Address) {
    renderAddress((Address) e, x);
  } else if (e instanceof ContactPoint) {
    renderContactPoint((ContactPoint) e, x);
  } else if (e instanceof UriType) {
    renderUri((UriType) e, x);
  } else if (e instanceof Timing) {
    renderTiming((Timing) e, x);
  } else if (e instanceof Range) {
    renderRange((Range) e, x);
  } else if (e instanceof Quantity) {
    renderQuantity((Quantity) e, x, showCodeDetails);
  } else if (e instanceof Ratio) {
    renderQuantity(((Ratio) e).getNumerator(), x, showCodeDetails);
    x.addText("/");
    renderQuantity(((Ratio) e).getDenominator(), x, showCodeDetails);
  } else if (e instanceof Period) {
    Period p = (Period) e;
    x.addText(!p.hasStart() ? "??" : p.getStartElement().toHumanDisplay());
    x.addText(" --> ");
    x.addText(!p.hasEnd() ? "(ongoing)" : p.getEndElement().toHumanDisplay());
  } else if (e instanceof Reference) {
    Reference r = (Reference) e;
    XhtmlNode c = x;
    ResourceWithReference tr = null;
    if (r.hasReferenceElement()) {
      tr = resolveReference(res, r.getReference());
      if (!r.getReference().startsWith("#")) {
        if (tr != null && tr.getReference() != null)
          c = x.addTag("a").attribute("href", tr.getReference());
        else
          c = x.addTag("a").attribute("href", r.getReference());
      }
    }
    // what to display: if text is provided, then that. if the reference was resolved, then show the generated narrative
    if (r.hasDisplayElement()) {
      c.addText(r.getDisplay());
      if (tr != null) {
        c.addText(". Generated Summary: ");
        generateResourceSummary(c, tr.getResource(), true, r.getReference().startsWith("#"));
      }
    } else if (tr != null) {
      generateResourceSummary(c, tr.getResource(), r.getReference().startsWith("#"), r.getReference().startsWith("#"));
    } else {
      c.addText(r.getReference());
    }
  } else if (e instanceof Resource) {
    return;
  } else if (e instanceof ElementDefinition) {
    x.addText("todo-bundle");
  } else if (e != null && !(e instanceof Attachment) && !(e instanceof Narrative) && !(e instanceof Meta))
    throw new NotImplementedException("type "+e.getClass().getName()+" not handled yet");
}
 
Example #28
Source File: MessageHelper.java    From sailfish-core with Apache License 2.0 4 votes vote down vote up
public IMessage prepareMessageToEncode(Map<String, Object> message, Map<String, String> params) {
    throw new NotImplementedException("");
}
 
Example #29
Source File: AccessPriorityListIterators.java    From bartworks with MIT License 4 votes vote down vote up
@Override
public void add(E e) {
    throw new NotImplementedException("Not Implemented");
}
 
Example #30
Source File: StubUserService.java    From Spring with Apache License 2.0 4 votes vote down vote up
@Override
public void deleteById(Long id) {
    throw new NotImplementedException("[DELETE] Not to be used at the moment.");
}